Virtual power plant scheduling method considering user battery replacement comprehensive utility under space-time aggregation

By adopting a virtual power plant scheduling method that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation, this method solves the challenges of spatiotemporal prediction, dynamic decision-making, and user response in virtual power plant scheduling. It optimizes the fit between the net load of the virtual power plant and the output of external renewable energy, maximizes profits, and improves user satisfaction, thereby enhancing the overall utility and user response of the virtual power plant.

CN122118944APending Publication Date: 2026-05-29NORTH CHINA ELECTRIC POWER UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTH CHINA ELECTRIC POWER UNIV
Filing Date
2026-01-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing research on virtual power plant scheduling optimization has failed to effectively address the issues of spatiotemporal prediction, dynamic decision-making, and user response. This results in difficulties in coordinating multi-objective conflicts in the collaborative scheduling of new energy power systems and electric vehicle battery swapping stations. Furthermore, the charging pile operation model suffers from problems such as high costs and insufficient user response.

Method used

A virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation is adopted. Typical photovoltaic output scenarios are generated through the Monte Carlo method. Battery swapping demand is predicted by combining user cluster feature vectors and distance attenuation models. A two-level objective function model is constructed to maximize the fit between the virtual power plant net load and external renewable energy, maximize profits, and maximize user satisfaction.

Benefits of technology

It maximizes the fit between the net load of the virtual power plant and the output of external renewable energy, maximizes profits and user satisfaction, and improves the overall operating efficiency and user response of the virtual power plant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122118944A_ABST
    Figure CN122118944A_ABST
Patent Text Reader

Abstract

The application discloses a virtual power plant scheduling method considering user battery replacement comprehensive utility under space-time aggregation, comprising the following steps: generating a photovoltaic output typical scene based on historical photovoltaic output time series data by using a Monte Carlo method; extracting a set of battery replacement location coordinates of all battery replacement users in each period from historical battery replacement demand data of a battery replacement station cluster, and clustering the set of battery replacement location coordinates of all battery replacement users in each period respectively to obtain a user cluster set of each period; extracting user cluster feature vectors of each user cluster of each period, and combining a distance attenuation model to determine the predicted battery replacement times of each battery replacement station in each period to obtain battery replacement demand prediction data; based on the photovoltaic output typical scene and the battery replacement demand prediction data, constructing an upper model with the maximum fitting degree of a virtual power plant net load and external renewable energy predicted output and the maximum total profit of the virtual power plant operation as upper targets, constructing a lower model with the maximum comprehensive satisfaction degree of a battery replacement user group as a lower target to obtain a virtual power plant double-layer scheduling model; and solving the virtual power plant double-layer scheduling model to obtain an optimal virtual power plant scheduling scheme. The application can maximize the fitting degree of the virtual power plant net load and the external renewable energy output, maximize the profit, and maximize the user satisfaction degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power technology, and in particular to a virtual power plant scheduling method that considers the comprehensive benefits of user battery swapping under spatiotemporal aggregation. Background Technology

[0002] With the increasing demand for electricity driven by economic and social development, new energy technologies are rapidly emerging. However, photovoltaic and wind power are characterized by volatility and intermittency, making their safe and efficient grid connection a key concern. Against this backdrop, new power system forms such as microgrids and virtual power plants have emerged. Virtual power plants integrate distributed resources through information and communication technologies, participating in grid operation as a whole and providing services similar to traditional power plants. The low-carbon transformation in the transportation sector is driving the rapid development of the new energy vehicle industry, with supporting charging and battery swapping facilities becoming increasingly sophisticated. In terms of vehicle-to-grid (V2G) interaction, battery swapping stations have a greater advantage than charging piles. Charging piles are mostly unidirectional, requiring conversion to bidirectional modules for V2G participation, resulting in high costs. Secondly, the peak-valley price difference revenue, after being distributed by operators, is not attractive enough to car owners, who also worry about battery degradation. Furthermore, charging pile operation follows a B2C model, requiring consideration of user preferences and imposing numerous constraints, making practical promotion difficult. In contrast, battery swapping stations adopt a B2B model, operated by enterprises, possessing substantial battery assets. They can function as independent energy storage units, quickly responding to grid dispatch, participating in spot trading and ancillary services, and more easily achieving large-scale, efficient vehicle-to-grid interaction.

[0003] Currently, research on the scheduling optimization of virtual power plants (VPPs) has made significant progress at both the theoretical and technical levels, but challenges remain regarding multi-objective coordination and policy adaptability. In terms of theoretical framework, early research often focused on a single objective, maximizing economic benefits, encompassing factors such as profit, market returns, supply and demand utility, or operating costs. At the technical level, battery swapping station scheduling relies on a combination of demand forecasting and uncertainty analysis. However, existing research has not fully resolved the issues of "spatiotemporal forecasting - dynamic decision-making - user response."

[0004] Therefore, in order to address the multi-objective conflict problem in the coordinated scheduling of new energy power systems and electric vehicle battery swapping stations, a virtual power plant scheduling method that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation is needed. Summary of the Invention

[0005] To address this, the present invention provides a virtual power plant scheduling method that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation, in order to solve or at least alleviate the problems mentioned above.

[0006] According to one aspect of the present invention, a virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation is provided. The virtual power plant includes a battery swapping station cluster, which includes multiple battery swapping stations and is suitable for generating electricity through photovoltaic power. The method includes: generating typical photovoltaic output scenarios based on historical photovoltaic output time-series data using the Monte Carlo method; extracting the set of battery swapping location coordinates of all battery swapping users in each time period from the historical battery swapping demand data of the battery swapping station cluster, and clustering the set of battery swapping location coordinates of all battery swapping users in each time period to obtain a user cluster set for each time period; extracting the user cluster feature vector of each user cluster in each time period, and combining it with a distance decay model to determine the predicted number of battery swapping times for each battery swapping station in each time period to obtain battery swapping demand prediction data; and, based on the typical photovoltaic output scenarios and the battery swapping demand prediction data, using the virtual power plant net load and the predicted output of external renewable energy to simulate... The upper-level objective is to maximize the overall efficiency and total profit of the virtual power plant operation. An upper-level objective function is constructed based on this function, and an upper-level model is built accordingly. The net load of the virtual power plant is related to the charging power and photovoltaic power generation of each swapping station in the swapping station cluster. The lower-level objective is to maximize the overall satisfaction of the swapping user group. A lower-level objective function is constructed based on this function, and a lower-level model is built accordingly. The overall satisfaction is related to the swapping price, overall distance, and queuing number of each swapping station. Based on the upper-level and lower-level models, a two-layer scheduling model for the virtual power plant is obtained. The two-layer scheduling model is solved to obtain the optimal virtual power plant scheduling scheme. The optimal virtual power plant scheduling scheme indicates: the optimal selection strategy for each user cluster of swapping stations, the optimal power purchase and sale plan of the virtual power plant to the external power grid, the optimal charging and discharging power of each swapping station, and the optimal swapping price of each swapping station.

[0007] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, a higher-level objective function is constructed with the goal of maximizing the fit between the virtual power plant net load and the predicted output of external renewable energy, and maximizing the total operating profit of the virtual power plant. This includes: normalizing the virtual power plant net load and the predicted output of external renewable energy respectively, and constructing a first objective function with the goal of minimizing the difference between the normalized virtual power plant net load and the normalized predicted output of external renewable energy; constructing a second objective function with the goal of maximizing the total operating profit of the virtual power plant; and linearly combining the first objective function and the second objective function using a linear weighted sum method to obtain the higher-level objective function.

[0008] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, the total operating profit of the virtual power plant is related to the actual number of battery swaps and the battery swapping price of each battery swapping station in each time period, the power output and the power output and the power output of the virtual power plant to the external power grid, and the conventional power output and the conventional power price purchased by the virtual power plant from the external power grid.

[0009] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, the comprehensive satisfaction of the battery swapping user group is related to the historical average number of battery swaps for each user cluster in each time period, the selection strategy of each user cluster for battery swapping stations, the battery swapping price of each battery swapping station, the road network distance from the centroid of each user cluster to each battery swapping station, the actual number of battery swaps and the maximum service capacity of each battery swapping station.

