Photovoltaic and energy storage equipment capacity planning method, device, equipment and medium

By constructing a capacity planning method for photovoltaic and energy storage equipment with multiple loads and using an improved particle swarm optimization algorithm to solve the objective function, the problem that the dynamic coupling characteristics of multiple loads were not considered in the existing technology was solved. This method achieves the optimal capacity configuration of photovoltaic and energy storage equipment and improves the power quality and economic operation capability of the distribution network.

CN121791307APending Publication Date: 2026-04-03DALI POWER SUPPLY BUREAU YUNNAN POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing power distribution network capacity optimization methods fail to fully consider the dynamic coupling characteristics of diverse loads such as photovoltaics, energy storage, and electric vehicle charging, resulting in the inability to effectively achieve rational resource allocation and maximize overall system benefits, and making them unsuitable for high-proportion distributed energy access and complex load environments.

Method used

A capacity planning method for photovoltaic and energy storage equipment that includes multiple loads is constructed. By obtaining the photovoltaic output model, energy storage model, electric vehicle charging load model and external grid power purchase cost model, the objective function is solved by an improved particle swarm optimization algorithm to obtain the optimal capacity configuration of photovoltaic and energy storage equipment, which satisfies the optimal configuration scheme under the constraints.

Benefits of technology

It significantly improves computational efficiency and convergence performance, enabling the rapid acquisition of optimal configuration schemes that meet various operational constraints. It is applicable to distribution network optimization scenarios of different scales and structural characteristics, achieving optimal capacity configuration and coordinated operation of photovoltaic and energy storage equipment, and improving the power quality and economic operation capability of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121791307A_ABST
    Figure CN121791307A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart power grids, and discloses a photovoltaic and energy storage equipment capacity planning method and device, equipment and a medium, and the method comprises the steps: obtaining a photovoltaic operation cost function based on a photovoltaic output model, obtaining an energy storage equipment operation cost function based on an energy storage model, and obtaining a charging pile revenue function based on an electric vehicle charging load model; based on the photovoltaic operation cost function, the energy storage equipment operation cost function, the charging pile revenue function, the external network electricity purchasing cost model and the investment cost model, obtaining a target function with the minimum annual cost as a target; and solving the objective function through an improved particle swarm algorithm to obtain the optimal capacity configuration of the photovoltaic equipment and the energy storage equipment under the condition of meeting the constraint conditions. And with the minimum annual cost as an optimization target, an objective function is solved by adopting an improved particle swarm algorithm, so that the calculation efficiency and the convergence performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid technology, and in particular to a method, apparatus, equipment and medium for capacity planning of photovoltaic and energy storage equipment. Background Technology

[0002] With the transformation of the global energy structure and the rapid development of renewable energy, the planning and operation of distribution networks are facing unprecedented challenges and opportunities. Traditional distribution networks mainly rely on centralized power generation and unidirectional power transmission, making it difficult to adapt to the integration needs of a high proportion of distributed energy sources. Photovoltaic power generation, as one of the most promising renewable energy sources, exhibits intermittent and fluctuating output; direct large-scale grid connection may affect the stability and economics of the grid. Meanwhile, advancements in energy storage technology provide an effective means to mitigate the fluctuations in renewable energy output, and the widespread adoption of electric vehicles makes charging loads an indispensable component of the distribution network. The introduction of these diverse loads makes the optimization of distribution networks more complex, requiring trade-offs between multiple objectives such as investment costs, operating efficiency, and energy consumption.

[0003] Existing distribution network capacity optimization methods mostly focus on single energy sources or fixed load scenarios, failing to fully consider the dynamic coupling characteristics of diverse loads such as photovoltaics, energy storage, and electric vehicle charging. While photovoltaic energy boasts advantages of being clean and sustainable, its output is significantly random and uncontrollable due to natural factors such as sunlight intensity and weather. Energy storage systems, as a key technology for mitigating renewable energy fluctuations and improving power system flexibility, have a significant impact on distribution network stability and economics due to their capacity configuration and operation strategies. Electric vehicle charging loads are characterized by their dispersed nature and unpredictable timing; large-scale integration can lead to localized overloads and voltage fluctuations in the distribution network. Furthermore, the uncertainty of external power purchase costs and the constraints of system investment costs place higher demands on the optimized operation of the distribution network. Therefore, existing distribution network planning and operation optimization methods have limitations in handling the coordination of diverse energy sources and the balancing of diverse loads, failing to effectively achieve rational resource allocation and maximize overall system benefits. Innovative optimization methods are urgently needed to enhance the distribution network's ability to cope with complex energy and load environments. Summary of the Invention

[0004] Based on this, it is necessary to address the technical problem that existing power distribution network planning and operation optimization methods cannot effectively achieve the rational allocation of resources and the maximization of overall system benefits. Therefore, a capacity planning method, device, equipment, and medium for photovoltaic and energy storage equipment is proposed.

[0005] In a first aspect, a capacity planning method for photovoltaic and energy storage devices is provided, the method comprising: Obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; Based on the photovoltaic output model, the photovoltaic operating cost function is obtained; based on the energy storage model, the energy storage device operating cost function is obtained; and based on the electric vehicle charging load model, the charging pile revenue function is obtained. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, an objective function with the goal of minimizing annual costs is obtained. By solving the objective function using an improved particle swarm optimization algorithm, the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints is obtained.

