Typical scene generation-based double-layer configuration optimization method for wind-solar electrolytic hydrogen production system

By using dynamic programming and particle swarm optimization algorithms generated based on typical scenarios, the component configuration of the wind and solar photovoltaic hydrogen production system is optimized, which solves the problems of low computational efficiency and poor optimization effect in existing methods and achieves efficient system configuration optimization.

CN120808971APending Publication Date: 2025-10-17SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510868921.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing wind-photovoltaic electrolysis hydrogen production system configuration optimization methods lack the design from the perspective of environmental input conditions, resulting in low computational efficiency and poor optimization effect.

Method used

A dynamic programming method based on typical scenario generation is used for inner-layer energy management, and a particle swarm optimization algorithm is combined for outer-layer configuration optimization. By establishing a probability distribution model of typical wind and solar scenarios and Latin hypercube sampling, the scenario set is reduced, and dynamic programming and particle swarm optimization algorithms are designed to optimize the number of components and energy management.

Benefits of technology

A good balance between optimization performance and computational efficiency is achieved, which significantly shortens the computation time, reduces the unit hydrogen production cost, and improves the economy and accuracy of system configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808971A_ABST
    Figure CN120808971A_ABST
Patent Text Reader

Abstract

The invention discloses a typical scene generation-based double-layer configuration optimization method for a wind-solar electrolytic hydrogen production system, and the method comprises the steps: carrying out the configuration searching optimization of an outer layer through employing a particle swarm optimization algorithm, and carrying out the energy management of an inner layer through employing a scene generation-based dynamic planning method; during inner-layer energy management, data of a combined typical scene is used as alternative input of original one-year environment data, the overall optimization target is to minimize the unit hydrogen production cost, and constraint conditions comprise a total hydrogen production capacity constraint, a component number constraint and a power constraint; according to the algorithm framework, an inner layer carries out optimal power distribution decision making according to a fixed configuration scheme, a corresponding objective function value is fed back to an outer layer, and the outer layer searches an optimal decision variable combination in a constraint interval by adopting a PSO algorithm. According to the method, good balance between optimization performance and calculation efficiency can be obviously achieved, and important theoretical reference and technical support are provided for system construction and capacity configuration optimization in related fields.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of energy system capacity configuration optimization, and particularly relates to a wind-solar-electrolysis hydrogen production system double-layer configuration optimization method based on typical scenario generation. BACKGROUND

[0002] In order to cope with the increasingly serious environmental problems and energy crisis, renewable energy such as solar energy and wind energy has been vigorously developed in the field of electric power. Due to the intermittent, random and fluctuating characteristics of renewable energy power generation, long-term large-scale energy storage technology is of great importance. Compared with traditional energy storage technologies such as batteries, flywheels and pumped storage, hydrogen has the advantages of high energy density and low carbon emission, and can be transported and used on a large scale, which is more suitable for long-term large-scale energy storage. Therefore, the configuration optimization of hydrogen production systems represented by wind energy and solar energy is of great theoretical and engineering significance to promote the efficient use of renewable energy.

[0003] In the configuration optimization of the system, the energy management method plays an important role. At present, the energy management method in the configuration optimization can be divided into rule-based method and planning-based method. The rule-based method is a method of power distribution in the system according to the preset rules or conditions, while the optimization-based method refers to the method of optimizing the problem to obtain the optimal power distribution sequence. The rule-based energy management method has the characteristics of simplicity and easy implementation, and can be adjusted according to different application scenarios and requirements, but the flexibility of this method is relatively poor, and there is no corresponding optimization target, resulting in generally poor optimization effect; the planning-based method has a more explicit optimization target, which can ensure that a higher accuracy can be found, but the calculation efficiency is relatively low. Therefore, designing a configuration optimization method with the advantages of the above two methods has become the research focus in the related field.

[0004] For configuration optimization, the environmental input condition is the fundamental factor to determine the size of the system configuration capacity. The commonly used analysis methods mainly include two types: one is to directly collect historical environmental data for a certain period of time (usually one year) and put it into the optimization problem for analysis and calculation; the other is to summarize the historical environmental data into several typical scenarios, and use the data of the scenarios as the basis for optimization problem calculation. The first method can obtain more accurate and reasonable configuration results, but the calculation time is generally longer. Therefore, the current research focuses on the second type of scenario analysis method, which realizes higher calculation efficiency while highlighting the key scenario conditions, so as to have higher potential research value. SUMMARY

