Double-layer optimization scheduling method for hydrogen energy heavy truck and wind-solar collaborative carbon reduction
By generating typical scenarios through Latin hypercube sampling and K-means clustering, and combining MC to simulate the operating characteristics of hydrogen heavy-duty trucks, a two-layer optimization scheduling model was constructed, which solved the uncertainty and carbon emission problems of the new energy system and achieved efficient utilization of new energy and low-carbon transformation.
Patent Information
- Application Number
- CN202510893637.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-27
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
The randomness and intermittency of new energy sources such as wind power and photovoltaics lead to shocks to the power system. Traditional coal-transporting heavy trucks have high carbon emissions, and there is a lack of effective optimized scheduling methods for coordinated carbon reduction between hydrogen heavy trucks and wind and solar power.
Latin hypercube sampling and K-means clustering are used to generate typical scenarios. Combined with MC to simulate the operating characteristics of hydrogen heavy trucks, a two-layer optimization scheduling model is constructed. Hydrogen is produced through wind and solar collaborative power generation, equipment capacity and power configuration are optimized, and a demand response strategy is introduced.
Maximize the absorption of new energy, reduce carbon emissions and economic costs, realize the replacement of fossil energy with hydrogen energy, and improve the stability and economy of hydrogen supply.
Smart Images