[0006] Preferably, the constraints include a photovoltaic equipment output threshold, an energy storage equipment capacity threshold, an energy storage equipment charging / discharging power threshold, and a power purchase threshold.

[0007] Preferably, the photovoltaic output model is based on the actual light intensity and actual photovoltaic temperature. The real-time output power is obtained by multiplying the rated photovoltaic power under standard conditions by the actual light intensity influence factor and the actual temperature influence factor. The photovoltaic operating cost function is obtained by multiplying the real-time output power of the photovoltaic equipment calculated based on the photovoltaic output model by the unit photovoltaic output cost.

[0008] Preferably, the energy storage model is based on the actual energy state at the previous moment, plus the actual discharge power at the current moment, and then subtracted from the discharge power at the current moment to obtain the current power value; Based on the current power value and the unit power operating cost of the energy storage device, the operating cost function of the energy storage device is obtained.

[0009] Preferably, the electric vehicle charging load model is based on the number of electric vehicles multiplied by the charging power of the electric vehicles to obtain the total power of the electric vehicles; The charging pile revenue function is obtained by multiplying the total power of the electric vehicle by the unit power revenue of the charging pile.

[0010] Preferably, the investment cost model includes a photovoltaic investment cost function and an energy storage investment cost function; The photovoltaic investment cost function is based on the initial investment cost of the photovoltaic system, and is converted into an annual investment cost according to its service life and discount rate; The energy storage investment cost function is based on the power capacity and energy capacity investment cost of the energy storage equipment, and is converted into an annual investment cost according to its service life and discount rate.

[0011] Preferably, the step of solving the objective function using an improved particle swarm optimization algorithm to obtain the optimal capacity configuration of the photovoltaic device and the energy storage device under the constraints includes: Improved particle swarm optimization algorithm for initializing and generating particle swarms; The system iteratively updates the data based on preset positions and velocities. It calculates the annual investment cost value corresponding to the current position of each particle using an objective function, and records the individual optimal value and the global optimal value. The individual optimal value is the position corresponding to the minimum annual investment cost value of each particle, and the global optimal value is the position corresponding to the minimum annual investment cost value in the particle swarm. Based on the individual optimal value and the global optimal value, the particle velocity and position of the improved particle swarm algorithm are updated, and the update continues iteratively. The improved particle swarm optimization algorithm continues until it reaches the preset convergence condition, at which point it outputs the optimal capacity configuration.

[0012] Secondly, a photovoltaic and energy storage equipment capacity planning device is provided, the device comprising: The model building module is used to obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; Based on the photovoltaic output model, the photovoltaic operating cost function is obtained; based on the energy storage model, the energy storage device operating cost function is obtained; and based on the electric vehicle charging load model, the charging pile revenue function is obtained. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, an objective function with the goal of minimizing annual costs is obtained. The model solving module is used to solve the objective function by improving the particle swarm optimization algorithm to obtain the optimal capacity configuration of the photovoltaic equipment and the energy storage equipment under the constraints.

[0013] Thirdly, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the photovoltaic and energy storage device capacity planning method as described in any of the preceding claims.

[0014] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the photovoltaic and energy storage device capacity planning method as described in any of the preceding claims.

[0015] Beneficial effects: This application constructs a mathematical model of a photovoltaic-storage distribution network that incorporates diverse loads. It integrates photovoltaic power output, energy storage systems, and electric vehicle charging loads into a unified optimization framework, fully leveraging the complementary characteristics of various energy sources and effectively overcoming the shortcomings of traditional single-energy systems in coordinated operation. With the goal of minimizing annual cost, an improved particle swarm optimization algorithm is used to solve the objective function, significantly improving computational efficiency and convergence performance. This algorithm can quickly obtain the optimal configuration scheme that satisfies various operational constraints and is applicable to distribution network optimization scenarios of different scales and structural characteristics. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] in: Figure 1 This is an application environment diagram of a photovoltaic and energy storage device capacity planning method in one embodiment; Figure 2 A flowchart of a capacity planning method for photovoltaic and energy storage devices in one embodiment; Figure 3 This is a topology diagram of a 33-node distribution network containing multiple loads in one embodiment; Figure 4 Here are the daily load curves of the distribution network and the typical daily photovoltaic output curves in one embodiment; Figure 5 This is a voltage comparison diagram of distribution network nodes in one embodiment; Figure 6 This is a comparison chart of the energy storage system output under two scenarios in one embodiment. Figure 7 This is a structural block diagram of a photovoltaic and energy storage device capacity planning and processing apparatus in one embodiment. Figure 8 This is a structural block diagram of a computer device in one embodiment. Detailed Implementation