[0010] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, constructing an upper-level model based on the upper-level objective function includes: constructing an upper-level model based on the upper-level objective function and upper-level constraints, wherein the upper-level constraints include: energy balance constraints for battery swapping station clusters, power grid interaction constraints, dynamic constraints on the number of fully charged batteries in battery swapping stations, power grid charging and discharging constraints, mutual exclusion constraints on charging and discharging of battery swapping stations, and battery swapping price constraints; the power grid interaction constraints are used to indicate that: the photovoltaic power generation does not exceed the maximum photovoltaic power generation, and the virtual power plant supplies electricity to external sources. The power sold by the grid does not exceed the maximum power allowed to be sold to the external grid, and the conventional power purchased by the virtual power plant from the external grid does not exceed the maximum conventional power allowed to be purchased; the charging and discharging power constraint of the battery swapping station is used to indicate that the charging power of each battery swapping station in each time period does not exceed the maximum charging power of the battery swapping station, and the discharging power of each battery swapping station in each time period does not exceed the maximum discharging power of the battery swapping station; the charging and discharging mutual exclusion constraint of the battery swapping station is used to indicate that each battery swapping station cannot charge and discharge simultaneously; the battery swapping price constraint is used to indicate that the battery swapping price of each battery swapping station in each time period is greater than or equal to the minimum battery swapping price and less than or equal to the maximum battery swapping price.

[0011] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, constructing a lower-level model based on the lower-level objective function includes: constructing a lower-level model based on the lower-level objective function and lower-level constraints, wherein the lower-level constraints include: a unique user cluster selection constraint, a battery swapping station service capacity limitation constraint, and a battery swapping queue length constraint; the unique user cluster selection constraint indicates that a single user in each user cluster must and can only select one battery swapping station in each time period; the battery swapping station service capacity limitation constraint indicates that the actual number of battery swaps at each battery swapping station in each time period does not exceed the maximum service capacity of each battery swapping station in each time period; the queue length constraint indicates that the number of people queuing at each battery swapping station in each time period does not exceed the maximum tolerable queue length.

[0012] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, solving the virtual power plant two-layer scheduling model includes the following steps: obtaining initial algorithm parameters, the initial algorithm parameters including: photovoltaic power generation, predicted output of external renewable energy, initial battery swapping price and location of each battery swapping station; based on the initial algorithm parameters, fixing the decision variables of the upper-layer model, and solving the lower-layer model to obtain the lower-layer selection strategy and the corresponding satisfaction, and determining the actual number of battery swaps and the number of people queuing for each battery swapping station according to the lower-layer selection strategy, the lower-layer selection strategy... The process includes: selecting battery swapping stations for each user cluster; solving the upper-level model based on the actual number of battery swaps and the number of people queuing for each battery swapping station to obtain an upper-level scheduling strategy. The upper-level scheduling strategy includes the virtual power plant's power purchase and sale plan to the external power grid and the charging and discharging power of each battery swapping station. Based on a feedback mechanism combined with the number of people queuing and the satisfaction level, the initial battery swapping price and charging and discharging power of each battery swapping station are smoothly updated to obtain an updated upper-level scheduling strategy. The above steps are iteratively executed until the convergence condition is met, resulting in an optimal virtual power plant scheduling scheme that includes the optimal upper-level scheduling strategy and the optimal lower-level selection strategy.

[0013] Optionally, in the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation according to the present invention, the Monte Carlo method is used to generate typical photovoltaic output scenarios based on historical photovoltaic output time-series data, including: acquiring historical photovoltaic output time-series data and subjecting the historical photovoltaic output time-series data to normal distribution random perturbation to generate multiple initial scenarios; statistically analyzing the occurrence frequency of each initial scenario and calculating the original occurrence probability of each initial scenario, selecting a predetermined number of initial scenarios with the highest original occurrence probability as candidate typical scenarios; standardizing the original occurrence probability corresponding to each candidate typical scenario to obtain the standardized probability of each candidate typical scenario, so that the sum of the standardized probabilities of all candidate typical scenarios is 1; and subjecting the standardized probability of each candidate typical scenario to uniform distribution random perturbation to obtain typical photovoltaic output scenarios and the probabilities corresponding to the typical photovoltaic output scenarios.

[0014] According to one aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions including instructions for executing the virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation as described above.

[0015] According to one aspect of the present invention, a computer program product is provided, comprising a computer program / instructions, wherein the computer program / instructions, when executed by a processor, implement the method as described above.

[0016] According to one aspect of the present invention, a readable storage medium storing program instructions is provided, which, when read and executed by a computing device, causes the computing device to perform the virtual power plant scheduling method as described above, which considers the comprehensive utility of user battery swapping under spatiotemporal aggregation.

[0017] According to the technical solution of the present invention, a virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation is provided. It adopts a closed-loop optimization framework of "spatiotemporal prediction-dynamic decision-user response" and combines a master-slave game mechanism. An upper-level model is constructed with the upper-level objective of maximizing the fit between the virtual power plant's net load and external renewable energy output and maximizing the total operating profit of the virtual power plant. A lower-level model is constructed with the lower-level objective of maximizing the comprehensive satisfaction of the battery swapping user group. This yields a two-layer scheduling model for the virtual power plant. The optimal virtual power plant scheduling scheme is obtained by solving the model. Based on this, the method can simultaneously maximize the fit between the virtual power plant's net load and external renewable energy output, maximize profits, and maximize user satisfaction.

[0018] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0019] To achieve the foregoing and related objectives, certain illustrative aspects of the invention are described in conjunction with the following description and accompanying drawings. These aspects indicate various ways in which the principles of the invention can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The foregoing and other objectives, features, and advantages of this disclosure will become more apparent from the following detailed description, taken in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.

[0020] Figure 1 A schematic diagram of the structure of a virtual power plant 100 according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of a computing device 200 provided according to an embodiment of the present invention is shown; Figure 3 A flowchart of a virtual power plant scheduling method 300 considering the comprehensive utility of user battery swapping under spatiotemporal aggregation, provided by an embodiment of the present invention, is shown. Figure 4 A schematic diagram of a typical daily photovoltaic power generation output curve configured in a battery swapping station according to an embodiment of the present invention is shown. Figure 5 A schematic diagram illustrating the spatial-temporal characteristics analysis of the distribution of battery swapping user clusters according to an embodiment of the present invention is shown. Figure 6 A schematic diagram comparing the distribution of battery swapping user clusters at different time periods is shown in an embodiment of the present invention. Figure 7 A schematic diagram showing a comprehensive performance comparison of three models according to an embodiment of the present invention is provided. Detailed Implementation

[0021] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0022] To address the problems existing in current virtual power plant scheduling optimization schemes, this invention proposes a virtual power plant scheduling method that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation. First, it innovatively proposes a closed-loop optimization framework of "spatiotemporal prediction - dynamic decision-making - user response," deeply integrating user behavior spatial clustering, time-period demand probability modeling, and master-slave game theory to overcome the limitations of traditional single-time-series prediction. Second, it constructs an upper-level model with the upper-level objectives of maximizing the fit between the virtual power plant's net load and external renewable energy output and maximizing the total operating profit of the virtual power plant, and a lower-level model with the lower-level objective of maximizing the overall satisfaction of the battery swapping user group. This results in a two-layer virtual power plant scheduling model, and the optimal virtual power plant scheduling scheme is obtained by solving the model. Based on this, it can simultaneously maximize the fit between the virtual power plant's net load and external renewable energy output, maximize profits, and maximize user satisfaction.

[0023] The virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation, provided by embodiments of the present invention, can be used in virtual power plants. The following first introduces a virtual power plant provided by an embodiment of the present invention.

[0024] Figure 1 A schematic diagram of a virtual power plant 100 provided according to an embodiment of the present invention is shown.

