Capacity configuration optimization method for wind-solar-hydrogen storage system based on improved sparrow algorithm

By improving the sparrow search algorithm to optimize the number of equipment for the wind and light hydrogen storage system, the problem of insufficient global optimization ability in the existing technology is solved, the economic and reliability of the system is improved, and the unit power generation cost is reduced.

CN115882477BActive Publication Date: 2025-09-02SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211010786.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-09-02
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

The existing group intelligence algorithms have problems such as insufficient global optimization capability and low optimization accuracy in the capacity configuration optimization of wind and optical hydrogen storage systems, which makes it difficult to improve the system power supply reliability and economy at the same time.

Method used

The improved sparrow search algorithm is adopted, and the follower position update method is improved through independent strategies. Combined with independent strategies and greed strategies, the equipment number configuration of the wind and light hydrogen storage system is optimized, the objective function is established and relevant constraints are set, and the improved sparrow search algorithm is used to solve the global optimal solution.

Benefits of technology

On the premise of ensuring power supply reliability, the unit power generation cost of the system is significantly reduced, the economic benefits of the system are improved, and more optimized equipment configuration is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115882477B_ABST
    Figure CN115882477B_ABST
Patent Text Reader

Abstract

The present invention provides a method for optimizing the capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm. Under the premise of ensuring the power supply reliability of the wind-solar-hydrogen storage integrated power supply system, the objective function is to minimize the unit power generation cost of the system. After setting relevant constraints such as reliability constraints, equipment output constraints, and power balance constraints, the improved sparrow search algorithm is used to solve and obtain the global optimal solution, thereby minimizing the unit power generation cost of the system under the premise of ensuring power supply reliability, and improving the economic benefits of the system power generation. It is of great significance to the specific application of clean energy power generation technology. In particular, the present invention adopts a sparrow search algorithm improved by relying on a self-reliant strategy, and improves the position update method of half of the followers with poor fitness values. These followers will also actively look for nearby food sources, effectively avoiding the death of these followers, thereby overcoming the problem of insufficient global search capabilities of the existing sparrow search algorithm in the later stage of the search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of clean energy power generation, and specifically relates to a method for optimizing the capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm. Background Art

[0002] Providing reliable and affordable electricity to remote areas (such as mountain villages and islands) has long been a challenge. With the rapid development of renewable energy generation, abundant local renewable energy sources have attracted attention. Local photovoltaic and wind power generation are emerging as promising solutions to address the power supply challenge in remote areas. However, compared with traditional thermal and gas-fired power generation, the greater randomness and volatility of photovoltaic and wind power generation can lead to reduced power quality. To address this issue, some researchers have proposed the concept of microgrids. A microgrid is essentially a small power system that integrates power generation, energy storage, and load management. A wind, solar, and storage integrated power supply system is also a specific implementation of a microgrid. This system primarily utilizes abundant local wind and solar resources for distributed power generation, relying on energy storage as a backup power source to ensure power reliability and quality. In theory, this system produces significantly lower greenhouse gas emissions than traditional power generation methods, aligning with the current energy conservation and emission reduction initiatives advocated by the power industry. Consequently, it has garnered significant attention and become a hot topic in microgrid research.

[0003] To maximize the reliability and economy of system power supply, configuring the system's power capacity is a key component of system optimization design and a crucial foundation for ensuring safe and reliable system operation. Due to the large variety of distributed power sources in the system and the significant differences in the output characteristics of each generating unit, the system capacity optimization problem is highly nonlinear, complex, and uncertain, making it difficult for traditional optimization methods to achieve satisfactory results. In recent years, swarm intelligence algorithms, such as the particle swarm optimization (PSO), have achieved some success in capacity configuration optimization. However, these algorithms often suffer from insufficient global optimization capabilities, prone to local convergence, and resulting in low optimization accuracy. Summary of the Invention

[0004] The present invention is designed to solve the above-mentioned problems and aims to provide a swarm intelligence algorithm with better global optimization capability and optimization accuracy, as well as a method for using the algorithm to achieve more optimal configuration of the wind-solar-hydrogen storage system capacity. The present invention adopts the following technical solutions:

[0005] The present invention provides a method for optimizing the capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm, which is characterized by comprising the following steps:

[0006] Step S1, summarizing the natural resource data and load demand power data of the region where the wind, solar, hydrogen and storage integrated power supply system is located throughout the year;

[0007] Step S2, taking the number of each device in the wind-solar-hydrogen-storage integrated power supply system as an independent variable, establishing an objective function with the goal of minimizing the unit power generation cost of the wind-solar-hydrogen-storage integrated power supply system, and setting constraints based on the load demand power data for the whole year;

[0008] Step S3, using an improved sparrow search algorithm to solve the objective function and obtain a global optimal solution as the optimal capacity configuration of the wind-solar-hydrogen-storage integrated power supply system;