[0018] 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, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] The photovoltaic and energy storage equipment capacity planning method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment, the physical terminal 110 communicates with the server terminal 120 via a network. The server terminal 120 can receive relevant data from the power distribution network through the physical terminal 110, and obtain photovoltaic output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models. Based on the photovoltaic output model, a photovoltaic operating cost function is obtained; based on the energy storage model, an energy storage device operating cost function is obtained; based on the electric vehicle charging load model, a charging pile revenue function is obtained; based on the photovoltaic operating cost function, energy storage device operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, an objective function with the goal of minimizing annual costs is obtained; the objective function is solved using an improved particle swarm optimization algorithm to obtain the optimal capacity configuration of the photovoltaic equipment and the energy storage equipment under the constraints. In this application, by constructing a mathematical model of a photovoltaic-storage-distribution network that includes multiple loads, photovoltaic output, energy storage systems, and electric vehicle charging loads are incorporated into a unified optimization framework, giving full play to the complementary characteristics of various energy sources and effectively overcoming the shortcomings of traditional single-energy systems in coordinated operation. With the goal of minimizing annual cost, an improved particle swarm optimization algorithm is used to solve the objective function, significantly improving computational efficiency and convergence performance. This allows for the rapid acquisition of the optimal configuration scheme that satisfies various operational constraints, making it suitable for distribution network optimization scenarios of different scales and structural characteristics. The physical terminal 110 can be, but is not limited to, various control and maintenance electronic devices for distribution networks, used to acquire operational data of the distribution network equipment. The server terminal can be a personal computer, laptop, smartphone, or a server cluster composed of multiple servers. The invention will be described in detail below through specific embodiments. It should be noted that the photovoltaic equipment described in this application is a photovoltaic power station, i.e., a photovoltaic node in the distribution network. The energy storage device is an energy storage power station, i.e., an energy storage node in the distribution network.

[0020] Please see Figure 2 As shown, Figure 2 A flowchart illustrating the capacity allocation method for photovoltaic and energy storage devices provided in this embodiment of the invention includes the following steps: S1 acquires photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models.

[0021] Among them, the photovoltaic output model is used to calculate the power generation of the photovoltaic power station; the energy storage model is used to calculate the energy state of the energy storage power station; the electric vehicle charging load model is used to calculate the total electricity demand of electric vehicles; and the external grid power purchase cost model is used to calculate the cost that the distribution network needs to spend to purchase electricity from the upper-level grid. By comprehensively considering the impact of flexible loads such as photovoltaics, energy storage, and electric vehicles, the scheme of this application is more flexible and adaptable to more complex distribution network environments.

[0022] S2 derives the photovoltaic operating cost function based on the photovoltaic output model, the energy storage equipment operating cost function based on the energy storage model, and the charging pile revenue function based on the electric vehicle charging load model.

[0023] The photovoltaic (PV) operating cost function is used to calculate the costs required for the operation and maintenance of a PV power plant. It is typically proportional to the actual power generation (output) of the PV power plant. The energy storage device operating cost function is used to calculate the losses incurred by an energy storage system (such as a battery) during charging and discharging. It is typically related to the charging and discharging power or the number of cycles. The charging pile revenue function is used to calculate the economic income that can be obtained by operating electric vehicle charging piles. It is typically proportional to the total charging capacity or power provided.

[0024] S3, based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, derives an objective function that aims to minimize annual costs.

[0025] The objective function is expressed as follows: min in, Indicates the operating cost of photovoltaic systems; This indicates the operating cost of energy storage equipment; This indicates the revenue generated by the charging stations; Indicates the cost of photovoltaic investment; This indicates the investment cost of energy storage.

[0026] The annual cost refers to the annual operating cost of the distribution network. The planning objective is to minimize the annual cost, which is the economically optimal goal. This involves comprehensively considering equipment investment and operating costs, balancing expenditures and revenues, and ensuring that the planning scheme has the best economic efficiency throughout its entire life cycle. By guiding the coordinated allocation of various energy sources through economic objectives, the system achieves source-storage-load synergistic operation. Further quantitative analysis provides precise decision support for the allocation of photovoltaic and energy storage capacity in the distribution network.

[0027] Energy storage devices (energy storage power stations) themselves consume electrical energy; their value is realized through "buying low and selling high" (arbitrage) and providing ancillary services. Without the integration of photovoltaic (PV) equipment, all energy must be purchased externally, and the system must cope with random and unpredictable load fluctuations. The integration of PV equipment directly replaces a portion of the electricity that would otherwise be purchased at high prices from external sources, significantly reducing the total electricity purchase cost of the distribution network system. Simultaneously, PV inverters can generate reactive power to support the local grid voltage during peak load periods, preventing low voltage from affecting user equipment.

[0028] Simultaneously, connecting to charging piles creates new revenue growth points. Charging services themselves are a marketable electrical energy commodity, bringing direct and substantial economic benefits to distribution network operators or investors. Electric vehicle charging is a flexible load that can be shifted. Through intelligent orderly charging (V1G), users can be guided to charge when electricity prices are low or when photovoltaic output is high, achieving peak shaving and valley filling. Orderly charging reduces reliance on energy storage devices, meaning system power balance can be achieved at a lower cost.

[0029] S4 solves the objective function by improving the particle swarm optimization algorithm, and obtains the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints.

[0030] Among them, the constraints are used to ensure that each model in the objective function conforms to physical laws and engineering realities during calculation.

[0031] The improved particle swarm optimization algorithm dynamically adjusts the inertia factor, enabling it to perform a wide-ranging search in the early stages, avoiding getting trapped in local optima; and to perform a finer search in the later stages, improving convergence accuracy. This provides a powerful, efficient, and problem-specific "optimization engine" for this application, ensuring that within a reasonable computation time, it can reliably select the technically feasible and economically optimal solution from a massive number of possible capacity configurations. This is a key technical guarantee for the successful implementation of the entire method.