[0005] In the current optimization method, there is a lack of a system configuration optimization method from the perspective of environmental input conditions. Therefore, in view of various problems in the above research, the application provides a wind and light electrolytic hydrogen production system double-layer configuration optimization method based on typical scene generation.

[0006] The wind and light electrolytic hydrogen production system double-layer configuration optimization method based on typical scene generation provided by the application adopts a dynamic programming (DP) method based on wind and light typical scene generation in the inner layer, and adopts a particle swarm optimization (PSO) algorithm in the outer layer; and specifically includes the following steps:

[0007] Step 1: establishment of a wind and light combined typical scene.

[0008] S1.1, a non-parametric kernel density estimation method is used to establish a probability distribution function model of each environmental variable, including wind speed, light intensity or temperature:

[0009]

[0010] In the formula, N represents the sample size, h represents the bandwidth, K ker represents the kernel function, and X i represents each data point in the sample data set.

[0011] S1.2, a Latin hypercube sampling method is used to obtain an initial scene set with a sample size of 10000.

[0012] S1.3, a K-means++ clustering algorithm is used for scene reduction to obtain a typical scene set of each variable.

[0013] S1.4, a scene combination, synchronous back substitution reduction method based on the Cartesian idea and a post-processing method considering extreme scenes are used to obtain a combined typical scene set and the corresponding occurrence probability.

[0014] Step 2: establishment of an optimization problem model of the inner layer energy management.

[0015] S2.1, the decision variable is defined as the charging and discharging power P bat of the battery, and the state variable is the energy state SOE of the battery:

[0016] u(k)=P bat (k)

[0017] x(k)=SOE(k)

[0018] S2.2, the objective function is defined as the annual hydrogen production of the system maximization:

[0019]

[0020] S2.3, define the photovoltaic power P pv (k), the wind power P wt (k) and the electrolyzer power P pem (k), then the relevant constraints of the inner layer are the power balance constraint, the electrolyzer power constraint and the battery-related constraint:

[0021] P pv (k) + P wt (k) + P bat (k) ≥ P pem (k)

[0022] P pem,min (k) ≤ P pem (k) ≤ P pem,max (k)

[0023] u min (k) ≤ u(k) ≤ u max (k)

[0024] Step 3: In the inner layer energy management, design a dynamic programming method based on typical scenario generation.

[0025] S3.1, discretize the state variables and decision variables at each time within their constraint range, and divide them into n-1 equal intervals, then get n evenly distributed points including the first and last ends, denoted as:

[0026]

[0027] In the formula, SOE1 and P bat,1 respectively represent the minimum value of the state variable SOE and the decision variable P bat in the constraint range at the current time, SOE n and P bat,n represent the corresponding maximum value.

[0028] S3.2, define the state transition equation, that is, the relationship between the state variable at this time and the state variable at the last time, the decision variable and the time:

[0029] x(k) = f[x(k+1), u(k+1), k+1]

[0030] In the formula, f represents the functional relationship of state transition.

[0031] S3.3, determine the optimization equation of the DP method in the decision-making process:

[0032]

[0033] In the formula, J N represents the cumulative hydrogen production of the system reaching the termination time N, The state variable at time N, that is, the boundary condition, L[x(k), u(k), k] represents a function expression of the hydrogen production amount at time k according to the state variable x(k) and the decision variable u(k).

[0034] Accordingly, the relationship between the cumulative hydrogen production amount at each time and the cumulative hydrogen production amount at the last calculation time is obtained:

[0035] J N-k [x(k)] = max u(k)∈Ω {L[x(k), u(k), k] + J N-k-1 [x(k+1)]}

[0036] In the formula, J N-k [x(k)] represents the cumulative hydrogen production amount corresponding to the state variable x(k) at time k, and Ω represents the constraint range of the decision variable u(k) at time k.