[0025] like Figure 1 As shown, the virtual power plant 100 includes: an intelligent dispatch center; a photovoltaic cluster that aggregates the photovoltaic power generation (photovoltaic panels) on the roofs of the battery swapping stations; a battery swapping station cluster that aggregates the battery swapping stations within the area covered by the virtual power plant; and an electric vehicle cluster that aggregates the electric vehicles requiring battery swapping within the area. In other words, the virtual power plant 100 includes a battery swapping station cluster, which contains multiple battery swapping stations within the area covered by the virtual power plant. The photovoltaic cluster is formed by the aggregation of multiple photovoltaic panels on the roofs of the battery swapping stations. The electric vehicle cluster is formed by the aggregation of multiple electric vehicles requiring battery swapping within the area covered by the virtual power plant. Furthermore, the virtual power plant can also sell and purchase electricity from the external power grid (power grid system).

[0026] It should be noted that the battery swapping station cluster, as the main unit of the entire virtual power plant 100, consists of multiple battery swapping stations located in the same area (the area covered by the virtual power plant). It is responsible for the orderly scheduling of battery charging and discharging, playing a crucial role in the overall operation of the virtual power plant. Specifically, the photovoltaic clusters atop the battery swapping stations provide power to the stations, while individual connections provide power to the battery banks, enabling the stations to generate electricity through photovoltaics. The intelligent dispatch center monitors the operation of the entire virtual power plant in real time through big data collection and intelligent optimization scheduling technologies, and schedules its operation accordingly. On one hand, the intelligent dispatch center can predict the battery swapping demand for the next day based on the historical daily battery swapping demand data of each station, and statistically analyze the battery swapping demand of the entire battery swapping station cluster for the next day. On the other hand, the intelligent dispatch center can predict and generate the photovoltaic output curve for the next day based on historical daily photovoltaic power generation data. To address the inherent intermittency and uncertainty of photovoltaic (PV) power generation, this invention employs a combination of Monte Carlo random scenario generation and scenario reduction to predict PV output for the next day. A typical daily PV output curve is then generated and input into the upper-level model for deterministic optimization. Next, the intelligent dispatch center performs coupled calculations based on the battery swapping demand of the battery swapping station cluster for the following day and the PV output curve for that day, generating the external power demand for the battery swapping station cluster for the next day. On the following day, the VPP compares the predicted user battery swapping results from the previous day with the actual user battery swapping results for that day and begins iterative calculations to obtain the optimal user battery swapping scheme based on the two-layer dispatch model. By adjusting the battery swapping station prices, users are guided to swap batteries according to the optimal scheme and participate in the real-time electricity market, maximizing green energy absorption and revenue through the intelligent dispatch center.

[0027] In embodiments of the present invention, a computing device may be configured to execute a virtual power plant scheduling method 300 that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation. The virtual power plant scheduling method 300 of the present invention, which considers the comprehensive utility of user battery swapping under spatiotemporal aggregation, will be described below.

[0028] The following describes a computing device 200 provided by an embodiment of the present invention.

[0029] Figure 2 A schematic diagram of a computing device 200 according to an embodiment of the present invention is shown. Figure 2As shown, in a basic configuration, computing device 200 includes at least one processing unit 202 and system memory 204. According to one aspect, depending on the configuration and type of the computing device, the processing unit 202 may be implemented as a processor. System memory 204 includes, but is not limited to, volatile memory (e.g., random access memory), non-volatile memory (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, system memory 204 includes an operating system 205.

[0030] According to one aspect, operating system 205 is, for example, suitable for controlling the operation of computing device 200. Furthermore, examples are practiced in conjunction with graphics libraries, other operating systems, or any other applications, and are not limited to any particular application or system. Figure 2 The basic configuration is illustrated by the components within the dashed lines. According to one aspect, the computing device 200 has additional features or functions. For example, according to one aspect, the computing device 200 includes additional data storage devices (removable and / or non-removable), such as disks, optical discs, or magnetic tapes. This additional storage... Figure 2 The middle part is shown by removable storage device 209 and non-removable storage device 210.

[0031] As stated above, according to one aspect, program module 203 is stored in system memory 204. According to one aspect, program module 203 may include one or more applications. The present invention does not limit the type of application; for example, applications may include: email and contact applications, word processing applications, spreadsheet applications, database applications, slideshow applications, drawing or computer-aided applications, web browser applications, etc.

[0032] In an embodiment of the present invention, program module 203 includes multiple program instructions for executing the virtual power plant scheduling method 300 of the present invention, which considers the comprehensive utility of user battery swapping under spatiotemporal aggregation.

[0033] According to one aspect, examples can be practiced on circuits including discrete electronic components, packaged or integrated electronic chips containing logic gates, circuits utilizing microprocessors, or on a single chip containing electronic components or a microprocessor. For example, it can be practiced via wherein... Figure 2Each or many of the components shown can be implemented as an example by integrating a System-on-a-Chip (SOC) on a single integrated circuit. According to one aspect, such an SOC device may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or “burned in”) as a single integrated circuit onto a chip substrate. When operated via the SOC, the functions described in this invention can be operated via dedicated logic integrated on a single integrated circuit (chip) with other components of the computing device 200. Embodiments of the invention can also be implemented using other techniques capable of performing logical operations (e.g., AND, OR, and NOT), including but not limited to mechanical, optical, fluid, and quantum technologies. Additionally, embodiments of the invention can be implemented within a general-purpose computer or in any other circuit or system.

[0034] According to one aspect, computing device 200 may also have one or more input devices 212, such as a keyboard, mouse, pen, voice input device, touch input device, etc. It may also include output devices 214, such as a display, speaker, printer, etc. The foregoing devices are examples and other devices may also be used. Computing device 200 may include one or more communication connections 216 that allow communication with other computing devices 218. Examples of suitable communication connections 216 include, but are not limited to: RF transmitter, receiver and / or transceiver circuitry; Universal Serial Bus (USB), parallel and / or serial ports.

[0035] As used herein, the term computer-readable medium includes computer storage medium. Computer storage medium can include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information (e.g., computer-readable instructions, data structures, or program modules). System memory 204, removable storage device 209, and non-removable storage device 210 are examples of computer storage media (i.e., memory storage). Computer storage medium can include random access memory (RAM), read-only memory (ROM), electrically erasable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital universal disc (DVD) or other optical storage, magnetic tape, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and is accessible by computing device 200. According to one aspect, any such computer storage medium can be part of computing device 200. Computer storage medium does not include carrier waves or other transmitted data signals.

[0036] According to one aspect, a communication medium is implemented by computer-readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transmission mechanism), and includes any information transmission medium. According to one aspect, the term "modulated data signal" describes a signal having one or more sets of characteristics or altered in a manner that encodes information in the signal. By way of example and not limitation, a communication medium includes wired media such as wired networks or direct wired connections, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.

[0037] In an embodiment of the present invention, computing device 200 is configured to execute a virtual power plant scheduling method 300 that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation. Computing device 200 includes one or more processors and one or more readable storage media storing program instructions, which, when configured to be executed by the one or more processors, cause the computing device to execute the virtual power plant scheduling method 300 that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation in this embodiment of the present invention.

[0038] In some embodiments, the computing device 200 that executes the virtual power plant scheduling method 300 under spatiotemporal aggregation considering the comprehensive utility of user battery swapping in the embodiments of the present invention can be a terminal or a server.

[0039] The following is a detailed description of the virtual power plant scheduling method 300 that considers the comprehensive utility of user battery swapping under spatiotemporal aggregation in the embodiments of the present invention.

[0040] Figure 3 A flowchart illustrating a virtual power plant scheduling method 300 considering the comprehensive utility of user battery swapping under spatiotemporal aggregation, according to an embodiment of the present invention, is shown. Figure 3 As shown, the virtual power plant scheduling method 300, which considers the comprehensive utility of user battery swapping under spatiotemporal aggregation, includes the following steps 310-360.

[0041] Step 310: The computing device 200 can use the Monte Carlo method to generate typical photovoltaic output scenarios based on historical photovoltaic output time series data.