[0032] The beneficial effects of this implementation method are as follows: By constructing a mathematical model of a photovoltaic-storage distribution network that includes multiple loads, it incorporates photovoltaic power output, energy storage systems, and electric vehicle charging loads into a unified optimization framework, fully leveraging the complementary characteristics of various energy sources and effectively overcoming the shortcomings of traditional single-energy systems in coordinated operation. With the goal of minimizing annual cost, an improved particle swarm optimization algorithm is used to solve the objective function, significantly improving computational efficiency and convergence performance. This allows for the rapid acquisition of the optimal configuration scheme that satisfies various operational constraints, making it suitable for distribution network optimization scenarios of different scales and structural characteristics.

[0033] This implementation comprehensively considers the operating costs of photovoltaic power plants, energy storage power stations, charging pile revenue, external grid power purchase costs, and investment costs, taking into account both one-time investment and long-term operation, to find the solution with the lowest total cost and highest net profit throughout the entire project lifecycle. By driving technical decisions with optimal economic efficiency throughout the entire lifecycle, the system automatically finds the best capacity configuration and coordinated operation scheme for photovoltaic, energy storage, and other equipment while ensuring safe system operation. This not only minimizes overall investment and operating costs but also indirectly improves the voltage quality of the distribution network, energy self-sufficiency rate, and absorption capacity, providing an economically reliable planning basis for the integration of diverse energy sources.

[0034] For example, with Figure 3 The 33-node distribution network topology with multiple loads shown is the test system. Photovoltaic equipment (PV1, PV2, PV3) and energy storage equipment (ES1, ES2, ES3) are configured at nodes 9, 24, and 30. Energy storage equipment (ES4, ES5) is connected at nodes 2 and 15. Electric vehicle charging stations (EV1, EV2) are installed at nodes 21 and 33. Key system parameters are set as follows: the maximum capacity of the energy storage equipment is 4000 kW, the charge / discharge efficiency is 0.9, and the state of charge (SOC) operating ranges are 0.1, 0.9, 0.1, and 0.9, respectively. The daily load curve of the distribution network and the typical daily photovoltaic equipment output curve are shown below. Figure 4 As shown in the figure. After adding photovoltaic equipment and energy storage equipment using the method proposed in this embodiment, the voltage comparison results of the distribution network nodes are as follows. Figure 5 As shown, without photovoltaic (PV) connections, the per-unit voltage values ​​of each node fluctuate significantly, exhibiting poor stability. However, after connecting optimized PV and energy storage equipment, the overall node voltage level improves, and no voltage exceedance occurs. The PV and energy storage equipment method described in this application can effectively improve the system's power quality and enhance the distribution network's ability to absorb PV power.

[0035] To verify the comprehensive advantages of the photovoltaic and energy storage equipment capacity planning method described in this application, two typical scenarios are set up for comparative analysis: Scenario 1 involves only configuring energy storage equipment to participate in demand response; Scenario 2 considers the coordinated participation of energy storage equipment and the orderly charging and discharging of electric vehicles in the response. The output of energy storage equipment in the two scenarios is compared as follows: Figure 6 As shown in the figure, the results indicate that when the photovoltaic equipment output is high, the energy storage device is mainly in a charging state to absorb the surplus power; while when the photovoltaic equipment output is insufficient, the energy storage device discharges to support the load demand. In Scenario 2, the introduction of the orderly charging regulation capability of electric vehicle charging piles reduces the dependence on the capacity of the energy storage system, indicating that electric vehicles, as flexible loads, can effectively complement the energy storage system, improving the overall economy and operational flexibility of the system.

[0036] from Figures 3-6It can be seen that by optimizing the capacity of photovoltaic and energy storage devices and introducing orderly charging of electric vehicles, the power distribution network has been transformed from "passively bearing loads" to "actively coordinating management," ultimately achieving significant results in both power quality and economic operation.

[0037] In some implementations, the constraints include a photovoltaic equipment output threshold, an energy storage equipment capacity threshold, an energy storage equipment charging / discharging power threshold, and a power purchase threshold.

[0038] The photovoltaic (PV) equipment output threshold constrains the upper and lower limits of PV equipment output. The determination of the output threshold involves a comprehensive decision-making process considering physical limits, technical specifications, safety standards, and grid connection requirements. The upper output limit specifies the maximum allowable output power of the PV power plant, limited by the equipment's physical capacity, grid dispatch instructions, and technical standards and grid connection specifications, taking the minimum value of these three factors. The lower output limit specifies the minimum allowable output power of the PV power plant, typically determined by technical requirements and operating modes. In this embodiment, the lower limit of PV equipment output is set to 0. That is, when PV power generation is not needed (e.g., at night, during grid failures), it can output no power at all. In other embodiments, under some advanced grid connection requirements, the grid may require PV equipment to not only operate at reduced power but also maintain a minimum technical output greater than zero to assist the grid in frequency regulation, etc. In this case, the lower limit may be set to a very small positive number. Its expression is as follows: in, and Let represent the lower and upper limits of the power output of the i-th photovoltaic node, respectively. The photovoltaic equipment output threshold constraint stipulates that the power generation of each photovoltaic power station must be between its minimum and maximum technical capabilities. The constraint on the upper limit of photovoltaic equipment output ensures that the calculation results of the objective function have practical application value.

