Optical storage and charging integrated charging and battery swapping station demand response method, system, device and medium
By dividing the power battery packs according to their state of charge in the charging and battery swapping station and constructing a two-layer optimization model, and by adopting an adaptive mutated particle swarm optimization algorithm, the problems of grid load deterioration and battery modeling caused by disordered charging and discharging in the charging and battery swapping station are solved. This achieves peak shaving and valley filling of grid load and maximization of the revenue of the charging and battery swapping station, thereby improving the operating efficiency and economy of the grid and the station.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WENZHOU ELECTRIC POWER BUREAU
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-02
AI Technical Summary
The disorderly charging and discharging behavior of charging and battery swapping stations leads to the deterioration of grid load and the complexity of battery modeling. The fixed time-of-use pricing in the existing technology cannot adapt to the dynamic changes in load, and the peak shaving and valley filling effect is poor. Single-cell modeling suffers from the curse of dimensionality and is difficult to solve, making it difficult to achieve unified scheduling of large-scale batteries.
A basic model for an integrated photovoltaic-storage-charging and battery swapping station is constructed. The power batteries are divided into several discrete groups according to their state of charge. A dynamic grouping management model is established with constraints on the number of charging and discharging and the number of battery swapping. A two-level optimization model and an adaptive mutated particle swarm optimization algorithm are used to solve the problem. The optimal demand response strategy is obtained by coordinating the peak shaving and valley filling of the power grid and the economic interests of the charging and battery swapping station through a two-level iterative solution method.
It effectively achieves peak shaving and valley filling of distribution network load, improves the reliability and economy of regional power grid, adapts to the dynamic changes in electric vehicle travel behavior and photovoltaic power output, enhances the economic benefits of charging and battery swapping stations, and solves the problems of load deterioration and complex battery modeling caused by disordered charging and discharging.
Smart Images