[0042] Step 320: The computing device 200 can extract the set of battery swapping location coordinates of all battery swapping users in each time period from the historical battery swapping demand data of the battery swapping station cluster, and cluster the set of battery swapping location coordinates of all battery swapping users in each time period to obtain the user cluster set for each time period. Then, the user cluster feature vector of each user cluster in each time period can be extracted, and combined with the distance attenuation model to determine the predicted number of battery swapping times for each battery swapping station in each time period, so as to obtain the battery swapping demand prediction data.

[0043] Step 330: The computing device 200 can construct an upper-level objective function based on typical photovoltaic output scenarios and battery swapping demand forecast data. The upper-level objective is to maximize the fit between the virtual power plant's net load and the predicted output of external renewable energy, and to maximize the total operating profit of the virtual power plant. Based on this upper-level objective function, an upper-level model can be constructed. Here, the virtual power plant's net load is related to the charging power and photovoltaic power generation of each battery swapping station in the battery swapping station cluster.

[0044] It should be noted that typical photovoltaic power output scenarios and battery swapping demand forecast data can be used as the basic input data for the virtual power plant two-layer scheduling model constructed in this embodiment of the invention.

[0045] Step 340: The computing device 200 can construct a lower-level objective function based on the battery swapping demand forecast data, with the goal of maximizing the overall satisfaction of the battery swapping user group. This lower-level objective function can then be used to construct a lower-level model. It should be noted that the overall satisfaction level is related to the battery swapping price, overall distance, and queuing length of each battery swapping station.

[0046] Step 350: The computing device 200 can obtain a two-layer scheduling model for the virtual power plant based on the upper-layer model and the lower-layer model.

[0047] Step 360: The computing device 200 solves the two-layer scheduling model of the virtual power plant to obtain the optimal virtual power plant scheduling scheme. The optimal virtual power plant scheduling scheme indicates: the optimal selection strategy of each user cluster for the battery swapping station in each time period, the optimal power purchase and sale plan of the virtual power plant to the external power grid in each time period (including the power sold to the external power grid and the power purchased), the optimal charging and discharging power of each battery swapping station in each time period (including the charging power and the discharging power), and the optimal battery swapping price of each battery swapping station in each time period.

[0048] In some embodiments, in step 310, historical photovoltaic power output time series data can be obtained, random scenarios can be generated by normal distribution random perturbation, and after frequency statistics and probability standardization, typical photovoltaic power output scenarios can be finally output.

[0049] Specifically, in step 310, the process of generating typical photovoltaic output scenarios based on historical photovoltaic output time-series data using the Monte Carlo method is as follows: First, historical photovoltaic (PV) output time-series data is acquired, and then a normal distribution random perturbation is applied to this data to generate multiple initial scenarios. This is illustrated in the following equation: (1) In the formula, This represents the historical average measured value of light intensity during time period t; This indicates that the expression follows a mean of 0 and a standard deviation of . The normal distribution random perturbation; represents the illumination intensity of the generated initial scene s after the normal distribution random perturbation in time period t; This represents the standard deviation for a given period, set based on historical fluctuations in photovoltaic power output.

[0050] Subsequently, the frequency of occurrence of each initial scene can be statistically analyzed, and the original occurrence probability of each initial scene can be calculated. A predetermined number (K) of initial scenes with the highest original occurrence probability can be selected as candidate typical scenes.

[0051] The frequency of occurrence of each initial scene is statistically analyzed as follows: (2) In the formula, This represents the frequency of the initial scene s in all M simulations.

[0052] The original occurrence probability of the initial scene s can be calculated by scene reduction, as shown in the following formula: (3) In the formula, This represents the original probability of occurrence of the initial scene s.

[0053] Therefore, a predetermined number (K) of initial scenarios with the highest original occurrence probability can be selected as candidate typical scenarios. The K candidate typical scenarios are sorted according to their original occurrence probability as follows: (4) Next, the original occurrence probabilities corresponding to each candidate typical scenario can be standardized to obtain the standardized probability of each candidate typical scenario, so that the sum of the standardized probabilities of all candidate typical scenarios is 1. The specific method for standardizing the original occurrence probabilities corresponding to the candidate typical scenarios is shown in the following formula: (5) In the formula, It is the standardized probability of the candidate typical scenarios, thus ensuring that the sum of the standardized probabilities of all candidate typical scenarios (K candidate typical scenarios) is 1.

[0054] Finally, by applying a uniformly distributed random perturbation to the standardized probability of each candidate typical scenario, we can obtain the typical photovoltaic output scenario and its corresponding probability, as shown in the following formula: (6) In the formula, This represents a uniformly distributed random perturbation, used to enhance the standardized probability differences between candidate typical scenarios and improve classicity.

[0055] It should be noted that by uniformly distributing random perturbations to the standardized probabilities of each candidate typical scenario, the difference in standardized probabilities among the candidate typical scenarios can be increased, thus improving the classicism. Ultimately, this yields K (a predetermined number) typical photovoltaic power output scenarios and their corresponding probabilities. These K typical photovoltaic power output scenarios and their corresponding probabilities can then be used as inputs to subsequent models.

[0056] Battery swapping station clusters need to participate in the day-ahead virtual power plant scheduling optimization; therefore, they need to predict the battery swapping demand for the next day. In this embodiment of the invention, the traditional single-dimensional time-series prediction method is abandoned, and a spatiotemporal feature decoupling prediction framework is proposed, achieving refined demand prediction through a three-level linkage mechanism. Specifically, according to the battery swapping demand prediction model in this embodiment of the invention, firstly, historical data of the battery swapping station cluster is analyzed to extract global temporal patterns (the global battery swapping demand probability of the battery swapping station cluster); then, user spatial behavior patterns are clustered and identified. Specifically, an improved k-means clustering algorithm can be used to cluster and identify user behavior patterns for each time period (hour) to obtain the clustering results for each time period (hour) (a set of user clusters containing multiple user clusters, where each user cluster corresponds to a user behavior pattern), generating 24 user cluster sets per day; finally, a spatiotemporal mapping relationship is established by combining a distance decay model to calculate the predicted number of battery swapping users per hour for each battery swapping station (predicted number of battery swaps).

[0057] The battery swapping demand forecasting method in this invention has two major advantages over traditional methods: First, it deeply integrates spatiotemporal dimensions, breaking through the limitations of a single time series. Traditional models rely solely on historical time series data, failing to capture information such as users' battery swapping habits and geographical preferences in different regions. However, the battery swapping demand prediction model in this embodiment of the invention first separates temporal and spatial patterns through spatiotemporal decoupling, and then performs spatiotemporal mapping using a distance attenuation model, achieving accurate predictions that better reflect the actual distribution characteristics of battery swapping users.

[0058] Secondly, it boasts high computational efficiency, making it more suitable for engineering applications. Traditional models require complex parameter estimation and seasonal adjustments, resulting in high computational costs and lengthy training times, as well as demanding hardware requirements, making them unsuitable for real-time scheduling scenarios. In contrast, the battery swapping demand prediction model proposed in this invention has a clear structure, lightweight computation, and is easier to add new data to. It requires far less configuration and resources than traditional models, making it more suitable for real-time scheduling systems embedded in virtual power plants.

[0059] Specifically, according to the battery swapping demand prediction model in the embodiments of the present invention, the historical battery swapping demand data of the battery swapping station cluster can first be analyzed by the following formula to obtain the global battery swapping demand probability (the proportion of battery swapping times to the total number of battery swapping times throughout the day) of the battery swapping station cluster in each time period.

[0060] (7) In the formula, This represents the global battery swapping demand probability of the battery swapping station cluster during time period t, i.e., the proportion of battery swapping times during time period t to the total number of battery swapping times throughout the day. This global battery swapping demand probability is used to allocate the battery swapping tendency of user clusters according to time patterns in subsequent spatiotemporal mapping. D represents the number of days of historical battery swapping demand data for the battery swapping station cluster; This represents the number of battery swaps performed on day d, time period t, in the history of the battery swapping station cluster. This represents the total number of battery swaps performed across all time periods (the entire day) on day d in the history of the battery swapping station cluster.