[0039] The capacity threshold constraint for energy storage devices stipulates that the remaining capacity of the energy storage battery must be maintained within a predetermined range, expressed as: in and Let $t$ and $t$ represent the upper and lower limits of the energy state of the j-th energy storage node at time $t$, and the upper and lower limits of the charging / discharging power of the energy storage device, respectively.

[0040] The lower and upper limits of the energy state (energy capacity) of an energy storage device determine "how much electricity" the energy storage system can store, usually measured in kilowatt-hours (kWh). It is typically constrained by the state of charge (SOC), and to ensure battery life, it is generally not allowed to be fully charged or completely discharged. Therefore, usable energy capacity = rated capacity × energy coefficient. For example, if the rated capacity is 100 kWh and the operating range is [0.1, 0.9], then the usable capacity is 80 kWh. This usable capacity must meet the actual application requirements.

[0041] The upper and lower limits of the power capacity of energy storage devices determine how fast the energy storage system can charge and discharge, usually measured in kilowatts. This is influenced by instantaneous power demand, inverter capacity limitations, and battery health and limits. Within the physical safety threshold set by the device, a more conservative dynamic threshold is set to extend battery life. This can be automatically executed by the energy management system of the energy storage device: reading the real-time status of the energy storage device—capacity, temperature, voltage, and battery performance status—calculating the safety and health power boundaries based on the battery management model, and setting a power threshold within the physically possible range as a constraint.

[0042] in, and These represent the charging power and discharging power of the j-th energy storage node, respectively. The expression for the power purchase threshold is: and These represent the lower and upper limits of the power purchase capacity, respectively.

[0043] The power purchase limit specifies the maximum amount of electricity a distribution network can buy from the main grid; this is a safety limit. It requires comprehensive consideration of the thermal stability limits of lines and equipment, the capacity of the main transformer in the substation, grid connection agreements, and dispatch instructions. Specifically, the power purchase limit = min(line thermal stability limit, main transformer capacity, grid connection agreement specified value).

[0044] The minimum power purchase limit specifies the minimum amount of electricity a distribution network needs to buy from the main grid. This is usually related to the requirements for safe and stable system operation. The minimum power purchase limit is typically a positive value, determined by system stability requirements, and can be set to zero under ideal conditions.

[0045] Each constraint anchors the mathematical optimization results within physical reality and engineering safety. The output threshold for photovoltaic (PV) equipment ensures its own safety, preventing it from operating beyond its capacity and ensuring its lifespan and stability. The capacity threshold for energy storage equipment ensures the safety and lifespan of the storage battery itself, preventing irreversible damage through overcharging and over-discharging—a fundamental prerequisite for the economic viability of energy storage systems. The charging / discharging power threshold for energy storage equipment ensures the safety of power interface devices such as energy storage converters, preventing overload or damage due to excessive power and ensuring the reliability of the charging and discharging process. The power purchase threshold ensures the safety of the connection lines and equipment between the distribution network and the main grid, maintaining grid stability and preventing system-level failures caused by exceeding power limits. These thresholds work together to ensure that all "optimal" configuration schemes recommended by the optimization algorithm are technically feasible, safe, and durable, thus bridging the final gap between "theoretical optimality" and "engineering usability."

[0046] In some implementations, the photovoltaic power output model is based on the actual light intensity and actual photovoltaic temperature. The rated photovoltaic power under standard conditions is multiplied by the actual light intensity influence factor and the actual temperature influence factor to obtain the real-time output power. The real-time output power of the photovoltaic equipment calculated based on the photovoltaic power output model is multiplied by the unit photovoltaic power output cost to obtain the photovoltaic operating cost function.

[0047] The photovoltaic power output model can be expressed as: In the formula, express t Time of the first i Power output of each photovoltaic node This indicates the rated power of the photovoltaic system under standard conditions. express t The actual solar radiation intensity at which the photovoltaic system is located at any given time. Indicates the light intensity under standard conditions. Indicates the power temperature coefficient. express t The actual temperature of the photovoltaic surface at all times. This indicates the photovoltaic temperature under standard conditions.

[0048] The actual light intensity is the influencing factor, and photovoltaic power generation is directly proportional to light intensity. This factor compares the actual light intensity, which varies with weather, time of day, and season, with a constant standard, quantifying the decisive impact of light resource fluctuations on power generation and ensuring that the model can realistically simulate the entire process of power output from dawn, noon, to cloudy and rainy days.

[0049] The actual temperature impact factor is crucial because photovoltaic cell efficiency decreases with increasing temperature, a factor often overlooked but vital. This factor quantifies the impact of temperature on power generation efficiency, correcting theoretical output and leading to more accurate output predictions. Among these factors is the power temperature coefficient. The power temperature coefficient is a key technical parameter determined by the manufacturer through standard testing and obtained directly from the product datasheet of the photovoltaic module. It quantifies the sensitivity of the photovoltaic module's output power to changes in its own temperature.

[0050] The photovoltaic operating cost function, established through the photovoltaic output model, can be expressed as: In the formula, Represents the photovoltaic operating cost function. This represents the unit operating cost of photovoltaic power output. The total number of time periods into which a year is divided. For example, if each time period is 1 hour, then... =8760, The total number of nodes in a photovoltaic power station.

[0051] In some implementations, the energy storage model is based on the actual energy state at the previous moment, plus the actual charging power at the current moment, and then minus the discharge power at the current moment to obtain the current power value; Based on the current power value and the unit power operating cost of the energy storage device, the operating cost function of the energy storage device is obtained.