Figure CN120806465A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of new energy hydrogen production, and particularly relates to a double-layer optimization scheduling method for hydrogen energy heavy truck and wind-solar coordinated carbon reduction. BACKGROUND
[0002] In recent years, new energy such as wind power and photovoltaic power has developed rapidly, but it has uncertainty problems such as randomness, volatility and intermittency. Large-scale grid connection will cause impact on the power system, and hydrogen, which is clean, zero-carbon, high in calorific value and widely used, is considered to be the energy carrier and storage medium in the future. As a new type of energy storage method, hydrogen can realize energy time shift, and closely combines new energy and new energy heavy truck, which has important practical significance for the green and low-carbon transformation of the power industry and the transportation field. In view of the environmental problems such as large fossil fuel consumption and high carbon emission of traditional coal heavy truck, combined with the unique geographical location and rich wind and solar resources in Xinjiang, a wind-solar hydrogen energy heavy truck coordinated carbon reduction operation mode considering demand response is proposed. According to the operation characteristics of fuel heavy truck and hydrogen energy heavy truck, energy consumption flexibility modeling is carried out, a hydrogen energy heavy truck carbon trading model is constructed, and a hydrogen supply stability evaluation index is proposed. The upper layer capacity configuration model minimizes the annual investment cost, and the lower layer optimization scheduling model optimizes the daily operation cost as the objective function, and a double-layer collaborative low-carbon optimization scheduling strategy of 'wind-solar-hydrogen energy heavy truck' is developed. The double-layer model is converted into a single-layer linear model for solving by using the Karush-Kuhn-Tucher (KKT) condition and the Big-M method. Through example analysis, it is shown that the application can maximize the consumption of new energy, effectively reduce carbon emission and economic cost, and realize the replacement of fossil energy by hydrogen energy. SUMMARY
[0003] To solve the problems in the prior art, the purpose of the application is to provide a double-layer optimization scheduling method for hydrogen energy heavy truck and wind-solar coordinated carbon reduction. To achieve the above purpose, the technical scheme of the application is as follows.
[0004] The double-layer optimization scheduling method for hydrogen energy heavy truck and wind-solar coordinated carbon reduction comprises the following steps.
[0005] S1S1 wind-solar power and hydrogen uncertainty analysis
[0006] S1.S1.1 scene generation based on Latin hypercube sampling
[0007] The Latin hypercube sampling (LHS) method belongs to stratified sampling, and is different from the Monte Carlo (MC) method. The sampling strategy is improved to make the sampling accuracy and efficiency higher. The wind-solar output and the electric and hydrogen load both conform to the normal distribution, so that large-scale scene generation is realized.
[0008] S1.2 Scene reduction based on K-means clustering
[0009] The K-means clustering algorithm can classify the large-scale scenarios generated by LHS according to certain similarities, determine the number of clusters, and ultimately generate a number of typical scenarios. The Euclidean distance between scenario sets is used as a similarity metric. The K-means clustering algorithm reduces the large amount of wind, solar, and hydrogen data to six typical scenarios. The uncertainty output of wind, solar, and hydrogen is obtained by weighted summing the output of these typical scenarios and their probabilities.
[0010] S2 MC method to simulate the operating characteristics of hydrogen heavy trucks
[0011] Hydrogen is produced through the coordinated power generation of wind and solar power to ensure the normal operation of hydrogen heavy-duty trucks, and the power grid and energy storage provide auxiliary energy.
[0012] S2.1 Flexibility Modeling of Hydrogen Heavy-Duty Trucks
[0013] S2.1.1 MC simulation method
[0014] MC is a random sampling method that obtains its probability distribution based on the probability density function. The starting time is obtained by randomly generating some data and comparing it with the probability distribution. By randomly simulating the daily mileage of heavy trucks, the start time of hydrogen filling, and the initial capacity of hydrogen heavy trucks, a statistical model is constructed to predict the changing trend of heavy trucks in a scheduling cycle.
[0015] S2.1.2 Hydrogen Heavy Truck Travel Characteristics
[0016] 1) Daily mileage of hydrogen heavy-duty trucks
[0017]
[0018] Where: f(·) is the probability density of the daily mileage of the kth hydrogen heavy truck, which is described by the lognormal distribution, with the mean μ m =5.3, standard deviation σ m =0.35.
[0019] 2) When hydrogen heavy trucks start filling with hydrogen
[0020]
[0021] Where: f HDT (·)—the probability density of the kth hydrogen heavy truck arriving at the hydrogen refueling station, described by a truncated normal distribution with mean μ=17.6 and standard deviation σ=3.4; —The time when the kth hydrogen heavy truck starts to charge hydrogen.
[0022] 3) Initial SOH of hydrogen heavy truck
[0023]
[0024] In the formula: f(k) - the initial SOH probability density of the kth hydrogen energy heavy truck, wherein the mean μ SOH = 17.6, standard deviation σ SOH = 0.05.
[0025] S2.1.3 Energy consumption characteristics of hydrogen energy heavy truck
[0026] According to the daily driving mileage probability density of the hydrogen energy heavy truck, the hydrogen consumption thereof can be obtained by calculation through formula (3).
[0027]
[0028] In the formula: - the hydrogen consumption per 100 km of the kth hydrogen energy heavy truck, kg; L k - the driving mileage of the kth hydrogen energy heavy truck, km; - the hydrogen consumption per 100 km of the hydrogen energy heavy truck, taken as 10 kg / 100 km; - the hydrogen refueling demand of the kth hydrogen energy heavy truck after driving on the same day, kg; SOH max - the maximum hydrogen storage state of the hydrogen storage tank of the hydrogen energy heavy truck; - the initial hydrogen storage state of the kth hydrogen energy heavy truck; C HST - the maximum capacity of the hydrogen storage tank of the hydrogen energy heavy truck, kg; M hfs - the total hydrogen refueling amount of the hydrogen refueling station, kg; N - the number of hydrogen energy heavy trucks.
[0029] S2.1.4 Hydrogen consumption demand analysis of hydrogen refueling station
[0030] The hydrogen refueling demand of the hydrogen refueling station refers to the situation that the station provides the required hydrogen for hydrogen fuel vehicles. The hydrogen refueling demand of the hydrogen refueling station depends on the hydrogen storage capacity of the vehicle, the target driving range, and the supply capacity of the hydrogen refueling station. When the hydrogen energy heavy truck has energy anxiety, that is, when the SOH of the hydrogen storage tank of the hydrogen energy heavy truck is less than the set minimum SOH, the hydrogen energy heavy truck is selected to enter the hydrogen refueling station, and the hydrogen refueling demand is met through the hydrogen refueling machine.
[0031] S2.2 Evaluation index of hydrogen supply stability
[0032] The present application mainly analyzes the system economy and low carbon property, but also considers the system hydrogen supply reliability, so the present application analyzes the hydrogen supply stability of the heavy truck from two angles, one is the equivalent hydrogen loss rate of the heavy truck, and the other is the equivalent hydrogen energy surplus rate of the heavy truck.
[0033] 1) Equivalent hydrogen loss rate of heavy truck
[0034]
[0035] In the formula: η loss - the equivalent hydrogen loss rate of the heavy truck; —t time point electricity purchase power; —t time point electricity storage discharge power; —t time point fuel cell power generation power; —t time point electricity consumption for hydrogen production.
[0036] 2) Heavy truck equivalent hydrogen energy surplus rate
[0037]
[0038] η = (P + P + P + P) / (P + P + P + P) extra —Heavy truck equivalent hydrogen energy surplus rate; —respectively, wind power, photovoltaic unit output coefficient; C w , C pv —respectively, wind farm, photovoltaic power station capacity; —respectively, t time point wind power, photovoltaic output.
[0039] S3 double-layer optimal scheduling model
[0040] S3.1 Upper layer capacity configuration model
[0041] S3.1.1 Upper layer objective function
[0042] The upper layer model takes the minimum investment and maintenance cost as the objective function, and the decision variable is the capacity of each device.
[0043]
[0044] In the formula: —Minimum investment and maintenance cost, yuan; f N —The investment and maintenance cost of each device, yuan, where N represents the wind farm, photovoltaic power station, hydrogen production device, electricity storage device and fuel cell; f hs —Hydrogen storage device investment and maintenance cost, yuan; f dep —The recovery benefit of each device, yuan.
[0045] 1) The investment and maintenance cost of each device is:
[0046]
[0047] In the formula: λ N —The unit investment cost of each device, yuan / kW; C N —The capacity of each device, kW; r—discount rate, take 0.067; ψ N —The service life of each device, take 15, 15, 20, 15, 20 years; λ N,om —The unit operation and maintenance cost coefficient of each device, yuan / kW; —t time point each device output, kW.
[0048] 2) Hydrogen storage device investment maintenance cost is:
[0049]
[0050] In the formula: λ hs — Hydrogen storage device unit investment cost, yuan / kg; C hs — Hydrogen storage device capacity, kg; ψ hs — Hydrogen storage device life, take 20 years.
[0051] 3) Each device recycling income
[0052]
[0053] In the formula: f dep — Total recycling income; f w,dep — Wind farm recycling income; λ' w — Wind farm recycling income coefficient. Each device recycling income coefficient is 25, 15, 30, 12, 10 yuan / kW, 5 yuan / kg, respectively.
[0054] S3.1.2 Upper constraint condition
[0055] 1) Each device capacity constraint
[0056] C N,min ≤ C N ≤ C N,max (11)
[0057] In the formula: C N,max , C N,min — Each device capacity upper and lower limit, kW.
[0058] 2) Hydrogen storage device hydrogen storage state and hydrogen charging and discharging rate constraint
[0059]
[0060] In the formula: T— Daily scheduling period, 24 hours; — Hydrogen storage device stored hydrogen amount at t and t-1 time, kg; — Hydrogen storage device hydrogen charging and discharging amount at t time, kg; η hs — Hydrogen storage device charging / discharging efficiency, take 0.98; — Hydrogen storage device scheduling start and end hydrogen storage amount, kg; μ hs,in , μ hs,dis — Charging / discharging state; H hs,max — Hydrogen storage device maximum hydrogen charging amount and discharging amount.
[0061] 3) Electric energy storage device state of charge and charging and discharging power constraint
[0062]
[0063] In the formula: —Energy storage capacity of the electric energy storage device at time t and time t-1; —Charging power of the electric energy storage device at time t, kW; η es —Charging and discharging efficiency of the electric energy storage device; —Scheduled storage capacity of the electric energy storage device; u es,c , u es,dis —Charging / discharging state of the electric energy storage device; P es,max —Maximum charging / discharging power of the electric energy storage device.
[0064] The state of hydrogen (SOH) of the hydrogen storage is:
[0065]
[0066] The state of charge (SOC) of the electric energy storage is:
[0067]
[0068] Due to the product term of 0-1 variable and continuous variable, the Big-M method is used for linearization.
[0069] S3.2 Lower-layer optimization scheduling model
[0070] S3.2.1 Lower-layer objective function
[0071] The lower-layer model takes the minimum operation cost as the objective function, and the power of each device as the optimization decision variable.
[0072]
[0073] In the formula: —Minimum cost of the lower-layer model, yuan; f run —Operation cost of each device, yuan; f P,buy —Purchase electricity cost, yuan; f H,buy —Purchase hydrogen cost, yuan; f w,aba —Penalty cost of abandoned wind, yuan; f pv,aba —Penalty cost of abandoned light, yuan; f hfs —Hydrogen addition cost, yuan; f DR —Demand response cost, yuan; f carbon —Carbon emission reduction benefit, yuan; f envir —New energy environmental benefit, yuan.
[0074] 1) Operation cost of each device
[0075]
[0076] wherein: λ N — coefficient of the operation cost of each device, 0.03 yuan / kW; λ hs — coefficient of the operation cost of hydrogen storage device, 0.5 yuan / kg.
[0077] 2) Cost of purchasing electricity from the grid
[0078]
[0079] wherein: μ H,buy — electricity price for purchasing electricity from the grid, time-of-use electricity price, yuan / kW; — electricity purchased from the grid at time t, kW.
[0080] 3) Cost of purchasing hydrogen from the market
[0081]
[0082] wherein: μ H,buy — hydrogen price for purchasing hydrogen from the market, time-of-use hydrogen price, yuan / kg; — hydrogen purchased from the market at time t, kg.
[0083] 4) Cost of wind curtailment penalty
[0084]
[0085] wherein: λ w,aba — coefficient of the cost of wind curtailment penalty, yuan / kW.
[0086] 5) Cost of light curtailment penalty
[0087]
[0088] 6) Cost of hydrogen addition
[0089]
[0090] wherein: λ hfs — coefficient of the cost of hydrogen addition, yuan / kg; — hydrogen consumption of the kth hydrogen energy heavy truck, kg.
[0091] 7) Cost of demand response
[0092]
[0093] wherein: — transferable electric and hydrogen load at time t, kW and kg; — reducible electric and hydrogen load at time t, kW and kg.
[0094] 8) Carbon emission reduction benefit
[0095] The carbon emission amount of the heavy fuel truck is reduced by 0.5 kg per 100 km compared with the heavy fuel truck.
[0096]
[0097] In the formula: E save,car —The carbon emission amount of the heavy fuel truck is reduced by 0.5 kg per 100 km compared with the heavy fuel truck; M hfs —The hydrogen refueling load of the hydrogen refueling station, that is, the hydrogen refueling load of the hydrogen energy truck, kg; —The hydrogen energy truck unit hydrogen energy driving range, 100 km / kg; E gas —The carbon emission amount of the heavy fuel truck is reduced by 0.5 kg per 100 km compared with the heavy fuel truck; —The hydrogen refueling load of the kth hydrogen energy truck; L hfs —The total daily driving range of the kth hydrogen energy truck; —The daily driving range of the kth hydrogen energy truck. The equivalent carbon emission amount of the hydrogen energy truck unit hydrogen refueling is not considered, that is, the equivalent carbon emission amount of the electricity required for hydrogen refueling purchased from the power grid on the power generation side is not considered. The carbon emission reduction benefit of the hydrogen energy truck is shown in formula (25).
[0098] f car = λ car E save,car (25)
[0099] In the formula: λ car —The carbon benefit coefficient, yuan / kg.
[0100] 9) New energy power generation environmental benefit
[0101]
[0102] In the formula: λ envir —The wind power and photovoltaic power generation environmental benefit coefficient, yuan / kW.
[0103] S3.2.2 Lower constraint condition
[0104] 1) Power balance constraint
[0105]
[0106] In the formula: —The basic electricity load.
[0107] 2) Hydrogen balance constraint
[0108]
[0109] In the formula: —The hydrogen consumption of the hydrogen energy truck at time t, kg; —The hydrogen output of the compressor at time t, kg; — Fuel cell hydrogen consumption, kg; η com — Compressor compression efficiency; — Electrolyzer hydrogen production at time t, kg; η el — Electrolyzer efficiency; — Hydrogen heat value, kW·h / kg; η fuel — Fuel cell efficiency.
[0110] 3) Transferable electricity-hydrogen load constraints
[0111]
[0112] 4) Individual device output constraints
[0113]
[0114] P = P + P + P el,max P = P + P + P fuel,max P = P + P + P buy,max — Respectively, the upper limit of electricity hydrogen, fuel cell, and electricity power, kW; H buy,max — The upper limit of hydrogen purchase, kg.
[0115] 5) Electricity-hydrogen demand response constraints
[0116]
[0117] 3.2.3 Electricity carbon emissions
[0118]
[0119] Q = Q + Q + Q carbon — Electricity generation carbon emissions, kg; δ carbon — Electricity carbon emission coefficient, take 1.08 kg / kW.
[0120] 3.3 Solution method of double-layer optimization model
[0121] The present application is based on Latin hypercube and K-means clustering to realize scenario generation and reduction to obtain wind-solar-hydrogen uncertain output, which is used for capacity configuration and optimal scheduling of the double-layer optimization model. Since the upper model has nonlinear constraints, the lower model belongs to mixed integer linear programming, and there is a certain coupling relationship between the upper and lower models, which is difficult to solve directly. The present application first constructs the Lagrangian function of the lower model, then converts the lower model into the constraint condition of the upper model according to the KKT complementary relaxation condition of the lower model, linearizes the nonlinear terms in the converted single-layer nonlinear model by Big-M method, and finally solves by using the CPLEX solver in MATLAB.
[0122] Compared with the prior art, the present application has the following beneficial effects:
[0123] The present application can effectively solve the problem of uncertainty of power supply and demand in Xinjiang region, and can maximize the use of clean energy resources, reduce energy consumption and carbon emissions by constructing an electricity-hydrogen-vehicle energy station architecture including wind-solar complementary hydrogen production, hydrogen storage and hydrogen energy heavy truck.
[0124] 1) The introduction of demand response strategy can optimize the power curve of electricity and hydrogen, reasonably allocate system capacity and optimize power, realize wind and light consumption, and have better economy.
[0125] 2) The hydrogen energy heavy truck is modeled flexibly, the MC is used to simulate its operation characteristics and the hydrogen consumption demand of hydrogen filling station is analyzed, and the hydrogen supply stability evaluation index can provide reference for the early investment and construction of each equipment.
[0126] 3) The capacity of each equipment is optimized and the output is optimized, and the comprehensive cost of wind-solar collaborative hydrogen production mode under demand response is 4.87% less than that of scene one, which has good economy, low carbon and hydrogen supply stability. BRIEF DESCRIPTION OF DRAWINGS
[0127] Figure 1 Model solution schematic diagram;
[0128] Figure 2 Electric power balance diagram;
[0129] Figure 3 Hydrogen mass balance diagram;
[0130] Figure 4 Hydrogen storage capacity change diagram;
[0131] Figure 5 Electricity and hydrogen demand response;
[0132] Figure 6 Effect of efficiency on capacity configuration. DETAILED DESCRIPTION
[0133] The technical scheme of the present application will be further described in combination with the drawings and specific embodiments:
[0134] The double-layer optimization scheduling method of hydrogen energy heavy truck and wind-solar collaborative carbon reduction comprises the following steps:
[0135] S1. Uncertainty analysis of wind-solar electricity and hydrogen
[0136] S1.1 Scene generation based on Latin hypercube sampling
[0137] The Latin hypercube sampling (LHS) method belongs to stratified sampling, and unlike the Monte Carlo (MC) method, it improves the sampling strategy to make the sampling accuracy and efficiency higher. The wind and light output and the electric hydrogen load both follow the normal distribution, thereby realizing large-scale scenario generation.
[0138] S1.2 Scenario reduction based on K-means clustering
[0139] The K-means clustering algorithm can classify the large-scale scenarios generated by LHS according to a certain similarity to determine the number of clusters, finally generate the number of typical scenarios, and take the Euclidean distance between the scenario sets as the similarity measurement standard. Through the K-means clustering algorithm, a large amount of wind, light, electricity and hydrogen data is reduced to six typical scenarios, and the typical scenario output is weighted and summed with its probability to obtain the wind, light, electricity and hydrogen uncertainty output.
[0140] S2 MC method simulates hydrogen energy heavy truck running characteristics
[0141] Through wind and light coordinated power generation for hydrogen production to ensure the normal operation of hydrogen energy heavy trucks, and power grid and energy storage auxiliary power supply.
[0142] S2.1 Flexibility modeling of hydrogen energy heavy truck
[0143] S2.1.1 MC simulation method
[0144] MC is a random sampling method, mainly based on the probability density function to obtain its probability distribution, and by randomly generating some data and comparing with the probability distribution to obtain the starting time; by randomly simulating the daily driving mileage of the heavy truck, the starting hydrogen charging time and the initial capacity of the hydrogen energy heavy truck, a statistical model is constructed to predict the trend of its change in a scheduling period.
[0145] S2.1.2 Hydrogen energy heavy truck travel characteristics
[0146] 1) Daily driving mileage of hydrogen energy heavy truck
[0147]
[0148] In the formula: f(·) is the probability density of the daily driving mileage of the kth hydrogen energy heavy truck, which is described by a lognormal distribution, where the mean μ m = 5.3, and the standard deviation σ m = 0.35.
[0149] 2) Starting hydrogen charging time of hydrogen energy heavy truck
[0150]
[0151] In the formula: f HDT(·)— The probability density of the time period when the kth hydrogen energy heavy truck arrives at the hydrogen refueling station, described by a truncated normal distribution, where the mean μ = 17.6 and the standard deviation σ = 3.4; — The time when the kth hydrogen energy heavy truck starts to be refueled.
[0152] 3) Initial SOH of hydrogen energy heavy truck
[0153]
[0154] In the formula: f(·)— The probability density of the initial SOH of the kth hydrogen energy heavy truck, where the mean μ = 17.6 and the standard deviation σ = 0.05. SOH SOH
[0155] S2.1.3 Energy consumption characteristics of hydrogen energy heavy truck
[0156] According to the daily driving mileage probability density of the hydrogen energy heavy truck, the daily driving mileage can be obtained, and then the hydrogen consumption can be calculated through formula (3).
[0157]
[0158] In the formula: — The hydrogen consumption per 100 km of the kth hydrogen energy heavy truck, kg; L k — The driving mileage of the kth hydrogen energy heavy truck, km; — The hydrogen consumption per 100 km of the hydrogen energy heavy truck, taken as 10 kg / 100 km; — The hydrogen refueling demand of the kth hydrogen energy heavy truck after driving on the same day, kg; SOH max — The maximum hydrogen storage state of the hydrogen energy heavy truck; — The initial hydrogen storage state of the kth hydrogen energy heavy truck; C HST — The maximum capacity of the hydrogen storage tank of the hydrogen energy heavy truck, kg; M hfs — The total hydrogen refueling amount of the hydrogen refueling station, kg; N— The number of hydrogen energy heavy trucks.
[0159] S2.1.4 Hydrogen consumption demand analysis of hydrogen refueling station
[0160] The hydrogen refueling demand of the hydrogen refueling station refers to the situation that the station provides the required hydrogen for hydrogen fuel vehicles. The hydrogen refueling demand of the hydrogen refueling station depends on the vehicle hydrogen storage capacity, target driving range, and hydrogen refueling station supply capacity. When the hydrogen energy heavy truck has energy anxiety, i.e., the hydrogen storage tank SOH of the hydrogen energy heavy truck is less than the set minimum SOH, it chooses to enter the hydrogen refueling station, and the hydrogen refueling demand is met through the hydrogen refueling machine.
[0161] S2.2 Evaluation index of hydrogen supply stability
[0162] The present application mainly analyzes the system economy and low carbon, but also considers the reliability of the system hydrogen supply, so the present application analyzes the heavy truck hydrogen supply stability from two angles, one is the equivalent hydrogen loss rate of heavy truck, and the other is the equivalent hydrogen energy surplus rate of heavy truck.
[0163] 1) The equivalent hydrogen loss rate of heavy truck
[0164]
[0165] In the formula: η loss The equivalent hydrogen loss rate of heavy truck; The electricity purchase power at t moment; The electricity storage energy discharge power at t moment; The fuel cell power generation power at t moment; The electricity consumption power of electric hydrogen production at t moment.
[0166] 2) The equivalent hydrogen energy surplus rate of heavy truck
[0167]
[0168] In the formula: η extra The equivalent hydrogen energy surplus rate of heavy truck; C and C respectively are the unit output coefficients of wind power and photovoltaic power; C w C and C respectively are the unit output coefficients of wind power and photovoltaic power; C pv C and C respectively are the wind power field and photovoltaic power station capacity; C and C respectively are the wind power and photovoltaic output at t moment.
[0169] S3 Double-layer optimization scheduling model
[0170] S3.1 Upper layer capacity configuration model
[0171] S3.1.1 Upper layer objective function
[0172] The upper layer model takes the minimum investment and maintenance cost as the objective function, and the decision variable is the capacity configuration of each device.
[0173]
[0174] In the formula: The minimum investment and maintenance cost is yuan; f N The investment and maintenance cost of each device is yuan, wherein N represents the wind power field, photovoltaic power station, electric hydrogen production device, electric energy storage device and fuel cell; f hs The investment and maintenance cost of hydrogen energy storage device is yuan; f dep The recovery income of each device is yuan.
[0175] 1) The investment and maintenance cost of each device is:
[0176]
[0177] Where: N —Unit investment cost of each equipment, yuan / kW; C N —Capacity of each device, kW; r—discount rate, take 0.067; ψ N —The operating life of each equipment is 15, 15, 20, 15, and 20 years; N,om —Unit operation and maintenance cost coefficient of each equipment, yuan / kW; —Output of each device at time t, kW.
[0178] 2) The investment and maintenance costs of hydrogen energy storage equipment are:
[0179]
[0180] Where: hs —Unit investment cost of hydrogen energy storage equipment, yuan / kg; C hs —Capacity of hydrogen energy storage equipment, kg; ψ hs —The life of hydrogen energy storage equipment is 20 years.
[0181] 3) Recycling income of each equipment
[0182]
[0183] Where: f dep —Total recovery income; f w,dep —Wind farm recovery income; λ' w — Wind farm recovery coefficient. The recovery coefficients for each device are 25, 15, 30, 12, 10 yuan / kW and 5 yuan / kg respectively.
[0184] S3.1.2 Upper-level constraints
[0185] 1) Capacity constraints of each device
[0186] C N,min ≤C N ≤C N,max (11)
[0187] Where: C N,max 、C N,min —Upper and lower limits of each equipment’s capacity, kW.
[0188] 2) Hydrogen energy storage equipment hydrogen charge state and hydrogen charging and discharging rate constraints
[0189]
[0190] Where: T—daily scheduling period, 24 hours; —The amount of hydrogen stored in the hydrogen energy storage device at time t and time t-1, kg; —hydrogen storage and generation amount of hydrogen storage device at time t, kg; η hs —hydrogen storage and generation efficiency of hydrogen storage device, 0.98; —hydrogen storage amount of hydrogen storage device at the beginning and end of scheduling, kg; μ hs,in 、μ hs,dis —hydrogen storage and generation state of hydrogen storage device; H hs,max —maximum hydrogen storage and generation amount of hydrogen storage device.
[0191] 3) State of Charge (SOC) and charging and discharging power constraints of electric energy storage device
[0192]
[0193] In the formula: —energy storage capacity of electric energy storage device at time t and time t-1; —charging power of electric energy storage device at time t, kW; η es —charging and discharging efficiency of electric energy storage device; —energy storage amount of electric energy storage device at the beginning and end of scheduling; u es,c 、u es,dis —charging and discharging state of electric energy storage device; P es,max —maximum charging and discharging power of electric energy storage device.
[0194] State of Hydrogen (SOH) of hydrogen storage is:
[0195]
[0196] State of Charge (SOC) of electric energy storage is:
[0197]
[0198] Due to the product term of 0-1 variable and continuous variable, Big-M method is used for linearization.
[0199] S3.2 Lower-layer optimization scheduling model
[0200] S3.2.1 Lower-layer objective function
[0201] The lower-layer model takes the minimum operation cost as the objective function, and the power of each device is the optimization decision variable.
[0202]
[0203] In the formula: —minimum cost of lower-layer model, yuan; f run —operation cost of each device, yuan; f P,buy —purchasing power cost, yuan; fH,buy —Hydrogen purchase cost, yuan; f w,aba — Penalty cost for curtailing wind power, yuan; f pv,aba —abandonment penalty cost, yuan; f hfs —Hydrogenation cost, yuan; f DR —demand response cost, yuan; f carbon —carbon emission reduction benefits, yuan; f envir —New energy environmental benefits, yuan.
[0204] 1)1) Operating costs of each device
[0205]
[0206] Where: N —Operation cost coefficient of each equipment, 0.03 yuan / kW; hs —Hydrogen energy storage equipment operating cost coefficient, 0.5 yuan / kg.
[0207] 2) Cost of purchasing electricity from the grid
[0208]
[0209] Where: μ H,buy —Price of electricity purchased from the power grid, time-of-use electricity price, RMB / kW; —Purchase electricity from the grid at time t, kW.
[0210] 3) Cost of purchasing hydrogen from the market
[0211]
[0212] Where: μ H,buy —Hydrogen price from the market, time-sharing hydrogen price, yuan / kg; —Purchase hydrogen from the market at time t, kg.
[0213] 4) Penalty costs for wind curtailment
[0214]
[0215] Where: w,aba — Wind curtailment penalty cost coefficient, RMB / kW.
[0216] 5) Penalty cost for abandoned light
[0217]
[0218] 6) Hydrogenation cost
[0219]
[0220] Where: hfs —Hydrogenation cost coefficient, yuan / kg; The hydrogen consumption of the kth hydrogen energy heavy truck, kg.
[0221] 7) Demand response cost
[0222]
[0223] In the formula: The transferable electric hydrogen load at time t, kW, kg; The reducible electric hydrogen load at time t, kW, kg.
[0224] 8) Carbon emission reduction benefit
[0225] The carbon dioxide emission amount of the fuel heavy truck running the same distance as the total hydrogen filling amount of the hydrogen energy heavy truck after scheduling.
[0226]
[0227] In the formula: E save,car The carbon emission reduction amount compared with the fuel heavy truck running the same distance, kg; M hfs The hydrogen filling load of the hydrogen filling station, i.e., the hydrogen filling load of the hydrogen energy heavy truck, kg; The unit hydrogen energy driving distance of the hydrogen energy heavy truck, 100 km / kg; E gas The carbon emission amount per unit driving distance of the fuel heavy truck, 5.26 kg / 100 km; The hydrogen filling load of the kth hydrogen energy heavy truck; L hfs The total daily driving distance of the k hydrogen energy heavy trucks; The daily driving distance of the kth hydrogen energy heavy truck. The equivalent carbon emission amount of the hydrogen energy heavy truck unit hydrogen filling is not considered, i.e., the equivalent carbon emission amount of the electric energy required for hydrogen filling on the power grid power generation side is not considered. The carbon emission reduction benefit of the hydrogen energy heavy truck is shown in formula (25).
[0228] f car = λ car E save,car (25)
[0229] In the formula: λ car The carbon benefit coefficient, yuan / kg.
[0230] 9) New energy power generation environmental benefit
[0231]
[0232] In the formula: λ envir The wind power and photovoltaic power generation environmental benefit coefficient, yuan / kW.
[0233] S3.2.2 Lower layer constraint condition
[0234] 1) Power balance constraint
[0235]
[0236] In the formula: —Basic electricity load.
[0237] 2) Hydrogen balance constraint
[0238]
[0239] In the formula: —Hydrogen consumption of hydrogen energy heavy truck at time t, kg; —Hydrogen output of compressor at time t, kg; —Hydrogen consumption of fuel cell, kg; η com —Compressor compression efficiency; —Hydrogen production of electrolyzer at time t, kg; η el —Efficiency of electrolyzer; —Heat value of hydrogen, kW·h / kg; η fuel —Efficiency of fuel cell.
[0240] 3) Transferable electricity hydrogen load constraint
[0241]
[0242] 4) Each device output constraint
[0243]
[0244] In the formula: P el,max , P fuel,max , P buy,max —Respectively, the upper limit of electricity hydrogen, fuel cell, and electricity power, kW; H buy,max —Upper limit of hydrogen purchase, kg.
[0245] 5) Electricity hydrogen demand response constraint
[0246]
[0247] 3.2.3 Electricity carbon emission
[0248]
[0249] In the formula: Q carbon —Carbon emission generated by electricity purchase, kg; δ carbon —Carbon emission coefficient of electricity purchase, taken as 1.08 kg / kW.
[0250] 3.3 Solution method of double-layer optimization model
[0251] The present application realizes wind and light power hydrogen uncertainty output based on Latin hypercube and K-means clustering to achieve scene generation and reduction, which is used for capacity configuration and optimal scheduling of a double-layer optimization model. Since the upper model has nonlinear constraints, the lower model belongs to mixed integer linear programming, and there is a certain coupling relationship between the upper and lower models, which is difficult to solve directly. The present application first constructs the Lagrange function of the lower model, then converts the lower model into the constraint condition of the upper model according to the KKT complementary relaxation condition of the lower model, linearizes the nonlinear terms in the converted single-layer nonlinear model by Big-M method, and finally solves it by using the CPLEX solver in MATLAB.
[0252] Four kinds of conventional scenes are set in this paper, scene one: considering wind and light coordinated power generation for hydrogen production; scene two: only considering photovoltaic power generation for hydrogen production; scene three: only considering hydrogen production by purchasing electricity; scene four: considering wind and light coordinated power generation for hydrogen production under demand response. The present application builds an electricity-hydrogen-vehicle energy station architecture including wind and light complementary hydrogen production, hydrogen storage and hydrogen energy heavy truck, which not only effectively solves the uncertainty problem of power supply and demand in Xinjiang region, but also maximizes the use of clean energy resources, reduces energy consumption and carbon emissions.
[0253] Table 1 Optimal capacity configuration of conventional scenes
[0254] Capacity / kW Scenario one Scenario two Scenario three Scenario four Wind power 56721 / / 53827 Photovoltaic 9436 1068 / 8953 Electrolytic hydrogen 35124 71014 32700 33379 Hydrogen storage / kg 5276 10335 6497 5183 Electric storage / / / / Fuel cell / 2600 / /
[0255] As can be seen from Table 1, no energy storage capacity is needed in the solution results of the four conventional scenes, which shows that wind and light output or purchasing electricity from the upper grid is more economical in meeting the electrical load and electric hydrogen demand. In scene two, due to the daily periodicity of photovoltaic output, only daytime power generation cannot meet the electrical load and electric hydrogen demand during the scheduling period, and the fuel cell can generate electricity by consuming hydrogen in the hydrogen storage tank through hydrogen-oxygen chemical reaction, and the product is only water, so the capacity of hydrogen storage equipment is relatively large; In scene three, no wind power and photovoltaic power are configured, and new energy cannot be relied on for power generation, so only purchasing electricity from the upper grid can be used for power supply; Scene four is the wind and light coordinated power generation proposed in this paper, and the capacity configured after demand response is 5.1%, 5.1%, 5% and 1.8% less than that in scene one respectively. The capacity configuration results are brought into the double-layer optimal scheduling model for repeated iteration to obtain the optimal scheduling output, optimal capacity configuration cost of each device, optimal optimal scheduling cost, total cost, total carbon emission and hydrogen supply stability index under conventional scenes, and the specific results are shown in Table 2.
[0256] Table 2 Scheduling results of conventional scenes
[0257]
[0258] From table 2, it can be seen that the capacity configuration cost of each device in the early stage of investment and construction in scenario one is higher, which is 32.74%, 183.74% and 5.19% higher than that in other scenarios respectively; the construction cost and the comprehensive cost in scenario two are lower than those in scenario one because only photovoltaic power station is built as a new energy power generation source; the investment and construction cost in scenario three is the lowest because scenario three adopts the mode of hydrogen production by electricity purchase, and the optimization scheduling cost is also lower, so the comprehensive cost in scenario three is the lowest, but the carbon emission generated by electricity purchase is also the highest, which is not conducive to carbon reduction; the optimization scheduling cost in scenario four changes little compared with that in scenario one, and the comprehensive cost is 4.87% less than that in scenario one because of the lower capacity configuration cost, so scenario four is more economical; the carbon emission generated by electricity purchase in scenario two is the lowest, the equivalent hydrogen loss rate is lower, and the hydrogen energy surplus rate is the highest, so scenario two can realize low carbon while ensuring the stability of hydrogen energy supply; the carbon emission amount in scenario one and scenario four is the same under the constraint of electricity purchase, and the low carbon property and hydrogen supply stability are good.
[0259] 1) The introduction of demand response strategy to optimize the electricity-hydrogen load curve can reasonably configure the system capacity and optimize the power, realize the wind and light consumption, and be more economical.
[0260] 2) The hydrogen energy heavy truck is modeled flexibly, the MC is used to simulate the operation characteristics and analyze the hydrogen consumption demand of the hydrogen filling station, and the hydrogen supply stability evaluation index can provide a reference for the early stage investment and construction of each device.
[0261] 3) The capacity optimization configuration and output optimization scheduling of each device are carried out, and it is concluded that the comprehensive cost of the wind and light coordinated hydrogen production mode under the demand response is 4.87% less than that in scenario one, which has good economy, low carbon property and hydrogen supply stability.
[0262] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any change or replacement without creative labor should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be limited by the protection scope defined in the claims.
Claims
1. A two-tier optimization scheduling method for coordinated carbon reduction of hydrogen heavy trucks and wind and solar power, consisting of the following steps: Step 1: Uncertainty analysis of wind, solar, and hydrogen: Build a wind-solar-electric-hydrogen energy station architecture, generate scenarios based on Latin hypercube sampling, and then implement scenario reduction based on K-means clustering to obtain the uncertainty output of wind, solar, and hydrogen. Step 2: MC method simulates the operating characteristics of hydrogen heavy trucks: By randomly simulating the daily mileage, hydrogen filling start time, and initial capacity of hydrogen heavy trucks, a statistical model is constructed to predict the changing trend of the heavy trucks during a scheduling cycle. Step 3. Two-layer optimization scheduling model: With the objective function of minimizing the annual investment cost of the upper-layer capacity configuration model and optimizing the daily operating cost of the lower-layer optimization scheduling model, a "wind-solar-hydrogen heavy truck" two-layer collaborative low-carbon optimization scheduling strategy is formulated.
2. The method according to claim 1, characterized in that The step 1 is specifically as follows: S1 uncertainty analysis of wind, solar, and hydrogen; S1.1 Scene Generation Based on Latin Hypercube Sampling The Latin hypercube sampling (LHS) method is a stratified sampling method. Unlike the Monte Carlo (MC) method, it improves the sampling strategy to achieve higher sampling accuracy and efficiency. Both wind and solar power output and electric and hydrogen load follow a normal distribution, thus enabling large-scale scenario generation. S1.2 Scene reduction based on K-means clustering; The K-means clustering algorithm can classify the large-scale scenes generated by LHS according to certain similarities to determine the number of clusters, and finally generate the number of typical scenes, and use the Euclidean distance between scene sets as the similarity measurement standard; through the K-means clustering algorithm, a large amount of wind, solar, and hydrogen data is reduced to six typical scenes, and the output of the typical scenes and their probabilities are weighted and summed to obtain the uncertainty output of wind, solar, and hydrogen.
3. The method according to claim 1, characterized in that The second step is specifically as follows: the S2 MC method simulates the operating characteristics of the hydrogen heavy truck and produces hydrogen through wind and solar collaborative power generation to ensure the normal operation of the hydrogen heavy truck, with the power grid and energy storage assisting in energy supply; S2.1 Flexibility modeling of hydrogen heavy trucks; S2.1.1MC simulation method; MC is a random sampling method that uses a probability density function to obtain its probability distribution. The starting time is determined by randomly generating some data and comparing it with the probability distribution. A statistical model is constructed to predict the changing trend of heavy trucks over a scheduling cycle by randomly simulating their daily mileage, hydrogen filling start time, and initial capacity. S2.1.2 Hydrogen heavy truck travel characteristics; 1) Daily mileage of hydrogen heavy-duty trucks; Where: f(·) is the probability density of the daily mileage of the kth hydrogen heavy truck, which is described by the lognormal distribution, with the mean μ m =5.3, standard deviation σ m =0.35; 2) The time when hydrogen heavy truck starts to be charged with hydrogen; Where: f HDT (·)—the probability density of the kth hydrogen heavy truck arriving at the hydrogen refueling station, described by a truncated normal distribution with mean μ=17.6 and standard deviation σ=3.4; —The time when the kth hydrogen heavy truck starts to charge hydrogen; 3) Initial SOH of hydrogen heavy truck; Where: f(·) is the initial SOH probability density of the kth hydrogen heavy truck, where the mean μ SOH =17.6, standard deviation σ SOH =0.05; S2.1.3 Energy consumption characteristics of hydrogen heavy trucks; The daily mileage of a hydrogen heavy truck can be obtained based on its probability density, and then its hydrogen consumption can be calculated using formula (3). Where: —Hydrogen consumption per 100 kilometers of the kth hydrogen heavy truck, kg; L k — Mileage of the kth hydrogen heavy truck, km; —Hydrogen consumption per 100 kilometers for hydrogen-powered heavy trucks, taking 10kg / 100km; —The hydrogen demand of the kth hydrogen heavy truck after driving on the same day, kg; SOH max —The maximum value of hydrogen charge in the hydrogen storage tank of a hydrogen heavy truck; —The initial hydrogen charge state of the kth hydrogen heavy truck; C HST —Maximum capacity of hydrogen storage tank for hydrogen heavy truck, kg; M hfs —Total hydrogen refueling capacity at the hydrogen refueling station, kg; N—number of hydrogen heavy trucks; S2.1.4 Analysis of hydrogen consumption demand at hydrogen refueling stations; The hydrogen refueling demand at a hydrogen refueling station refers to the situation in which the station can provide the required hydrogen for hydrogen fuel vehicles. The hydrogen refueling demand at a hydrogen refueling station depends on the vehicle's hydrogen storage capacity, target range, and the supply capacity of the hydrogen refueling station. When a hydrogen heavy truck experiences energy anxiety, that is, when the SOH of the hydrogen storage tank of a hydrogen heavy truck is less than the set minimum SOH, it will choose to enter a hydrogen refueling station and meet its hydrogen refueling demand through a hydrogen refueling machine. S2.2 Hydrogen supply stability evaluation index; 1) Equivalent hydrogen loss rate of heavy trucks; Where: η loss —Equivalent hydrogen loss rate of heavy trucks; —Power purchased at time t; —Energy storage discharge power at time t; —Power generation capacity of the fuel pool at time t; —Power consumption of hydrogen production at time t; 2) Equivalent hydrogen energy surplus rate for heavy trucks; Where: η extra —Excess rate of equivalent hydrogen energy for heavy trucks; —respectively wind power and photovoltaic unit output coefficients; C w 、C pv —Capacity of wind farms and photovoltaic power stations respectively; —are wind power and photovoltaic output at time t respectively.
4. The method according to claim 1, characterized in that The step three is specifically: S3 two-layer optimization scheduling model; S3.1 Upper layer capacity configuration model; S3.1.1 Upper layer objective function; The upper model takes the minimum investment and maintenance cost as the objective function, and the decision variable is the configuration capacity of each device; Where: —Minimum investment and maintenance cost, yuan; f N — Investment and maintenance costs of various equipment, RMB, where N represents wind farm, photovoltaic power station, electric hydrogen production equipment, electric energy storage equipment and fuel cell; f hs —Hydrogen energy storage equipment investment and maintenance costs, yuan; f dep —Recycling income of each equipment, RMB; 1) The investment and maintenance costs of each equipment are: Where: N —Unit investment cost of each equipment, yuan / kW; C N —Capacity of each device, kW; r—discount rate, take 0.067; ψ N —The operating life of each equipment is 15, 15, 20, 15, and 20 years; λ N,om —Unit operation and maintenance cost coefficient of each equipment, yuan / kW; —Output of each device at time t, kW; 2) The investment and maintenance costs of hydrogen energy storage equipment are: Where: hs —Unit investment cost of hydrogen energy storage equipment, yuan / kg; C hs —Capacity of hydrogen energy storage equipment, kg; ψ hs — Lifespan of hydrogen energy storage equipment is 20 years; 3) Recycling income of each equipment; Where: f dep —Total recovery income; f w,dep —Wind farm recovery income; λ' w — Wind farm recovery coefficient; the recovery coefficients of various equipment are 25, 15, 30, 12, 10 yuan / kW and 5 yuan / kg respectively; S3.1.2 Upper level constraints; 1) Capacity constraints of each device; C N,min ≤C N ≤C N,max (11); Where: C N,max 、C N,min — Upper and lower limits of each equipment capacity, kW; 2) Hydrogen charge state and hydrogen charging and discharging rate constraints of hydrogen energy storage equipment; Where: T—daily scheduling period, 24 hours; —The amount of hydrogen stored in the hydrogen energy storage device at time t and time t-1, kg; —The amount of hydrogen charged and released by the hydrogen energy storage device at time t, kg; η hs —The charging / discharging efficiency of hydrogen energy storage equipment is 0.98; —Hydrogen storage capacity of hydrogen energy storage equipment at the beginning and end of scheduling, kg; μ hs,in 、μ hs,dis —Hydrogen charging / discharging state; H hs,max —The maximum amount of hydrogen charged and discharged from hydrogen energy storage equipment; 3) State of charge and charge / discharge power constraints of energy storage equipment; Where: —Energy storage capacity of the electric energy storage device at time t and time t-1; —Charging power of the energy storage device at time t, kW; η es —Charging and discharging efficiency of electrical energy storage equipment; —The total storage capacity of the energy storage equipment during dispatch; u es,c 、u es,dis —Charge / discharge status of the energy storage device; P es,max —Maximum charge / discharge power of the energy storage device; The state of hydrogen (SOH) of hydrogen energy storage is: The state of charge (SOC) of the energy storage is: Since it contains product terms of 0-1 variables and continuous variables, the Big-M method is required for linearization; S3.2 Lower layer optimization scheduling model; S3.2.1 Lower layer objective function; The lower model takes the minimum operating cost as the objective function, and the optimization decision variable is the power of each device; Where: —Minimum cost of the lower model, yuan; f run —Operation cost of each equipment, yuan; f P,buy —Electricity purchase cost, yuan; f H,buy —Hydrogen purchase cost, yuan; f w,aba — Penalty cost for curtailing wind power, yuan; f pv,aba —abandonment penalty cost, yuan; f hfs —Hydrogenation cost, RMB; f DR —demand response cost, yuan; f carbon —carbon emission reduction benefits, yuan; f envir —New energy environmental benefits, yuan; 1) Operating costs of each device; Where: N —Operation cost coefficient of each equipment, 0.03 yuan / kW; hs —Operation cost coefficient of hydrogen energy storage equipment, 0.5 yuan / kg; 2) Cost of purchasing electricity from the grid; Where: μ H,buy —Price of electricity purchased from the power grid, time-of-use price, RMB / kW; —Power purchased from the grid at time t, kW; 3) Cost of purchasing hydrogen from the market; Where: μ H,buy —Hydrogen price from the market, time-sharing hydrogen price, yuan / kg; —Purchase hydrogen from the market at time t, kg; 4) Wind curtailment penalty costs; Where: w,aba — Wind curtailment penalty cost coefficient, RMB / kW; 5) Penalty cost for abandoned light; 6) Hydrogenation cost; Where: hfs —Hydrogenation cost coefficient, yuan / kg; —Hydrogen consumption of the kth hydrogen heavy truck, kg; 7) Demand response costs; Where: —Transferable electric hydrogen load at time t, kW, kg; —The electric hydrogen load that can be reduced at time t, kW, kg; 8) Carbon emission reduction benefits; The carbon dioxide emissions of a fuel heavy truck driving the same mileage as a hydrogen heavy truck with the same total hydrogen charge; Where: E save,car —Compared with fuel heavy trucks, the amount of carbon emissions reduced by the same mileage, kg; M hfs —Hydrogen filling load at hydrogen filling station, i.e. hydrogen filling load of hydrogen heavy truck, kg; — Hydrogen heavy truck unit hydrogen mileage, 100 km / kg; E gas -Carbon emissions per unit mileage for fuel heavy trucks: 5.26kg / 100km; —Hydrogen refueling load of the kth hydrogen heavy truck; L hfs —Total daily mileage of k hydrogen heavy trucks; —The daily mileage of the kth hydrogen heavy truck; the equivalent carbon emissions per unit of hydrogen filling of the hydrogen heavy truck are not considered, that is, the equivalent carbon emissions of the electricity purchased from the power generation side of the grid for the part of the electricity required for hydrogen filling are not considered; the carbon emission reduction benefits of hydrogen heavy trucks are shown in formula (25); f car =λ car E save,car (25); Where: car —Carbon benefit coefficient, yuan / kg; 9) Environmental benefits of new energy power generation; Where: envir —Environmental benefit coefficient of wind power and photovoltaic power generation, RMB / kW; S3.2.2 Lower level constraints; 1) Power balance constraints; Where: —Basic electrical load; 2) Hydrogen balance constraints; Where: —Hydrogen consumption of hydrogen heavy truck at time t, kg; —Amount of hydrogen output by the compressor at time t, kg; —Hydrogen consumption of fuel cell, kg; η com —Compressor compression efficiency; —Amount of hydrogen produced by the electrolyzer at time t, kg; η el — efficiency of the electrolyzer; —Heating value of hydrogen, kW·h / kg; η fuel — fuel cell efficiency; 3) Transferable electric hydrogen load constraints; 4) Output constraints of each device; Where: P el,max 、P fuel,max 、P buy,max —Power limits for hydrogen production from electricity, fuel cells, and purchased electricity, kW; H buy,max —Upper limit of hydrogen purchase, kg; 5) Electric hydrogen demand response constraints; 3.2.3 Carbon emissions from electricity purchases; Where: Q carbon —Carbon emissions from electricity purchase, kg; δ carbon —Carbon emission coefficient for purchased electricity: 1.08kg / kW; 3.3 Two-layer optimization model solution method; Based on Latin hypercube and K-means clustering, scenario generation and reduction are realized to obtain the uncertain output of wind, solar and hydrogen, which is used for capacity configuration and optimal scheduling of the two-layer optimization model; first, the Lagrangian function of the lower-level model is constructed, and then the lower-level model is converted into the constraints of the upper-level model according to the KKT complementary relaxation condition of the lower-level model. The nonlinear terms in the transformed single-layer nonlinear model are then linearized using the Big-M method, and finally the CPLEX solver in MATLAB is used for solution.