[0037] S3.4, starting from k=N, the decision variable matrix is solved in reverse order of time, that is, the optimal decision sequence corresponding to each discretized grid according to S3.1 is solved, and the optimal decision sequences of all grids together constitute the decision variable matrix.

[0038] S3.5, the unique optimal decision sequence is solved in the positive order of time, and the energy management process is completed.

[0039] Step 4: Establish the optimization problem model of the outer layer configuration search optimization.

[0040] S4.1, define the core component quantity as the outer layer decision variable:

[0041] N = [N pv ,N wt ,N pem , N bat ] T

[0042] S4.2, define the net present value cost C NPC,total of the system in the whole life cycle, the actual discount rate d, and the objective function as the minimum unit hydrogen production cost ζ LCOH of the system:

[0043]

[0044] S4.3, define the annual target hydrogen production amount deviation accuracy κ, and the constraint conditions are the component quantity constraint and the annual hydrogen production amount constraint:

[0045] N min ≤ N ≤ N max

[0046]

[0047] Step 5: Design the outer layer PSO algorithm to search the optimal decision variable combination in the outer layer constraint interval, so as to realize the economic optimization target of the system.

[0048] S5.1, define the initial information of particles, including the number of particle groups, the maximum number of iterations and the learning factor.

[0049] S5.2, initialize the position and speed of each particle:

[0050]

[0051] In the formula, x max and x min represent the maximum and minimum values of the particle position constraint, v max and v min represent the maximum and minimum values of the particle speed constraint, represents the configuration scheme corresponding to the i-th particle before the iteration starts.

[0052] S5.3, calculate the fitness function value corresponding to each particle:

[0053]

[0054] In the formula, ζ LCOH is the unit cost of hydrogen production.

[0055] S5.4, judge whether the individual optimal position vector p best,i and the global optimal position vector g best will be updated in the current iteration.

[0056] First, set the initial conditions g best = p best,i = f min (x i ) where f min (x i ) represents the particle fitness function value that makes ζ LCOH minimum in the particle population of the first iteration.

[0057] Then, according to the position of each particle in the current iteration number , if , then otherwise p best,i is unchanged; finally, if f(p best,i ) < f(g best ), then g best = p best,i , otherwise g best is unchanged.

[0058] S5.5, update the position and velocity of each particle in the next iteration:

[0059]

[0060] S5.6, return to step S5.3 for iterative loop calculation until the iteration number l meets the maximum iteration number, and output g best The corresponding configuration scheme is completed, and the configuration optimization calculation is completed.

[0061] Further, step S3.5 is specifically:

[0062] (1) Extract the decision variable u(k) at the kth moment from the decision variable matrix.

[0063] (2) Establish a polynomial regression equation of the decision variable u(k) and the state variable x(k) at the kth moment:

[0064] u(k) = α n ·[x(k)] n + α n-1 ·[x(k)] n-1 + … + α1·x(k) + α0

[0065] In the formula, α = [α1, α2, …, α n ] represents the coefficients of polynomial fitting.

[0066] (3) Calculate the SOE at the next moment according to the state transition equation:

[0067]

[0068] In the formula, η bat represents the charge and discharge efficiency of the battery, C bat,rate represents the rated capacity of a single battery, N bat represents the number of batteries, and Δk represents the sampling interval (1 hour).

[0069] (4) Iterative solution to obtain the global optimal decision sequence, that is, the battery power sequence, thereby completing the energy management process.

[0070] The beneficial technical effects of the present application are:

[0071] The application provides a wind-solar-electrolysis hydrogen production system configuration optimization method based on scene generation, wherein unit hydrogen production cost minimization is taken as an overall optimization target, an outer layer adopts a PSO algorithm for configuration optimization, and an inner layer adopts a DP method based on typical scene generation for energy management. BRIEF DESCRIPTION OF DRAWINGS

[0072] Figure 1 It is a topology diagram of an off-grid wind-solar-electrolysis hydrogen production system.

[0073] Figure 2 It is a structure diagram of a double-layer configuration optimization method based on scene generation.

[0074] Figure 3 It is a schematic diagram of an inner-layer dynamic programming method based on typical scenes.