[0009] Step S4, based on the natural resource data of the whole year and the optimal capacity configuration, calculate the annual power generation of the wind, solar, hydrogen and storage integrated power supply system,

[0010] Among them, the sparrow individuals in the improved sparrow search algorithm include producers, followers and early warning ones. The self-reliance strategy is adopted to improve the position update method of the half of the followers with poor fitness values. The half of the followers with poor fitness values ​​randomly update their current positions according to the producer position or random search position.

[0011] The method for optimizing the capacity configuration of a wind-solar-hydrogen storage system based on the improved sparrow algorithm provided by the present invention may also have the following technical features: Step S3 includes the following sub-steps:

[0012] Step S3-1, initialize the sparrow population information, including setting the population size pop, problem dimension d and variable upper and lower bounds ub, lb, producer ratio p_percent, maximum number of iterations iter max , warning threshold ST;

[0013] Step S3-2, randomly generate the initial population, that is, the initial solution to the problem, calculate the fitness value of each sparrow individual according to the objective function, sort the sparrow individuals according to the fitness value, find the best individual and the worst individual, and obtain the fitness value of the best individual f g and its position X best , the worst individual fitness value f w and its position X worst ;

[0014] Step S3-3, updating the producer position using a first predetermined algorithm;

[0015] Step S3-4: Update the follower position according to the following formula:

[0016]

[0017]

[0018] Where, is a random search position, is the third random sparrow individual position, F is the weight factor, is the position with the best fitness value occupied by the producer at the t+1th iteration, is the self-supporting position generated by the self-supporting strategy, rand is used to generate random numbers, ZL is the self-supporting probability, which is used to determine whether the data of each dimension of the self-supporting position is provided by the random search position or the global optimal solution, and f L is the adaptation value of the self-supporting position vector, f X is the adaptation value of the original position vector;

[0019] Step S3-5, determining whether the warning value of the alarmer has reached a predetermined warning threshold;

[0020] Step S3-6: if the result of step S3-5 is yes, the position of the alerter is updated using a third predetermined algorithm;

[0021] Step S3-7: If step S3-5 is judged as no, or step S3-6 is completed, the fitness value of the new generation of sparrow individuals is calculated, and the sparrow individuals are sorted according to the fitness value to find the best individual and the worst individual, and the fitness value of the best individual f is obtained. g and its position X best , the worst individual fitness value f w and its position X worst ;

[0022] Step S3-8, determining whether a predetermined maximum number of iterations and the constraint condition are reached, if not, incrementing the number of iterations by 1 and returning to step S3-2;

[0023] Step S3-9: If the result of step S3-8 is yes, the optimal individual at this time is output as the optimal capacity configuration.

[0024] The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on the improved sparrow algorithm provided by the present invention may also have the following technical features, wherein step S3-4 includes the following sub-steps:

[0025] Step S3-4-1: For the followers with i>n / 2, two different sparrow individuals are randomly selected from the sparrow population, and the vectors of the two sparrow individuals are subtracted to obtain a random vector:

[0026]

[0027] In the formula, i is the order number of the sparrow individual, n is the total number of sparrow individuals, are two random sparrow individuals in the sparrow population, l1 and l2 are their index numbers, Z t is the random vector obtained by taking the difference between two sparrow individuals;

[0028] Step S3-4-2, adding the random vector to the vector of another random sparrow individual according to a predetermined weight to obtain the random search position:

[0029]

[0030] Step S3-4-3, based on the random search position and the global optimal position under the current number of iterations, determine the self-supporting position according to the following formula:

[0031]

[0032] Step S3-4-4: Use a greedy strategy to compare the fitness values ​​of the independent position and the original position of the follower, and select the position with a higher fitness value as the new position of the follower:

[0033]

[0034] The wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm provided by the present invention may also have such a technical feature, wherein, in step S3-3, the discoverer position is updated according to the following formula:

[0035]

[0036] Where t is the current iteration number, is the value of the j-dimensional position of the i-th sparrow individual at iteration t, α is a random number, R2 is the alarm value, Q is a random number that obeys the normal distribution, and L is a 1×d-order matrix with all elements being 1.

[0037] The wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm provided by the present invention may also have such a technical feature, wherein, in step S3-6, the position of the early warning person is updated according to the following formula:

[0038]

[0039] The wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm provided by the present invention may also have the following technical features: wherein, in step S2, the equipment includes a wind turbine, a photovoltaic panel, a hydrogen fuel cell, an alkaline electrolyzer and a hydrogen storage tank,

[0040] The independent variables to be optimized are:

[0041] X=N i i=1,2,3,4,5

[0042] Where N i i=1,2,3,4,5 are the number of wind turbines, photovoltaic panels, hydrogen fuel cells, alkaline electrolyzers and hydrogen storage tanks respectively.