[0061] Furthermore, in order to capture the spatial distribution characteristics of users (battery swapping users) at different times, "hour" can be used as the basic time unit (time period), and the battery swapping location coordinates (geographic coordinates) of users in each time period can be clustered independently.

[0062] Specifically, in step 320, the day can be divided into 24 time periods (hours), and the set of battery swapping location coordinates of all battery swapping users within each time period can be extracted from the historical battery swapping demand data of the battery swapping station cluster. Then, clustering can be performed independently on the set of battery swapping location coordinates of all users within each time period to obtain a user cluster set (containing multiple user clusters) for each time period. Here, each battery swapping location coordinate in the set corresponds to one battery swapping behavior. By performing clustering analysis independently for each time period, the dynamic changes in the spatial behavior patterns of battery swapping users at different times of the day can be accurately captured.

[0063] In some embodiments, an improved k-means clustering algorithm can be used to cluster the set of battery swapping location coordinates of all battery swapping users within each time period to obtain a set of user clusters (containing multiple user clusters) for each time period. It should be noted that the k-means algorithm is highly efficient and interpretable when processing large-scale geographic coordinate data, making it very suitable for engineering applications.

[0064] Specifically, the steps for clustering the set of battery swapping location coordinates of all battery swapping users within each time period (time period t) using the improved k-means clustering algorithm are as follows: First, the optimal number of clusters for that time period can be determined based on the silhouette coefficient or the elbow rule. (i.e., the number of user clusters); then, by calculating the Euclidean distance from the battery swapping location coordinates of each user to the cluster center, each user is assigned to the nearest user cluster, and the cluster center of the user cluster is updated to the mean of all battery swapping location coordinates within that user cluster; the above steps are repeated until the cluster centers of each user cluster are stable or the maximum number of iterations is reached, and the clustering results are output: (8) In the formula, Represents the set of user clusters in time period t (including (a user cluster) This represents the number of clusters in time period t (i.e., the number of user clusters).

[0065] After obtaining the user cluster set for each time period through clustering, the user cluster feature vector of each user cluster in each time period can be extracted, as shown in the following formula: (9) In the formula, This represents the user cluster feature vector of the k-th user cluster in time period t; Let represent the longitude and latitude coordinates of the centroid of the k-th user cluster during time period t, respectively. This represents the historical average number of battery swaps for the k-th user cluster during time period t.

[0066] Finally, based on the user cluster feature vectors of each user cluster in each time period, the predicted number of battery swaps at each battery swapping station in each time period can be determined by combining the distance attenuation model, thus obtaining the predicted battery swapping demand data. As shown in the following formula: (10) (11) In the formula, This represents the predicted number of battery swaps at battery swap station i during time period t. This represents the road network distance from the centroid of the k-th user cluster to the battery swapping station i during time period t; Indicates the location coordinates of battery swapping station i; This represents the distance attenuation coefficient during time period t; This represents the distance threshold at which the probability of selection decreases by 50%.

[0067] In some embodiments, the upper-level objective function includes a first objective function and a second objective function. The specific process of constructing the upper-level objective function in step 330 is as follows.

[0068] First, the virtual power plant net load and the predicted output of external renewable energy can be normalized separately. The first objective function is then constructed with minimizing the difference between the normalized virtual power plant net load and the normalized predicted output of external renewable energy (i.e., maximizing the goodness of fit). In other words, maximizing the goodness of fit can be represented by minimizing the difference between the virtual power plant net load and the predicted output of external renewable energy. Here, the method of minimizing the sum of squared errors is used to construct the first objective function, as shown in the following equation: (12) In the formula, This represents the difference between the virtual power plant net load (normalized virtual power plant net load) and the predicted output of external renewable energy (normalized external renewable energy predicted output); t represents the time period. .

[0069] It is understandable that the difference between the normalized virtual power plant net load and the normalized external renewable energy forecast output is the sum of squares of the differences between the normalized virtual power plant net load and the normalized external renewable energy forecast output for all time periods.

[0070] It should be noted that since the predicted output of external renewable energy and the net load of virtual power plants may differ by a huge order of magnitude, the net load of virtual power plants (virtual power plant net load curve) and the predicted output of external renewable energy (external renewable energy predicted output curve) can be normalized in advance.

[0071] The formula for calculating the net load of the virtual power plant is as follows: (13) In the formula, i represents the i-th battery swapping station (battery swapping station i); I represents the total number of battery swapping stations in the battery swapping station cluster; This represents the virtual power plant net load during time period t; This represents the charging power of battery swapping station i during time period t; Let t represent the photovoltaic power generation during time period t.

[0072] Based on the above formula, it can be understood that the net load of the virtual power plant is related to the charging power and photovoltaic power generation of each battery swapping station in the battery swapping station cluster. Furthermore, the net load of the virtual power plant in each time period is related to the charging power and photovoltaic power generation of each battery swapping station in the battery swapping station cluster in that time period; that is, the net load of the virtual power plant in each time period can be determined based on the charging power and photovoltaic power generation of each battery swapping station in the battery swapping station cluster in that time period.

[0073] The virtual power plant net load and the predicted output of external renewable energy can be normalized using the following formula: (14) (15) In the formula, This represents the predicted output of external renewable energy during time period t, and is an exogenous input parameter.

[0074] Secondly, a second objective function can be constructed, with the goal of maximizing the total profit from operating the virtual power plant. The second objective function is shown in the following equation: (16) In the formula, This represents the total profit from the operation of the virtual power plant; This represents the actual number of battery swaps performed at battery swap station i during time period t. This represents the battery swapping price (battery swapping service price) at battery swapping station i during time period t. This represents the power output of the virtual power plant to the external power grid during time period t; This represents the on-grid electricity price (the price at which the virtual power plant sells electricity to the external power grid) for time period t. This represents the conventional electrical power purchased by the virtual power plant from the external power grid during time period t; This represents the price of conventional electricity purchased by the virtual power plant from the external power grid during time period t. This represents the total operating cost of the virtual power plant.

[0075] It is understandable that the total operating profit of a virtual power plant is related to the actual number of battery swaps and the battery swap price at each battery swapping station during each time period, the power output and the power output (grid connection price) that the virtual power plant sells to the external power grid, and the conventional power output and the conventional power price that the virtual power plant purchases from the external power grid.

[0076] After constructing the first and second objective functions, a linear weighted sum method can be used to linearly combine them to obtain the upper-level objective function, as shown in the following equation: (17) As shown in the above equation, using the linear weighted sum method, by introducing a first weight... Second weight By balancing the first objective function and the second objective function based on the first weight and the second weight, the dual objective can be transformed into a single objective for solution, thereby simplifying the complexity of the multi-objective programming problem.

[0077] In some embodiments, in step 330, after constructing the upper-level objective function, the upper-level model can be constructed based on the upper-level objective function and the upper-level constraints.

[0078] The upper-level constraints may include: energy balance constraints of the battery swapping station cluster, power interaction constraints of the power grid, dynamic constraints of the number of fully charged batteries in the battery swapping station, charging and discharging power constraints of the battery swapping station, mutual exclusion constraints of charging and discharging of the battery swapping station, and battery swapping price constraints.

[0079] The specific energy balance constraints of the battery swapping station cluster are shown in the following formula: (18) In the formula, Let t represent the photovoltaic power generation during time period t; This represents the discharge power of battery swapping station i during time period t; This represents the conventional electrical power purchased by the virtual power plant from the external power grid during time period t.

[0080] This represents the charging power of battery swapping station i during time period t; This represents the power output of the virtual power plant to the external power grid during time period t; The actual number of battery swaps performed at battery swap station i during time period t; This represents the amount of electricity required for a single battery swap, and is a constant.

[0081] To ensure that energy interaction between the virtual power plant and the external power grid occurs within a safe and compliant range, power grid interaction constraints were set when constructing the upper-level model. These constraints limit the virtual power plant's photovoltaic power generation to the maximum allowed photovoltaic power generation, the virtual power plant's electricity sales to the external power grid to the maximum allowed electricity sales to the external power grid, and the virtual power plant's conventional electricity purchases from the external power grid to the maximum allowed conventional electricity purchases. This aims to comply with grid dispatch instructions and market transaction rules.

[0082] Specifically, the power grid interaction constraint condition is shown in the following equation: (19) In the formula, Indicates the maximum photovoltaic power generation capacity; This indicates the maximum amount of electricity that is permitted to be sold to the external power grid; This indicates the maximum standard electrical power that can be purchased.

[0083] The dynamic constraint on the number of fully charged batteries at a battery swapping station is shown in the following formula: (20) (twenty one) In the formula, This indicates the state of charge of battery swapping station i at the end of time period t, i.e., the percentage of fully charged batteries. , These represent the charging efficiency and discharging efficiency of the battery swapping station, respectively. This represents the total battery capacity of battery swapping station i; , These represent the lower limit and upper limit of the state-of-charge operation of battery swapping station i, respectively, which are used to protect the battery.

[0084] The charging and discharging power constraints for battery swapping stations are used to indicate that the charging power of each battery swapping station in each time period does not exceed the maximum charging power of the station, and the discharging power of each battery swapping station in each time period does not exceed the maximum discharging power of the station. Specifically, the constraints are shown in the following formula: (twenty two) In the formula, This indicates the maximum charging power of the battery swapping station; This indicates the maximum discharge power of the battery swapping station.

[0085] The mutual exclusion constraint condition for charging and discharging at battery swapping stations indicates that each station cannot charge and discharge simultaneously. Specifically, it can be expressed as follows: (twenty three) The battery swapping price constraint indicates that the battery swapping price at each battery swapping station during each time period is greater than or equal to the minimum battery swapping price and less than or equal to the maximum battery swapping price. This is illustrated in the following formula: (twenty four) In the formula, This indicates the minimum battery swapping price at the battery swapping station; This indicates the highest battery swapping price at the battery swapping station.

[0086] In some embodiments, in step 340, the lower-level objective function constructed with maximizing the overall satisfaction of the battery swapping user group as the lower-level objective is as follows: (25) (26) In the formula, This represents the historical average number of battery swaps for the k-th user cluster during time period t; This represents the 0-1 decision variable for the k-th user cluster to select battery swapping station i during time period t. A value of 0 indicates that a battery swapping station i is not selected. A value of 1 indicates that a battery swapping station i is selected. This indicates overall satisfaction. The weights for battery swapping price, distance, and queuing are respectively: .

[0087] (27) (28) (29) In the formula, Let be the battery swapping price at battery swapping station i during time period t. , These represent the lowest and highest battery swapping prices for all battery swapping stations at all times. This represents the road network distance from the centroid of the k-th user cluster to the battery swapping station i during time period t; Let t represent the actual number of battery swaps performed at battery swap station i during time period t. This represents the maximum service capacity of battery swapping station i.

[0088] It should be understood that the overall satisfaction of battery swapping users is related to the historical average number of battery swaps for each user group in each time period, the selection strategy of each user group for battery swapping stations in each time period, the battery swapping price of each battery swapping station in each time period, the road network distance from the centroid of each user group to each battery swapping station in each time period, the actual number of battery swaps and the maximum service capacity of each battery swapping station in each time period.

[0089] In some embodiments, in step 340, after constructing the lower-level objective function, a lower-level model can be constructed based on the lower-level objective function and lower-level constraints. Lower-level constraints may include: a unique user cluster selection constraint, a battery swapping station service capacity limitation constraint, and a battery swapping queue length constraint.

[0090] Specifically, the unique selection constraint for user clusters means that a single user in each user cluster must and can only select one battery swapping station during each time period. This is illustrated in the following formula: (30) In the formula, This represents the 0-1 decision variable for the k-th user cluster to select battery swapping station i during time period t. A value of 0 indicates that a battery swapping station i is not selected. A value of 1 indicates that a battery swapping station i is selected.

[0091] The service capacity limitation constraint for battery swapping stations states that the actual number of battery swaps performed at each station during any given time period shall not exceed the maximum service capacity of each station during that time period. The specific formula is as follows: (31) (32) In the formula, This represents the historical average number of battery swaps for the k-th user cluster during time period t. This represents the actual number of battery swaps performed at battery swap station i during time period t (calculated from the lower-level model).

[0092] The queue length constraint means that the number of people queuing at each battery swapping station during any given time period shall not exceed the maximum tolerable queue length. The specific formula is as follows: (33) In the formula, Let be the number of people queuing at battery swapping station i during time period t; This indicates the maximum tolerable queue length.

[0093] In some embodiments of this invention, a master-slave collaborative optimization framework can be used to handle the global problem. Since the upper-level objective function focuses on system-level optimality, while the lower-level objective function primarily concerns individual user-side optimality, conflicts may arise during the calculation process. For example, to maximize the fit between the virtual power plant's net load and the predicted output of external renewable energy, the upper-level model may tend to sell electricity to the external grid at lower prices during specific periods, leading to increased electricity costs for battery swapping stations. The overall satisfaction of the battery swapping user group requires selling electricity to users at the lowest possible swapping price, which conflicts with the upper-level profit maximization objective.

[0094] Therefore, in some embodiments, by constructing a master-slave collaborative optimization framework, an alternating iterative optimization algorithm (master-slave game iterative algorithm) can be used to solve the two-layer scheduling model of a virtual power plant. This can be achieved by writing code in Python and using the Gurobi solver to solve the optimization problems at the upper and lower layers separately. This master-slave game iterative algorithm is essentially a subgradient method or heuristic search. Through continuous interaction and strategy adjustment between the upper and lower layer models, it approximates the Stackelberg equilibrium point. At the equilibrium point, given the optimal upper-layer scheduling strategy of the upper-layer model, the lower-layer selection strategy of the lower-layer model is optimal; simultaneously, given the optimal lower-layer selection strategy of the lower-layer model, the upper-layer scheduling strategy of the upper-layer model is also optimal, and neither side has an incentive to unilaterally deviate from this state. Although convergence cannot be strictly guaranteed for such nonlinear problems, the algorithm can reach stability within a finite number of iterations under a set convergence tolerance.

[0095] Specifically, in step 360, the solution process for the virtual power plant two-layer scheduling model includes the following steps B1 to B4: Step B1: Set the number of iterations Computing devices (such as dispatch centers) can initialize algorithm parameters to obtain initial algorithm parameters, which include: photovoltaic power generation capacity, predicted output of external renewable energy, and information such as the initial battery swapping price, location, and number of people in the queue for each battery swapping station.

[0096] Step B2: Based on the initial algorithm parameters, the lower-level model is solved by fixing the decision variables of the upper-level model. Since the optimization problem of the lower-level model is a linear integer programming problem, the Gurobi solver can be used to solve the lower-level model to obtain the current optimal lower-level selection strategy (the selection strategy of each user cluster for the battery swapping station). Based on the selection strategy of each user cluster for the battery swapping station, the actual number of battery swaps and the number of people queuing for each battery swapping station are determined, as shown in the following formula.

[0097] (34) In the formula, the superscript k indicates the k-th iteration.

[0098] (35) In the formula, Let represent the satisfaction function for the k-th iteration; This represents the utility of the battery swapping price calculated based on the battery swapping price of station i during time period t. This represents the queuing utility calculated based on the number of people queuing at battery swapping station i during time period t.

[0099] Step B3: The actual number of battery swaps and the number of people queuing at each battery swapping station, fed back from the lower-level model, are used as fixed parameters and substituted into the upper-level model to solve the upper-level model. The upper-level scheduling strategy can be obtained. Here, the upper-level scheduling strategy includes the virtual power plant's power purchase and sale plan to the external power grid and the charging and discharging plan (charging and discharging power) of each battery swapping station. Here, the upper-level model does not directly use the solution obtained in this step, but further updates the battery swapping price (initial battery swapping price) and charging and discharging power of each battery swapping station according to the feedback mechanism shown in the following formulas (36)-(37), combined with the number of people queuing and satisfaction information fed back from the lower-level model, so as to obtain the updated upper-level scheduling strategy, thereby avoiding iterative oscillations and promoting the smooth convergence of the algorithm.

[0100] (36) In the formula, Indicates the i-th battery swapping station during time period t. The battery swapping price in the next iteration; This represents the battery swapping price at battery swapping station i in the k-th iteration during time period t; Indicates the learning rate; This represents the partial derivative of the upper-level objective function with respect to the battery swapping price.

[0101] Approximate calculation of gradient: (37) In the formula, Indicates the perturbation step size; This indicates an increase in battery swapping prices. The value of the upper-level objective function after that; This indicates a reduction in battery swapping prices. The value of the upper-level objective function.

[0102] Step B4: Calculate the rate of change of the system's key indicators (upper-level objective function value and lower-level objective function value) between the two iterations (this iteration and the previous iteration).

[0103] Iterate through steps B2 to B4 until the convergence condition is met. Then stop the iteration and output the optimal virtual power plant scheduling scheme (including the optimal upper-level scheduling strategy and the optimal lower-level selection strategy). Otherwise, return to step B2.

[0104] In some embodiments, the convergence condition is as shown in the following equation.

[0105] (38) In the formula, , These represent the preset first convergence tolerance and second convergence tolerance, respectively. This indicates the maximum number of iterations.

[0106] In other words, by iteratively executing the above steps until the convergence condition (iteration termination condition) is met, the optimal virtual power plant scheduling scheme is obtained. The convergence condition can be that the rate of change of the upper objective function value between two consecutive iterations is less than or equal to the first convergence tolerance, the rate of change of the lower objective function value between two consecutive iterations is less than or equal to the second convergence tolerance, or the number of iterations reaches the maximum number of iterations.

[0107] It should be noted that at the equilibrium point, given the optimal upper-level scheduling strategy of the upper-level model, the lower-level selection strategy of the lower-level model is also optimal; at the same time, given the optimal lower-level selection strategy of the lower-level model, the upper-level scheduling strategy of the upper-level model is also optimal, and neither side has an incentive to unilaterally deviate from this state.

[0108] In one specific embodiment, referring to the actual operating data of a domestic electric vehicle battery swapping company, the key parameter settings are shown in Table 1. The predicted output curve of external renewable energy uses the meteorological data of the day obtained from the CloudPSS platform. The curve obtained after power normalization is directly input into the model as a known parameter.

[0109] Table 1 Basic Data and Parameter Settings

[0110] To comprehensively evaluate the effectiveness of the framework and method proposed in this invention, multiple sets of comparative models were designed. Three predictive clustering methods were designed for comparison in terms of predictive clustering, and three model frameworks were also designed for comparison in terms of optimization models. Their core features are shown in Table 2.

[0111] Table 2 Model Comparison

[0112] Figure 4A schematic diagram of a typical daily photovoltaic (PV) power output curve configured for a battery swapping station according to an embodiment of the present invention is shown. The typical daily PV power output curve is generated based on simulations of actual PV power generation characteristics, with a total installed capacity of 1MW. This result will be directly input into subsequent calculations as the PV power output result. PV power generation exhibits typical diurnal variation characteristics from 6:00 AM sunrise to 6:00 PM sunset: output slowly increases from 6:00 AM, reaches a peak around 12:00 PM (approximately 750kW, accounting for 75% of the installed capacity), then gradually decreases, completely ceasing at 6:00 PM sunset.

[0113] Figure 5 A schematic diagram illustrating the spatial-temporal characteristics of battery swapping user cluster distribution according to an embodiment of the present invention is shown. Figure 5 It can be seen that user behavior in battery swapping exhibits a clear spatial clustering pattern, with user swapping activity highly concentrated around the 10 battery swapping stations. This forms a clustered distribution pattern centered on these stations. The service radius of each station varies, with some stations, such as stations 7 and 10, attracting a wider range of users. Furthermore, battery swapping demand shows a clear fluctuation over 24 hours: during peak hours (9:00-18:00), the cluster size and density increase significantly, particularly around stations 2, 7, and 10, where a large number of users gather. During off-peak hours, such as 22:00-6:00, only a few stations experience sporadic battery swapping activity.

[0114] Figure 6 A schematic diagram comparing the distribution of battery swapping user clusters at different time periods is shown in one embodiment of the present invention. Figure 6 As shown in the figure, six typical time periods were selected for analysis. The black circles in the figure represent the locations of the battery swapping stations. The lighter-colored dots represent the distribution of users in historical data during those time periods, while the darker-colored dots represent the distribution of user clusters during those time periods. It can be seen that the distribution of user clusters is highly correlated with the location of users in historical data, and user clusters can effectively reflect user location information. Furthermore, although the locations of the battery swapping stations are not uniformly distributed, the user clusters are densely located near the locations of the battery swapping stations, indicating that historical users likely selected battery swapping stations based on location information.

[0115] Figure 7 A schematic diagram showing a comprehensive performance comparison of three models according to an embodiment of the present invention is provided.

[0116] From Table 3 and Figure 7The results show that by comparing the performance of the three optimization models on three key indicators—external renewable energy fit, average daily total profit, and user satisfaction—the overall performance of each model can be clearly evaluated. Model A performs best in terms of external renewable energy fit and economic benefits, with a fit RMSE of 0.400 and an average daily total profit of 158,000 yuan, significantly outperforming the other two models. Specifically, as follows... Figure 7 As shown in the goodness-of-fit comparison chart, Model A's goodness-of-fit is 13.8% and 8.9% higher than Model B and Model C, respectively, demonstrating its significant advantage in promoting the consumption of renewable energy. In terms of economic benefits, Model A's average daily total profit increases by 11.3% and 66.3% compared to Model B and Model C, respectively, verifying its good economic feasibility.

[0117] While Model B slightly outperforms Model A in user satisfaction, Model A achieves a better balance across the three key metrics, considering Model B's relatively weaker fit to external renewable energy and lower economic efficiency. Model C, while performing reasonably well in user satisfaction, suffers from poor external renewable energy fit and the lowest economic efficiency, presenting significant limitations in practical applications.

[0118] Comprehensive analysis shows that Model A, by coordinating system operational goals with user response behavior, effectively improves the system's environmental and economic benefits while ensuring high user satisfaction, providing a more comprehensive and feasible solution for the actual scheduling of VPPs. The "spatiotemporal prediction-dynamic decision-making-user response" closed-loop optimization framework adopted by Model A achieves the coordination of interests between VPP operators and battery swapping users through a master-slave game mechanism. This ensures both the overall optimization goals of the system and takes into account individual user preferences, demonstrating significant potential in practical applications.

[0119] Table 3 Comparison of the three model schemes

[0120] In summary, the virtual power plant scheduling method 300 based on the spatiotemporal aggregation of the present invention, which considers the comprehensive utility of user battery swapping, adopts a closed-loop optimization framework of "spatiotemporal prediction-dynamic decision-user response" and combines a master-slave game mechanism. An upper-level model is constructed with the upper-level objective of maximizing the fit between the virtual power plant's net load and external renewable energy and maximizing the total operating profit of the virtual power plant. A lower-level model is constructed with the lower-level objective of maximizing the comprehensive satisfaction of the battery swapping user group. This yields a two-layer scheduling model for the virtual power plant. The optimal virtual power plant scheduling scheme is obtained by solving the model. Based on this, the maximum fit between the virtual power plant's net load and external renewable energy output, the maximum profit, and the maximum user satisfaction can be achieved simultaneously.

[0121] By way of example, and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in the form of modulated data signals such as carrier waves or other transmission mechanisms, and includes any information delivery medium. Any combination of the above is also included within the scope of readable media.

[0122] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with the examples of this invention. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0123] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0124] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, in the description of exemplary embodiments of the invention above, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof.