[0052] The energy storage model can be expressed as: In the formula, express t Time of the first j Energy status of each energy storage node; This represents the energy storage loss coefficient, also known as the self-discharge rate. It indicates the proportion of electricity lost by the energy storage system per unit time due to internal reactions when the system is at rest. Energy storage charging efficiency is the ratio of the energy actually stored in the energy storage device to the total energy obtained from the grid or photovoltaic system during the charging process. express t Time of the first j Charging power of each energy storage node; The energy storage discharge efficiency is the ratio of the energy actually released to the grid during the discharge process to the total energy released by the energy storage device itself. This represents the charging power of the j-th energy storage node at time t. .

[0053] The actual energy state at the previous moment must be considered when the optimization algorithm formulates a charging and discharging plan. This will enable it to make sustainable decisions and avoid ineffective planning such as "no power to discharge" or "no space to charge". The charging power at the current moment; This represents the discharge power at the current moment; it quantifies the static natural losses of the energy storage system, improving the accuracy of economic assessment. Energy loss coefficient. This indicates that even without any charging or discharging operations, energy storage units (especially batteries) experience energy losses such as self-discharge.

[0054] The operating cost function of an energy storage power station, established through an energy storage model, can be expressed as: In the formula, This represents the operating function of the energy storage power station. This indicates the unit power operating cost of an energy storage power station. express t Time of the first j Charging power of each energy storage node express t Time of the first j The charging power of each energy storage node comprehensively considers the operating costs during the charging / discharging process of energy storage devices, making the model more realistic and accurate.

[0055] In some implementations, the electric vehicle charging load model is based on the number of electric vehicles multiplied by the charging power of the electric vehicles to obtain the total power of the electric vehicles; The charging pile revenue function is obtained by multiplying the total power of the electric vehicle by the unit power revenue of the charging pile.

[0056] The electric vehicle charging load model can be expressed as follows: In the formula, express t Total load of electric vehicles at any time express t The number of electric vehicles that are constantly being charged. express t Time of the first k Charging power of electric vehicles.

[0057] The electric vehicle charging load model enables accurate aggregation and prediction of total charging load. By simply summing, it aggregates individual, scattered, and random electric vehicle charging behaviors into a macroscopic and quantifiable total load.

[0058] The revenue function of charging piles, established through the electric vehicle charging load model, can be expressed as: In the formula, Represents the revenue function of charging piles. This indicates the revenue per unit power of the charging pile.

[0059] The charging pile revenue function directly transforms charging load into definite economic benefits, providing value guidance for optimization algorithms. These two models clearly quantify the value of a decision: for example, redirecting a portion of the charging load from evening peak hours to midday peak solar power output, while still meeting user demand, may reduce grid electricity purchase costs (by utilizing inexpensive solar power) and increase charging revenue by serving more vehicles. Maximizing charging revenue while improving solar power absorption achieves optimal overall system economics.

[0060] In some implementations, the investment cost model includes a photovoltaic investment cost function and an energy storage investment cost function; the photovoltaic investment cost function is based on the initial investment cost of the photovoltaic system, and is converted into an annual investment cost according to its service life and discount rate; the energy storage investment cost function is based on the power capacity and energy capacity investment cost of the energy storage device, and is converted into an annual investment cost according to its service life and discount rate.

[0061] The investment cost model includes photovoltaic investment costs and energy storage investment costs, which can be expressed as follows: In the formula, Represents the photovoltaic investment cost function. This represents the energy storage investment cost function. This represents the discount rate, which reflects the time value of money and investment risk. The higher the value, the higher the discount rate, indicating that money is more "expensive" and the present value of future returns is lower. Indicates the service life of photovoltaic panels. These represent the lifespan of the energy storage system. This represents the unit investment cost of photovoltaic power. Indicates the number of photovoltaic nodes. Indicates the first i The installed capacity of each photovoltaic node Indicates the number of energy storage nodes. This indicates the investment cost per unit of energy storage capacity. Indicates the first j Power capacity of each energy storage node This indicates the investment cost per unit of energy storage capacity. Indicates the first j Energy capacity of each energy storage node.

[0062] This represents the annual value coefficient of photovoltaic equipment; This represents the annual value factor of energy storage equipment. The annual value factor is a key calculation factor that converts the initial investment cost of the equipment into an equivalent annual cost. It is used to calculate the amount that needs to be recovered at the end of each year in order to recover an initial investment under a specific discount rate and term. The core purpose is to amortize the large one-time initial investment into a fixed annual cost, so as to add it up and compare it with the annual operating costs and revenues.

[0063] In some implementations, step S4 includes: Improved particle swarm optimization algorithm for initializing and generating particle swarms; The system iterates and updates the data based on preset positions and velocities. It calculates the annual investment cost value of each particle based on its current position using an objective function. It records the individual optimal value and the global optimal value. The individual optimal value is the position corresponding to the minimum annual investment cost value of each particle, and the global optimal value is the position corresponding to the minimum annual investment cost value in the particle swarm. Based on the individual optimal value and the global optimal value, the particle velocity and position of the improved particle swarm algorithm are updated and iterated continuously. The process continues until the improved particle swarm optimization algorithm reaches the preset convergence condition and outputs the optimal capacity configuration.