[0043] The objective function is:

[0044] f(X)=C generation +C reliability

[0045] in:

[0046] C generation =C total / P total

[0047] C total =C g +C w +C h

[0048]

[0049]

[0050]

[0051] Where C generation is the unit power generation cost of the wind-solar-hydrogen-storage integrated power supply system, C reliability is the reliability cost of the wind-solar-hydrogen-storage integrated power supply system, C total is the total investment cost of the wind-solar-hydrogen-storage integrated power supply system during its life cycle, P total is the total power generation during the life cycle of the wind-solar-hydrogen-storage integrated power supply system, C g is the initial cost of each device, C w is the operation and maintenance cost of each equipment, C h is the replacement cost of each device, C i is the initial purchase cost of each equipment, T is the working years of each equipment, P i is the rated power of each device, γ i is the maintenance cost coefficient of each equipment, T i is the working life of each equipment, and r is the inflation coefficient.

[0052] The wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm provided by the present invention may also have the following technical features, wherein the constraint conditions include reliability constraints, equipment output constraints, and power balance constraints, and the reliability constraints include:

[0053]

[0054] in:

[0055]

[0056]

[0057] Where LPSP is the load power shortage rate of the wind-solar-hydrogen-storage integrated power supply system, P is the number of hours in a year when the net power of the wind-solar-hydrogen-storage integrated power supply system is less than 0. net (t) is the net power of the wind-solar-hydrogen-storage integrated power supply system at time t, P i (t) is the output power of the i-th device at time t, P load (t) is the power required by the load at time t. The equipment output constraints include:

[0058]

[0059] The power balance constraints include:

[0060]

[0061]

[0062] P 4min ≤P 4in ≤P 4max

[0063] R 5j ≤R 5max

[0064] Where S i is the total installed capacity of the i-th type of equipment, N ij is the jth unit of the i-th device, S i max is the maximum installed capacity of the i-th type of equipment, P 4min is the upper limit of the input power of the alkaline electrolyzer, P 4max Alkaline electrolyzer input power lower limit, P 4in is the input power of the alkaline electrolyzer, R 5j is the current hydrogen storage capacity of the jth hydrogen storage tank, R 5max The upper limit of the hydrogen storage tank capacity.

[0065] The capacity configuration optimization method of the wind-solar-hydrogen storage system based on the improved sparrow algorithm provided by the present invention may also have such a technical feature, wherein the natural resource data throughout the year includes the hourly wind speed, temperature, and irradiance data of the region throughout the year.

[0066] Functions and effects of the invention

[0067] The improved sparrow search algorithm-based capacity configuration optimization method for wind, solar, hydrogen, and storage systems, based on the present invention, takes minimizing the unit power generation cost of the system as the objective function, while ensuring the power supply reliability of the wind, solar, hydrogen, and storage integrated power supply system. After setting relevant constraints such as reliability constraints, equipment output constraints, and power balance constraints, the improved sparrow search algorithm is used to find the global optimal solution. This method minimizes the unit power generation cost of the system while ensuring power supply reliability, thereby improving the economic benefits of the system's power generation. This has important implications for the specific application of clean energy power generation technology.

[0068] In particular, the present invention utilizes an improved sparrow search algorithm based on a self-reliance strategy. This improves the position update method for half of the followers with poor fitness, randomly updating their current positions based on the producer's position or a random search location (other locations where food may be found). This means that followers with poor fitness will also actively seek out nearby food sources, effectively preventing the death of these followers. As described above, the algorithm can fully utilize the global optimal solution while not being overly dependent on it, overcoming the problem of the existing sparrow search algorithm's insufficient global search capabilities in the later stages of the search. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is a structural diagram of a wind-solar-hydrogen-storage integrated power supply system according to an embodiment of the present invention;

[0070] Figure 2 Flowchart of a method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm in an embodiment of the present invention;

[0071] Figure 3 is a flow chart of an improved sparrow algorithm according to an embodiment of the present invention;

[0072] Figure 4 1 is a graph of hourly wind speed data for the target area throughout the year in an embodiment of the present invention;

[0073] Figure 5 7 is a graph of hourly temperature data of the target area throughout the year in an embodiment of the present invention;

[0074] Figure 6 This is a graph of hourly irradiance data for the target area throughout the year in an embodiment of the present invention;

[0075] Figure 7This is a graph of hourly load demand power data for the target area throughout the year in an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following is a detailed description of the wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm of the present invention in combination with the embodiments and drawings.

[0077] <Example>

[0078] Figure 1 It is a structural diagram of the wind, solar, hydrogen and storage integrated power supply system in this embodiment.