[0125] Those skilled in the art will understand that modules, units, or components of the device in the examples disclosed in this invention can be arranged in the device as described in this embodiment, or alternatively, can be located in one or more devices different from the device in this example. The modules in the foregoing examples can be combined into a single module or, in addition, can be divided into multiple sub-modules.

[0126] Unless otherwise specified, the use of ordinal numbers such as “first,” “second,” “third,” etc., to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects being described must have a given order in time, space, ordering, or any other manner.

Claims

1. A virtual power plant scheduling method considering the comprehensive utility of user battery swapping under spatiotemporal aggregation, wherein the virtual power plant includes a battery swapping station cluster, the battery swapping station cluster includes multiple battery swapping stations and is suitable for generating electricity through photovoltaic power, the method comprising: Using the Monte Carlo method, typical photovoltaic power output scenarios are generated based on historical photovoltaic power output time-series data; Extract the set of battery swapping location coordinates of all battery swapping users in each time period from the historical battery swapping demand data of the battery swapping station cluster, and cluster the set of battery swapping location coordinates of all battery swapping users in each time period to obtain the user cluster set for each time period; extract the user cluster feature vector of each user cluster in each time period, and combine it with the distance attenuation model to determine the predicted number of battery swapping times for each battery swapping station in each time period, so as to obtain the battery swapping demand prediction data. Based on the typical photovoltaic output scenarios and battery swapping demand forecast data, an upper-level objective function is constructed with the goal of maximizing the fit between the virtual power plant net load and the predicted output of external renewable energy, and maximizing the total operating profit of the virtual power plant. An upper-level model is then constructed based on the upper-level objective function. The virtual power plant net load is related to the charging power and photovoltaic power generation of each battery swapping station in the battery swapping station cluster. With the goal of maximizing the overall satisfaction of battery swapping users, a lower-level objective function is constructed, and a lower-level model is built based on the lower-level objective function. The overall satisfaction is related to the battery swapping price, overall distance, and number of people queuing at each battery swapping station. Based on the upper-layer model and the lower-layer model, a two-layer scheduling model for virtual power plants is obtained; The two-layer scheduling model of the virtual power plant is solved to obtain the optimal virtual power plant scheduling scheme. The optimal virtual power plant scheduling scheme is used to indicate: the optimal selection strategy of each user cluster for the battery swapping station, the optimal power purchase and sale plan of the virtual power plant to the external power grid, the optimal charging and discharging power of each battery swapping station, and the optimal battery swapping price of each battery swapping station.