[0064] The objective function, obtained by using an improved particle swarm optimization algorithm, can be expressed as follows: In the formula, Indicates the first k Particle velocity at +1 iteration Indicates the current iteration number. Indicates the inertia factor. and Represents the learning factor. and This represents a random number between (0, 1). Represents the individual's optimal value. This represents the global optimum. Indicates the first k Particle position at the next iteration and These represent the initial and final values ​​of the inertia factor, respectively. Indicates the total number of iterations. and They represent learning factors. Initial and final values, and They represent learning factors. The initial and final values ​​of .

[0065] Specifically, a particle represents a complete photovoltaic and energy storage capacity planning scheme, that is, the capacity of photovoltaic and energy storage equipment that should be installed at the specified pre-installed nodes of the distribution network.

[0066] The improved particle swarm optimization algorithm is implemented as follows: Initialization: A swarm of particles is randomly generated to form the initial population. Each particle is assigned a random initial position and initial velocity. The initial position represents a complete capacity planning scheme for photovoltaic and energy storage devices.

[0067] Iteration and Update: In each iteration, the improved particle swarm optimization (PSO) algorithm calculates the objective function value for the current position of each particle in the swarm, while simultaneously recording individual optimal and global optimal information. The individual optimal is the photovoltaic and energy storage capacity planning scheme corresponding to the minimum objective function value for each particle in this iteration. The global optimal is the photovoltaic and energy storage capacity planning scheme corresponding to the minimum objective function value for all particles in this iteration. All particles adjust their flight speed and position according to the updated formula of the improved PSO algorithm, moving towards their individual optimal and the swarm's global optimal directions.

[0068] Output: When the iteration reaches the preset convergence condition, such as reaching the maximum number of iterations, the convergence rate of the objective function value being less than a threshold, or the objective function value being less than a threshold, or reaching the maximum iteration time, the improved particle swarm optimization algorithm stops. At this point, the vector represented by the globally optimal position (the capacity planning scheme for photovoltaic and energy storage devices) is the optimal capacity configuration scheme output by the improved particle swarm optimization algorithm, which includes the optimal capacity size of photovoltaic and energy storage at each node.

[0069] Improved Particle Swarm Optimization (PSO) algorithm convergence logic: At the start of the algorithm iteration, the inertia factor and learning factor work together to cause the particle swarm to disperse like scouts, widely exploring different regions of the solution space while maintaining diversity. As iteration progresses, the inertia factor and learning factor... Gradually decrease, learning factor As the number of particles increases, they begin to learn from their individual discoveries and collectively move towards the optimal point found by the swarm (i.e., the global optimum). Finally, towards the end of the iteration, the particle swarm will cluster closely around this universally accepted optimal solution for fine-tuning. At this point, the objective function value tends to stabilize, and the improved particle swarm optimization algorithm has converged.

[0070] In some implementations, the external grid electricity purchase cost model can be expressed as: In the formula, The function representing the cost of purchasing electricity from the external network. Indicates the number of time periods in a year. This indicates the time-of-use electricity price for the distribution network. This indicates the amount of electricity purchased.

[0071] The formula calculates the total annual cost for the system to purchase electricity from the external power grid, which is typically the largest cash expenditure in distribution network operations. The model... Time-of-use (TOU) pricing is a key variable that links the value of electricity to time, distinguishing between peak and off-peak prices. The value of photovoltaics, energy storage, and electric vehicles ultimately lies in the extent to which they can replace or reduce expensive grid-purchased electricity. Photovoltaics can directly offset the high-priced electricity purchased during power generation; energy storage reduces peak-hour electricity purchases through "buying low and discharging high"; and the value of orderly charging for electric vehicles shifts charging load from peak to off-peak hours, avoiding high electricity bills. The grid-purchased electricity cost model provides a unified value measurement standard, allowing different energy forms and technologies (photovoltaics, energy storage, electric vehicles) to be compared and coordinated within the same economic framework, ultimately minimizing the total system cost. In some implementations…

[0072] Please see Figure 7 As shown, in one embodiment, a photovoltaic and energy storage device capacity planning apparatus is provided, the apparatus comprising: The model building module is used to obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; The photovoltaic operating cost function is obtained based on the photovoltaic output model, the energy storage device operating cost function is obtained based on the energy storage model, and the charging pile revenue function is obtained based on the electric vehicle charging load model. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model and investment cost model, an objective function with the goal of minimizing annual cost is obtained; The model solving module is used to solve the objective function by improving the particle swarm optimization algorithm, so as to obtain the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints.

[0073] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the following server-side method for photovoltaic and energy storage equipment capacity planning: Obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; The photovoltaic operating cost function is obtained based on the photovoltaic output model, the energy storage device operating cost function is obtained based on the energy storage model, and the charging pile revenue function is obtained based on the electric vehicle charging load model. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model and investment cost model, an objective function with the goal of minimizing annual cost is obtained; By improving the particle swarm optimization algorithm to solve the objective function, the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints is obtained.