[0079] like Figure 1 As shown, the wind-solar-hydrogen-storage integrated power supply system (hereinafter referred to as the system) 10 includes an AC / DC bus 11, a wind power generation system 12, a photovoltaic power generation system 13, a control center 14, a rectifier 15, a hydrogen energy storage system 16, etc. The hydrogen energy storage system 16 includes a rectifier 161, an alkaline water hydrogen production device 162, a hydrogen storage tank 163, a hydrogen fuel cell 164, an inverter device 165, etc.

[0080] The electricity generated by the wind power generation system 12 and the photovoltaic power generation system 13 is supplied to the power load 20 via the AC / DC bus 11. This electricity is also stored in the hydrogen energy storage system 16. The hydrogen energy storage system 16 draws power from the AC / DC bus 11 via a rectifier 161. This power is then used to produce hydrogen gas through an alkaline water hydrogen production device 162. The produced hydrogen gas is stored in a hydrogen storage tank 163 and further processed into a hydrogen fuel cell 164. This hydrogen fuel cell 164 then supplies the electricity to the power load 20 via the AC / DC bus 11.

[0081] The specific structure of the wind, solar, hydrogen and storage integrated power supply system is existing technology, so it will not be explained in detail.

[0082] Figure 2 This is a flow chart of the capacity configuration optimization method of the wind-solar-hydrogen storage system based on the improved sparrow algorithm in this embodiment.

[0083] like Figure 2 As shown in FIG, the capacity configuration optimization method of the wind-solar-hydrogen storage system based on the improved sparrow algorithm specifically includes the following steps:

[0084] Step S1, summarize the natural resource data and load demand power data of the area where the wind, solar, hydrogen and storage integrated power supply system is located throughout the year, where the natural new resource data throughout the year include wind speed, temperature and irradiance data throughout the year.

[0085] In this embodiment, the target area is Weining County, Bijie City, Guizhou Province. The hourly wind speed, temperature, and irradiance data of the area throughout 2021 are collected and summarized, and the load demand power data of the whole year are summarized. Figure 4-7 The collected and summarized hourly wind speed, temperature, irradiance and load demand power data of the target area throughout the year are shown respectively.

[0086] Step S2: Taking the number of devices in the system as an independent variable and minimizing the system unit power generation cost as the goal, an objective function is established, and constraints are set based on the load demand power data throughout the year.

[0087] In this embodiment, the equipment in the system includes wind turbines, photovoltaic panels, hydrogen fuel cells, alkaline electrolyzers, and hydrogen storage tanks. The optimization variable is denoted as N i i = 1, 2, 3, 4, 5, respectively, represents the number of wind turbines, photovoltaic panels, hydrogen fuel cells, alkaline electrolyzers, and hydrogen storage tanks, and is defined as:

[0088] X=N i i=1,2,3,4,5

[0089] The optimization goal is to minimize the unit power generation cost while ensuring power supply reliability. The specific objective function is:

[0090] f(X)=C generation +C reliability

[0091] Where C generation Indicates the unit power generation cost of the system, its unit is RMB / MW; C reliability Represents the reliability cost of the system, and its unit is yuan.

[0092] Unit power generation cost C generation It represents the economic advantages and disadvantages of the entire system, specifically the total investment cost C during the system life cycle. total and power generation P total The ratio is as follows:

[0093] C generation =C total / P total

[0094] The total investment cost C total It also includes the initial purchase cost, operation and maintenance cost, and replacement cost of each of the above equipment, as shown in the following formula:

[0095] C total =C g +C w +C h

[0096] Where C g represents the initial cost of all equipment; C w Represents the operation and maintenance costs of all equipment; C h Represents the replacement cost of all equipment. The specific calculation method of each cost is as follows:

[0097]

[0098]

[0099]

[0100] Where C i represents the initial purchase cost of each device; T represents the working years of the equipment; P i is the rated power of each device; γ i is the maintenance cost coefficient of each equipment; T i is the working life of each equipment; r is the inflation coefficient.

[0101] The total output of the system (i.e. total power generation) is calculated as follows:

[0102]

[0103] Where, P i (t) is the output power of the i-th device at time t.

[0104] In this embodiment, the constraints include reliability constraints, equipment output constraints, and power balance constraints.

[0105] In order to highlight the reliability of the power supply system, the reliability constraint index is introduced into the objective function in the form of a penalty function, as shown in the following formula:

[0106]

[0107] Where LPSP is the system's load power shortage rate, which is the number of hours in a year that the system cannot meet the grid load demand. The calculation formula is as follows:

[0108]

[0109]

[0110] Where N P(t)net<0 is the number of hours in a year when the system's net power is less than 0; P net (t) is the net power of the system at time t; P load (t) is the power required by the load at time t.

[0111] In terms of power constraints, the entire system must always meet the power balance constraint. That is, the output of all power generation equipment in the system must be able to meet the load demand per unit time, as shown in the following formula:

[0112]

[0113] In actual engineering applications, regardless of the type of power generation equipment, a certain capacity upper limit must be met during installation, as shown in the following formula:

