A method for configuring user-side energy storage capacity based on particle swarm algorithm
Optimizing the configuration of photovoltaic power generation and energy storage systems through particle swarm algorithms, solving the problem that photovoltaic power generation cannot be adjusted independently, achieving efficient utilization of energy storage, reducing electricity bill costs, and promoting the absorption of renewable energy and environmental protection.
Patent Information
- Application Number
- CN202410790045.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-06-19
AI Technical Summary
In the prior art, photovoltaic power generation cannot independently adjust the power generation, resulting in excess power generation and inability to absorb. When the power generation is insufficient, the power grid needs to be replenished, resulting in the problem of increased electricity costs.
Using the user-side energy storage capacity configuration method based on particle swarm algorithm, the objective function is constructed to optimize the photovoltaic power generation cost, energy storage charging and discharging cost, grid power purchase cost and power sales revenue, and iterative calculation determines the maximum energy storage charging and discharging power to achieve Optimal energy storage capacity configuration.
It has improved the utilization rate of photovoltaic power generation, reduced electricity bill costs, enhanced the proportion of green electricity consumption, reduced dependence on the power grid, promoted the absorption of renewable energy, reduced the use of fossil fuels, and has environmental and economic benefits.
Smart Images

Figure CN118365101B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of new energy access to the grid, and in particular relates to a method for configuring user-side energy storage capacity based on a particle swarm algorithm. Background Art
[0002] At present, many electricity users have built self-use photovoltaic power stations to increase the proportion of green electricity consumption. The user-side photovoltaic power generation mostly adopts the "self-generation and self-use, surplus power to the grid" mode, that is, photovoltaic power generation is given priority, and when photovoltaic power generation is insufficient, grid power is used to supplement power consumption, and when photovoltaic power generation is excessive, electricity is sent back to the grid for sale. Although this model avoids the problem of photovoltaic power generation being wasted due to abandoned light, due to the strong volatility of photovoltaic power generation and the peak-valley electricity price difference caused by time-of-use electricity prices, this model often cannot fully absorb photovoltaic power generation on the user side, and at the same time cannot significantly reduce the user's electricity bill. Energy storage can store excess photovoltaic power and discharge it when needed, or use the city power valley to charge peak, which can improve the absorption of photovoltaic power and effectively reduce electricity bills.
[0003] At present, the user-side photovoltaic power generation mostly adopts the mode of "self-generation and self-use, surplus power to the grid", that is, photovoltaic power generation is used first, when photovoltaic power generation is insufficient, grid power is used to supplement power consumption, and when photovoltaic power generation is excessive, power is sent back to the grid for sale. The principle is as follows: Figure 1 shown.
[0004] Figure 1 Implementation method: Since photovoltaic power generation cannot adjust power generation autonomously, it often causes excess power generation to be unable to be consumed, affecting the effective utilization rate of power generation. Sometimes it can only be sold to the power grid at a low price. When power generation is insufficient, it needs to be supplemented by power from the power grid, and photovoltaic power generation energy cannot be effectively utilized. When the peak power load coincides with the peak electricity price period, it will cause an increase in electricity costs. Summary of the invention
[0005] The present invention provides a user-side energy storage capacity configuration method based on a particle swarm algorithm, so as to at least solve the problem in the prior art that photovoltaic power generation cannot autonomously adjust power generation, resulting in excess power generation that cannot be consumed, and when power generation is insufficient, grid power needs to be supplemented, resulting in increased electricity costs.
[0006] Methods include:
[0007] S101: Construct an objective function based on the customer's lack of energy storage, daily photovoltaic power generation costs, energy storage charging and discharging costs, power grid electricity purchase costs, daily photovoltaic power generation sales revenue to the grid after energy storage is configured, and daily photovoltaic power generation sales revenue to the grid when energy storage is not configured;
[0008] S102: defining constraint conditions based on power balance conditions and energy storage charging and discharging conditions;
[0009] S103: Obtain and input known parameter values, and use the particle swarm algorithm to iteratively optimize the optimal solution composed of unknown parameters, and calculate the optimal solution and objective function value; change the configured maximum energy storage discharge power and maximum energy storage charging power according to the preset step size, iteratively optimize the unknown parameters again, and calculate the optimal solution and objective function value; compare all the objective function values obtained to obtain the maximum value, and output the corresponding optimal solution energy storage maximum charging and discharging power.
[0010] It should be further explained that the objective function constructed in step S101 is:
[0011] maxR=C0-(C pv +C s +C g )+C dg -C dg0
[0012] Among them, C0 means the customer does not configure energy storage, C pv is the daily photovoltaic power generation cost, C s is the daily energy storage charging and discharging cost, C g is the daily electricity purchase cost from the power grid, C dg is the revenue from selling electricity from photovoltaic power generation to the grid every day after configuring energy storage, C dg0 The daily revenue from photovoltaic power sales to the grid when no energy storage is configured;
[0013] The calculation method for the customer not configuring energy storage C0 is:
[0014] C0=Δt∑[P l (t)-P pv (t)]c g (t)+C pv
[0015] Where t∈{t|P l (t)-P pv (t)≥0};
[0016] Daily photovoltaic power generation cost C pv The calculation method is:
[0017]
[0018] Among them, r pv is the residual value rate of photovoltaic power after the operation period, c pv is the unit photovoltaic cost, P pv for photovoltaic installed capacity;
[0019] Daily energy storage charging and discharging cost C s The calculation method is:
[0020]
[0021] Among them, r s is the residual value rate of energy storage after the end of its service life, c s is the unit energy storage cost, E s is the energy storage capacity, M is the number of energy storage replacements during the operation period;
[0022] Daily grid electricity purchase cost C g The calculation method is:
[0023] C g =Δt∑c g (t)P g (t)
[0024] Among them, P g (t) is the real-time power of electric energy obtained by the load from the power grid; c g (t) Time-of-use electricity prices for purchasing electricity from the power grid;
[0025] After configuring energy storage, the daily revenue from photovoltaic power generation sold to the grid is C dg The calculation method is:
[0026] C dg =c dg Δt∑P pv,out (t)
[0027] Among them, c dg is the price of photovoltaic grid-connected electricity, P pv,out (t) is the real-time power of photovoltaic power output to the grid after energy storage is configured;
[0028] The daily revenue from photovoltaic power sales to the grid when no energy storage is configured C dg0 The calculation method is:
[0029] C dg0 =c dg Δt∑[P pv (t)-P l (t)]
[0030] Where t∈{t|P l (t)-P pv (t)<0};
[0031] P pv (t) is the daily photovoltaic power generation.
[0032] It should be further explained that the configuration method of the power balance condition in step S102 is:
[0033] P l (t) = P pv (t)-P pv,out(t)+P g (t)+P s (t)
[0034] Among them, P s (t) is the real-time power of energy storage charging and discharging;
[0035] When photovoltaics output electricity to the grid, the energy storage is only charged unidirectionally by photovoltaics and the grid, or discharged unidirectionally to the load, then:
[0036]
[0037] It should be further explained that the configuration method of the energy storage charging and discharging conditions in step S102 is:
[0038]
[0039] Among them, S c,t , S c,t-Δt They represent the ratio of the energy storage capacity to the total energy storage capacity at time t and time t-Δt respectively, and η is the energy storage charging and discharging efficiency;
[0040] For any time t, we have
[0041] S c,min ≤S c,t ≤S c,max
[0042] Among them, S c,min With S c,min They are the minimum and maximum values allowed for the proportion of electricity storage respectively;
[0043] The maximum charge and discharge power of the energy storage real-time charge and discharge power and the remaining charge and discharge capacity of the energy storage are defined as:
[0044]
[0045] Among them, P sin,min is the real-time maximum charging power of the energy storage, P sout,max is the real-time maximum discharge power of the energy storage.
[0046] It should be further explained that step S103 also includes:
[0047] S1031: Obtain known parameters and constant parameter assignments;
[0048] S1032: Initialize unknown parameters;
[0049] S1033: Execute iterative calculation process;
[0050] S1034: Configure the maximum discharge power of energy storage according to the preset step size and maximum charging power of energy storage Right now:
[0051]
[0052] u=1,2,…,f-1
[0053] Where f is a positive integer greater than or equal to 2. Perform iterative calculation again and record it in the maximum discharge power of the energy storage. and maximum charging power of energy storage The optimal solution X pu And the objective function value R(X pu ), when u=f-1, the iterative calculation process ends;
[0054] S1035: All the objective function values R(X pu ) to obtain the maximum value R(X pu ) max Then, output the corresponding optimal solution Maximum charging and discharging power of energy storage
[0055] It should be further explained that step S1031 also includes: obtaining the photovoltaic daily time-sharing power generation Ppv(t), the user's daily load curve P l (t), time-of-use electricity price c g (t) known time-sharing function;
[0056] Also obtain the transformer capacity P c , time interval Δt, photovoltaic installed capacity P pv 、Unit photovoltaic cost c pv 、Unit energy storage cost c s , Photovoltaic residual value rate r pv , energy storage residual value rate r s , operation period Y, number of energy storage replacements M, photovoltaic grid-connected electricity sales price c dg ;
[0057] Set the minimum value S allowed for the storage ratio c,min and the maximum value S c,max The value of
[0058] According to the transformer capacity P c and load power P l (t) Set the initial maximum energy storage charge and discharge power, the initial maximum energy storage discharge power The value of is shown as follows
[0059]
[0060] Among them, P l,min (t), Pl,max (t) are the minimum power and maximum power required by the load respectively.
[0061] It should be further explained that step S1032 also includes: the objective function f is P pv,out (t), P g (t), P s (t), S c,t (t), S c,t-Δt (t), E s The function of pv,out (t), P g (t), P s (t), S c,t (t), S c,t-Δt (t) are all expressed as discrete functions with 24 / Δt sets of data, which are defined as x1(t), x2(t), x3(t), x4(t), x5(t), and x6;
[0062] That is, the objective function R = f(x1(t), x2(t), x3(t), x4(t), x5(t), x6);
[0063] Given n sets of solutions that meet the constraints, the initial value X 0 ,Right now:
[0064] or
[0065]
[0066] At the same time, the initial velocity vector V of the solution is given i 0 ,Right now:
[0067]
[0068] It should be further explained that step S1033 further includes: let subscript i represent the i-th group of solutions, and superscript j represent the j-th iteration;
[0069] S10331: Suppose that after j iterations, the value of the i-th group of solutions at a certain iteration is Make the objective function R reach the maximum value, then The value of That is, the i-th group of solutions X i The historical optimal solution of is expressed as:
[0070]
[0071] k∈{0,1,…,j}
[0072] S10332: Suppose that after j iterations, among all n solutions, the value of the hth solution at a certain iteration is Make the objective function R reach the maximum value, then The value of is recorded as gbest j , that is, the global optimal solution of all n groups of solutions is expressed as:
[0073]
[0074] m∈{0,1,…,j},h∈{0,1,…,j}
[0075] S10333: Calculate the approximation speed. Suppose the approximation speed of the i-th group of solutions at the j-th iteration is The calculation formula is:
[0076]
[0077] Among them, w is the inertia weight, c1 is the individual acceleration factor, c2 is the social acceleration factor, c1 and c2 take constant values, and w adopts a linear decreasing inertia weight. The formula is as follows:
[0078]
[0079] Among them, w j represents the inertia weight at the jth iteration, w 0 The value is 0.9, w e The value is 0.4, and L represents the number of program iterations set;
[0080] S10334: Let the solution obtained by the i-th group of solutions at the j-th iteration be Then we have:
[0081]
[0082] S10335: Iterate and calculate the objective function. Substitute the objective function and calculate again, and use the calculation results to update the historical optimal solution of each group of solutions And the global optimal solution of all n groups of solutions gbset j , and then calculate the approximation speed of the next iteration again And optimize the optimal solution The loop ends when the set number of iterations is completed or the calculated objective function error does not exceed the set value, that is:
[0083]
[0084] It can be seen from the above technical solutions that the present invention has the following advantages:
[0085] In the user-side energy storage capacity configuration method based on the particle swarm algorithm involved in the present invention, an objective function is first constructed based on the customer's non-configured energy storage, daily photovoltaic power generation costs, energy storage charging and discharging costs, power grid electricity purchase costs, daily photovoltaic power generation to the power grid after energy storage is configured, and daily photovoltaic power sales to the power grid when energy storage is not configured; define constraints based on power balance conditions and energy storage charging and discharging conditions; obtain parameter values, and iteratively calculate unknown parameter values, configure the maximum energy storage discharge power and the maximum energy storage charging power according to the preset step size, and calculate the optimal solution and objective function value; compare all the obtained objective function values, obtain the maximum value, and output the corresponding optimal solution energy storage maximum charging and discharging power. In this way, the present application can solve the problem that when photovoltaic power generation is in excess under the "self-generation and self-use, surplus power on the grid" mode, it cannot be absorbed, and the power grid is sold at a low price, and the photovoltaic income is reduced. The method of the present invention can also use peak and valley electricity prices to reduce the electricity cost on the user side by charging the valley and using the peak. The present application helps to achieve the optimal energy storage capacity configuration and operation strategy and increase the proportion of green electricity consumption.
[0086] The present invention can also reduce dependence on the power grid and reduce the cost of purchasing electricity by optimizing the charging and discharging power of the energy storage system. Reasonable configuration of the energy storage system can maximize the use of photovoltaic power generation, reduce energy waste, and thus reduce the cost of photovoltaic power generation. Energy storage can store electricity during the peak period of photovoltaic power generation and release electricity during the peak demand or the low period of photovoltaic power generation, thereby balancing the load of the power grid and improving energy utilization efficiency. By optimizing the revenue from electricity sales, more photovoltaic power can be used to further promote the consumption of renewable energy. The application also optimizes the use of energy storage to reduce dependence on fossil fuels, reduce greenhouse gas emissions, and is beneficial to environmental protection. Maximizing the use of photovoltaic power generation helps promote the development of renewable energy and is in line with the strategic direction of sustainable development. By optimizing the configuration of the energy storage system, the user's electricity bill expenditure can be reduced and the economic benefits can be improved. The optimization of electricity sales revenue can bring additional economic benefits to users and enhance users' confidence in investing in renewable energy. The application can provide decision makers with a scientific basis for the configuration and operation strategy of the energy storage system by constructing a model and iterative calculation. The output results of the model can guide users to make investment decisions and operation management of the energy storage system. The model of the present application can be adjusted according to different parameters and scenarios to adapt to different needs and conditions. Iterative calculation methods can handle complex optimization problems and find the global optimal solution or approximate optimal solution. They can reduce overall costs, improve energy efficiency, enhance system stability, bring environmental and economic benefits, and provide decision support for decision makers. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0088] Figure 1 It is a schematic diagram of the prior art;
[0089] Figure 2 A flow chart of a method for configuring user-side energy storage capacity based on a particle swarm algorithm;
[0090] Figure 3 This is the schematic diagram of the photovoltaic storage system. DETAILED DESCRIPTION
[0091] In the following description, in order to illustrate the exemplary content of the user-side energy storage capacity configuration method based on the particle swarm algorithm of the present invention, rather than to limit it, specific details such as specific system structures and technologies are proposed to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details.
[0092] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or their collections. The terms "comprising", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0093] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" etc. that appear in different places in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0094] The present invention relates to a user-side energy storage capacity configuration method based on a particle swarm algorithm. The objective function can be configured based on intelligent processing technology for information on the unconfigured energy storage of the associated customer, the daily photovoltaic power generation cost, the energy storage charging and discharging cost, the power grid electricity purchase cost, the daily photovoltaic power generation sales revenue to the power grid after the energy storage is configured, and the daily photovoltaic power sales revenue to the power grid when the energy storage is not configured. In combination with the data acquisition and processing process, constraint conditions are defined based on power balance conditions and energy storage charging and discharging conditions; parameter values are obtained, and the parameter values are iteratively calculated, the maximum energy storage discharge power and the maximum energy storage charging power are configured according to a preset step size, and the optimal solution and the objective function value are calculated; all the objective function values obtained are compared to obtain the maximum value, and the corresponding optimal solution energy storage maximum charging and discharging power is output.
[0095] The user-side energy storage capacity configuration method of the present invention utilizes a digital computer-controlled machine to simulate, extend and expand human intelligence, and is based on theories, methods, technologies and application devices of artificial neural networks, transfer learning, inductive learning, environmental perception, knowledge acquisition and use of knowledge to obtain the best results. By establishing a mathematical model, the objective function is expressed as the external photovoltaic power P pv,out (t), grid power P g (t), energy storage charging and discharging power P s (t), energy storage capacity ratio S c,t (t), S c,t-Δt (t), energy storage capacity E s The function is optimized by particle swarm algorithm to obtain the solution that can maximize the objective function, which solves the problem in the prior art that photovoltaic power generation cannot autonomously adjust the power generation, resulting in excess power generation that cannot be consumed, and when the power generation is insufficient, the grid needs to supplement it, resulting in increased electricity costs.
[0096] The user-side energy storage capacity configuration method and steps of the present invention will be described in detail below with reference to the accompanying drawings.
[0097] Among them, the relevant keywords involved in the present invention are explained as follows:
[0098] Objective function: The algorithm calculates the increase in daily revenue after energy storage configuration compared to before energy storage configuration;
[0099] Initialization: The initial value of the solution that meets the constraints when the given algorithm is solving the problem.
[0100] Historical optimal solution: A set of solutions that, in the iteration process up to the present, when substituted into the objective function, results in the maximum value of the objective function.
[0101] Global optimal solution: The solution that maximizes the objective function after all n groups of solutions are substituted into the objective function in the iteration process so far.
[0102] The user-side energy storage capacity configuration method of the present invention can be applied to the power generation and grid-connection analysis and energy storage status analysis of photovoltaic power stations. It combines the status of photovoltaic power generation, energy storage, load and power grid to obtain the optimal energy storage capacity and PCS configuration and photovoltaic storage playback strategy, which has a positive effect on improving energy utilization.
[0103] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0104] like Figures 2 to 3 As shown, in this embodiment, a system can be composed of photovoltaics, energy storage, power grid and load. The amount of electricity required for the load involved can be provided by photovoltaics, energy storage and power grid at the same time, or it can be powered by any one of photovoltaics, energy storage and power grid, or any two of them. Photovoltaics can also output electricity to energy storage, load and power grid at the same time. When photovoltaics output electricity to the grid, the grid may not output electricity to the load, or charge the energy storage. Of course, energy storage is generally only charged unidirectionally by photovoltaics and the grid, or discharged unidirectionally to the load. The specific implementation method can be configured based on the actual operation process, and is not limited here.
[0105] The user-side energy storage capacity configuration method based on particle swarm algorithm provided by the present invention includes:
[0106] S101: Construct an objective function based on the customer's lack of energy storage, daily photovoltaic power generation costs, energy storage charging and discharging costs, grid power purchase costs, daily photovoltaic power generation sales revenue to the grid after energy storage is configured, and daily photovoltaic power generation sales revenue to the grid when energy storage is not configured.
[0107] In an exemplary embodiment, the system knows the capacity of the transformer at the user side P c , unit kW. Photovoltaic power generation installed capacity P pv , unit kW. It should be noted that P pv Less than P c . According to the photovoltaic daily time-sharing power generation P pv (t), the user's daily load curve P l (t), time-of-use electricity price c g (t), time interval Δt defines the objective function:
[0108] maxR=C0-(C pv +C s +C g )+C dg -C dg0
[0109] Among them, C0 is the inherent daily energy consumption cost when the customer does not configure energy storage and adopts the photovoltaic "self-generation and self-use" mode, and C pv is the daily photovoltaic power generation cost, C s is the daily energy storage charging and discharging cost, C g is the daily electricity purchase cost from the power grid, C dg is the revenue from selling electricity from photovoltaic power generation to the grid every day after configuring energy storage, C dg0 The daily revenue from photovoltaic power sales to the grid when no energy storage is configured, assuming that the operation period is Y years without considering inflation and price changes. Y years can be set based on the actual operating life of the system and the design life, and the specific value is not limited here.
[0110] It should be noted that the daily energy consumption cost of the customer without energy storage C0 is a fixed cost. C0 is the fixed daily energy consumption cost. The daily photovoltaic power generation cost C pv It includes the depreciation, operation and maintenance costs of the photovoltaic system, but does not include the cost of the photovoltaic module itself to generate electricity, that is, Cpv = daily depreciation and operation and maintenance costs of the photovoltaic system. s Including the depreciation of the energy storage system, operation and maintenance costs, and possible loss of charging and discharging efficiency. If the user does not configure energy storage, then C s is 0.
[0111] Optionally, the daily grid electricity purchase cost C g Depends on the amount of electricity purchased from the grid and the price of electricity. Cg = daily amount of electricity purchased from the grid × electricity price.
[0112] After configuring energy storage, the daily revenue C of photovoltaic power generation selling electricity to the grid dg Depends on the amount of electricity sold by customers to the grid and the price of electricity. dg = Daily electricity sold to the grid × electricity price. If the user does not configure energy storage, the electricity sold may be reduced due to self-use needs.
[0113] The daily revenue of photovoltaic power sales to the grid when no energy storage is configured C dg0 When there is no energy storage system, the customer sells excess photovoltaic power to the grid. dg0 =The amount of electricity sold to the grid every day when no energy storage is configured × the electricity price.
[0114] For the embodiment of the present application, the calculation method of the customer not configuring energy storage C0 is:
[0115] C0=Δt∑[P l (t)-P pv (t)]c g (t)+C pv
[0116] Where t∈{t|P l (t)-P pv (t)≥0}.
[0117] Daily photovoltaic power generation cost C pv The calculation method is:
[0118]
[0119] Among them, r pv is the residual value rate of photovoltaic power after the operation period, unit: %; c pv is the unit photovoltaic cost, unit yuan / kW; P pv is the photovoltaic installed capacity, in kW.
[0120] In this embodiment, the daily energy storage charging and discharging cost C s The calculation method is:
[0121]
[0122] Among them, r s is the residual value rate of energy storage after the end of its service life, unit %, c s is the unit energy storage cost, unit yuan / kW·h; E s is the energy storage capacity, unit: / kW·h; M is the number of times the energy storage is replaced during the operation period.
[0123] The daily power purchase cost C of the power grid in this embodiment is g The calculation method is:
[0124] C g =Δt∑c g (t)P g (t)
[0125] Among them, P g (t) is the real-time power of electric energy obtained by the load from the power grid.
[0126] After configuring energy storage, the daily revenue from photovoltaic power generation sold to the grid is C dg The calculation method is:
[0127] C dg =c dg Δt∑P pv,out (t)
[0128] Among them, c dg is the price of photovoltaic grid-connected electricity, unit: yuan / (kW·h), P pv,out (t) is the real-time power of photovoltaic power output to the grid after energy storage is configured, in kW.
[0129] In this embodiment, when energy storage is not configured, the daily revenue of photovoltaic power sales to the grid is C dg0 The calculation method is:
[0130] C dg0 =c dg Δt∑[P pv (t)-P l (t)]
[0131] Where t∈{t|P l (t)-P pv (t)<0}.
[0132] S102: Define constraint conditions based on power balance conditions and energy storage charging and discharging conditions.
[0133] In an exemplary embodiment, the power balance is calculated based on the following formula,
[0134] P l (t) = P pv (t)-P pv,out (t)+P g (t)+P s (t)
[0135] Among them, P s (t) is the real-time power of energy storage charging and discharging, where discharging is positive and charging is negative. Since the grid cannot output power to the load or charge the energy storage when the photovoltaic power plant outputs power to the grid, the energy storage can only be charged unidirectionally by the photovoltaic power plant and the grid, or discharged unidirectionally to the load, we have:
[0136]
[0137] The energy storage charge and discharge calculation method of this embodiment is:
[0138]
[0139] Among them, S c,t , S c,t-Δt They represent the ratio of the energy storage capacity to the total energy storage capacity at time t and time t-Δt, respectively, and η is the energy storage charging and discharging efficiency. For any time t, there is
[0140] S c,min ≤S c,t ≤S c,max
[0141] Among them, S c,min With S c,min They are the minimum and maximum values allowed for the storage ratio.
[0142] The real-time charging and discharging power of the energy storage in this embodiment is limited by the maximum charging and discharging power of the energy storage and the remaining charging and discharging capacity of the energy storage, as follows:
[0143]
[0144] Among them, P sin,min is the maximum charging power of the energy storage. sout,max is the maximum discharge power of the energy storage.
[0145] That is, when the energy storage is charged, when the rechargeable capacity allows charging at the maximum charging power within the Δt period, the energy storage charging power is less than or equal to the maximum charging power; when the rechargeable capacity does not allow charging at the maximum charging power within the Δt period, the energy storage charging power is less than or equal to the average charging power of the rechargeable capacity within the Δt period, and vice versa.
[0146] S103: Obtain and input known parameter values, and use a particle swarm algorithm to iterate the optimal solution composed of unknown parameters to calculate the optimal solution and objective function value;
[0147] The configured maximum energy storage discharge power and maximum energy storage charging power are changed according to the preset step size, and the unknown parameters are iteratively optimized again to calculate the optimal solution and objective function value; all the objective function values obtained are compared to obtain the maximum value, and the corresponding optimal solution energy storage maximum charging and discharging power is output.
[0148] It should be noted that the known parameter values include but are not limited to the photovoltaic daily time-sharing power generation P pv (t), the user's daily load curve P l (t), time-of-use electricity price c g (t) etc. Known time-sharing function and transformer capacity P c , time interval Δt, photovoltaic installed capacity P pv 、Unit photovoltaic cost c pv 、Unit energy storage cost c s , Photovoltaic residual value rate r pv , energy storage residual value rate r s , operation period Y, number of energy storage replacements M, photovoltaic grid-connected electricity sales price c dg , the minimum value S allowed for the proportion of electricity storage c,min and the maximum value S c,max The unknown parameter values include but are not limited to the external photovoltaic power P pv,out (t), grid power P g (t), energy storage charging and discharging power P s (t), energy storage capacity ratio S c,t (t), S c,t-Δt (t), energy storage capacity E s wait.
[0149] In an embodiment of the present invention, based on step S103, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner.
[0150] S1031: Obtain known parameters and constant parameter assignments.
[0151] In this embodiment, the photovoltaic daily time-sharing power generation P can be obtained pv (t), the user's daily load curve P l (t), time-of-use electricity price c g (t) and other known time-sharing functions.
[0152] Also obtain the transformer capacity P c , time interval Δt, photovoltaic installed capacity P pv 、Unit photovoltaic cost c pv 、Unit energy storage cost c s , Photovoltaic residual value rate r pv , energy storage residual value rate r s , operation period Y, number of energy storage replacements M, photovoltaic grid-connected electricity sales price c dg Equal constants.
[0153] Furthermore, the minimum value S allowed for the storage ratio is set c,min and the maximum value S c,max value; according to the transformer capacity P c and load power P l (t) Set the initial maximum energy storage charge and discharge power, the initial maximum energy storage discharge power The value of is shown as follows:
[0154]
[0155] Among them, P l,min (t), P l,max (t) are the minimum power and maximum power required by the load, and the initial maximum charging power of the energy storage The absolute value of can be slightly less than The value of .
[0156] S1032: Initialize unknown parameters.
[0157] From the expressions of the objective function and constraint conditions of this embodiment, it can be seen that the objective function f is actually P pv,out (t), P g (t), P s (t), S c,t (t), S c,t-Δt (t), E s The function of pv,out (t), P g(t), P s (t), S c,t (t), S c,t-Δt (t) can be expressed as a discrete function with 24 / Δt sets of data, assuming that they are x1(t), x2(t), x3(t), x4(t), x5(t), x6, that is, the objective function R = f(x1(t), x2(t), x3(t), x4(t), x5(t), x6).
[0158] Furthermore, this embodiment can give n groups of solutions that meet the constraints. 0 ,Right now:
[0159]
[0160] At the same time, the initial velocity vector V of the solution is given i 0 ,Right now:
[0161]
[0162] S1033: Execute iterative calculation process.
[0163] In this embodiment, the subscript "i" represents the i-th solution, and the superscript "j" represents the j-th iteration.
[0164] (1) Suppose that after j iterations, the value of the i-th group of solutions at a certain iteration is Make the objective function R reach the maximum value, then The value of That is, the i-th group of solutions X i The best historical solution.
[0165] Here the formula can be expressed as:
[0166]
[0167] k∈{0,1,…,j}
[0168] (2) Suppose that after j iterations, among all n solutions, the value of the hth solution at a certain iteration is Make the objective function R reach the maximum value, then The value of is recorded as gbest j , which is the global optimal solution of all n groups of solutions.
[0169] It can be expressed as:
[0170]
[0171] m∈{0,1,…,j},h∈{0,1,…,j}
[0172] (3) Calculate the approximation speed. Suppose the approximation speed of the i-th solution at the j-th iteration is
[0173] The calculation formula is:
[0174]
[0175] w is the inertia weight, c1 is the individual acceleration factor, c2 is the social acceleration factor, c1 and c2 take constant values (usually 2), w can use a linear decreasing inertia weight, the formula is as follows:
[0176]
[0177] Among them, w j represents the inertia weight at the jth iteration, w 0 The general value is 0.9, w e The value is generally 0.4, and L represents the number of set program iterations.
[0178] (4) Optimize the optimal solution. Suppose the solution obtained by the i-th group of solutions at the j-th iteration is Then we have:
[0179]
[0180] (5) Iterate and calculate the objective function. Here, Substitute the objective function and calculate again, and use the calculation results to update the historical optimal solution of each group of solutions And the global optimal solution of all n groups of solutions gbset j , and then calculate the approximation speed of the next iteration again And optimize the optimal solution The loop ends when the set number of iterations is completed or the calculated objective function error does not exceed the set value, that is:
[0181]
[0182] Among them, δ is a sufficiently small positive number. The maximum discharge power of the energy storage recorded at the beginning and the initial maximum charging power of the energy storage The optimal solution X and the value of the objective function R obtained are X p0 and R(X p0 ).
[0183] S1034: Configure the maximum energy storage discharge power P according to the preset step length sout,max and the maximum charging power P of energy storage sin,min ,Right now:
[0184]
[0185] u=1,2,…,f-1
[0186] Where f is a positive integer greater than or equal to 2. Perform iterative calculation again and record it in the new maximum energy storage discharge power. and maximum charging power of energy storage The optimal solution X pu And the objective function value R(X pu ), and the program ends when u=f-1.
[0187] S1035: All the objective function values R(X pu ) to obtain the maximum value R(X pu )max, output the corresponding optimal solution Maximum charging and discharging power of energy storage
[0188] It can be seen that in the user-side energy storage capacity configuration method based on the particle swarm algorithm involved in this embodiment, an objective function is first constructed based on the customer's non-configured energy storage, daily photovoltaic power generation costs, energy storage charging and discharging costs, power grid purchase costs, daily photovoltaic power generation to the grid after configuring energy storage, and daily photovoltaic power sales to the grid when energy storage is not configured; define constraints based on power balance conditions and energy storage charging and discharging conditions; obtain parameter values, and iteratively calculate the parameter values, configure the maximum energy storage discharge power and the maximum energy storage charging power according to the preset step size, and calculate the optimal solution and objective function value; compare all the objective function values obtained to obtain the maximum value, and output the corresponding optimal solution energy storage maximum charging and discharging power. In this way, the present application can solve the problem that when photovoltaic power generation is in excess under the "self-generation and self-use, surplus power on the grid" mode, it cannot be absorbed, and the power grid is sold at a low price, and the photovoltaic income is reduced. The method of the present invention can also use peak and valley electricity prices to reduce the electricity cost on the user side by charging the valley and using the peak. The present application helps to achieve the optimal energy storage capacity configuration and operation strategy and increase the proportion of green electricity consumption.
[0189] In the user-side energy storage capacity configuration method based on the particle swarm algorithm involved in this embodiment, by optimizing the charging and discharging power of the energy storage system, the dependence on the power grid can be reduced and the cost of purchasing electricity can be reduced. Reasonable configuration of the energy storage system can maximize the use of photovoltaic power generation, reduce energy waste, and thus reduce the cost of photovoltaic power generation. The energy storage system involved in this embodiment can store electricity during the peak period of photovoltaic power generation and release electricity during the peak demand or the low period of photovoltaic power generation, thereby balancing the load of the power grid and improving energy utilization efficiency. By optimizing the revenue from electricity sales, more photovoltaic power can be encouraged to be used, further promoting the consumption of renewable energy. This application also optimizes the use of energy storage to reduce dependence on fossil fuels, reduce greenhouse gas emissions, and is beneficial to environmental protection. Maximizing the use of photovoltaic power generation helps promote the development of renewable energy and is in line with the strategic direction of sustainable development. By optimizing the configuration of the energy storage system, the user's electricity bill expenditure can be reduced and the economic benefits can be improved. The optimization of electricity sales revenue can bring additional economic benefits to users and enhance users' confidence in investing in renewable energy. This application can provide decision makers with a scientific basis for energy storage system configuration and operation strategy by constructing a model and iterative calculation. The output results of the model can guide users in making investment decisions and operating management of energy storage systems. The model of this application can be adjusted according to different parameters and scenarios to adapt to different needs and conditions. The iterative calculation method can handle complex optimization problems and find the global optimal solution or the approximate optimal solution. It can reduce overall costs, improve energy efficiency, enhance system stability, bring environmental and economic benefits, and provide decision support for decision makers.
[0190] The user-side energy storage capacity configuration method of the present invention is a combination of the units and algorithm steps of each example described in the embodiments disclosed herein, and can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0191] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for configuring user-side energy storage capacity based on particle swarm algorithm, characterized in that the method include: S101: Construct an objective function based on the customer's lack of energy storage, daily photovoltaic power generation costs, energy storage charging and discharging costs, power grid electricity purchase costs, daily photovoltaic power generation sales revenue to the grid after energy storage is configured, and daily photovoltaic power generation sales revenue to the grid when energy storage is not configured; The transformer capacity P on the user side is known. c , Photovoltaic power generation installed capacity P pv , according to the photovoltaic daily time-sharing power generation P pv (t), the load power P corresponding to the user's daily load curve l (t), time-of-use electricity price c g (t), time interval Δt defines the objective function: R=C0-(C pv +C s +C g )+C dg -C dg0 Among them, C0 means the customer does not configure energy storage, C pv is the daily photovoltaic power generation cost, C s is the daily energy storage charging and discharging cost, C g is the daily electricity purchase cost from the power grid, C dg is the revenue from selling electricity from photovoltaic power generation to the grid every day after configuring energy storage, C dg0 The daily revenue from photovoltaic power sales to the grid when no energy storage is configured; C dg = Daily electricity sold to the grid × electricity price; C dg0 = The amount of electricity sold to the grid every day when no energy storage is configured × electricity price; The calculation method for the customer not configuring energy storage C0 is: C0=Δt∑[P l (t)-P pv (t)]c g (t)+C pv Where t∈{t|P l (t)-P pv (t)≥0}; Daily photovoltaic power generation cost C pv The calculation method is: Among them, r pv is the residual value rate of photovoltaic power after the operation period, c pv is the unit photovoltaic cost; Daily energy storage charging and discharging cost C s The calculation method is: Among them, r s is the residual value rate of energy storage after the end of its service life, c s is the unit energy storage cost, E s is the energy storage capacity, M is the number of energy storage replacements during the operation period; Daily grid electricity purchase cost C g The calculation method is: C g =Δt∑c g (t)P g (t) Among them, P g (t) is the real-time power of electric energy obtained by the load from the power grid; After configuring energy storage, the daily revenue from photovoltaic power generation sold to the grid is C dg The calculation method is: C dg =c dg Δt∑P pv,out (t) Among them, c dg is the price of photovoltaic grid-connected electricity, P pv,out (t) is the real-time power of photovoltaic power output to the grid after energy storage is configured; The daily revenue from photovoltaic power sales to the grid when no energy storage is configured C dg0 The calculation method is: C dg0 =c dg Δt∑[P pv (t)-P l (t)] Where t∈{t|P l (t)-P pv (t)<0}; S102: defining constraint conditions based on power balance conditions and energy storage charging and discharging conditions; The power balance is calculated based on the following formula, P l (t)=P pv (t)-P pv,out (t)+P g (t)+P s (t) Among them, P s (t) is the real-time power of energy storage charging and discharging; When photovoltaics output electricity to the grid, the energy storage is only charged unidirectionally by photovoltaics and the grid, or discharged unidirectionally to the load, then: P pv (t),P g (t)≥0 0≤P pv,out (t)≤P pv (t); If P pv,out (t)>0, then P g (t) = 0 The calculation method of energy storage charging and discharging is: Among them, S c,t , S c,t-Δt They represent the ratio of the energy storage capacity to the total energy storage capacity at time t and time t-Δt respectively, and η is the energy storage charging and discharging efficiency; For any time t, we have S c,min ≤S c,t ≤S c,max Among them, S c,min With S c,max They are the minimum and maximum values allowed for the proportion of electricity storage respectively; The real-time charging and discharging power of energy storage is limited by the maximum charging and discharging power of energy storage and the remaining charging and discharging capacity of energy storage, as follows: Among them, P sin,min is the real-time maximum charging power of the energy storage, P sout,max is the real-time maximum discharge power of the energy storage; S103: Obtain and input known parameter values, and use a particle swarm algorithm to iterate the optimization of the optimal solution composed of the unknown parameters, and calculate a first optimal solution and a first objective function value; The configured maximum energy storage charging power and the maximum energy storage discharging power are changed according to a preset step size, and the unknown parameters are iteratively optimized again to calculate the second optimal solution and the second objective function value; Compare all the obtained second objective function values to obtain the maximum value, and output the corresponding optimal solution energy storage maximum charging power; S1031: Obtain known parameters and constant parameter assignments; Get the photovoltaic daily time-sharing power generation P pv (t), the load power P corresponding to the user's daily load curve l (t), time-of-use electricity price c g (t); Also obtain P c , time interval Δt, P pv , C pv , C s 、r pv 、r s , Operation period Y, M, PV grid-connected electricity sales price c dg ; Set the minimum value S allowed for the storage ratio c,min and the maximum value S c,max The value of; According to the known user side transformer capacity P c The load power P corresponding to the user's daily load curve l (t) Set the initial maximum energy storage charging power and the initial maximum energy storage discharging power The value of is shown as follows: Among them, P l,min (t), P l,max (t) are the minimum power and maximum power required by the load corresponding to the daily load curve; S1032: Initialize unknown parameters; Based on the expressions of the objective function and constraints, the objective function R is actually P pv,out (t), P g (t), P s (t), S c,t (t), S c,t-Δt (t), E s Function of Among them, P pv,out (t), P g (t), P s (t), S c,t (t), S c,t-Δt (t) are all expressed as discrete functions with 24 / Δt groups of data, namely x1(t), x2(t), x3(t), x4(t), x5(t), x6, that is, the objective function R = f(x1(t), x2(t), x3(t), x4(t), x5(t), x6); Given n sets of solutions that meet the constraints, the initial value X 0 ,Right now: or At the same time, the initial velocity vector of the solution is given Right now: S1033: Execute iterative calculation process; Let subscript i denote the i-th solution, and superscript j denote the j-th iteration; S10331: Suppose that after j iterations, the value of the i-th group of solutions at a certain iteration is Make the objective function R reach the maximum value, then The value of That is, the i-th group of solutions X i The historical optimal solution; The formula is: k∈{0,1,…,j} S10332: Suppose that after j iterations, among all n solutions, the value of the hth solution at a certain iteration is Make the objective function R reach the maximum value, then The value of is recorded as gbest j , that is, the global optimal solution of all n groups of solutions; The formula is: m∈{0,1,…,j},h∈{0,1,…,j} S10333: Calculate the approximation speed. Suppose the approximation speed of the i-th group of solutions at the j-th iteration is The calculation formula is: w is the inertia weight, c1 is the individual acceleration factor, c2 is the social acceleration factor, c1 and c2 take constant values, and w adopts a linear decreasing inertia weight, and the formula is as follows: Among them, w j represents the inertia weight at the jth iteration, w 0 The value is 0.9, w e The value is 0.4, and L represents the number of program iterations set; S10334: Optimize the optimal solution. Suppose the solution obtained by the i-th group of solutions at the j-th iteration is Then we have: S10335: Iterate and calculate the objective function. Substitute the objective function and calculate again, and use the calculation results to update the historical optimal solution of each group of solutions And the global optimal solution of all n groups of solutions gbset j , and then calculate the approximation speed of the next iteration again And optimize the optimal solution The loop ends when the set number of iterations is completed or the calculated objective function error does not exceed the set value, that is: Record the maximum discharge power of the energy storage at the initial and the initial maximum charging power of the energy storage The values of the first optimal solution X and the first objective function R obtained are X p0 and R(X p0 ); S1034: Configure the maximum energy storage discharge power P according to the preset step length sout,max and the maximum charging power P of energy storage sin,min ,Right now: u=1,2,…,f-1 Where f is a positive integer greater than or equal to 2. Perform iterative calculation again and record it in the new maximum discharge power of energy storage. and maximum charging power of energy storage The second best solution X pu and the second objective function value R(X pu ), when u=f-1, the program ends; S1035: All the obtained second objective function values R(X pu ) to compare, and after obtaining the maximum value, output the corresponding optimal solution Maximum discharge power of energy storage Energy storage maximum charging power
Citation Information
Patent Citations
Micro-grid energy storage optimization configuration method based on particle swarm algorithm
CN112103946A