Figure CN122136923A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy charging and swapping technology, and in particular to a demand response method, system, equipment and medium for an integrated photovoltaic-storage-charging and swapping station. Background Technology
[0002] With the rapid growth of electric vehicle ownership, charging and battery swapping stations, as critical infrastructure, can cause problems such as peak load spikes and voltage fluctuations in the power distribution network due to their disorderly charging and discharging behavior. Although integrated photovoltaic-storage-charging stations incorporate photovoltaics and energy storage, they lack effective coordination and scheduling strategies. In existing technologies, fixed time-of-use pricing cannot adapt to dynamic load changes, resulting in poor peak shaving and valley filling effects. Furthermore, the use of single-cell modeling for the power batteries within the station leads to the curse of dimensionality and solution difficulties, making it difficult to achieve unified scheduling of large-scale batteries.
[0003] Therefore, how to solve the problems of disordered charging and discharging at charging and battery swapping stations leading to grid load deterioration and complex battery modeling in existing technologies has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] This invention provides a demand response method, system, equipment, and medium for an integrated photovoltaic-storage-charging and battery swapping station, which solves the problems of grid load deterioration caused by disordered charging and discharging in existing charging and battery swapping stations and the complexity of battery modeling.
[0005] To address the aforementioned technical problems, the first aspect of this invention provides a demand response method for an integrated photovoltaic-storage-charging and battery swapping station, comprising: Acquire historical data on electric vehicle travel, historical data on photovoltaic power generation, and grid load data, and construct a basic model for an integrated photovoltaic-storage-charging and battery swapping station based on the historical data on electric vehicle travel and historical data on photovoltaic power generation; The power batteries in the integrated photovoltaic-storage-charging and battery swapping station are divided into several discrete groups according to their state of charge, and a dynamic grouping management model for each discrete group is constructed based on the constraints of charging and discharging quantity and battery swapping quantity. A two-layer optimization model is constructed based on the power grid load data, the basic model, and the dynamic grouping management models of each battery. The two-layer optimization model includes an outer optimization model aimed at peak shaving and valley filling of the power grid and an inner scheduling model aimed at maximizing the revenue of the photovoltaic-storage-charging integrated charging and swapping station. The two-level optimization model is solved using a two-level iterative solution method based on the adaptive mutant particle swarm optimization algorithm to obtain the optimal demand response strategy to control the execution of the integrated photovoltaic-storage-charging and battery swapping station.
[0006] Compared with the prior art, the beneficial effects of the embodiments of the present invention are as follows: The power batteries are divided into several discrete groups according to their state of charge, and a dynamic grouping management model is established under the constraints of charging / discharging quantity and battery swapping quantity. The introduction of dynamic battery grouping management significantly reduces the dimensionality of variables, making large-scale battery group scheduling computation feasible. A two-layer optimization model is adopted to coordinate the grid peak shaving and valley filling with the economic benefits of charging and battery swapping stations, avoiding suboptimal results caused by unilateral optimization. The outer optimization model aims at grid peak shaving and valley filling, effectively smoothing the peak-valley difference of the grid, reducing grid operating pressure, and improving the reliability and economy of the regional grid by adaptively adjusting the power interaction between charging and battery swapping stations and the grid. The inner scheduling model... With the goal of maximizing power station revenue, this invention optimizes the allocation of charging and discharging power while meeting battery swapping needs, thereby maximizing revenue. It employs a two-layer iterative solution method based on an adaptive mutated particle swarm optimization algorithm, which can quickly converge to a globally approximate optimal solution under complex constraints. Furthermore, the adaptive mutation mechanism prevents the algorithm from getting trapped in local optima, enabling the strategy to respond in real-time to dynamic changes in electric vehicle travel behavior, photovoltaic output, and grid load, demonstrating strong adaptability. This invention effectively achieves peak shaving and valley filling of the distribution network load, while simultaneously improving the economic benefits of charging and battery swapping stations. It solves the problems of load deterioration caused by disordered charging and discharging and the complexity of battery modeling in existing technologies. Attached Figure Description
[0007] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments 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.
[0008] Figure 1 This is a schematic diagram of energy exchange in an integrated photovoltaic-storage-charging and battery swapping station provided in a certain embodiment of the present invention; Figure 2 This is a flowchart of a demand response method for an integrated photovoltaic-storage-charging and battery swapping station provided in a certain embodiment of the present invention; Figure 3 This is a simulation result diagram of battery swapping load provided in a certain embodiment of the present invention; Figure 4 This is a photovoltaic prediction result diagram provided in a certain embodiment of the present invention; Figure 5 This is a schematic diagram of dynamic group management of batteries within a station provided in a certain embodiment of the present invention; Figure 6 This is a diagram showing the result of dividing the time periods of electricity load within a region according to a certain embodiment of the present invention; Figure 7 This is a flowchart of a demand response method for an integrated photovoltaic-storage-charging and battery swapping station provided in a certain embodiment of the present invention; Figure 8This is a photovoltaic output power curve provided in a certain embodiment of the present invention; Figure 9 This is a distribution network load curve diagram provided in a certain embodiment of the present invention; Figure 10 This is a graph showing the changes of the objective function under different parameters according to a certain embodiment of the present invention; wherein, Figure 10 a) is the overall goal. Figure 10 b) represents volatility. Figure 10 c) represents the peak-to-valley difference. Figure 10 d) represents smoothness; Figure 11 This is a structural diagram of a demand response system for an integrated photovoltaic, energy storage, and charging / swapping station provided in a certain embodiment of the present invention; Figure 12 This is a structural diagram of an electronic device provided in a certain embodiment of the present invention; Figure label: Among them, 10 is the basic model building module; 20 is the group model building module; 30 is the two-layer model building module; 40 is the demand response module; 5000 is the electronic device; 5001 is the processor; 5002 is the bus; 5003 is the memory; and 5004 is the transceiver. Detailed Implementation
[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings and examples. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0010] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. Those skilled in the art will be able to understand the specific meaning of the above terms in this application according to the specific circumstances.
[0011] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is merely for describing specific embodiments and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0012] In recent years, the new energy vehicle industry, represented by electric vehicles (EVs), has developed rapidly. Among them, the battery swapping model, due to its vehicle-battery separation characteristic, offers a wider range of dispatchable charging loads and more flexible charging strategies. Based on this, integrated photovoltaic-storage-charging and battery swapping stations, combining renewable energy, can not only increase the penetration rate of new energy sources but also promote the local consumption of photovoltaic resources, becoming an important direction for future charging and battery swapping station construction. However, the disorderly charging and discharging behavior of charging and battery swapping stations will bring negative impacts such as peak-load amplification to the distribution network. Integrated photovoltaic-storage-charging and battery swapping stations are located at the end of the distribution network and exhibit source-load duality, thus possessing a certain degree of active regulation capability. An integrated photovoltaic-storage-charging and battery swapping station (referred to as a charging and battery swapping station) mainly consists of a photovoltaic power generation system, an energy storage system, a power battery pack, a charger / discharger, a battery swapping module, and an energy management system. A schematic diagram of energy exchange in an integrated photovoltaic-storage-charging and battery swapping station is shown below. Figure 1 As shown in the diagram, the blue arrows indicate that each unit exchanges energy between the station and the outside world through a common bus.
[0013] The photovoltaic power generation system directly supplies power to charge the power batteries in the station during the day. Its output is random and fluctuates, and can be divided into the following two situations: If the photovoltaic output power is too small to meet the battery charging demand, the energy storage system will discharge to supply power to the charger, or the power will be purchased from the grid to make up for the shortfall; if the photovoltaic output power is large, the excess power will be stored in the energy storage system or sold to the grid.
[0014] As an auxiliary facility for photovoltaic power generation systems, energy storage systems play a role in smoothing out fluctuations in photovoltaic output. Therefore, energy storage systems do not participate in the interaction with the power grid.
[0015] The power battery is the most crucial component of a charging and battery swapping station, replacing the batteries of vehicles undergoing swapping and facilitating energy exchange between the station and the electric vehicle. Because power batteries exhibit source-load duality, and the power grid needs to smooth out peak-valley load fluctuations, rationally scheduling the charging and discharging behavior of batteries within the station based on time-of-use pricing can improve the economic efficiency of the charging and battery swapping station while providing some support to the power grid. Therefore, regarding the interaction between the power battery and the power grid, when the total energy level within the station is high and the power grid is in peak demand, it is advisable to consider selling electricity to the grid by discharging the power battery to alleviate peak demand pressure. When the grid load is low and the electricity purchase price is lower, the charging power of the power battery can be appropriately increased to reduce the operating costs of the charging and battery swapping station.
[0016] To address the aforementioned issues, this invention proposes a two-layer optimized demand response strategy for integrated photovoltaic-storage-charging and battery swapping stations. Considering the randomness and volatility of battery swapping load and photovoltaic output, a basic model of the charging and battery swapping station is constructed, and the power batteries within the station are dynamically grouped according to their state of charge to reduce computational complexity. Subsequently, a two-layer optimization model is constructed: the outer layer focuses on the power grid, employing an adaptive mutated particle swarm optimization algorithm to optimize dynamic time-of-use pricing; the inner layer focuses on the charging and battery swapping station, employing linear programming to optimize battery charging and discharging and battery swapping scheduling. After iterative convergence of both layers, the optimal demand response strategy is output to control the execution of the integrated photovoltaic-storage-charging and battery swapping station. This strategy can smooth out peak-valley fluctuations in the distribution network load and improve the profitability of the charging and battery swapping station.
[0017] In one embodiment, such as Figure 2 As shown, the first aspect of the present invention provides a demand response method for an integrated photovoltaic-storage-charging and battery swapping station, comprising: S1. Acquire historical data on electric vehicle travel, photovoltaic power generation, and grid load, and construct a basic model for an integrated photovoltaic-storage-charging and battery swapping station based on the historical data on electric vehicle travel and photovoltaic power generation. The basic model includes a battery swapping load prediction model, a photovoltaic output prediction model, and an energy storage constraint model. Specifically, collect at least one year of historical data on electric vehicle travel (including daily mileage, travel time distribution, battery capacity / power consumption, battery swapping preferences, etc.), historical photovoltaic power generation data of integrated photovoltaic-storage-charging and battery swapping stations in the target area (daily power generation curve, seasonal variations, instantaneous power, historical irradiance and weather data, etc.), grid load data of the distribution network to which the charging and battery swapping station belongs (distribution network load curve, and simultaneously obtain real-time time-of-use electricity prices, i.e., peak, flat, and valley periods and corresponding purchase and sale prices), and grid operation data (real-time / historical parameters such as voltage, frequency, and power flow, etc.). Then, divide these 24-hour data into 96 scheduling periods of 15 minutes each, and perform data cleaning, such as removing outliers and supplementing missing data, to improve data accuracy.
[0018] In one embodiment, the basic model for constructing an integrated photovoltaic-storage-charging and battery swapping station based on the electric vehicle travel history data and photovoltaic power generation history data includes: Based on the historical data of vehicle travel, the Monte Carlo method is used to simulate the battery swapping time of each electric vehicle, and the battery swapping demand for each scheduling period is accumulated to form the battery swapping load prediction model. The historical photovoltaic power generation data is divided into several state intervals. A state probability quality function and a state transition probability matrix are introduced to recursively predict the photovoltaic output power for each future period, thus forming the photovoltaic output prediction model. The energy storage constraint model is constructed based on the charging and discharging rules of the integrated photovoltaic-storage-charging and battery swapping station.
[0019] Specifically, this invention combines historical statistical data on electric vehicle travel and owner usage habits to establish a battery swapping time estimation model based on mileage and battery charge. Then, a Monte Carlo method is used for simulation sampling to obtain the battery swapping time for each electric vehicle, thereby obtaining the total battery swapping load at each time point. Therefore, the battery swapping load for a single vehicle... t 0 o'clock to t Distance traveled at 1 minute S i for: In the formula, S i0 This represents the total mileage driven by the car in one day. f s The percentage of mileage driven per hour out of the total mileage driven in a day is obtained using statistical methods.
[0020] The timing of a car owner's decision to swap batteries is primarily influenced by factors such as battery capacity, charge level, and the owner's range anxiety. Here, we assume the owner chooses to swap batteries when the battery's state of charge is below a certain level. The distance the vehicle travels from time t0 to the time of the swap will be... for: In the formula, W i0 for t The car's battery level at time 0; k 0 represents the state of charge threshold for battery swapping selected by the vehicle owner; Q Battery capacity; W 100 Electricity consumption per 100 kilometers.
[0021] make S i = This allows us to determine the battery swapping time for a single electric vehicle. Based on traffic data from the National Household Travel Survey (NHTS), this invention provides the percentage of daily mileage traveled per hour by a single vehicle, as shown in the table below: Table 1 Percentage of Vehicle Mileage Per Hour Subsequently, a state of charge (SOC) threshold for battery swapping was set (e.g., 20%-30%). The Monte Carlo method was used to extract the swapping time for each vehicle. After 5000 simulations, for each time period t, the frequency distribution of swapping demand across all simulations was statistically analyzed. The median was taken as the deterministic prediction value for that time period, and the 10% and 90% quantiles were taken as the uncertainty intervals. Finally, the battery swapping demand prediction curve for every 15 minutes of the next 24 hours was output, which is the battery swapping load prediction model. Alternatively, a Long Short-Term Memory (LSTM) network can be trained using historical data to obtain a battery swapping load prediction model. This model takes the number of swapping requests in the two hours preceding the same time point in the past 7 days and the SOC demand distribution for each vehicle as input, and outputs the number of swapping requests (the number of battery packs to be replaced) and the expected SOC interval for every 15 minutes of the next 24 hours. The battery swapping load simulation results are as follows: Figure 3 As shown, by Figure 3 It is evident that the battery swapping load fluctuates across different time periods, with peak swapping activity concentrated in the afternoon, overlapping with peak power consumption in the distribution network. Therefore, developing a reasonable energy dispatch strategy for charging and battery swapping stations is crucial for the stable operation of the distribution network.
[0022] Assuming that factors such as weather, temperature, geographical location, and battery chemistry remain relatively constant, the photovoltaic output power can be considered to have a linear relationship with solar irradiance. This invention uses a Markov chain to describe changes in solar irradiance and combines historical statistical data on weather and power output of photovoltaic power plants to perform short-term predictions of photovoltaic output.
[0023] First, a dataset of similar days to the day to be predicted is selected. Data with the same weather type as the day to be predicted is chosen based on weather forecasts. Then, based on intraday temperature changes and the K-means clustering algorithm, the data with the closest temperature to the day to be predicted is selected as similar days. Next, based on the specific distribution of photovoltaic power output on similar days, the length of the state interval is determined, dividing it into N state intervals, such as State 1: 0-5 kW (night or heavy cloudy), State 2: 5-30 kW (weak sunlight), State 3: 30-80 kW (moderate irradiance), State 4: 80-150 kW (relatively strong sunlight), and State 5: 150-300 kW (strong sunshine). Each state is represented by an integer, and the historical photovoltaic power sequence every 15 minutes is transformed into a state sequence. A state probability quality function is then introduced. pn express n Photovoltaic output power at any time X n Probability distribution in each state s N It is expressed by the following formula: Photovoltaic power output from n state of time s i Transferred to n The state at time +1 s j The transition probability is denoted as P ij As shown in the following formula: This creates a state transition probability matrix per unit time. P As shown in the following formula: Based on this, a photovoltaic power output prediction model can be constructed, which yields... n Photovoltaic output power probability distribution at time +1 p n+1 as well as n Predicted photovoltaic output power at time +1 P f,n+1 : In the formula, P EXP Let be the expected vector of state power.
[0024] The probability quality function and predicted value of photovoltaic output power at all times can be obtained through recursion. Based on the above prediction model, the photovoltaic prediction result for a sunny summer day is as follows: Figure 4 As shown.
[0025] Photovoltaic power output is random and fluctuating. To flexibly adjust the output power of the photovoltaic system, an electrochemical energy storage device is equipped. When the photovoltaic output power exceeds the charging demand of the EV battery, the energy storage system stores the excess energy; when the photovoltaic output power is less than the charging demand of the EV battery, the energy storage system discharges to charge the EV battery. Based on this charging and discharging rule, an energy storage constraint model is constructed, which includes upper and lower limits for charging and discharging power at any given time. In the formula, and These are the upper and lower limits of the charging power of the energy storage system, respectively. and These are the upper and lower limits of the discharge power of the energy storage system, respectively. For energy storage t Charging power during a given period; For energy storage t Discharge power over a given period of time; and Variables are 0-1, representing respectively t The energy storage has a unique charging and discharging state during the time period; T This refers to the scheduling period.
[0026] Upper and lower limits of battery power at any given time: In the formula, E s ( t For energy storage t The battery level at the beginning of the time period; η ESS The charging and discharging efficiency of energy storage; Δ t Unit of time; E s,max and E s,min These represent the upper and lower limits of the energy storage system's power capacity.
[0027] And the amount of electricity stored at the end of the day to maintain stable system operation. Not lower than the initial power constraint : The upper limit of the power exchange with the power grid (positive for purchasing electricity and negative for selling electricity) is the capacity of the transformer in the station, and the power interaction constraint is that each time period can only be one-way (cannot purchase and sell electricity at the same time).
[0028] This invention employs the Monte Carlo method to perform extensive random sampling simulations of the battery swapping time for each electric vehicle. This fully reflects the individual differences and random fluctuations in the travel habits of different vehicles, avoiding the smoothing distortion of peak and valley demand caused by simple averaging or deterministic models, thus making the battery swapping load prediction more in line with actual randomness. By dividing historical photovoltaic data into a finite number of state intervals and establishing a state probability quality function and a state transition probability matrix, the power output for each future period can be recursively predicted using only the temporal correlation of the historical power sequence itself. This method has low computational complexity, is easy to update online, and is particularly suitable for sites with limited communication conditions or missing meteorological data. Based on the actual charging and discharging rules of the charging and swapping station (such as upper and lower limits of battery state of charge, charging and discharging power limits, battery swapping service priorities, etc.), an energy storage constraint model is constructed, making the subsequent optimization scheduling results physically feasible. This avoids the disconnect between theoretical optimization and actual equipment control, improving the executability of the strategy.
[0029] S2. Divide the power batteries in the integrated photovoltaic-storage-charging and battery swapping station into several discrete groups according to their state of charge, and construct a dynamic grouping management model for each discrete group based on the constraints of charging and discharging quantity and battery swapping quantity. To address the problems of dimensionality curse and slow computation associated with single-cell modeling and to facilitate unified scheduling of batteries with the same State of Charge (SOC), this invention divides the SOC distribution of power batteries within the station into several state intervals. Based on this, a dynamic grouping management model for batteries within the station is established using SOC as the basis. To more comprehensively describe the corresponding constraints and reduce model complexity, this invention makes the following assumptions based on the characteristics of the battery swapping mode: 1) The charging and discharging power of each charger and discharger within the station is equal and constant; 2) The specifications of each power battery pack within the station are consistent; 3) A single power battery can only select a single charging or discharging mode within the same time period; 4) Battery swapping activities are all carried out at the beginning of the time period. The time required for the battery swapping process is short and can be ignored, i.e., all battery swapping activities are considered to be completed instantaneously; 5) Battery swapping activities follow the "one in, one out" principle, so the total number of batteries in the station remains unchanged before and after swapping; 6) The impact of capacity degradation of power batteries within the station is not considered; 7) To avoid excessive depth of discharge affecting battery cycle life, the depth of discharge of power batteries within the station does not exceed 80%.
[0030] Based on the above assumptions, this invention establishes a dynamic grouping management model for batteries within the battery swapping station. First, the battery charging and discharging power P within the swapping station is defined. ch If constant, then the change in state of charge (ΔSOC) of a single battery during charging / discharging per unit time (Δt) is a constant value, as shown in the following formula: In the formula, Δ Q This represents changes in battery charge.
[0031] Based on Δ SOC This fixed value divides the power batteries within the station into M discrete groups based on their different SOC (State of Charge): In the formula, SOC max and SOC min These represent the maximum and minimum values of the battery's state of charge, respectively.
[0032] Then the first m State of charge of the battery pack SOC m for: .
[0033] In one embodiment, the step of constructing a dynamic battery grouping management model for each of the discrete groups based on charging / discharging quantity constraints and battery swapping quantity constraints includes: Based on the charging and discharging quantity constraints and the battery swapping quantity constraints, determine the battery quantity change model and battery swapping behavior quantity change model for each discrete group after charging and discharging. Based on the battery swapping demand, battery swapping service availability constraints and equipment capacity and safety constraints are constructed, and combined with the battery quantity change model after charging and discharging of each discrete group and the battery swapping behavior quantity change model of each discrete group, to obtain the battery dynamic grouping management model of each discrete group.
[0034] for t The first period m Battery pack ( t =1,2,…,T, m =1,2,…,M), introduce variables B t,m This indicates the number of batteries after the battery swap. Bp t,m This indicates the number of batteries before the battery swap. C t,m Indicates the number of batteries being charged. D t,m This represents the number of batteries being discharged. The change in the number of batteries in each group after charging and discharging, i.e., the model of battery quantity change after charging and discharging (after battery swapping, batteries within a group undergo charging / discharging, and the SOC jumps to the adjacent group, maintaining a quantity balance), is shown in the following formula: Assuming users can accept the following minimum state of charge for battery swapping: SOC acc The state of charge within the station is not lower than SOC acc If several groups of batteries can participate in battery swapping, then the minimum value M of the discrete group is... min for: Therefore, the quantity change model of charging and swapping behavior can be obtained based on the constraints of charging and discharging quantity and swapping quantity (swapping is performed at the beginning of the time period, following the principle of one in, one out, swapping out low-charged batteries and swapping in fully charged batteries, that is, swapping only changes the quantity of each group, and the total number of batteries in the station remains unchanged), as shown in the following formula: In the formula, R t,m express t Initial time of the period m The number of batteries replaced.
[0035] Taking the changes in battery grouping within the station before and after battery swapping at the initial time of time period t as an example, the schematic diagram of dynamic battery grouping management within the station is as follows: Figure 5 As shown in the figure, the blue shading indicates that the state of this part of the battery does not change.
[0036] Based on user battery swapping needs, availability constraints and equipment capacity and safety constraints are constructed for battery swapping services; among them, the availability constraints for battery swapping services include the lower limit of the acceptable state of charge (SOC) of swapped batteries for users; only SOC m ≥SOC acc Only groups of batteries can be used for external battery swapping; the total number of batteries swapped out in the entire group must not be less than the battery swapping demand for the time period; and the number of swapped batteries must not exceed the existing number of batteries in the group. Equipment capacity and safety constraints include charging and discharging quantity constraints, i.e., the total number of charging and discharging within the group does not exceed the number of batteries in the group, the total number of charging at the entire station does not exceed the total number of charging and discharging machines, and the total number of discharging at the entire station does not exceed the total number of charging and discharging machines; battery swapping equipment constraints, i.e., the total number of swapped batteries at the entire station does not exceed the number of battery swapping equipment; battery safety constraints, i.e., ensuring that the discharge does not exceed 80% to protect battery life; and non-negative integer constraints for variables, i.e., all quantity variables are not less than 0 and are integers. Combining these constraints and change models yields the dynamic grouping management model for batteries in each discrete group.
[0037] This invention accurately depicts the dynamic migration process of battery quantity between different SOC groups by establishing separate models for battery quantity changes after charging and discharging and for battery swapping behavior. It introduces battery swapping service availability constraints to effectively ensure the real-time availability of the service. Through equipment capacity and safety constraints, it limits the number of batteries simultaneously charging or discharging to no more than the number of physical interfaces between the charging pile and the bidirectional converter, while preventing overcharging and over-discharging, extending battery cycle life, and avoiding safety hazards caused by scheduling commands exceeding equipment capacity. This model does not depend on a specific number of batteries or equipment parameters and can be flexibly adapted to various scenarios by adjusting the number of groups and constraint boundaries, exhibiting good portability.
[0038] S3. Based on the grid load data, the basic model, and the dynamic grouping management models of each battery, a two-layer optimization model is constructed. This two-layer optimization model includes an outer optimization model aimed at peak shaving and valley filling of the grid, and an inner scheduling model aimed at maximizing the revenue of the integrated photovoltaic-storage-charging and battery swapping station. Specifically, to address the problem of peak-on-peak load caused by the disorderly access of a large number of electric vehicle loads to the distribution network, this invention proposes a two-layer optimization demand response strategy for the integrated photovoltaic-storage-charging and battery swapping station. By constructing a two-layer optimization model, a reasonable dynamic time-of-use price is obtained, guiding the charging and battery swapping station to participate in grid demand response. This improves the revenue of the charging and battery swapping station while simultaneously achieving peak shaving and valley filling of the grid load. Specifically, the outer model aims to maximize the peak shaving and valley filling effect of the grid load and determines the dynamic time-of-use price. Based on this, the inner model aims to maximize the revenue of the charging and battery swapping station and determines the energy scheduling scheme for the station at different time periods.
[0039] In one embodiment, step S3 includes: Based on the grid load data and the basic model, the total grid load time series data of the photovoltaic-storage-charging-swapping integrated station is determined; Based on the time-series data of the total power grid load, several peak shaving and valley filling indicators are determined, and each of the peak shaving and valley filling indicators is linearly weighted to obtain the outer objective function; The power grid load data is divided into several time periods using a clustering algorithm. The electricity price coefficient of each time period is used as an outer-layer decision variable and combined with the outer-layer objective function to obtain the outer-layer optimization model. Construct an inner objective function based on the outer optimization model and the photovoltaic output prediction model; Based on the battery dynamic group management model, the charging power of the photovoltaic-storage-charging integrated charging and swapping station to the batteries in each time period and the number of batteries charged, discharged, and swapped out in each discrete group are used as inner-layer decision variables, and combined with the inner-layer objective function to obtain the inner-layer scheduling model. The outer optimization model and the inner scheduling model are combined to form the two-layer optimization model.
[0040] As the proportion of EV load in the distribution network continues to increase, energy dispatching of charging and battery swapping stations guided by fixed electricity prices will lead to new peak and off-peak electricity demand in the distribution network. This invention takes into account load volatility and uses an outer-layer optimization model to determine dynamic time-of-use pricing, aiming to achieve better peak shaving and valley filling effects. The outer-layer optimization model takes the power grid as the main body, the time-of-use pricing as the decision variable, and the optimization objective as peak shaving and valley filling of the power grid load.
[0041] First, based on the grid load data and the output of the basic model, the time-series data of the total grid load of the integrated photovoltaic-storage-charging and battery swapping station is calculated, which is the total grid load after adding the load of the charging and battery swapping station. for: In the formula, for t The original grid load excluding the load of charging and battery swapping stations during the time period; for t The charging power that the power battery in the station obtains from the grid during the specified time period; for t Solar grid-connected power output during specific time periods; for t The discharge power provided by the batteries in the station to the power grid during the specified time period; η EV This refers to the conversion efficiency of the power battery.
[0042] Based on the time-series data of total grid load, three peak-shaving and valley-filling indicators were determined to describe the effect of peak shaving and valley filling: volatility. f 1. Peak-valley difference f 2. Smoothness f 3. Volatility reflects the distance from each point to the load average, indicating the degree of load dispersion. Lower dispersion results in a better volatility index. Peak-to-valley difference is the difference between the highest and lowest load points within a day; minimizing this peak-to-valley difference is set as an optimization sub-objective. Smoothness reflects the change in load value at the current moment compared to the previous moment; smaller overall change within a day results in a better smoothness index. These three indicators are expressed by the following formula: In the formula, This represents the average total load of the power grid over a single day.
[0043] The three peak-shaving and valley-filling indices are each normalized using the min-max method, and then linearly weighted to obtain the final outer objective function. f This process is represented by the following formula: In the formula, This is the result of normalization processing; , Let be the minimum and maximum values of the i-th peak shaving and valley filling index; α 1. α 2. α 3 represents the weighting coefficients of each indicator, reflecting the different degrees of preference of the overall objective for each sub-objective. This invention has undergone multiple simulations, and... α 1 = 5 α 2=5, α3 = 1.
[0044] In dynamic time-of-use pricing optimization strategies, considering time-period segmentation and setting separate prices for each time period can significantly reduce the dimensionality of decision variables, thereby improving the algorithm's convergence speed. This invention uses the K-means clustering algorithm to divide grid load data (excluding electric vehicle load) into four time periods from high to low: peak, off-peak, and valley periods. The electricity price coefficient for each time period is used as the outer decision variable; that is, with the off-peak price as the baseline, the price coefficients for peak, valley, and peak periods are set to [values missing]. k r , k p , k v The price coefficient vector is composed of k = [ k v ,1, k p , k r ], where 0.3 < k v <1, 1< k p < k r ≤1.8, k The solution is found in a two-level optimization model; the outer-level decision variables, their value constraints, and the outer-level objective function are combined to form the outer-level optimization model. Taking the power grid load in a certain region as an example, the result of dividing the power load time periods in the region is as follows: Figure 6 As shown, by Figure 6 As can be seen, the peak periods are set from 10:15 to 11:15 and from 16:45 to 20:45, with a load cluster center of 99.8MW; the valley period is set from 0:00 to 6:00, with a load cluster center of 67.9MW.
[0045] The inner model focuses on an integrated photovoltaic-energy storage-charging and battery swapping station. The decision variable is the energy scheduling behavior of the station, and the optimization objective is to maximize the station's revenue. Factors influencing the operating profit of a charging and battery swapping station include battery swapping revenue, charging costs, electricity sales revenue, and operation and maintenance costs. Since vehicle owners' battery swapping behavior is an uncontrollable factor, operation and maintenance costs are relatively fixed. Therefore, this invention only considers the charging and discharging profits of the charging and battery swapping station from the perspective of energy scheduling. I An inner objective function is constructed based on the time-of-use electricity price and photovoltaic output prediction model output by the outer optimization model. This function can transform scheduling behavior into an optimizable economic objective. In the formula, I It consists of three parts, namely the revenue from selling electricity from the power battery to the grid. I discThe cost of purchasing electricity from the grid for power batteries I char With photovoltaic grid connection revenue I PV ; TOU ( t () indicates time-of-use electricity pricing; , , They are respectively t The charging power provided by photovoltaic, energy storage and grid to the power battery during the period; This refers to the charging time.
[0046] Based on the battery dynamic grouping management model, taking the charging and battery swapping station as the main body, the charging quantity, discharging quantity, and swapping quantity of each discrete group within every 15-minute time period, as well as the charging power of the energy storage system and photovoltaic power generation system to the battery within the integrated photovoltaic-energy storage-charging and battery swapping station, are defined as inner-layer decision variables. These variables are combined with the inner-layer objective function to form an inner-layer scheduling model. The constraints of the inner-layer scheduling model include photovoltaic output constraints, power battery charging power, grid connection status constraints of the integrated photovoltaic-energy storage-charging and battery swapping station, battery swapping demand constraints, and consistency constraints of the total battery energy within the station.
[0047] The photovoltaic (PV) system charges the power battery and stores any surplus photovoltaic power in an energy storage system or sells it to the grid. Therefore, according to the law of conservation of energy, the constraint on PV output is that the sum of the power flowing from the PV system to the power battery, energy storage system, and power distribution network cannot exceed its total output power. In the formula, for t The charging power provided by the photovoltaic system to the energy storage system during specific time periods; for t The charging power provided by the photovoltaic system for electric vehicle batteries during certain time periods; for t Solar grid-connected power output during specific time periods; for t Photovoltaic output power during a given time period.
[0048] The charging power of the power batteries in the station is provided by the photovoltaic power generation system, energy storage system, or power grid. By controlling the opening and closing of the bus common connection point port switch, the charging and battery swapping station can switch between grid-connected and off-grid modes. The grid-connected state constraint of the integrated photovoltaic-energy storage-charging and battery swapping station is that the station can only select a single interactive mode of grid connection or off-grid operation at any given time; that is, there cannot be a situation where some batteries are charging while others are discharging simultaneously. In the formula, and For 0-1 variables, When it is 1, it means t The charging and battery swapping stations purchase electricity from the power grid during certain hours. When it is 1, it means t During certain periods, the charging and battery swapping stations sell electricity to the grid.
[0049] The service availability of charging and battery swapping stations is a crucial factor affecting their economic benefits. This invention optimizes the operation strategy of charging and battery swapping stations based on meeting users' battery swapping needs. Therefore, the battery swapping demand constraint is as follows: In the formula, DEM t express t The number of battery swaps required during different time periods.
[0050] Consistency constraint of total battery energy at the station: To maintain stable system operation, the total energy of the power batteries at the end of the dispatch process must be consistent. Eb T+1 The total charge should not be less than the starting charge. Eb 1. It is expressed by the following formula: In addition, it also includes upper and lower limit constraints on the number of charge / discharge cycles, the number of battery swaps, and battery grouping, i.e., for... t The first period m For each battery pack, the total number of charge / discharge cycles shall not exceed the number of batteries after the battery swap; the total number of charge / discharge cycles shall not exceed the number of chargers / dischargers. t The total number of batteries swapped out during a given period shall not exceed the number of battery swapping devices. In the formula, N char Indicates the number of charging and discharging machines in the station; N exch This refers to the number of power swapping devices within the station.
[0051] Number of rechargeable batteries C t,m Number of discharge batteries D t,m Number of batteries replaced R t,m Number of batteries after battery swap Bt,m Number of batteries before battery swap Bp t,m The upper and lower limit constraints are expressed by the following formula: The outer optimization model and the inner scheduling model are nested and combined to form a two-layer optimization model.
[0052] The two-layer structure constructed in this invention enables the balance between the global regulation requirements of the power grid and the local economic interests of power plants through iterative coordination, avoiding the drawbacks of single-layer optimization where bias towards one side leads to poor performance on the other. A clustering algorithm is used to divide the power grid load data into several typical time periods, and the electricity price coefficient of each time period is used as the outer-layer decision variable, instead of directly using a fixed time-of-use price. This allows the electricity price time period division to adapt to the load characteristics of different seasons and day types, avoiding the misalignment between dispatch instructions and actual load peaks and valleys caused by fixed time period division, thus improving the economy and effectiveness of the demand response strategy. The inner-layer decision variables correspond one-to-one with the variables in the previously constructed battery dynamic grouping management model, ensuring that optimized dispatch instructions can be directly implemented in the operation of each battery group, avoiding information loss and execution deviation caused by variable transformation, and also allowing constraints to be naturally embedded in the inner-layer model.
[0053] S4. The dual-layer optimization model is solved using a two-layer iterative solution method based on the adaptive mutated particle swarm optimization algorithm to obtain the optimal demand response strategy to control the execution of the photovoltaic-storage-charging and battery swapping integrated station. Specifically, the dual-layer optimization model of this invention adopts a closed-loop iterative architecture of outer-layer grid-side electricity price optimization + inner-layer power station-side energy scheduling: the outer layer optimizes the dynamic time-of-use electricity price based on the adaptive mutated particle swarm optimization algorithm with the goal of grid peak shaving and valley filling, and the inner layer responds to the electricity price and executes energy scheduling with the goal of maximizing the revenue of the charging and battery swapping station. The optimal bidirectional benefits of the grid and the power station are achieved through the logic of pricing-response-iteration-convergence.
[0054] In one embodiment, the step of using a two-level iterative solution method based on an adaptive mutant particle swarm optimization algorithm to solve the two-level optimization model and obtain the optimal demand response strategy includes: Initialize the particle swarm; each particle in the particle swarm corresponds to a set of outer-layer decision variables; The initialized particles are input into the inner scheduling model to obtain the initial energy scheduling strategy, which is then input into the outer optimization model to calculate each peak-shaving and valley-filling index, thereby obtaining the fitness value of the outer particle swarm. When the fitness value is less than the global optimal fitness value of the particle swarm, the initialized particle is taken as the global optimal particle position, and the fitness variance of all particles in the current particle swarm is calculated as the population fitness variance. When the population fitness variance reaches the mutation condition, an adaptive mutation operation is performed on the global optimal particle position to obtain the global optimal particle mutation position. The calculation process of the energy scheduling strategy and the adaptive mutation process of the global optimal particle position are iteratively executed based on the global optimal particle mutation position until the preset iteration termination condition is reached. The global optimal particle mutation position and energy scheduling strategy obtained in the final iteration are used as the optimal demand response strategy.
[0055] Specifically, iterative initialization is performed first: Outer initialization uses the original grid load data, battery swapping load forecast, and photovoltaic output forecast as inputs. K-means clustering is used to divide the grid load into four time periods: peak, flat, and valley. Simultaneously, an initial particle swarm is randomly generated, with each particle representing a set of outer decision variables (i.e., time-of-use electricity price coefficients for valley, peak, and peak periods). Hard constraints on electricity prices are determined (their value range must satisfy the price gradient), and the particle swarm size, maximum number of iterations, population fitness variance convergence threshold, and historical global optimal particle positions are set. Inner initialization uses the initial electricity price scheme corresponding to the particle swarm, all constraints of the basic model, and photovoltaic / battery swapping / energy storage parameters as inputs. The initial SOC of the batteries within the station, the initial energy storage capacity, and the initial number of battery groups are preset.
[0056] The initialized particles are input into the inner scheduling model. Based on the input constraints and data, a commercial integer programming solver such as GUROBI is used to solve the model, outputting the initial energy scheduling strategy for 96 time periods under the current electricity price. This strategy includes battery charging and discharging power, photovoltaic absorption / grid power, energy storage charging and discharging status, and the number of battery groups charging / discharging / swapping. The initial energy scheduling strategy is then input into the outer optimization model to calculate the total grid load curve after superimposing the load of charging and swapping stations. Based on this curve, various peak shaving and valley filling indices are calculated. After min-max normalization of the three indices, they are linearly weighted and summed according to preset weights to obtain the fitness value of the outer particle swarm (the objective function value; the smaller the value, the better the peak shaving and valley filling effect). This fitness value is used to evaluate the grid-side optimization effect of the current electricity price scheme.
[0057] The fitness value calculated in this round is compared with the historical global best fitness value. If the fitness value in this round is better (smaller objective function value, improved peak smoothing and valley filling effect): it is determined as "yes", and the initialized particle is saved as the global best particle position. The historical global best fitness value is updated synchronously as the comparison benchmark for subsequent iterations. The fitness variance of all particles in the current particle swarm is calculated as the population fitness variance. The calculation process is shown in the following formula: In the formula, For population fitness variance; Let be the fitness value of the i-th particle, i = 1, 2, ..., G, where G is the swarm size; , These represent the average fitness value and the maximum fitness value of the particle swarm.
[0058] Otherwise, if the fitness of this round is not better, jump to the step of updating the time-of-use electricity price coefficient, generate a new electricity price coefficient through the particle swarm velocity update rule, and re-enter the inner model to execute the next round of scheduling solution.
[0059] The calculated population fitness variance is compared with a preset population fitness variance convergence threshold. If the population fitness variance is less than the preset threshold, it indicates that the particle swarm is trapped in a local optimum, and this is considered a yes. A mutation operation is then performed, specifically an adaptive mutation operation (such as Gaussian mutation or adaptive adjustment of mutation probability) is applied to the electricity coefficient of the globally optimal particle. This perturbs the position of the optimal particle, helps it escape the local optimum trap, avoids premature convergence, generates new candidate electricity coefficient schemes, and yields the mutated position of the globally optimal particle. Otherwise, it indicates that the particle swarm is still in an effective search state, and this is considered a no, proceeding to the next step.
[0060] The calculation process of the energy scheduling strategy is based on the iterative execution of the global optimal particle mutation position and the adaptive mutation process of the global optimal particle position until the preset iteration termination condition is reached (such as the number of iterations reaching the preset maximum number of iterations or the change of the outer objective function in multiple consecutive rounds not exceeding the preset convergence threshold). The global optimal particle mutation position and energy scheduling strategy obtained in the final iteration round are used as the optimal demand response strategy and the photovoltaic-storage-charging-swapping integrated charging station is controlled to execute.
[0061] Another demand response method for integrated photovoltaic, energy storage, and charging / swapping stations is as follows: Figure 7 As shown, this invention calculates the population fitness variance of the particle swarm in real time during the solution process. When the variance reaches the preset mutation condition, an adaptive mutation operation is performed on the globally optimal particle position, which can jump out of the current local optimal region and continue to search for a better solution in the global scope, significantly improving the global optimality of the final demand response strategy. By inputting the particle into the inner scheduling model to obtain the corresponding energy scheduling strategy, and then calculating the outer peak shaving and valley filling index as the fitness value based on the strategy, this nested iterative structure makes the outer optimization process fully consider the response behavior of maximizing the power plant revenue in the inner layer. The final outer variables and inner strategies are matched with each other, avoiding decision conflicts caused by independent optimization.
[0062] In one embodiment, the adaptive mutation operation on the globally optimal particle position to obtain the globally optimal mutated particle position includes: The population convergence factor is determined based on the population fitness variance, and the iteration progress factor is determined based on the current iteration number. The adaptive mutation probability is determined based on the population convergence factor and the iteration progress factor. A uniform random number is generated, and the mutation is triggered when the uniform random number is less than the adaptive mutation probability. Extract the historical search direction of the global optimal particle position, construct an orthogonal projection matrix based on the historical search direction, and generate an adaptive perturbation vector by combining adaptive Gaussian noise; The adaptive perturbation vector is superimposed on the global optimal particle position to obtain the mutation candidate particle position. The mutation candidate particle position is then verified and corrected based on two dimensions of boundary and gradient to obtain the mutation corrected particle position. The fitness value of the mutated particle position is calculated and compared with the fitness value before mutation. The global optimal particle mutation position is determined based on the comparison result.
[0063] Specifically, this invention addresses the four major shortcomings of conventional particle swarm optimization (PSO) algorithms: fixed mutation probability, random undirected perturbation, direct discarding of out-of-bounds solutions, and lack of elite retention. This invention proposes an adaptive mutation method that can accurately escape local optima traps while ensuring the effectiveness of solutions and the stability of the algorithm.
[0064] First, the population convergence factor is determined based on the population fitness variance, and the iteration progress factor is determined based on the current iteration number. This process is expressed by the following formula: λ 2=t` / T max In the formula, λ 1. λ 2 represents the population convergence factor and iteration progress factor, respectively; σ0 is the preset population fitness variance convergence threshold, preferably 0.001; t` is the current iteration number; T max This is the preset maximum number of iterations.
[0065] Combining two-factor methods to determine adaptive mutation probabilities completely replaces the traditional fixed probability method. This process is expressed by the following formula: p m =p m,min +(p m,max -p m,min )×( λ 1× λ 2) In the formula, p m For adaptive mutation probability; pm,max p m,min These are the maximum and minimum values of the adaptive mutation probability, preferably 0.3 and 0.05 respectively; in the early stage of the algorithm ( λ 2 small), dispersed groups ( λ 1 hour, p m Approximately 0.05 ensures global exploration; in the later stages of the algorithm ( λ 2 large), group convergence ( λ When p is large (1), m Approaching 0.3 strengthens the escape from local optima.
[0066] Generate a uniformly distributed random number rand in the range [0,1]. If rand <p m If the mutation is successful, the mutation will be triggered; otherwise, the mutation will be skipped and the process will proceed directly to the termination condition check.
[0067] Maintain the historical position sequence of the globally optimal particle {X} gbest (1),...,X gbest (t`)}(X gbest (t` represents the historical position of the globally optimal particle at the t`th iteration), and the most recent historical search direction vector ΔX is calculated. gbest The difference between two consecutive historical position sequences represents the historical search trend of the optimal particle. To avoid continuing the search along the historical search direction (the local optimum direction), an orthogonal projection matrix P is constructed. orth (By dividing the product of the historical search direction vector and its transpose by the square of the magnitude of that historical search direction vector, and then subtracting the quotient from the identity matrix, the orthogonal projection matrix can be obtained.) This forces random perturbations to be projected onto the direction perpendicular to the historical direction, achieving precise escape. This matrix can project any vector onto ΔX. gbest The orthogonal complement space avoids searching along local optima from the root, thereby improving escape efficiency.
[0068] By combining orthogonal perturbations with adaptive Gaussian noise, an adaptive perturbation vector that balances directionality and randomness is generated. This process is expressed by the following equation: ΔX perturb =α×P orth ×ε+β×ε gauss α=α max ×λ1×λ2 β=β max ×(1-λ1×λ2) In the formula, ΔX perturb ε is the adaptive perturbation vector; α is the adaptive orthogonal perturbation coefficient, which becomes stronger as convergence and in later stages; ε is a uniform random vector in the range [-1,1]; β is the adaptive Gaussian noise coefficient, which becomes stronger as the convergence and dispersion in the earlier stages of exploration balance the global exploration;gauss To obey N(0,σ) ε 2 ) Gaussian random vector, σ ε =0.02×(1+λ1×λ2); α max β is the upper limit of the orthogonal perturbation coefficient, preferably 0.1; max The upper limit of the Gaussian noise figure is preferably 0.05.
[0069] The adaptive perturbation vector is added to the globally optimal particle position to obtain the position of the mutated candidate particle. For the specific constraints of time-of-use pricing in this invention, the mutated candidate particles undergo boundary and gradient dual-dimensional verification and correction, completely solving the computational waste caused by directly discarding out-of-bounds solutions in traditional algorithms. For the valley coefficient in the mutated candidate particle position, if it is not greater than 0.3, it is corrected to 0.3 + 0.05 × rand(), where rand() is a uniformly random number; if it is not less than 1, it is corrected to 1 - 0.05 × rand(). For the peak coefficient in the mutated candidate particle position, if it is not greater than 1, it is corrected to 1 + 0.05 × rand(); if it is not less than the peak coefficient in the mutated candidate particle, it is corrected to (peak coefficient in the mutated candidate particle position + 1) / 2. For the peak coefficient at the position of the mutated candidate particle, if it is not greater than the peak coefficient at the position of the mutated candidate particle, it is corrected to (peak coefficient at the position of the mutated candidate particle + 1.8) / 2; if it is not less than 1.8, it is corrected to 1.8 - 0.05 × rand().
[0070] For the position of the mutated candidate particle after boundary correction, verify and maintain its core logic gradient of time-of-use pricing. If the gradient is violated, it is scaled and corrected proportionally: when the valley coefficient after boundary correction is not less than 1, it is compressed to the interval [0.3,1) proportionally, and the peak coefficient and apex coefficient after boundary correction are adjusted simultaneously to maintain the gradient; when the peak coefficient after boundary correction is not greater than 1, it is raised to the interval (1, apex coefficient after boundary correction), and the apex coefficient after boundary correction is adjusted simultaneously to make it comply with the regulatory requirements of time-of-use pricing of the power grid, thus obtaining the position of the mutated corrected particle.
[0071] Input the position of the mutated particle into the internal energy scheduling model, recalculate its fitness value, and compare the fitness values before and after the mutation. If the mutated value is better than the original value, the mutation is deemed valid, and the position of the mutated particle is taken as the globally optimal particle mutation position; otherwise, the mutation is deemed invalid, and the original globally optimal particle is rolled back without updating to avoid algorithm oscillation.
[0072] This invention calculates the population convergence factor by using the population fitness variance to reflect the current degree of aggregation of the particle swarm. Simultaneously, it determines the iteration progress factor based on the ratio of the current iteration count to the maximum iteration count. The combination of these two factors forms an adaptive mutation probability, resulting in a higher mutation probability in the early stages of the algorithm, which helps maintain population diversity. The mutation probability decreases in the later stages, avoiding the destruction of already found optimal solutions. Furthermore, it extracts the historical search directions of the globally optimal particle positions and constructs an orthogonal projection matrix. Adaptive Gaussian noise is superimposed on this orthogonal subspace, causing the perturbation direction to tend towards orthogonal directions that have not yet been fully explored, avoiding perturbations in directions that have been repeatedly searched. The algorithm avoids redundant computational waste, thus improving the "exploration efficiency" of mutation. The positions of the mutated candidate particles are first checked and corrected by boundary verification and gradient-based local correction, ensuring that the mutated particles not only satisfy the variable constraints, but also have lower fitness potential on the outer objective function, avoiding the generation of a large number of invalid or inferior particles by blind mutation. This enables the adaptive mutation particle swarm algorithm to find better combinations of electricity price coefficients and corresponding energy scheduling strategies with fewer iterations when solving the two-layer optimization model of photovoltaic-storage-charging integrated charging and swapping station. Moreover, the results of multiple independent runs have small variance and high reliability in engineering applications.
[0073] This paper takes a typical photovoltaic-storage-charging integrated charging and battery swapping station as an example for simulation analysis. The station includes a photovoltaic power generation system, an energy storage system, a power battery pack, a charger / discharger, an energy management system, and other components. Its specific parameters are shown in the table below: Table 2 Simulation Parameter Settings The simulation uses 15-minute intervals for optimal control. The results of the Monte Carlo-based battery swapping load simulation are as follows: Figure 3 As shown, the regional power grid load is as follows: Figure 6 As shown, the photovoltaic output power curve is as follows: Figure 8 As shown. This invention references industrial electricity prices, assuming a flat-rate electricity price of 0.5 yuan / kWh. To verify the effectiveness of the method described in this invention, the total load of the distribution network including the load of charging and battery swapping stations is compared with the original load of the distribution network excluding the load of charging and battery swapping stations. The evaluation indicators of the optimization effect, namely load volatility, peak-valley difference, and smoothness, are shown in the table below: Table 3 Evaluation Indicators The optimized time-of-use electricity pricing period divisions and price coefficients are shown in the table below: Table 4. Time Period Division and Price Coefficient of Dynamic Time-of-Use Electricity Pricing As shown in Table 3, compared to the original distribution network load, the fluctuation rate of the total load simulated in this invention decreased by 24.7%, and the peak-to-valley difference decreased by 22.4%, but the smoothness slightly worsened. The distribution network load curve for a day is shown below. Figure 9 As shown in the figure, the yellow area indicates the valley filling effect from 0:00 to 6:00 and after 21:00, while the blue area indicates the peak shaving effect from 8:00 to 21:00. In summary, the method described in this invention has a peak shaving and valley filling effect, and its corresponding charging and discharging revenue is approximately 15,000 yuan, indicating that the electricity sales revenue can cover the charging costs and still have a surplus.
[0074] The above results show that the method described in this invention can formulate a reasonable time-of-use electricity price to guide charging and battery swapping stations to participate in grid demand response. Specifically, during peak electricity consumption periods, high electricity prices guide charging and battery swapping stations to reduce charging power and increase discharging power, while during off-peak electricity consumption periods, low electricity prices guide charging and battery swapping stations to increase charging power and reduce discharging power, thereby achieving peak shaving and valley filling of grid load and improving the revenue of charging and battery swapping stations.
[0075] The peak shaving and valley filling effect of the method described in this invention is determined by the charging and discharging power of the integrated photovoltaic-storage-charging and battery swapping station, while the upper limit of the total charging and discharging power is affected by the number of electric vehicle batteries and charging / discharging machines stored in the station. To verify the effectiveness of the method described in this invention under different numbers of power batteries and charging / discharging machines in the station, parameter N was set respectively. bat = 600 / 500 / 400 / 300, N char Simulation analysis was performed for 16 scenarios: 300 / 250 / 200 / 150. The simulation results show the changes in the objective function under different parameters as follows: Figure 10 As shown.
[0076] Depend on Figure 10 b) Figure 10 c) It can be seen that regardless of the changes in the number of batteries and charge / dischargers within the station, the load fluctuation rate and peak-valley difference indicators of the distribution network under the method described in this invention are always better than the original load. Therefore, the method described in this invention has a better peak shaving and valley filling effect.
[0077] Depend on Figure 10 a) Figure 10 b) Figure 10 c) It can be seen that as the number of batteries in the station increases, the total target, volatility, and peak-valley difference generally show a downward trend. Therefore, it can be concluded that the more power batteries in the station, the larger the adjustable range of the energy dispatch strategy, and the better the peak-shaving and valley-filling effect. However, Figure 10 The smoothness index d) did not fully follow this rule because the weighting coefficient of the smoothness index is smaller than that of the other two.
[0078] exist Figure 10 a) Figure 10b) Figure 10 In c), no obvious pattern was found in the changes of the indicators with the number of charge / discharge machines, but... Figure 10 In section d), as the number of charge / dischargers increases, the smoothness index generally shows a worsening trend. In summary, it can be concluded that the more charge / dischargers there are, the more frequently the battery's charge / discharge state changes, and the worse the smoothness index becomes.
[0079] The dual-layer optimized demand response strategy for integrated photovoltaic-storage-charging and battery swapping stations proposed in this invention guides charging and battery swapping stations to participate in grid demand response by setting reasonable time-of-use electricity prices. It can take into account the interests of both charging and battery swapping stations and the grid, and improve the revenue of charging and battery swapping stations and reduce the peak load of the grid while meeting the battery swapping needs of electric vehicles.
[0080] This application addresses the problems of grid load deterioration caused by disordered charging and discharging at charging and battery swapping stations and the complexity of battery modeling in existing technologies. It proposes a demand response method for integrated photovoltaic-storage-charging and battery swapping stations. This method divides power batteries into discrete groups based on their state of charge and establishes a dynamic grouping management model under constraints on the number of charging / discharging and battery swapping operations. The introduction of dynamic battery grouping management significantly reduces the dimensionality of variables, making large-scale battery group scheduling computation feasible. A two-layer optimization model is employed to coordinate grid peak shaving and valley filling with the economic benefits of charging and battery swapping stations, avoiding suboptimal results caused by unilateral optimization. The outer optimization model aims at grid peak shaving and valley filling, effectively smoothing grid peak and valley conditions by adaptively adjusting the power interaction between charging and battery swapping stations and the grid. This invention reduces the pressure on the power grid and improves the reliability and economy of the regional power grid. The inner-layer scheduling model aims to maximize the revenue of the power station, optimizing the allocation of charging and discharging power while meeting the needs of battery swapping, thereby maximizing revenue. It adopts a two-layer iterative solution method based on the adaptive mutation particle swarm algorithm, which can quickly converge to the global approximate optimal solution under complex constraints. The adaptive mutation mechanism can prevent the algorithm from getting trapped in local optima, enabling the strategy to respond in real time to the dynamic changes in electric vehicle travel behavior, photovoltaic output, and power grid load, and has strong adaptability. This invention can effectively realize peak shaving and valley filling of the distribution network load, while improving the economic benefits of charging and battery swapping stations, and solves the problems of load deterioration caused by disordered charging and discharging and complex battery modeling in the prior art.
[0081] It should be noted that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order requirement for the execution of these steps, and they can be executed in other orders.
[0082] In another embodiment, such as Figure 11 As shown, a second aspect of the present invention provides a demand response system for an integrated photovoltaic, energy storage, and charging / swapping station, comprising: The basic model construction module 10 is used to acquire historical data of electric vehicle travel, historical data of photovoltaic power generation, and grid load data, and to construct a basic model of the integrated photovoltaic-storage-charging and battery swapping station based on the historical data of electric vehicle travel and historical data of photovoltaic power generation. The grouping model construction module 20 is used to divide the power batteries in the integrated photovoltaic-storage-charging and battery swapping station into several discrete groups according to their state of charge, and to construct a dynamic grouping management model for each discrete group based on the constraints of charging and discharging quantity and battery swapping quantity. The dual-layer model construction module 30 is used to construct a dual-layer optimization model based on the power grid load data, the basic model, and each of the battery dynamic grouping management models; the dual-layer optimization model includes an outer-layer optimization model aimed at peak shaving and valley filling of the power grid and an inner-layer scheduling model aimed at maximizing the revenue of the photovoltaic-storage-charging integrated charging and swapping station. The demand response module 40 is used to solve the two-layer optimization model using a two-layer iterative solution method based on the adaptive mutant particle swarm algorithm, so as to obtain the optimal demand response strategy to control the execution of the photovoltaic-storage-charging integrated charging and swapping station.
[0083] It should be noted that each module in the aforementioned integrated photovoltaic-storage-charging-battery swapping station demand response system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module. For specific limitations regarding the integrated photovoltaic-storage-charging-battery swapping station demand response system, please refer to the limitations of the integrated photovoltaic-storage-charging-battery swapping station demand response method described above; both have the same function and role, and will not be repeated here.
[0084] A third aspect of the present invention provides an electronic device comprising: Processor, memory, and bus; The bus is used to connect the processor and the memory; The memory is used to store operation instructions; The processor is configured to execute the operation instructions by calling the operation instructions, thereby causing the processor to perform the operation corresponding to the demand response method for an integrated photovoltaic, energy storage, and charging / swapping station as shown in the first aspect of this application.
[0085] In one alternative embodiment, an electronic device is provided, such as Figure 12 As shown, Figure 12The illustrated electronic device 5000 includes a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, for example, via a bus 5002. Optionally, the electronic device 5000 may also include a transceiver 5004. It should be noted that in practical applications, the transceiver 5004 is not limited to one type, and the structure of this electronic device 5000 does not constitute a limitation on the embodiments of this application.
[0086] Processor 5001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 5001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0087] Bus 5002 may include a path for transmitting information between the aforementioned components. Bus 5002 may be a PCI bus or an EISA bus, etc. Bus 5002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0088] The memory 5003 may be a ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0089] The memory 5003 is used to store application code that executes the scheme of this application, and its execution is controlled by the processor 5001. The processor 5001 is used to execute the application code stored in the memory 5003 to implement the content shown in any of the foregoing method embodiments.
[0090] Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers.
[0091] The fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a demand response method for an integrated photovoltaic-storage-charging and battery swapping station as shown in the first aspect of this application.
[0092] Another embodiment of this application provides a computer-readable storage medium storing a computer program that, when run on a computer, enables the computer to execute the corresponding content in the aforementioned method embodiments.
[0093] Furthermore, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0094] In summary, this invention relates to the field of new energy charging and swapping technology, and discloses a demand response method, system, equipment, and medium for an integrated photovoltaic-storage-charging and swapping station. It constructs a basic model of the integrated photovoltaic-storage-charging and swapping station, and divides the power batteries within the station into several discrete groups according to their state of charge. Then, based on constraints on the number of charging / discharging and swapping operations, it constructs a dynamic grouping management model for each discrete group. Using the basic model and the dynamic grouping management model, it constructs a two-layer optimization model, including an outer optimization model aimed at peak shaving and valley filling of the power grid and an inner scheduling model aimed at maximizing the revenue of the integrated photovoltaic-storage-charging and swapping station. A two-layer iterative solution method based on an adaptive mutated particle swarm optimization algorithm is used to solve the two-layer optimization model, obtaining the optimal demand response strategy to control the execution of the integrated photovoltaic-storage-charging and swapping station. This effectively achieves peak shaving and valley filling of the distribution network load while improving the economic benefits of the charging and swapping station.
[0095] The various embodiments in this specification are described in a progressive manner. For directly identical or similar parts of the embodiments, refer to each other. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. It should be noted that 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. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0096] The embodiments described above are merely preferred embodiments of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various improvements and substitutions without departing from the technical principles of this invention, and these improvements and substitutions should also be considered within the scope of protection of this application. Therefore, the scope of protection of this patent application should be determined by the scope of the claims.
Claims
1. A demand response method for an integrated photovoltaic-storage-charging and battery swapping station, characterized in that, include: Acquire historical data on electric vehicle travel, historical data on photovoltaic power generation, and grid load data, and construct a basic model for an integrated photovoltaic-storage-charging and battery swapping station based on the historical data on electric vehicle travel and historical data on photovoltaic power generation; The power batteries in the integrated photovoltaic-storage-charging and battery swapping station are divided into several discrete groups according to their state of charge, and a dynamic grouping management model for each discrete group is constructed based on the constraints of charging and discharging quantity and battery swapping quantity. A two-layer optimization model is constructed based on the power grid load data, the basic model, and the dynamic grouping management models of each battery. The two-layer optimization model includes an outer optimization model aimed at peak shaving and valley filling of the power grid and an inner scheduling model aimed at maximizing the revenue of the photovoltaic-storage-charging integrated charging and swapping station. The two-level optimization model is solved using a two-level iterative solution method based on the adaptive mutant particle swarm optimization algorithm to obtain the optimal demand response strategy to control the execution of the integrated photovoltaic-storage-charging and battery swapping station.
2. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 1, characterized in that, The basic models include a battery swapping load prediction model, a photovoltaic power output prediction model, and an energy storage constraint model; among them... The basic model for constructing an integrated photovoltaic-energy storage-charging and battery swapping station based on the historical data of electric vehicle travel and photovoltaic power generation includes: Based on the historical data of vehicle travel, the Monte Carlo method is used to simulate the battery swapping time of each electric vehicle, and the battery swapping demand for each scheduling period is accumulated to form the battery swapping load prediction model. The historical photovoltaic power generation data is divided into several state intervals. A state probability quality function and a state transition probability matrix are introduced to recursively predict the photovoltaic output power for each future period, thus forming the photovoltaic output prediction model. The energy storage constraint model is constructed based on the charging and discharging rules of the integrated photovoltaic-storage-charging and battery swapping station.
3. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 1, characterized in that, The battery dynamic grouping management model for each discrete group, constructed based on charging / discharging quantity constraints and battery swapping quantity constraints, includes: Based on the charging and discharging quantity constraints and the battery swapping quantity constraints, determine the battery quantity change model and battery swapping behavior quantity change model for each discrete group after charging and discharging. Based on the battery swapping demand, battery swapping service availability constraints and equipment capacity and safety constraints are constructed, and combined with the battery quantity change model after charging and discharging of each discrete group and the battery swapping behavior quantity change model of each discrete group, to obtain the battery dynamic grouping management model of each discrete group.
4. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 1, characterized in that, The construction of a two-layer optimization model based on the power grid load data, the basic model, and each of the battery dynamic grouping management models includes: Based on the grid load data and the basic model, the total grid load time series data of the photovoltaic-storage-charging-swapping integrated station is determined; Based on the time-series data of the total power grid load, several peak shaving and valley filling indicators are determined, and each of the peak shaving and valley filling indicators is linearly weighted to obtain the outer objective function; The power grid load data is divided into several time periods using a clustering algorithm. The electricity price coefficient of each time period is used as an outer-layer decision variable and combined with the outer-layer objective function to obtain the outer-layer optimization model. Construct an inner objective function based on the outer optimization model and the photovoltaic output prediction model; Based on the battery dynamic group management model, the charging power of the photovoltaic-storage-charging integrated charging and swapping station to the batteries in each time period and the number of batteries charged, discharged, and swapped out in each discrete group are used as inner-layer decision variables, and combined with the inner-layer objective function to obtain the inner-layer scheduling model. The outer optimization model and the inner scheduling model are combined to form the two-layer optimization model.
5. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 1, characterized in that, The constraints of the inner-layer scheduling model include photovoltaic output constraints, power battery charging power, grid connection status constraints of the integrated photovoltaic-storage-charging and battery swapping station, battery swapping demand constraints, and consistency constraints of the total battery energy within the station.
6. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 4, characterized in that, The method employs a two-level iterative solution based on an adaptive mutant particle swarm optimization algorithm to solve the two-level optimization model and obtain the optimal demand response strategy, including: Initialize the particle swarm; each particle in the particle swarm corresponds to a set of outer-layer decision variables; The initialized particles are input into the inner scheduling model to obtain the initial energy scheduling strategy, which is then input into the outer optimization model to calculate each peak-shaving and valley-filling index, thereby obtaining the fitness value of the outer particle swarm. When the fitness value is less than the global optimal fitness value of the particle swarm, the initialized particle is taken as the global optimal particle position, and the fitness variance of all particles in the current particle swarm is calculated as the population fitness variance. When the population fitness variance reaches the mutation condition, an adaptive mutation operation is performed on the global optimal particle position to obtain the global optimal particle mutation position. The calculation process of the energy scheduling strategy and the adaptive mutation process of the global optimal particle position are iteratively executed based on the global optimal particle mutation position until the preset iteration termination condition is reached. The global optimal particle mutation position and energy scheduling strategy obtained in the final iteration are used as the optimal demand response strategy.
7. The demand response method for an integrated photovoltaic-storage-charging and battery swapping station according to claim 6, characterized in that, The adaptive mutation operation on the globally optimal particle position to obtain the globally optimal mutated particle position includes: The population convergence factor is determined based on the population fitness variance, and the iteration progress factor is determined based on the current iteration number. The adaptive mutation probability is determined based on the population convergence factor and the iteration progress factor. A uniform random number is generated, and the mutation is triggered when the uniform random number is less than the adaptive mutation probability. Extract the historical search direction of the global optimal particle position, construct an orthogonal projection matrix based on the historical search direction, and generate an adaptive perturbation vector by combining adaptive Gaussian noise; The adaptive perturbation vector is superimposed on the global optimal particle position to obtain the mutation candidate particle position. The mutation candidate particle position is then verified and corrected based on two dimensions of boundary and gradient to obtain the mutation corrected particle position. The fitness value of the mutated particle position is calculated and compared with the fitness value before mutation. The global optimal particle mutation position is determined based on the comparison result.
8. A demand response system for an integrated photovoltaic, energy storage, and charging / swapping station, characterized in that: include: The basic model building module is used to acquire historical data of electric vehicle travel, historical data of photovoltaic power generation, and grid load data, and to build a basic model of an integrated photovoltaic-storage-charging and battery swapping station based on the historical data of electric vehicle travel and historical data of photovoltaic power generation. The grouping model construction module is used to divide the power batteries in the integrated photovoltaic-storage-charging and battery swapping station into several discrete groups according to their state of charge, and to construct a dynamic grouping management model for each discrete group based on the constraints of charging and discharging quantity and battery swapping quantity. A two-layer model construction module is used to construct a two-layer optimization model based on the power grid load data, the basic model, and each of the battery dynamic grouping management models; the two-layer optimization model includes an outer optimization model aimed at peak shaving and valley filling of the power grid and an inner scheduling model aimed at maximizing the revenue of the photovoltaic-storage-charging integrated charging and swapping station; The demand response module is used to solve the two-layer optimization model using a two-layer iterative solution method based on the adaptive mutant particle swarm optimization algorithm, so as to obtain the optimal demand response strategy to control the execution of the photovoltaic-storage-charging-battery swapping station.
9. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the demand response method for an integrated photovoltaic-storage-charging and battery swapping station as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the device containing the computer-readable storage medium executes the computer program, it implements the demand response method for an integrated photovoltaic-storage-charging and battery swapping station as described in any one of claims 1 to 7.