Energy storage scheduling method and system of photovoltaic energy storage system based on particle swarm optimization
By using a photovoltaic energy storage system based on particle swarm optimization, the initial capacity is determined and the charging and discharging strategy is optimized, which solves the problem of the inability to cope with changes in power load in the existing technology, and realizes precise control of the energy storage system and improves economic efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2026-03-24
AI Technical Summary
Existing energy storage dispatching schemes are unable to cope with real-time changes in power load, making it difficult to achieve flexible response to power demand and maximize economic benefits.
A photovoltaic energy storage system based on particle swarm optimization is adopted. The initial capacity is determined by selecting the point with the largest rate of increase in the energy storage capacity-maximum annual average peak reduction ratio curve. Combined with the state of charge, load power and photovoltaic power generation, the particle swarm optimization algorithm is used to train and optimize the charging and discharging strategy of the energy storage system. The objective function is to maximize the internal rate of return and the cost recovery rate.
It enables precise control of the energy storage system, effectively responds to real-time changes in power load, improves grid stability and economic efficiency, and reduces operating costs.
Smart Images

Figure CN120675140B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microgrid dispatching, and specifically to a method and system for dispatching photovoltaic energy storage systems based on particle swarm optimization. Background Technology
[0002] Microgrids, as an emerging form of energy management, have developed rapidly in recent years. Providing a reasonable energy dispatch strategy is crucial to ensuring the safe, stable, and economical operation of microgrid systems. Since renewable energy sources exhibit natural complementarity in time and space, their rational use can effectively reduce the need for energy storage capacity. Energy storage devices can mitigate random fluctuations caused by the integration of renewable energy. The photovoltaic-storage management system (PV-SMS) dispatches the system through regulation to ensure stable operation, reduce operating costs, and achieve optimal energy management. Optimized dispatching by the PV-SMS system refers to maximizing the utilization of renewable energy in the microgrid by scheduling photovoltaic units and energy storage units, achieving peak shaving and valley filling, and ultimately minimizing overall operating costs and maximizing comprehensive social benefits.
[0003] Currently, most existing energy storage strategies rely on peak-valley arbitrage with fixed time and fixed power, that is, maximizing economic benefits by storing electricity during periods of low electricity prices and discharging it during periods of high electricity prices. However, this fixed-time and fixed-power strategy ignores the volatility and flexibility of electricity demand and is difficult to cope with real-time changes in electricity load. Summary of the Invention
[0004] This invention proposes an energy storage scheduling method and system based on particle swarm optimization for photovoltaic energy storage systems, in order to solve the technical problem that existing energy storage scheduling schemes are unable to cope with real-time changes in power load.
[0005] To address the aforementioned technical problems, this invention provides an energy storage scheduling method and system for photovoltaic energy storage systems based on particle swarm optimization, comprising the following steps:
[0006] Step S1: Select the point with the largest rate of increase in the energy storage capacity-maximum annual average peak reduction ratio curve to determine the initial capacity of the energy storage system;
[0007] Step S2: Use the state of charge, load power, photovoltaic power generation and time of the energy storage system as the state space, and the energy storage power as the optimization action; use minimizing the product of the square root of the maximum grid power peak within the time period and the sum of the squares of the daily grid power peak as the optimization objective, and train the particle swarm optimization algorithm.
[0008] Step S3: Within the range of ±A% of the initial capacity value, select alternative energy storage capacity values at equal intervals, and traverse them using a trained particle swarm optimization algorithm. Solve the algorithm with the objective function of maximizing the weighted sum of the internal rate of return (IRR) and the cost recovery rate, thus obtaining the energy storage capacity configuration value and the corresponding action strategy, where A is a number greater than zero.
[0009] Preferably, step S1 includes:
[0010] Step S11: Plot the power curve;
[0011] Step S12: Take the average value of the load power as the minimum value of the peak power, and take the maximum value of the load power as the maximum value of the peak power;
[0012] Step S13: Calculate the maximum peak reduction ratio under different energy storage capacities, and plot the ideal peak power for each month under different energy storage capacities. The maximum annual average peak reduction ratio is obtained by averaging the ideal peak reduction ratios for each month.
[0013] Step S14: Based on the energy storage capacity-maximum annual average peak shaving ratio curve, select the point with the largest increase rate as the initial capacity of the energy storage system.
[0014] Preferably, the expression for the optimization objective in step S2 is:
[0015] ;
[0016] In the formula, Indicate the optimization objective; The time length of a typical load power curve; This indicates the peak daily power supply to the household.
[0017] Preferably, in step S2, during training, a state of charge constraint and a charge / discharge power limit are applied; the state of charge constraint is limited by the initial capacity.
[0018] Preferably, the state of charge (SOC) constraints include a maximum allowable SOC during charging and a minimum allowable SOC during discharging; the charge / discharge power limits include a maximum charging power P. CHG and maximum discharge power P DCHG .
[0019] Preferably, in step S2, when the particle swarm optimization algorithm is trained, the update expressions for position and velocity are:
[0020] ;
[0021] In the formula, i Number the particles; For speed; For location; Indicates inertia weight; As a self-learning factor; For group learning factors; For the first i The optimal position of each particle; This represents the historical optimal position for all particles; and A random number between 0 and 1.
[0022] Preferably, the objective function in step S4 The expression is:
[0023] ;
[0024] In the formula, and These are the weighting coefficients; Indicates the internal rate of return; This indicates the cost recovery rate.
[0025] Preferably, the expression for calculating the internal rate of return (IRR) is:
[0026] ;
[0027] ;
[0028] ;
[0029] ;
[0030] ;
[0031] ;
[0032] In the formula, Indicates initial investment; This indicates the cost per unit capacity of energy storage; Indicates energy storage capacity; Indicates the battery's service life; Indicates the maximum cycle capacity; Indicates the first i Monthly cycle power consumption; M Indicates the corresponding number i The number of days in a month; and Indicates the corresponding number i The first month j The depth and number of charge-discharge cycles per day; Indicates the project's duration in years; This indicates the cost of each battery replacement. Indicates annual income; For the first i The peak load reduction ratio for the month; For the first i Maximum load in a month; Demand-based electricity pricing; Indicates maintenance costs; This indicates the cost of battery replacement.
[0033] Preferably, the expression for the cost recovery rate is:
[0034] ;
[0035] ;
[0036] In the formula, This represents the total cost.
[0037] The present invention also provides an energy storage scheduling system for a photovoltaic energy storage system based on particle swarm optimization, comprising: one or more processors and a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing the above.
[0038] The beneficial effects of this invention include at least the following: First, based on historical data analysis, the maximum peak shaving ratio corresponding to different energy storage capacities is obtained to obtain the initial value of the energy storage capacity. Then, using the existing power curve as the training sample set, the particle swarm optimization algorithm is applied to construct the basis function and determine the optimization objective by comprehensively considering the battery's state of charge (SOC), load power, and relative time at the current moment, thereby obtaining the real-time control command for the charging and discharging power of the energy storage system. Then, the energy storage capacity is optimized based on the command, effectively solving the dynamic planning problem of charging and discharging control of battery energy storage systems, providing an innovative solution for demand management in the microgrid field, and realizing precise control of energy storage capacity and charging and discharging power. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram illustrating the principle of a photovoltaic energy storage system connected to a park microgrid according to an embodiment of the present invention;
[0041] Figure 3 This is a schematic diagram illustrating the achievable peak power range according to an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of the power curve of a certain park in January according to an embodiment of the present invention;
[0043] Figure 5 For the ideal January of this invention embodiment Schematic diagram of the curve;
[0044] Figure 6 This is a schematic diagram of the maximum monthly demand corresponding to different energy storage capacities in an embodiment of the present invention;
[0045] Figure 7 This is a schematic diagram of the annual average peak reduction ratio for different energy storage capacities in an embodiment of the present invention.
[0046] Figure 8 This is a schematic diagram showing the maximum monthly demand results calculated according to an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0048] like Figure 1 As shown in the figure, this embodiment of the invention provides an energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization, including the following steps:
[0049] Step S1: Select the point with the largest rate of increase in the energy storage capacity-maximum annual average peak reduction ratio curve to determine the initial capacity of the energy storage system.
[0050] Specifically, the principle of connecting the photovoltaic energy storage system to the park microgrid in this embodiment is as follows: Figure 2 As shown.
[0051] A comparative analysis of different energy storage capacities for demand management is conducted, and the optimal energy storage capacity is selected. The charging and discharging operation of energy storage is reflected in the power curve as peak shaving and valley filling, as shown by the equivalent user load power curve. It can be seen that the achievable peak power The minimum value is the average load power. achievable peak power The maximum value is the maximum load power. ,like Figure 3 As shown.
[0052] curve At peak power The integral of the above part is the solution to this problem. The minimum energy storage capacity corresponding to the value That is, one can obtain the ideal Parameter combination. In this embodiment of the invention, the daily power curve of a certain park in January is as follows: Figure 4 As shown, its Parameter curves as follows Figure 5 As shown. The calculation results for different energy storage capacities are summarized for each month, as follows: Figure 6 As shown.
[0053] In this embodiment, when calculating the peak reduction ratio, if the energy storage capacity is known... According to the ideal Curve interpolation yields the ideal peak power corresponding to this capacity, and thus the maximum peak reduction ratio is obtained. :
[0054] ;
[0055] Plot the ideal peak power for each month under different energy storage capacities, and average the ideal peak reduction ratios for each month to obtain the maximum annual average peak reduction ratio, such as... Figure 7 As shown.
[0056] Based on the energy storage capacity-maximum annual average peak shaving ratio curve, the point with the largest increase rate is selected as the optimal value for energy storage capacity, and the initial capacity is determined. .
[0057] Step S2: Use the state of charge, load power, photovoltaic power generation and time of the energy storage system as the state space, and the energy storage power as the optimization action; use minimizing the product of the square root of the maximum grid power peak within the time period and the sum of the squares of the daily grid power peak as the optimization objective, and train the particle swarm optimization algorithm.
[0058] Specifically, based on the energy storage system design parameters, i.e., the initial capacity, the SOC constraints are defined, namely the maximum allowable SOC during charging and the minimum allowable SOC during discharging; based on the energy storage system's PCS capacity and battery parameters, the charging and discharging power limits are defined, i.e., the maximum charging power P. CHG Maximum discharge power P DCHG .
[0059] Define the state space: ,in for t SOC at any moment for t Load power at any given time (per unit). for t Photovoltaic power generation at any given time (per unit). for t The moment is within the time of day.
[0060] Define action: store energy power As an action to be optimized, this action should be state-dependent:
[0061] ;
[0062] in For state x Relevant basis functions, W This is the weight vector. There are many choices for the basis functions; for ease of engineering implementation, a polynomial function is chosen. The form is a first-order polynomial: . W It is a 5×1 vector, which is also the parameter that the Particle Swarm Optimization (PSO) algorithm needs to optimize.
[0063] Based on experience, the weight vector W Perform initialization, select W The range of values for each element is typically [-10, 10], and the range of the search step size is typically [-1, 1].
[0064] Then, typical photovoltaic power generation and power load data for a certain period of time were selected as the training sample set, with a duration of [duration missing]. To ensure the training sample set has sufficient coverage, the total time length of the sample set in this example is... The timeframe is 365 days, with data intervals of 5 minutes. The optimization metric is defined as minimizing the product of the square root of the maximum grid power peak value within this time period and the sum of the squares of the daily grid power peak values, i.e.:
[0065] ;
[0066] In the formula, Indicate the optimization objective; The typical load power curve time length is shown in this embodiment. Take 365; This indicates the peak daily power supply to the household.
[0067] According to the PSO algorithm, iterative iterations are performed based on the training sample set. The update formulas for the position (the parameter to be optimized) and the speed (the search step size) are:
[0068] ;
[0069] In the formula, i Number the particles; For speed; For location; Indicates inertia weight; As a self-learning factor; For group learning factors; For the first i The optimal position of each particle; This represents the historical optimal position for all particles; and A random number between 0 and 1.
[0070] When the set number of iterations is reached, the algorithm is considered to have converged. This yields the real-time power control algorithm for the energy storage system.
[0071] Step S3: Within the range of ±A% of the initial capacity value, select alternative energy storage capacity values at equal intervals, and iterate through them using a trained particle swarm optimization algorithm. The objective function is to maximize the weighted sum of the internal rate of return (IRR) and the cost recovery rate, thus obtaining the energy storage capacity configuration value and the corresponding action strategy, where A is a number greater than 0.
[0072] Specifically, in this embodiment of the invention, an energy storage economic model is constructed, which mainly includes an energy storage system cost model, a revenue model, and an internal rate of return (IRR) model, wherein the cost model calculation formula is as follows:
[0073] ;
[0074] in The cost per unit capacity of energy storage is expressed in yuan / kWh. Indicates energy storage capacity.
[0075] To better represent the relationship between battery replacement cycles and lifespan, a rainflow counting method was used to construct a battery lifespan model. The model calculates the maximum cycle capacity based on the battery's nominal parameters. Using the rainflow counting method, the depth of all charge-discharge cycles within each month can be calculated. and the corresponding number of times This allows us to obtain the monthly circulating electricity. :
[0076] ;
[0077] In the formula, M represents the number of days in the i-th month; and Indicates the corresponding number i The first month j The depth and number of charge-discharge cycles per day.
[0078] The total discharge amount each month is added up to obtain the total cycle amount for the whole year, and then the battery's service life is obtained:
[0079] ;
[0080] Project cycle duration Within this range, considering cell replacement, the battery replacement cost is:
[0081] ;
[0082] in Cost per battery replacement (in yuan).
[0083] The total cost model is as follows:
[0084] ;
[0085] In the formula, This indicates maintenance costs.
[0086] The revenue model is the equivalent revenue after the reduction in demand electricity costs, and the calculation formula is as follows:
[0087] ;
[0088] Indicates annual income; For the first i The peak load reduction ratio for the month; For the first i Maximum load in a month; This is the demand-based electricity price.
[0089] Annual cost recovery rate model, denoted as [model name missing] :
[0090] ;
[0091] IRR is calculated based on discounted cash flows, making the net present value (NPV) equal to zero. Cash flows include initial investment, operating costs, and revenue. The calculation formula is as follows:
[0092] ;
[0093] in The initial investment is taken as a negative value; This refers to the project's annual net income, which includes annual revenue and annual operating costs. The cost of replacing the battery during its lifespan.
[0094] The objective function is:
[0095] ;
[0096] In the formula, and These are the weighting coefficients.
[0097] Then at the initial value of energy storage capacity Within the range of ±A, select candidate energy storage capacity values at equal intervals, repeat the iteration, and run the process traversally until the calculated objective function is obtained. JBy selecting the maximum value from the options, we can obtain the optimized energy storage capacity configuration value and its action strategy. In this embodiment, A is set to 50%.
[0098] For a typical industrial park with a photovoltaic installed capacity of 4.5 MWp, the preferred energy storage installed capacity is 1 MWh, such as... Figure 8 The figure shows the maximum demand for each month after applying this intelligent peak shaving algorithm. Under ideal conditions, the maximum peak shaving ratio of the photovoltaic + 1MWh energy storage system is 14.21%, the annual average peak shaving ratio of the photovoltaic + energy storage system based on the PSO peak shaving algorithm is 9.23%, and the annual average peak shaving ratio based on fixed value peak shaving is 4.97%.
[0099] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0100] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A photovoltaic energy storage system energy storage scheduling method based on particle swarm optimization, characterized in that: Includes the following steps: Step S1: Select the point with the largest rate of increase in the energy storage capacity-maximum annual average peak reduction ratio curve to determine the initial capacity of the energy storage system; Step S2: Use the state of charge, load power, photovoltaic power generation and time of the energy storage system as the state space, and the energy storage power as the optimization action; use minimizing the product of the square root of the maximum grid power peak within the time period and the sum of the squares of the daily grid power peak as the optimization objective, and train the particle swarm optimization algorithm. Step S3: Within the range of ±A% of the initial capacity value, select alternative energy storage capacity values at equal intervals, and traverse them using a trained particle swarm optimization algorithm. Solve the algorithm with the objective function of maximizing the weighted sum of the internal rate of return (IRR) and the cost recovery rate, thus obtaining the energy storage capacity configuration value and the corresponding action strategy, where A is a number greater than zero.
2. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 1, characterized in that: Step S1 includes: Step S11: Plot the power curve; Step S12: Take the average value of the load power as the minimum value of the peak power, and take the maximum value of the load power as the maximum value of the peak power; Step S13: Calculate the maximum peak reduction ratio under different energy storage capacities, and plot the ideal peak power for each month under different energy storage capacities. The maximum annual average peak reduction ratio is obtained by averaging the ideal peak reduction ratios for each month. Step S14: Based on the energy storage capacity-maximum annual average peak shaving ratio curve, select the point with the largest increase rate as the initial capacity of the energy storage system.
3. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 1, characterized in that: The expression for the optimization objective in step S2 is: ; In the formula, Indicate the optimization objective; The time length of a typical load power curve; This indicates the peak daily power supply to the household.
4. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 1, characterized in that: In step S2, during training, a state of charge constraint and a charge / discharge power limit are applied; the state of charge constraint is limited by the initial capacity.
5. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 4, characterized in that: The state of charge (SOC) constraints include the maximum allowable SOC during charging and the minimum allowable SOC during discharging; the charge / discharge power limits include the maximum charging power P. CHG and maximum discharge power P DCHG .
6. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 1, characterized in that: In step S2, when the particle swarm optimization algorithm is trained, the update expressions for position and velocity are: ; In the formula, i Number the particles; For speed; For location; Indicates inertia weight; As a self-learning factor; For group learning factors; For the first i The optimal position of each particle; This represents the historical optimal position for all particles; and A random number between 0 and 1.
7. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 1, characterized in that: The objective function described in step S4 The expression is: ; In the formula, and These are the weighting coefficients; Indicates the internal rate of return; This indicates the cost recovery rate.
8. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 7, characterized in that: The formula for calculating the internal rate of return (IRR) is as follows: ; ; ; ; ; ; In the formula, Indicates initial investment; This indicates the cost per unit capacity of energy storage; Indicates energy storage capacity; Indicates the battery's service life; Indicates the maximum cycle capacity; Indicates the first i Monthly cycle electricity consumption; M represents the number of days in the i-th month; and Indicates the corresponding number i The first month j The depth and number of charge-discharge cycles per day; Indicates the project's duration in years; This indicates the cost of each battery replacement. Indicates annual income; For the first i The peak load reduction ratio for the month; For the first i Maximum load in a month; Demand-based electricity pricing; Indicates maintenance costs; This indicates the cost of battery replacement.
9. The energy storage scheduling method for a photovoltaic energy storage system based on particle swarm optimization according to claim 8, characterized in that: The expression for the cost recovery rate is: ; ; In the formula, This represents the total cost.
10. An energy storage dispatching system for a photovoltaic energy storage system based on particle swarm optimization, characterized in that: include: One or more processors and a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising methods for performing any one of claims 1 to 9.
Citation Information
Patent Citations
User side energy storage capacity configuration optimization model based on differential evolution algorithm
CN110705810A
Energy storage capacity optimal configuration method and system based on multi-objective particle swarm optimization algorithm
CN119561116A