[0075] Figure 4 It is environmental condition data of the Baxoi region in 2019. DETAILED DESCRIPTION

[0076] The application will be further described in detail below in combination with the drawings and specific implementation methods.

[0077] The wind-solar-electrolysis hydrogen production system as a whole comprises core components such as photovoltaic panels, wind turbines, storage batteries and electrolytic cells and auxiliary components such as AC-DC and DC-DC converters, and since the ultimate goal is to obtain a capacity configuration scheme of the core components, the application does not consider the influence of the auxiliary components.

[0078] Figure 1 A topology structure schematic diagram of the wind-solar-electrolysis hydrogen production system is shown. The working principle of the system is that the electric energy of the power generation unit (photovoltaic array and wind turbine set) is converged to a DC bus after being cooperatively controlled; then, dynamic scheduling is performed according to the energy management method to realize power distribution of the storage battery and the electrolytic cell; finally, the hydrogen produced by the electrolytic cell is transported to the hydrogen storage tank for storage. The entire system realizes reasonable storage and utilization of electric energy and hydrogen energy through the configuration optimization method.

[0079] A double-layer configuration optimization method for a wind-solar-electrolysis hydrogen production system based on typical scene generation according to the application is shown in Figure 2 The inner layer adopts a dynamic programming (DP) method based on typical wind-solar scenes, and the outer layer adopts a particle swarm optimization (PSO) algorithm; and the method specifically comprises the following steps:

[0080] Step 1: Establishment of a typical scene of wind-solar combination.

[0081] S1.1, the non-parametric kernel density estimation method is adopted to establish the probability distribution function model of each environmental variable, including wind speed, light intensity or temperature:

[0082]

[0083] In the formula, N represents the sample size, h represents the bandwidth, K ker represents the kernel function, and X i represents each data point in the sample data set.

[0084] S1.2, the Latin hypercube sampling method is adopted to obtain an initial scene set with a sample size of 10000.

[0085] S1.3, the K-means++ clustering algorithm is adopted to reduce the scene to obtain a typical scene set of each variable.

[0086] S1.4, the scene combination, synchronous back substitution reduction method based on Cartesian idea and post-processing method considering extreme scene are adopted to obtain the joint typical scene set and the corresponding occurrence probability.

[0087] Step 2: Establish the optimization problem model of inner energy management.

[0088] S2.1, define the decision variable as the charge and discharge power P bat of the battery, and the state variable as the state of energy SOE of the battery:

[0089] u(k)=P bat (k)

[0090] x(k)=SOE(k)

[0091] S2.2, define the objective function as the annual hydrogen production of the system maximize:

[0092]

[0093] S2.3, define the photovoltaic power P pv (k), the wind power P wt (k) and the electrolyzer power P pem (k), then the related constraints of the inner layer are the power balance constraint, the electrolyzer power constraint and the battery related constraint:

[0094] P pv (k)+P wt (k)+P bat (k)≥P pem (k)

[0095] P pem,min (k)≤P pem (k)≤Ppem,max (k)

[0096] u min (k)≤u(k)≤u max (k)

[0097] Step 3: In the inner layer energy management, a dynamic programming method based on typical scenario generation is designed, such as Figure 3 shown.

[0098] S3.1. Discretize the state variables and decision variables at each moment within their constraints and divide them into n-1 equally spaced intervals. This results in n evenly distributed points, including the beginning and the end, expressed as:

[0099]

[0100] Where, SOE1 and P bat,1 Represent the state variable SOE and decision variable P respectively bat The minimum value within the current constraint range, SOE n and P bat,n It represents the corresponding maximum value.

[0101] S3.2. Define the state transition equation, that is, the relationship between the state variables at this moment and the state variables, decision variables, and time at the previous moment:

[0102] x(k)=f[x(k+1),u(k+1),k+1]

[0103] Where f represents the functional relationship of state transition.

[0104] Specifically, it can be expressed as:

[0105]

[0106] Where x(k) represents the state variable SOE of the battery at time k, u(k-1) represents the charge and discharge power (decision variable) of the battery at time k-1, and η bat Indicates the battery charge and discharge efficiency, C bat,rate is the rated capacity of a single battery, and Δk represents the sampling interval of the input data (1 hour).