[0114]

[0115] Where S i represents the total installed capacity of the i-th type of equipment; N ij represents the jth unit of the i-th device; S i max It represents the maximum installed capacity of the i-th type of equipment, which is generally determined according to the local load.

[0116] For alkaline electrolyzers, the input power has a certain lower limit, as shown below:

[0117] P 4min ≤P 4in ≤P 4max

[0118] R 5j ≤R 5max

[0119] Where, P 4min and P 4max Respectively represent the upper and lower limits of the input power of the alkaline electrolyzer; P 4in Represents the input power of the alkaline electrolyzer; R 5j represents the current hydrogen storage capacity of the jth hydrogen storage tank; R 5max Represents the upper capacity of the hydrogen storage tank.

[0120] In step S3, the objective function is solved using an improved sparrow search algorithm to obtain a global optimal solution as the optimal capacity configuration of the system.

[0121] Figure 3 Flowchart of the improved sparrow search algorithm in this embodiment.

[0122] like Figure 3 As shown, in this embodiment, the self-reliance strategy is introduced into the sparrow search algorithm in the prior art, and the position update method of the half of followers with poor fitness values ​​is improved, thereby obtaining an improved sparrow search algorithm.

[0123] The improved sparrow search algorithm specifically includes the following steps:

[0124] Step S3-1, initialize the sparrow population information, including setting the population size pop, problem dimension d and variable upper and lower bounds ub, lb, producer ratio p_percent, maximum number of iterations iter max , warning threshold ST.

[0125] Each individual sparrow in the population represents a solution to the system capacity optimization problem. Individual sparrows can be divided into three roles: producers, followers, and early warning systems. The number of these three roles is fixed. Producers' primary task is to search for food for the entire sparrow population. The producer's search results (i.e., their location) determine the direction and area in which followers forage. Followers will follow producers in their search for food. Furthermore, followers may seize food from producers, thus reversing their roles. During the foraging process, if a predator is detected, some sparrows will issue an early warning signal. In this way, through the continuous searching of individual sparrows, they will eventually discover the optimal location.

[0126] Step S3-1a, set the number of iterations t=0.

[0127] Step S3-1b, set the number of iterations t=t+1.

[0128] Step S3-2: randomly generate the initial population, i.e. the initial solution to the problem, calculate the fitness value of each individual according to the objective function, sort the individuals according to the fitness value, find the best and worst individuals according to the sorting results, and obtain the fitness value of the best individual f g and its position X best , the worst individual fitness value f w and its position X worst .

[0129] Step S3-3: Update the producer position using a first predetermined update algorithm.

[0130] In this embodiment, the finder's location is updated according to the following formula:

[0131]

[0132] Where t is the current iteration number; Iter represents the value of the j-th dimension position of the i-th sparrow at iteration t times; max is the maximum number of iterations; α is a random number on [0,1]; R2 is the alarm value, whose value range is [0,1]; ST is the safety threshold, whose value range is [0.5,1]; Q is a random number that obeys the normal distribution; L is a 1×d-order matrix with all elements being 1.

[0133] Step S3-4: update the follower position using a second predetermined updating algorithm, where the second predetermined algorithm includes an improvement of the self-reliance strategy.

[0134] In this embodiment, the follower position is updated according to the following formula:

[0135]

[0136]

[0137] In the above formula, represents a random search position; represents the third random individual position; F is the weight factor, which is generally in the range of [0,2]. Represents the position with the best fitness value occupied by the producer at the t+1th iteration; represents the self-supporting position generated by the self-supporting strategy; rand is used to generate a random number in [0,1]; ZL is the self-supporting probability, which is generally [0,1] and is used to determine whether the data of each dimension of the self-supporting position is provided by the random search position or the global optimal solution. L and f X They represent the adaptation values ​​of the independent position vector and the original position vector respectively.

[0138] In step S3-4, how to determine the location of the sparrow individual randomly searching nearby locations when flying according to the independent strategy, the specific steps are as follows:

[0139] Step S3-4-1, for follower individuals with i>n / 2 (i is the individual's sorting number, n is the total number of individuals), first, two different sparrow individuals can be randomly selected from the sparrow population, and the vector difference between the two is taken to obtain a random vector, as shown in the following formula:

[0140]

[0141] Where, The table represents two random sparrow individuals in the population, l1 and l2 are their index numbers; Z t Represents the random vector obtained by subtracting the two.

[0142] In step S3-4-2, the obtained random vector is added to another random sparrow individual vector according to a predetermined weight, and the random search position of the self-reliance strategy is obtained, which is expressed as follows:

[0143]

[0144] Where, represents a random search position; represents the position of the third random sparrow individual; F is the weight factor, which is generally set to [0,2].

[0145] In step S3-4-3, based on the obtained random search position and the known global optimal position under the current number of iterations, the self-supporting position is determined as follows:

[0146]

[0147] Step S3-4-4: Next, in order to ensure that the fitness of these followers can be gradually optimized and to speed up the convergence of the improved sparrow search algorithm, a greedy strategy is introduced, that is, survival of the fittest. The fitness of the independent position and the follower's original position is compared, and finally the position vector with better fitness (i.e., higher fitness value) is selected as the new sparrow individual position, as shown in the following formula:

[0148]

[0149] Step S3-5, determines whether the individual warning value of the warning person reaches a predetermined warning threshold value, and if so, proceeds to step S3-6, and if not, proceeds to step S3-7.

[0150] Step S3-6: If the judgment in step S3-5 is yes, the third predetermined updating algorithm is used to update the position of the alerter.

[0151] In this embodiment, the position of the alerter is updated according to the following formula:

[0152]

[0153] Step S3-7: If step S3-5 is judged as no, or step S3-6 is completed, calculate the fitness value of the new generation of sparrow individuals, and sort the individuals according to the fitness value, find the best and worst individuals according to the sorting, and obtain the fitness value f of the best individual g and its position X best , the worst individual fitness value f w and its position X worst .

[0154] Step S3-8, determines whether the predetermined maximum number of iterations and constraint conditions are reached. If so, proceeds to step S3-9. If not, returns to step S3-1b, that is, adds 1 to the number of iterations and returns to step S3-2.

[0155] Step S3-9: If the judgment in step S3-8 is yes, the result is output, that is, the optimal individual is output as the optimal capacity configuration after optimization.

[0156] In order to verify the superiority of the improved sparrow search algorithm of the embodiment of the present invention, an independent comparative test was conducted on the SSA (i.e., sparrow search algorithm) in the prior art and the improved sparrow search algorithm using CEC2017 on a test platform.

[0157] The parameters of the test platform are: Intel(R) Core(TM) i7-6500U CPU@2.50GHz 2.60GHz, 4GB memory, Windows 10 system, Matlab R2017b.

[0158] The parameter settings of the two algorithms are shown in Table 1 below.

[0159] Table 1 Algorithm parameter setting table

[0160] algorithm Parameter settings SSA PD=0.2,S7=0.8,SD=0.2 The present invention PD=0.2, S7=0.8, SD=0.2, F=1, ZL=0.5

[0161] CEC2017 tested 29 single-objective functions, including unimodal functions (F1 and F3), simple multimodal functions (F4-F10), mixed functions (F11-F20), and combined functions (F21-F30). Five test metrics were used: optimal value, worst value, median value, mean, and standard deviation. The most valuable metrics are mean and variance. Specifically, a lower mean indicates a higher optimization accuracy, while a smaller standard deviation indicates a more robust algorithm.

[0162] After 5000 iterations of each algorithm in 30 dimensions, the test results are shown in Table 2 below.

[0163] Table 2 Comparison of CEC2017 test results

[0164]

[0165]

[0166]

[0167]

[0168] Among the 29 valid test functions, the improved sparrow search algorithm of this embodiment achieved a smaller mean value than the SSA in 23 functions and a smaller variance in 21 test functions. This clearly demonstrates that the improved sparrow search algorithm has better global optimization capability and accuracy than the SSA. Although its stability was average in eight functions, this is because the self-reliance strategy introduced by the improved sparrow search algorithm increases the algorithm's complexity to a certain extent. However, the results show that despite the increased complexity, the improved sparrow search algorithm can effectively overcome the SSA's shortcoming of jumping out of the local optimal solution in the late iteration.

[0169] In summary, to address the problem that SSA is prone to falling into local optimal solutions in the later stages, which leads to a decrease in global optimization ability and insufficient optimization accuracy, we proposed an improved sparrow search algorithm that uses a self-reliant strategy to improve the follower position update formula. This improves the global optimization ability and optimization accuracy of SSA.

[0170] On the basis of verifying that the improved sparrow search algorithm is effective, the improved sparrow search algorithm is used, that is, the objective function of this embodiment is solved according to the above steps, and the solution result is: X = [116, 20019, 445, 553, 2], f g =0.254. That is, after optimizing capacity configuration based on the improved sparrow search algorithm, the system costs about 0.254 yuan per kilowatt-hour of electricity generated, while the cost of electricity from a simple photovoltaic power station or wind power station is 0.37 yuan / (kW·h -1 ) calculation, the unit power generation cost of the system was reduced by 45.7%.

[0171] Step S4: Based on the natural resource data of the whole year and the optimal capacity configuration of the system, the annual power generation of the system is calculated.

[0172] Under the above optimal configuration, combined with the annual wind speed, irradiance, and temperature data, we can calculate that the annual wind and photovoltaic power generation is approximately 120 million kWh. Therefore, it can be determined that the system can generate an additional profit of approximately 13.92 million yuan per year compared to a simple photovoltaic or wind power station. Assuming the system has an operating life of 20 years, the total profit over its entire life cycle can be an additional 278.4 million yuan. This proves the feasibility of the wind-solar-hydrogen storage system capacity configuration optimization method based on the improved sparrow algorithm of this embodiment, and further illustrates that the use of this method can effectively reduce the power generation cost of the wind-solar-hydrogen storage integrated power supply and improve its economic benefits.

[0173] Example Function and Effect

[0174] According to the wind-solar-hydrogen-storage system capacity configuration optimization method based on the improved sparrow search algorithm provided in this embodiment, under the premise of ensuring the power supply reliability of the wind-solar-hydrogen-storage integrated power supply system, the objective function is to minimize the unit power generation cost of the system. After setting relevant constraints such as reliability constraints, equipment output constraints, and power balance constraints, the improved sparrow search algorithm is used to solve and obtain the global optimal solution. This minimizes the unit power generation cost of the system while ensuring power supply reliability, thereby improving the economic benefits of the system power generation. This has important significance for the specific application of clean energy power generation technology.

[0175] In particular, the present embodiment has adopted the sparrow search algorithm that relies on the improvement of self-reliance strategy. This algorithm can accomplish not over-dependence on the global optimal solution when making full use of the global optimal solution, thereby overcoming the problem that the existing sparrow search algorithm has insufficient global search ability in the later stage of the search. Specifically, during the sparrow foraging process, the followers whose fitness values ​​are in the latter half of the population have poor fitness values, that is, their internal energy levels are low, and they may even starve. At this moment, if these followers still blindly go to the vicinity of the producer's position, because their internal energy levels are insufficient, their flight speed will decrease. Even after arriving, they may not be able to obtain enough food, which leads to a vicious cycle, and eventually these individual sparrows may die. In the present embodiment, according to the sparrow's instinct to survive, with the current position as the starting point, on the way to the food source position found by the producer, they will also actively search for a nearby food source, and if they find a suitable food source, they will stop to eat. This is reflected in the algorithm. Specifically, follower individuals with i>n / 2 will randomly update their current positions with a certain probability using the producer's location information or other location information where food may be found. That is, a self-reliant strategy is adopted to effectively avoid the death of these follower individuals, thereby solving the problem of insufficient global search capabilities in the later stage of the existing sparrow search algorithm and the possibility of falling into local optimal solutions.

[0176] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm, characterized in that: The following steps are involved: Step S1, summarizing the natural resource data and load demand power data of the region where the wind, solar, hydrogen and storage integrated power supply system is located throughout the year; Step S2, taking the number of each device in the wind-solar-hydrogen-storage integrated power supply system as an independent variable, establishing an objective function with the goal of minimizing the unit power generation cost of the wind-solar-hydrogen-storage integrated power supply system, and setting constraints based on the load demand power data for the whole year; Step S3, using an improved sparrow search algorithm to solve the objective function and obtain a global optimal solution as the optimal capacity configuration of the wind-solar-hydrogen-storage integrated power supply system; Step S4, based on the natural resource data of the whole year and the optimal capacity configuration, calculate the annual power generation of the wind, solar, hydrogen and storage integrated power supply system, The sparrow individuals in the improved sparrow search algorithm include producers, followers and early warning devices, and the self-reliance strategy is used to improve the position update method of the half of the followers with poor fitness values. The followers with the worst fitness values ​​randomly update their current positions based on the producer position or random search position. Wherein, step S3 includes the following sub-steps: Step S3-1, initialize the sparrow population information, including setting the population size pop, problem dimension d and variable upper and lower bounds ub, lb, producer ratio p_percent, maximum number of iterations iter max , warning threshold ST; Step S3-2, randomly generate the initial population, that is, the initial solution to the problem, calculate the fitness value of each sparrow individual according to the objective function, sort the sparrow individuals according to the fitness value, find the best individual and the worst individual, and obtain the fitness value of the best individual f g and its position X best , the worst individual fitness value f w and its position X worst ; Step S3-3, updating the producer position using a first predetermined algorithm; Step S3-4: Update the follower position according to the following formula: Where, is a random search position, is the third random sparrow individual position, F is the weight factor, is the position with the best fitness value occupied by the producer at the t+1th iteration, is the self-supporting position generated by the self-supporting strategy, rand is used to generate random numbers, ZL is the self-supporting probability, which is used to determine whether the data of each dimension of the self-supporting position is provided by the random search position or the global optimal solution, and f L is the adaptation value of the self-supporting position vector, f X is the adaptation value of the original position vector; Step S3-5, determining whether the warning value of the alarmer has reached a predetermined warning threshold; Step S3-6: if the result of step S3-5 is yes, the position of the alerter is updated using a third predetermined algorithm; Step S3-7: If step S3-5 is judged as no, or step S3-6 is completed, the fitness value of the new generation of sparrow individuals is calculated, and the sparrow individuals are sorted according to the fitness value to find the best individual and the worst individual, and the fitness value of the best individual f is obtained. g and its position X best , the worst individual fitness value f w and its position X worst ; Step S3-8, determining whether a predetermined maximum number of iterations and the constraint condition are reached, if not, incrementing the number of iterations by 1 and returning to step S3-2; Step S3-9: If the result of step S3-8 is yes, the optimal individual at this time is output as the optimal capacity configuration.

2. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 1 is characterized in that: in, Step S3-4 includes the following sub-steps: Step S3-4-1: For the followers with i>n / 2, two different sparrow individuals are randomly selected from the sparrow population, and the vectors of the two sparrow individuals are subtracted to obtain a random vector: In the formula, i is the order number of the sparrow individual, n is the total number of sparrow individuals, are two random sparrow individuals in the sparrow population, l1 and l2 are their index numbers, Z t is the random vector obtained by taking the difference between two sparrow individuals; Step S3-4-2, adding the random vector to the vector of another random sparrow individual according to a predetermined weight to obtain the random search position: Step S3-4-3, based on the random search position and the global optimal position under the current number of iterations, determine the self-supporting position according to the following formula: Step S3-4-4: Use a greedy strategy to compare the fitness values ​​of the independent position and the original position of the follower, and select the position with a higher fitness value as the new position of the follower:

3. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 1 is characterized in that: in, In step S3-3, the producer position is updated according to the following formula: Where t is the current iteration number, is the value of the j-dimensional position of the i-th sparrow individual at iteration t, α is a random number, R2 is the alarm value, Q is a random number that obeys the normal distribution, and L is a 1×d-order matrix with all elements being 1.

4. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 1 is characterized in that: in, In step S3-6, the position of the alerter is updated according to the following formula:

5. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 1 is characterized in that: in, In step S2, the equipment includes a wind turbine, a photovoltaic panel, a hydrogen fuel cell, an alkaline electrolyzer and a hydrogen storage tank. The independent variables to be optimized are: X=N i i=1,2,3,4,5 Where N i i=1,2,3,4,5 are the number of wind turbines, photovoltaic panels, hydrogen fuel cells, alkaline electrolyzers and hydrogen storage tanks respectively. The objective function is: f(X)=C generation +C reliability in: C generation =C total / P total C total =C g +C w +C h Where C generation is the unit power generation cost of the wind-solar-hydrogen-storage integrated power supply system, C reliability is the reliability cost of the wind-solar-hydrogen-storage integrated power supply system, C total is the total investment cost of the wind-solar-hydrogen-storage integrated power supply system during its life cycle, P total is the total power generation during the life cycle of the wind-solar-hydrogen-storage integrated power supply system, C g is the initial cost of each device, C w is the operation and maintenance cost of each equipment, C h is the replacement cost of each device, C i is the initial purchase cost of each equipment, T is the working years of each equipment, P i is the rated power of each device, γ i is the maintenance cost coefficient of each equipment, T i is the working life of each equipment, and r is the inflation coefficient.

6. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 5 is characterized in that: in, The constraints include reliability constraints, equipment output constraints, and power balance constraints. The reliability constraints include: in: Where LPSP is the load power shortage rate of the wind-solar-hydrogen-storage integrated power supply system, P is the number of hours in a year when the net power of the wind-solar-hydrogen-storage integrated power supply system is less than 0. net (t) is the net power of the wind-solar-hydrogen-storage integrated power supply system at time t, P i (t) is the output power of the i-th device at time t, P load (t) is the power required by the load at time t, The equipment output constraints include: The power balance constraints include: P 4 min ≤P 4 in ≤P 4 max R 5j ≤R 5 max Where S i is the total installed capacity of the i-th type of equipment, N ij is the jth unit of the i-th device, S i max is the maximum installed capacity of the i-th type of equipment, P 4 min is the upper limit of the input power of the alkaline electrolyzer, P 4 max Alkaline electrolyzer input power lower limit, P 4 in is the input power of the alkaline electrolyzer, R 5j is the current hydrogen storage capacity of the jth hydrogen storage tank, R 5 max The upper limit of the hydrogen storage tank capacity.

7. The method for optimizing capacity configuration of a wind-solar-hydrogen storage system based on an improved sparrow algorithm according to claim 1 is characterized in that: in, The natural resource data for the entire year include hourly wind speed, temperature, and irradiance data for the region throughout the year.

Citation Information

Patent Citations

  • Microgrid energy storage optimization scheduling method based on sparrow search algorithm

    CN112994085A

  • Distributed power supply locating and sizing optimization method based on improved sparrow search algorithm

    CN113937808A