2. The method as described in claim 1, wherein, With the goals of maximizing the fit between the virtual power plant's net load and the projected output of external renewable energy, and maximizing the total operating profit of the virtual power plant, a higher-level objective function is constructed, including: The virtual power plant net load and the predicted output of external renewable energy are normalized respectively, and the first objective function is constructed with the goal of minimizing the difference between the normalized virtual power plant net load and the normalized predicted output of external renewable energy. With maximizing the total profit from operating the virtual power plant as the second objective, a second objective function is constructed. The first objective function and the second objective function are linearly combined using the linear weighted sum method to obtain the upper-level objective function.

3. The method as described in claim 1 or 2, wherein, The total operating profit of the virtual power plant is related to the actual number of battery swaps and the battery swap price at each battery swapping station in each time period, the power output and the power output and the power price of electricity sold by the virtual power plant to the external power grid, and the conventional power output and the conventional power price purchased by the virtual power plant from the external power grid.

4. The method according to any one of claims 1-3, wherein, The overall satisfaction of the battery swapping user group is related to the historical average number of battery swaps for each user cluster in each time period, the selection strategy of each user cluster for battery swapping stations, the battery swapping price of each battery swapping station, the road network distance from the centroid of each user cluster to each battery swapping station, the actual number of battery swaps and the maximum service capacity of each battery swapping station.