[0107] S3.3. Determine the optimization equation of the DP method in the decision-making process:

[0108]

[0109] Where, J N Indicates the cumulative hydrogen production of the system at the end time N, It represents the state quantity at time N, that is, the boundary condition. L[x(k),u(k),k] represents the function expression of the hydrogen production at time k obtained based on the state variable x(k) and the decision variable u(k).

[0110] Based on this, the relationship between the cumulative hydrogen production at each moment and the previous calculation moment is obtained:

[0111] J N-k [x(k)]=max u(k)∈Ω {L[x(k),u(k),k]+J N-k-1 [x(k+1)]}

[0112] Where, J N-k [x(k)] represents the cumulative hydrogen production corresponding to the state variable x(k) at time k, and Ω represents the constraint range of the decision variable u(k) at time k.

[0113] S3.4. Starting from k=N, solve the decision variable matrix in reverse chronological order. That is, according to each discretized grid in S3.1, solve the corresponding optimal decision sequence. The optimal decision sequences of all grids together constitute the decision variable matrix.

[0114] S3.5. Solve the unique optimal decision sequence in time sequence to complete the energy management process.

[0115] (1) Extract the decision variable u(k) at the kth moment from the decision variable matrix.

[0116] (2) Establish the polynomial regression equation of the decision variable u(k) and the state variable x(k) at time k:

[0117] u(k)=α n ·[x(k)] n +α n-1 ·[x(k)] n-1 +…+α1·x(k)+α0

[0118] In the formula, α = [α1, α2,..., α n ] represents the coefficients of the polynomial fit.

[0119] (3) Calculate the SOE at the next moment according to the state transition equation:

[0120]

[0121] Where η bat Indicates the charge and discharge efficiency of the battery, C bat,rate Indicates the rated capacity of a single battery, N bat represents the number of batteries, and Δk represents the sampling interval (1 hour).

[0122] (4) Iterative solution to obtain the global optimal decision sequence, that is, the battery power sequence, so as to complete the energy management process.

[0123] The application innovatively constructs a dynamic programming method containing scenario generation to carry out inner energy management, and the specific steps are as follows:

[0124] (1) Determine the wind speed data v(i, k), the light intensity data S(i, k), the temperature data T(i, k) in the ith joint typical scenario and the scenario occurrence probability p i .

[0125] (2) Adopt the dynamic programming method to carry out energy management in units of joint typical scenarios, determine the battery power decision sequence u com (i, k) and the corresponding total hydrogen production amount

[0126] (3) According to the total number of days T day of one year, the total hydrogen production amount of each scenario and the scenario occurrence probability p i , approximately calculate the total hydrogen production amount of one year.

[0127] (4) Calculate the corresponding unit hydrogen production cost and return to the outer layer for configuration search optimization.

[0128] Step 4: Establish the optimization problem model of the outer layer configuration search optimization.

[0129] S4.1, define the core component number as the outer layer decision variable:

[0130] N=[N pv ,N wt ,N pem , N bat ] T

[0131] S4.2, define the net present value cost C NPC,total of the system in the whole life cycle, the actual discount rate d, and the objective function as the unit hydrogen production cost ζ LCOH minimization:

[0132]

[0133] S4.3, define the annual target hydrogen production amount deviation accuracy k, and the constraint conditions are the component number constraint and the annual hydrogen production amount constraint:

[0134] N min ≤N≤N max

[0135]

[0136] Step 5: Design the outer PSO algorithm to search for the optimal combination of decision variables within the outer constraint interval to achieve the optimal economic goal of the system.

[0137] S5.1. Define the initial information of the particles, including the number of particle swarms, the maximum number of iterations, and the learning factor.

[0138] S5.2. Initialize the position and velocity of each particle:

[0139]

[0140] Where x max and x min Indicates the maximum and minimum values ​​of the particle position constraint, v max and v min Indicates the maximum and minimum values ​​of the particle velocity constraint, Represents the configuration scheme corresponding to the i-th particle before the iteration begins.

[0141] S5.3. Calculate the fitness function value corresponding to each particle:

[0142]

[0143] Where, ζ LCOH The unit hydrogen production cost.