[0074] This application constructs a mathematical model of a photovoltaic-storage distribution network that incorporates diverse loads. It integrates photovoltaic power output, energy storage systems, and electric vehicle charging loads into a unified optimization framework, fully leveraging the complementary characteristics of various energy sources and effectively overcoming the shortcomings of traditional single-energy systems in coordinated operation. With the goal of minimizing annual cost, an improved particle swarm optimization algorithm is used to solve the objective function, significantly improving computational efficiency and convergence performance. This algorithm can quickly obtain the optimal configuration scheme that satisfies various operational constraints and is applicable to distribution network optimization scenarios of different scales and structural characteristics.

[0075] In one embodiment, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, performs the following steps: Obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; The photovoltaic operating cost function is obtained based on the photovoltaic output model, the energy storage device operating cost function is obtained based on the energy storage model, and the charging pile revenue function is obtained based on the electric vehicle charging load model. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model and investment cost model, an objective function with the goal of minimizing annual cost is obtained; By improving the particle swarm optimization algorithm to solve the objective function, the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints is obtained.

[0076] This application constructs a mathematical model of a photovoltaic-storage distribution network that incorporates multiple loads. It integrates photovoltaic output, energy storage status, and electric vehicle charging loads into a unified optimization framework, fully leveraging the complementary characteristics of various energy sources and effectively overcoming the shortcomings of traditional single-energy systems in coordinated operation. With the goal of minimizing annual cost, an improved particle swarm optimization algorithm is used to solve the objective function, significantly improving computational efficiency and convergence performance. This algorithm can quickly obtain the optimal configuration scheme that satisfies various operational constraints and is applicable to distribution network optimization scenarios of different scales and structural characteristics.

[0077] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0078] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0079] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0080] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A capacity planning method for photovoltaic and energy storage equipment, characterized in that, The method includes: Obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; Based on the photovoltaic output model, the photovoltaic operating cost function is obtained; based on the energy storage model, the energy storage device operating cost function is obtained; and based on the electric vehicle charging load model, the charging pile revenue function is obtained. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, an objective function with the goal of minimizing annual costs is obtained. By solving the objective function using an improved particle swarm optimization algorithm, the optimal capacity configuration of photovoltaic equipment and energy storage equipment under the constraints is obtained.

2. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The constraints include the output threshold of photovoltaic equipment, the capacity threshold of energy storage equipment, the charging / discharging power threshold of energy storage equipment, and the power purchase threshold.

3. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The photovoltaic output model is based on the actual light intensity and actual photovoltaic temperature. It obtains the real-time output power by multiplying the rated photovoltaic power under standard conditions by the actual light intensity influence factor and the actual temperature influence factor. The photovoltaic operating cost function is obtained by multiplying the real-time output power of the photovoltaic equipment calculated based on the photovoltaic output model by the unit photovoltaic output cost.

4. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The energy storage model is based on the actual energy state at the previous moment, plus the actual discharge power at the current moment, and then subtracts the discharge power at the current moment to obtain the current power value; Based on the current power value and the unit power operating cost of the energy storage device, the operating cost function of the energy storage device is obtained.

5. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The electric vehicle charging load model is based on the number of electric vehicles multiplied by the charging power of the electric vehicles to obtain the total power of the electric vehicles; The charging pile revenue function is obtained by multiplying the total power of the electric vehicle by the unit power revenue of the charging pile.

6. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The investment cost model includes a photovoltaic investment cost function and an energy storage investment cost function; The photovoltaic investment cost function is based on the initial investment cost of the photovoltaic system, and is converted into an annual investment cost according to its service life and discount rate; The energy storage investment cost function is based on the power capacity and energy capacity investment cost of the energy storage equipment, and is converted into an annual investment cost according to its service life and discount rate.

7. The photovoltaic and energy storage equipment capacity planning method according to claim 1, characterized in that, The step of solving the objective function using an improved particle swarm optimization algorithm to obtain the optimal capacity configuration of the photovoltaic equipment and the energy storage equipment under the constraints includes: Improved particle swarm optimization algorithm for initializing and generating particle swarms; The system iteratively updates the data based on preset positions and velocities. It calculates the annual investment cost value corresponding to the current position of each particle using an objective function, and records the individual optimal value and the global optimal value. The individual optimal value is the position corresponding to the minimum annual investment cost value of each particle, and the global optimal value is the position corresponding to the minimum annual investment cost value in the particle swarm. Based on the individual optimal value and the global optimal value, the particle velocity and position of the improved particle swarm algorithm are updated, and the update continues iteratively. The improved particle swarm optimization algorithm continues until it reaches the preset convergence condition, at which point it outputs the optimal capacity configuration.

8. A capacity planning device for photovoltaic and energy storage equipment, characterized in that, The device includes: The model building module is used to obtain photovoltaic power output models, energy storage models, electric vehicle charging load models, external grid electricity purchase cost models, and investment cost models; Based on the photovoltaic output model, the photovoltaic operating cost function is obtained; based on the energy storage model, the energy storage device operating cost function is obtained; and based on the electric vehicle charging load model, the charging pile revenue function is obtained. Based on the photovoltaic operating cost function, energy storage equipment operating cost function, charging pile revenue function, external grid electricity purchase cost model, and investment cost model, an objective function with the goal of minimizing annual costs is obtained. The model solving module is used to solve the objective function by improving the particle swarm optimization algorithm to obtain the optimal capacity configuration of the photovoltaic equipment and the energy storage equipment under the constraints.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the photovoltaic and energy storage device capacity planning method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the photovoltaic and energy storage device capacity planning method as described in any one of claims 1 to 7.