5. The method according to any one of claims 1-4, wherein, Constructing an upper-level model based on the aforementioned upper-level objective function includes: The upper-level model is constructed based on the upper-level objective function and upper-level constraints. The upper-level constraints include: energy balance constraints of the battery swapping station cluster, power grid interaction constraints, dynamic constraints of the number of fully charged batteries in the battery swapping station, charging and discharging power constraints of the battery swapping station, mutual exclusion constraints of charging and discharging of the battery swapping station, and battery swapping price constraints. The power grid interaction constraints are used to indicate that: the photovoltaic power generation power does not exceed the maximum photovoltaic power generation power, the power sold by the virtual power plant to the external power grid does not exceed the maximum power allowed to be sold to the external power grid, and the conventional power purchased by the virtual power plant from the external power grid does not exceed the maximum conventional power allowed to be purchased. The charging and discharging power constraints of the battery swapping stations are used to indicate that: the charging power of each battery swapping station in each time period does not exceed the maximum charging power of the battery swapping station, and the discharging power of each battery swapping station in each time period does not exceed the maximum discharging power of the battery swapping station. The mutual exclusion constraint condition for charging and discharging at the battery swapping station is used to indicate that each battery swapping station cannot charge and discharge simultaneously. The battery swapping price constraint condition is used to indicate that the battery swapping price of each battery swapping station in each time period is greater than or equal to the minimum battery swapping price and less than or equal to the maximum battery swapping price.

6. The method according to any one of claims 1-5, wherein, Constructing a lower-level model based on the lower-level objective function includes: The lower-level model is constructed based on the lower-level objective function and lower-level constraints, wherein the lower-level constraints include: unique selection constraint for user clusters, service capacity limitation constraint for battery swapping stations, and battery swapping queue length constraint. The unique selection constraint for user clusters indicates that a single user in each user cluster must and can only select one battery swapping station during each time period. The service capacity limit constraint of the battery swapping station means that the actual number of battery swaps at each battery swapping station in each time period shall not exceed the maximum service capacity of each battery swapping station in each time period. The queue length constraint is used to indicate that the number of people queuing at each battery swapping station in each time period does not exceed the maximum tolerable queue length.

7. The method according to any one of claims 1-6, wherein, Solving the virtual power plant two-layer scheduling model includes the following steps: Obtain initial algorithm parameters, which include: photovoltaic power generation, predicted output of external renewable energy, and initial battery swapping price and location of each battery swapping station; Based on the initial algorithm parameters, the decision variables of the upper-level model are fixed, and the lower-level model is solved to obtain the lower-level selection strategy and the corresponding satisfaction. The actual number of battery swaps and the number of people queuing for each battery swapping station are determined according to the lower-level selection strategy. The lower-level selection strategy includes the selection strategy of each user cluster for the battery swapping station. Based on the actual number of battery swaps and the number of people queuing at each battery swapping station, the upper-level model is solved to obtain the upper-level scheduling strategy. The upper-level scheduling strategy includes the virtual power plant's power purchase and sale plan to the external power grid and the charging and discharging power of each battery swapping station. Based on the feedback mechanism and combined with the number of people queuing and the satisfaction level, the initial battery swapping price and charging and discharging power of each battery swapping station are smoothly updated to obtain the updated upper-level scheduling strategy. The above steps are executed iteratively until the convergence condition is met, at which point the optimal virtual power plant scheduling scheme, which includes the optimal upper-level scheduling strategy and the optimal lower-level selection strategy, is obtained.

8. The method according to any one of claims 1-7, wherein, Using the Monte Carlo method, typical photovoltaic (PV) output scenarios are generated based on historical PV output time-series data, including: Historical photovoltaic power output time series data is acquired, and the historical photovoltaic power output time series data is subjected to normal distribution random perturbation to generate multiple initial scenarios; The frequency of occurrence of each initial scene is statistically analyzed, and the original occurrence probability of each initial scene is calculated. A predetermined number of initial scenes with the highest original occurrence probability are selected as candidate typical scenes. The original occurrence probability of each candidate typical scenario is standardized to obtain the standardized probability of each candidate typical scenario, so that the sum of the standardized probabilities of all candidate typical scenarios is 1. The standardized probability of each candidate typical scenario is subjected to a uniformly distributed random perturbation to obtain the typical photovoltaic output scenario and the probability corresponding to the typical photovoltaic output scenario.

9. A computing device, comprising: At least one processor; and A memory storing program instructions, wherein the program instructions are configured to be processed by the at least one processor, the program instructions including instructions for processing the method as claimed in any one of claims 1-8.

10. A readable storage medium storing program instructions that, when read and processed by a computing device, cause the computing device to perform the method as described in any one of claims 1-8.