[0144] S5.4. Determine the optimal individual position vector p of the particle best,i and the global optimal position vector g best Whether an update will occur in the current iteration.

[0145] First, set the initial condition g best =p best,i =f min (x i ), where f min (x i ) means that in the first iteration of the particle population, ζ LCOH The minimum particle fitness function value.

[0146] Then, based on the position of each particle at the current iteration Make a judgment, if but Otherwise p best,i unchanged; finally, if f(p best,i )<f(g best ), then g best =p best,i , otherwise g bestInvariable.

[0147] S5.5, update the position and velocity of each particle in the next iteration:

[0148]

[0149] S5.6, return to step S5.3 for iterative loop calculation until the iteration number l meets the maximum iteration number, and output g best The corresponding configuration scheme is completed, thereby completing the configuration optimization calculation.

[0150] In order to verify the effectiveness of the method, the present application takes Figure 4 The environmental data shown in the figure as the test object, adopts the double-layer configuration optimization method based on scene generation to carry out experiment, and compares with two kinds of traditional methods: particle swarm optimization-rule method (PSO-Rule) and particle swarm optimization-dynamic programming method (PSO-DP) based on 8760-hour environmental input, and the comparison results are as shown in Table 1.

[0151] Table 1 Comparison of configuration optimization results of the method and original one-year environmental conditions in Baxi region

[0152]

[0153] It can be found very obviously that the unit hydrogen production cost and the calculation time of the double-layer configuration optimization method based on scene generation are between the other two methods, which indicates that the method can achieve a good balance between optimization performance and calculation efficiency.

[0154] The present application proposes a particle swarm optimization-dynamic programming configuration optimization method based on scene generation for off-grid wind-solar electrolytic hydrogen production system, aiming at minimizing the unit hydrogen production cost of the system. The results show that the method can realize the reduction of input data scale on the premise of ensuring the accuracy of optimization calculation, thereby significantly shortening the calculation time, and providing a decision basis for the construction of related systems.

Claims

1. A two-layer configuration optimization method for a wind-photovoltaic hydrogen production system based on typical scenario generation, characterized in that: The inner layer adopts a dynamic programming method based on the generation of typical wind and solar scenarios, and the outer layer adopts a particle swarm optimization algorithm. The specific steps include: Step 1: Establishment of typical wind-solar combined scenarios; S1.

1. Use the nonparametric kernel density estimation method to establish a probability distribution function model for each environmental variable, including wind speed, light intensity, or temperature: In the formula, N represents the sample size, h represents the bandwidth, and K ker represents the kernel function, X i Represents each data point in the sample dataset; S1.

2. Use the Latin hypercube sampling method to obtain an initial scene set with a sample size of 10,000; S1.

3. Use K-means++ clustering algorithm to reduce scenarios and obtain a set of typical scenarios for each variable. S1.

4. Using a Cartesian-based scenario combination, simultaneous back-substitution reduction, and a post-processing method that considers extreme scenarios, we obtain a set of joint typical scenarios and their corresponding occurrence probabilities. Step 2: Establish an optimization problem model for inner layer energy management; S2.

1. Define the decision variable as the battery charge and discharge power P bat , the state variable is the battery's state of energy SOE: u(k)=P bat (k) x(k)=SOE(k) S2.

2. Define the objective function as the annual hydrogen production of the system maximize: S2.

3. Define photovoltaic power generation power P pv (k), wind power P wt (k) and electrolytic cell power P pem (k), then the related constraints in the inner layer are power balance constraints, electrolyzer power constraints and battery-related constraints: P pv (k)+P wt (k)+P bat (k)≥P pem (k) P pem,min (k)≤P pem (k)≤P pem,max (k) you min (k)≤u(k)≤u max (k) Step 3: In the inner layer energy management, a dynamic programming method based on typical scenario generation is designed; S3.

1. Discretize the state variables and decision variables at each moment within their constraints and divide them into n-1 equally spaced intervals. This results in n evenly distributed points, including the beginning and the end, expressed as: In the formula, SOE1 and P bat,1 Represent the state variable SOE and decision variable P respectively bat The minimum value within the current constraint range, SOE n and P bat,n It represents the corresponding maximum value; S3.

2. Define the state transition equation, that is, the relationship between the state variables at this moment and the state variables, decision variables, and time at the previous moment: x(k)=f[x(k+1),u(k+1),k+1] In the formula, f represents the functional relationship of state transition; S3.

3. Determine the optimization equation of the DP method in the decision-making process: Where, J N Indicates the cumulative hydrogen production of the system at the end time N, represents the state variable at time N, that is, the boundary condition, and L[x(k),u(k),k] represents the function expression of the hydrogen production at time k obtained based on the state variable x(k) and the decision variable u(k); Based on this, the relationship between the cumulative hydrogen production at each moment and the previous calculation moment is obtained: J N-k [x(k)]=max u(k)∈Ω {L[x(k), u(k), k]+J N-k-1 [x(k+1)]} Where, J N-k [x(k)] represents the cumulative hydrogen production corresponding to the state variable x(k) at time k, and Ω represents the constraint range of the decision variable u(k) at time k; S3.

4. Starting from k=N, solve the decision variable matrix in reverse chronological order. That is, for each discretized grid in S3.1, solve the corresponding optimal decision sequence. The optimal decision sequences of all grids together constitute the decision variable matrix. S3.

5. Solve the unique optimal decision sequence in time order to complete the energy management process; Step 4: Establish an optimization problem model for outer configuration search; S4.

1. Define the outer decision variables as the number of core components: N=[N pv ,N wt ,N pem ,N bat ] T S4.

2. Define the net present value cost C of the system over its entire life cycle NPC,total , actual discount rate d, the objective function is the unit hydrogen production cost ζ of the system LCOH Minimize: S4.

3. Define annual target hydrogen production Deviation accuracy κ, the constraints are the number of components and the annual hydrogen production: N min ≤N≤N max Step 5: Design the outer PSO algorithm to search for the optimal combination of decision variables within the outer constraint interval to achieve the optimal economic goal of the system; S5.

1. Define the initial information of the particles, including the number of particle swarms, the maximum number of iterations, and the learning factor; S5.

2. Initialize the position and velocity of each particle: Where x max and x min Indicates the maximum and minimum values ​​of the particle position constraint, v max and v min Indicates the maximum and minimum values ​​of the particle velocity constraint, represents the configuration scheme corresponding to the i-th particle before the iteration begins; S5.

3. Calculate the fitness function value corresponding to each particle: Where, ζ LCOH is the unit hydrogen production cost; S5.

4. Determine the optimal individual position vector p of the particle best,i and the global optimal position vector g best Whether updates will occur in the current iteration; First, set the initial condition g best =p best,i =f min (x i ), where f min (x i ) means that in the first iteration of the particle population, ζ LCOH The minimum particle fitness function value; Then, based on the position of each particle at the current iteration Make a judgment, if but Otherwise p best,i unchanged; finally, if f(p best,i )<f(g best ), then g best =p best,i , otherwise g best constant; S5.

5. Update the position and velocity of each particle in the next iteration: S5.6, return to step S5.3 and perform iterative loop calculation until the number of iterations l meets the maximum number of iterations and then exit the loop, outputting the current g best The corresponding configuration scheme is used to complete the configuration optimization calculation.

2. The double-layer configuration optimization method for a wind-photovoltaic hydrogen production system based on typical scenario generation according to claim 1 is characterized in that: The step S3.5 is specifically as follows: (1) Extract the decision variable u(k) at the kth moment from the decision variable matrix; (2) Establish the polynomial regression equation of the decision variable u(k) and the state variable x(k) at time k: u(k)=a n ·[x(k)] n +a n-1 ·[x(k)] n-1 +…+α1·x(k)+α0 In the formula, α = [α1, α2,..., α n ] represents the coefficient of polynomial fitting; (3) Calculate the SOE at the next moment according to the state transfer equation: Where η bat Indicates the charge and discharge efficiency of the battery, C bat,rate Indicates the rated capacity of a single battery, N bat represents the number of batteries, Δk represents the sampling interval; (4) Iterative solution is used to obtain the global optimal decision sequence, that is, the battery power sequence, thereby completing the energy management process.