Two-stage charging and discharging scheduling method and device for electric vehicle

By employing a two-stage charging and discharging scheduling method, combined with day-ahead scheduling and real-time rolling optimization, the problem of power system burden caused by the disorderly entry of electric vehicles into the grid was solved, and the accuracy of electric vehicle charging and discharging control and grid stability were improved.

CN117592688BActive Publication Date: 2026-07-21STATE GRID BEIJING ELECTRIC POWER CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID BEIJING ELECTRIC POWER CO
Filing Date
2023-11-06
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The disorderly entry of electric vehicles into the grid has increased the burden on the power system, and real-time charging and discharging control is difficult to meet the needs. The accuracy of electric vehicle charging and discharging control in existing technologies is low.

Method used

A two-stage charging and discharging scheduling method is adopted. First, in the day-ahead scheduling stage, a model is established based on the time-of-use electricity price to determine the target total charging and discharging power for the next day. Then, in the real-time scheduling stage, the actual charging and discharging power is adjusted through rolling optimization to ensure that the difference between the actual power and the target power is minimized.

Benefits of technology

It improves the accuracy and efficiency of electric vehicle charging and discharging control, reduces grid load peaks, and optimizes the stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117592688B_ABST
    Figure CN117592688B_ABST
Patent Text Reader

Abstract

The application discloses a two-stage charging and discharging scheduling method and device for an electric vehicle. In the day-ahead scheduling stage of the electric vehicle, the travel information declared by the electric vehicle and time-of-use electricity price information are collected, a day-ahead scheduling model is established according to the time-of-use electricity price of the charging and discharging of the electric vehicle on the next day, the total charging and discharging power target curve of the electric vehicle on the next day is determined, and the target total charging and discharging power curve is used to represent the target total charging and discharging power of the electric vehicle in a plurality of preset time periods within the charging and discharging date. In the real-time scheduling stage of the electric vehicle, a real-time scheduling model based on rolling optimization is established for the randomness of the electric vehicle into the network, the actual total charging and discharging power of the electric vehicle in each preset time period in the real-time stage is adjusted, the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, and accurate and effective tracking of the target power is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging and discharging technology, and more specifically, to a two-stage charging and discharging scheduling method and apparatus for electric vehicles. Background Technology

[0002] With the large-scale grid connection of electric vehicles (EVs), disorderly charging of EVs will inevitably occur, bringing many negative impacts to the power system. For example, at certain times, when EVs are concentratedly connected to the grid, the "consistency" of charging time can lead to a surge in EV charging load. This, combined with residential electricity load, will increase the peak load of the distribution network, making transformer congestion more likely and posing a significant challenge to the safe and stable operation of the power grid. Furthermore, in reality, EV grid connection is highly uncertain, resulting in significant fluctuations in charging load during real-time control, making optimization and regulation difficult. Current related technologies mostly study EV charging and discharging control from two levels: day-ahead scheduling and real-time scheduling. Day-ahead scheduling can optimize scheduling and generate the next day's charging plan curve based on information submitted by vehicle owners, while meeting the grid's operational needs. However, in real-time scheduling, EV access is highly random and uncertain, and the actual situation differs from the day-ahead submitted information, making it difficult to meet the needs of real-time scheduling.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a two-stage charging and discharging scheduling method and apparatus for electric vehicles, which at least solves the technical problem of low charging and discharging control accuracy of electric vehicles.

[0005] According to one aspect of the embodiments of this application, a two-stage charging and discharging scheduling method for electric vehicles is provided, comprising: when the electric vehicle is in a pre-day charging and discharging scheduling stage, obtaining the time-of-use electricity price for charging and discharging the electric vehicle on the next day; based on the time-of-use electricity price for charging and discharging the electric vehicle on the next day, with the goal of minimizing the total cost of charging and discharging the electric vehicle on the next day, establishing a pre-day scheduling model, analyzing the scheduling model, and determining the target total charging and discharging power curve of the electric vehicle in a real-time scheduling stage, the target total charging and discharging power curve being used to represent the target total charging and discharging power of the electric vehicle within multiple preset time periods in the real-time scheduling stage; when the electric vehicle is in a real-time charging and discharging scheduling stage, adjusting the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling stage, such that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, wherein the pre-day scheduling stage precedes the real-time scheduling stage.

[0006] Optionally, the step of establishing a day-ahead scheduling model with the objective of minimizing the total cost of charging and discharging the electric vehicle based on the time-of-use electricity price for charging and discharging on the next day includes: collecting information reported by the electric vehicle owners to obtain statistical results, the statistical results including at least: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge of the electric vehicles when they connect to the grid, and the expected state of charge of the electric vehicles when they leave the grid; and establishing the day-ahead scheduling model based on the statistical results.

[0007] Optionally, the expression for the day-ahead scheduling model includes:

[0008]

[0009] In the formula, min f represents the total cost of charging and discharging an electric vehicle. This represents the charging power of the i-th electric vehicle at time t. This represents the discharge power of the i-th electric vehicle at time t. and Let N represent the charging price at time t and the discharging price at time t, respectively. Let N represent the number of electric vehicles, T represent the total number of scheduling periods, and c represent the total number of time periods. d,i Let Δt represent the discharge loss cost of the i-th electric vehicle, and let Δt represent the interval duration of the scheduling period.

[0010] Optionally, the scheduling model must satisfy the following constraints:

[0011]

[0012]

[0013]

[0014]

[0015]

[0016]

[0017]

[0018]

[0019] In the formula, and Let represent the maximum charging power of the i-th electric vehicle and the maximum discharging power of the i-th electric vehicle, respectively. and These are binary variables, representing the electric vehicle being in a charging state and the electric vehicle being in a discharging state, respectively. and S represents the times when the i-th electric vehicle connects to and disconnects from the power grid, respectively. i,min With S i,max S represents the minimum state of charge and the maximum state of charge of the i-th electric vehicle, respectively; i,t S represents the state of charge of the i-th electric vehicle at time t; i,des The desired charge state of the i-th electric vehicle when it leaves the power grid, η c and η d These represent the efficiency during the charging and discharging processes of an electric vehicle, respectively. P represents the capacity of the battery of the i-th electric vehicle; t trans P represents the transformer capacity at time t; t ref This represents the total charging and discharging power of the electric vehicle at time t.

[0020] Optionally, adjusting the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase includes: constructing an objective function with the objective of minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; and constructing a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase.

[0021] Optionally, the expression for the objective function includes:

[0022]

[0023] In the formula, This represents the actual charging and discharging power of the i-th electric vehicle at time t; and Let r1 and r2 represent the actual charging power and actual discharging power of the i-th electric vehicle at time t, respectively; r1 and r2 represent the corresponding obstacle factors, respectively.

[0024] Optionally, the expression for the objective function constraint includes:

[0025]

[0026]

[0027] In the formula, Let δ(i,t) be the reference value of the state of charge of the i-th electric vehicle obtained during the previous scheduling phase, and let δ(i,t) be a preset correlation value with time t and the off-grid time of the i-th electric vehicle. ΔS soc This represents the SOC adjustment amount, which is a constant.

[0028] According to another aspect of the embodiments of this application, a two-stage charging and discharging scheduling device for electric vehicles is also provided, comprising: an extraction module, configured to obtain the time-of-use electricity price for charging and discharging the electric vehicle on the next day when the electric vehicle is in the day-of-charge and discharging scheduling stage; a construction module, configured to establish a day-of-charge scheduling model based on the time-of-use electricity price for charging and discharging the electric vehicle on the next day, with the goal of minimizing the total cost of charging and discharging the electric vehicle on the next day, and to analyze the scheduling model to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling stage, the target total charging and discharging power curve being used to represent the target total charging and discharging power of the electric vehicle in multiple preset time periods in the real-time scheduling stage; and an adjustment module, configured to adjust the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling stage when the electric vehicle is in the real-time scheduling stage, such that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, wherein the day-of-charge scheduling stage is before the real-time scheduling stage.

[0029] According to another aspect of the embodiments of this application, a computer device is also provided, comprising: a memory for storing program instructions; and a processor connected to the memory for executing the program instructions for performing the following functions: when an electric vehicle is in a pre-charge / discharge scheduling phase, obtaining the time-of-use electricity price for the electric vehicle's charging and discharging on the next day; establishing a pre-charge scheduling model based on the time-of-use electricity price for the electric vehicle's charging and discharging on the next day, with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day; analyzing the scheduling model to determine the target total charging and discharging power curve of the electric vehicle in a real-time scheduling phase, the target total charging and discharging power curve representing the target total charging and discharging power of the electric vehicle within multiple preset time periods in the real-time scheduling phase; when the electric vehicle is in a real-time charging and discharging scheduling phase, adjusting the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase, such that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, wherein the pre-charge scheduling phase precedes the real-time scheduling phase.

[0030] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described two-stage charging and discharging scheduling method for electric vehicles by running the computer program.

[0031] In this embodiment, during the day-ahead scheduling phase of electric vehicles, travel information and time-of-use electricity price information declared by electric vehicles are collected. Based on the time-of-use electricity price for charging and discharging of electric vehicles on the following day, a day-ahead scheduling model is established with the goal of minimizing the total cost of charging and discharging of electric vehicles. The target total charging and discharging power curve of electric vehicles on the following day is determined. The target total charging and discharging power curve is used to represent the target total charging and discharging power of electric vehicles within multiple preset time periods within the charging and discharging date. During the real-time scheduling phase of electric vehicles, considering the randomness of electric vehicle grid access, a real-time scheduling model based on rolling optimization is established. The actual total charging and discharging power of electric vehicles in each preset time period during the real-time phase is adjusted to minimize the difference between the actual total charging and discharging power and the target total charging and discharging power, thereby achieving accurate and effective tracking of the target power and solving the technical problem of low accuracy in electric vehicle charging and discharging control in related technologies. Attached Figure Description

[0032] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0033] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a two-stage charging and discharging scheduling method for electric vehicles, according to an embodiment of this application.

[0034] Figure 2 This is a flowchart of a two-stage charging and discharging scheduling method for electric vehicles according to this application;

[0035] Figure 3 This is a flowchart of a two-stage charging and discharging rolling optimization process for electric vehicles according to this application;

[0036] Figure 4 This is a flowchart of another two-stage charging and discharging scheduling method for electric vehicles according to an embodiment of this application;

[0037] Figure 5 This is a schematic diagram of a two-stage charging and discharging scheduling device for an electric vehicle according to an embodiment of this application. Detailed Implementation

[0038] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0040] The two-stage charging and discharging scheduling method for electric vehicles provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a two-stage charge-discharge scheduling method for electric vehicles is shown. Figure 1 As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0041] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be implemented wholly or partially as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be wholly or partially integrated into any other element in the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0042] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the two-stage charging and discharging scheduling method for electric vehicles in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned two-stage charging and discharging scheduling method for electric vehicles. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0043] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0044] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.

[0045] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer devices.

[0046] Under the above operating environment, this application provides an embodiment of a two-stage charging and discharging scheduling method for electric vehicles. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0047] Figure 2This is a flowchart of a two-stage charging and discharging scheduling method for electric vehicles according to an embodiment of this application, as follows: Figure 2 As shown, the method includes the following steps:

[0048] Step S202: When the electric vehicle is in the pre-charge / discharge scheduling phase, obtain the time-of-use electricity price for the electric vehicle's charge / discharge on the next day;

[0049] In step S202 above, the day-ahead scheduling phase is the scheduling phase before the charging and discharging date. There can be one or more electric vehicles. During the day-ahead scheduling phase, it is necessary to collect the time-of-use electricity price information for the next day. In actual application scenarios, the electricity price information can be updated daily. The charging and discharging date (the date of the real-time scheduling phase) can be extracted from the travel information declared by the electric vehicle side, and the time-of-use electricity price information can be obtained from the grid side.

[0050] Step S204: Based on the time-of-use electricity price for the electric vehicle's charging and discharging on the next day, and with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day, establish a day-ahead scheduling model, use the scheduling model for analysis, and determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling phase. The target total charging and discharging power curve is used to represent the target total charging and discharging power of the electric vehicle in multiple preset time periods during the real-time scheduling phase.

[0051] Step S206: When the electric vehicle is in the real-time charging and discharging scheduling stage, the actual total charging and discharging power of the electric vehicle in each preset time period within the charging and discharging date is adjusted so that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized. The day-ahead scheduling stage is before the real-time scheduling stage.

[0052] It should be noted that one day of the charging and discharging date is used as a scheduling cycle, and the scheduling cycle is divided into several preset time periods based on preset time intervals. The preset time intervals can be determined according to the required scheduling granularity, such as 15 minutes, 20 minutes, etc.

[0053] The two-stage charging and discharging scheduling method for electric vehicles (EVs) described in steps S202 to S206 above collects travel information and time-of-use pricing information from EVs during the day-ahead scheduling phase. Based on the time-of-use pricing for charging and discharging on the following day, a day-ahead scheduling model is established with the goal of minimizing the total cost of charging and discharging. This model determines the target total charging and discharging power curve for the EVs on the following day, representing the target total charging and discharging power over multiple preset time periods within the charging and discharging date. During the real-time scheduling phase, considering the randomness of EV grid access, a real-time scheduling model based on rolling optimization is established. This model adjusts the actual total charging and discharging power for each preset time period in the real-time phase, minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power. This achieves accurate and effective tracking of the target power, thus solving the technical problem of low accuracy in EV charging and discharging control in related technologies. The details are explained below.

[0054] In step S204 of the above-mentioned two-stage charging and discharging scheduling method for electric vehicles, the goal is to minimize the total cost of charging and discharging of the electric vehicles based on the time-of-use electricity price for charging and discharging on the next day. A day-ahead scheduling model is established, specifically including the following steps: collecting information reported by electric vehicle owners to obtain statistical results, which at least include: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge of the electric vehicles when connecting to the grid, and the expected state of charge of the electric vehicles when leaving the grid; and establishing the day-ahead scheduling model based on the statistical results.

[0055] It should be noted that the information declared by electric vehicle owners refers to the information declared by the electric vehicle owners during the previous dispatch phase.

[0056] In one alternative approach, the expression for the scheduling model includes:

[0057]

[0058] In the formula, minf represents the total cost of charging and discharging an electric vehicle. This represents the charging power of the i-th electric vehicle at time t. This represents the discharge power of the i-th electric vehicle at time t. and Let N represent the charging price at time t and the discharging price at time t, respectively. Let N represent the number of electric vehicles, T represent the total number of scheduling periods, and c represent the total number of time periods. d,i Let Δt represent the discharge loss cost of the i-th electric vehicle, and let Δt represent the interval duration of the scheduling period.

[0059] It should be noted that when electric vehicles participate in grid interaction, it can damage battery life and increase battery aging costs. The embodiments in this application use c... d,i This represents the discharge loss cost of the i-th electric vehicle, for example: c d,i = 0.15 yuan / kW.

[0060] In some embodiments of this application, the scheduling model must satisfy the following constraints:

[0061]

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068]

[0069] In the formula, and Let represent the maximum charging power of the i-th electric vehicle and the maximum discharging power of the i-th electric vehicle, respectively. and These are binary variables, representing the electric vehicle being in a charging state and the electric vehicle being in a discharging state, respectively. and S represents the times when the i-th electric vehicle connects to and disconnects from the power grid, respectively. i,min With S i,max S represents the minimum state of charge and the maximum state of charge of the i-th electric vehicle, respectively; i,t S represents the state of charge of the i-th electric vehicle at time t; i,des The desired charge state of the i-th electric vehicle when it leaves the power grid, η c and η d These represent the efficiency during the charging and discharging processes of an electric vehicle, respectively. P represents the capacity of the battery of the i-th electric vehicle; t trans P represents the transformer capacity at time t; t ref This represents the total charging and discharging power of the electric vehicle at time t.

[0070] It should be noted that when and At time i, the i-th electric vehicle is in a charging state; when and At that time, the i-th electric vehicle is in a discharging state; when At that time, the i-th electric vehicle is idle, neither charging nor discharging.

[0071] One possible approach to adjust the actual total charging and discharging power of an electric vehicle in each preset time period during the real-time scheduling phase is as follows: Construct an objective function with the objective of minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; construct a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle in each preset time period during the real-time scheduling phase.

[0072] The real-time scheduling phase only obtains vehicle information for known time periods, lacking global information on future electric vehicle access. Therefore, once an electric vehicle connects to a charging station, the charging station's intelligent control module can read the vehicle's network access information, including network access time, network disconnection time, network access SOC (state of charge), and expected disconnection SOC, and transmit this information to the control center in real time for real-time optimization control. The real-time scheduling phase involves real-time scheduling of charging and discharging of electric vehicles within the charging / discharging date, for example, the following day.

[0073] In the power command response mode, with the target total charging and discharging power as the target power, the real-time optimization of electric vehicles considers accurately following the dispatching commands issued by the power grid, with the objective of minimizing the deviation between the charging and discharging power of the electric vehicle and the power control command. The expression of the objective function is as follows:

[0074]

[0075] in,

[0076] In the formula, This represents the actual charging and discharging power of the i-th electric vehicle at time t; and Let r1 and r2 represent the actual charging power and actual discharging power of the i-th electric vehicle at time t, respectively; r1 and r2 represent the corresponding obstacle factors, respectively.

[0077] To ensure the State of Charge (SOC) of electric vehicles at the time of off-grid connection, the following constraints can be added to the objective function:

[0078]

[0079]

[0080] In the formula, Let δ(i,t) be the reference value of the state of charge of the i-th electric vehicle obtained during the previous scheduling phase, and let δ(i,t) be a preset correlation value with time t and the off-grid time of the i-th electric vehicle. ΔS soc This represents the SOC adjustment amount, which is a constant.

[0081] When implementing real-time scheduling, a rolling optimization approach can be adopted to adjust the optimal charging and discharging power of electric vehicles. For example, the charging and discharging power of electric vehicles at the current moment can be used as a control command for the next optimization period, and the above optimization process can be repeated continuously thereafter.

[0082] Taking the control time domain of rolling optimization as H as an example, the expression of the rolling optimization model is as follows:

[0083]

[0084] Based on the above rolling optimization model Figure 3 This illustrates a rolling optimization solution process, such as... Figure 3 As shown, optimization calculations are performed on the current time step t and the window time range t∈[t,t+1,...,t+H]. Within each optimization time range [t,t+H], the charging and discharging power values ​​of each electric vehicle within the current time step and the future time range H are obtained by solving the above rolling model expression, generating a series of power control commands. However, only the charging and discharging power value of the first moment in the control command is selected and sent from the grid control center to the load layer; the charging and discharging power values ​​of other times within the predicted time range are not executed. When the next time step arrives, the current time step is pushed forward, and the grid dispatch center performs the real-time dispatch model calculation again based on the updated real-time status information and the planned SOC value. Then, only the optimized power of the electric vehicle in the current time step is executed, and the optimized dispatch of electric vehicles is achieved through continuous forward rolling optimization.

[0085] In some embodiments of this application, the control center sends the calculated charging power of each electric vehicle to the control module of each charging pile via a communication device; the intelligent module in the charging pile controls the charging task of each electric vehicle; the charging pile feeds back the charging and discharging power execution status of each time period to the control center via a communication device to complete closed-loop control.

[0086] Figure 4 A schematic diagram of a two-stage charging and discharging scheduling method for electric vehicles is shown, as follows: Figure 4 As shown, an analysis of electric vehicles in a certain region is conducted. During the day-ahead scheduling phase, the scheduling cycle is 24 hours, from 0:00 to 24:00. One scheduling cycle is divided into 96 time steps with 15-minute intervals.

[0087] During the real-time scheduling phase, optimization is performed within the selected optimization time range, but only the optimized power of electric vehicles in the first time step is executed. Optimized scheduling of electric vehicles is achieved by continuously rolling forward the optimization.

[0088] Figure 5 This is a structural diagram of a two-stage charging and discharging scheduling device for an electric vehicle according to an embodiment of this application, as shown below. Figure 5 As shown, the device includes:

[0089] Extraction module 50 is used to obtain the time-of-use electricity price for the electric vehicle's charging and discharging on the following day when the electric vehicle is in the pre-charging and discharging scheduling phase.

[0090] The construction module 52 is used to establish a day-ahead scheduling model based on the time-of-use electricity price of the electric vehicle charging and discharging on the next day, with the goal of minimizing the total cost of the electric vehicle charging and discharging on the next day. The scheduling model is used for analysis to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling stage. The target total charging and discharging power curve is used to represent the target total charging and discharging power of the electric vehicle in multiple preset time periods in the real-time scheduling stage.

[0091] The adjustment module 54 is used to adjust the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase when the electric vehicle is in the real-time scheduling phase, so that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, and the day-ahead scheduling phase is before the real-time scheduling phase.

[0092] The construction module 52 of the above-mentioned electric vehicle two-stage charging and discharging scheduling device includes: a construction submodule, used to collect the information reported by the electric vehicle owners and obtain statistical results, the statistical results including at least: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge when the electric vehicles connect to the grid and the expected state of charge when the electric vehicles leave the grid; and to establish the day-ahead scheduling model based on the statistical results.

[0093] The adjustment module 54 includes: an adjustment submodule, used to construct an objective function based on minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; and to construct a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase.

[0094] It should be noted that, Figure 5 The two-stage charge and discharge scheduling device for electric vehicles shown is used to perform Figure 2The two-stage charging and discharging scheduling method for electric vehicles shown herein is also applicable to this two-stage charging and discharging scheduling device for electric vehicles, and will not be repeated here.

[0095] This application embodiment also provides a computer device, including: a memory for storing program instructions; and a processor connected to the memory for executing the program instructions that perform the following functions: when an electric vehicle is in a pre-charge / discharge scheduling phase, obtaining the time-of-use electricity price for the electric vehicle's charging and discharging on the next day; establishing a pre-charge scheduling model based on the time-of-use electricity price for the electric vehicle's charging and discharging on the next day, with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day; using the scheduling model for analysis to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling phase, the target total charging and discharging power curve representing the target total charging and discharging power of the electric vehicle within multiple preset time periods in the real-time scheduling phase; when the electric vehicle is in a real-time charging and discharging scheduling phase, adjusting the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase, such that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, wherein the pre-charge scheduling phase precedes the real-time scheduling phase.

[0096] It should be noted that the aforementioned computer equipment is used to perform... Figure 2 The two-stage charging and discharging scheduling method for electric vehicles shown above is also applicable to this computer device, and will not be repeated here.

[0097] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following two-stage charging and discharging scheduling method for electric vehicles by running the computer program: When the electric vehicle is in the pre-charge / discharge scheduling phase, the time-of-use electricity price for the next day's charging and discharging is obtained; based on the time-of-use electricity price for the next day's charging and discharging, with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day, a pre-charge scheduling model is established; the scheduling model is used for analysis to determine the target total charging and discharging power curve for the electric vehicle in the real-time scheduling phase. The target total charging and discharging power curve represents the target total charging and discharging power of the electric vehicle within multiple preset time periods in the real-time scheduling phase; when the electric vehicle is in the real-time charging and discharging scheduling phase, the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase is adjusted to minimize the difference between the actual total charging and discharging power and the target total charging and discharging power. The pre-charge scheduling phase precedes the real-time scheduling phase.

[0098] It should be noted that the aforementioned non-volatile storage media is used for execution. Figure 2 The two-stage charge and discharge scheduling method for electric vehicles shown above also applies to this non-volatile storage medium, and will not be repeated here.

[0099] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0100] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0101] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0103] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0104] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0105] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A two-stage charging and discharging scheduling method for electric vehicles, characterized in that, include: When an electric vehicle is in the pre-charge / discharge scheduling phase, obtain the time-of-use electricity price for the electric vehicle's charge / discharge on the following day; Based on the time-of-use electricity price for the electric vehicle's charging and discharging on the next day, and with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day, a day-ahead scheduling model is established. The day-ahead scheduling model is used for analysis to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling phase. The target total charging and discharging power curve is used to represent the target total charging and discharging power of the electric vehicle in multiple preset time periods during the real-time scheduling phase. When the electric vehicle is in the real-time charging and discharging scheduling phase, the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase is adjusted so that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized. The day-ahead scheduling phase is before the real-time scheduling phase. The step of establishing a day-ahead scheduling model with the goal of minimizing the total cost of charging and discharging the electric vehicle based on the time-of-use electricity price for charging and discharging on the next day includes: collecting information reported by electric vehicle owners to obtain statistical results, which at least include: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge of the electric vehicles when they connect to the grid, and the expected state of charge of the electric vehicles when they leave the grid; and establishing the day-ahead scheduling model based on the statistical results. The expression for the day-ahead scheduling model includes: ; In the formula, This represents the total cost of charging and discharging an electric vehicle. This represents the charging power of the i-th electric vehicle at time t. This represents the discharge power of the i-th electric vehicle at time t. and Let N represent the charging price at time t and the discharging price at time t, respectively. Let N represent the number of electric vehicles and T represent the total number of scheduling periods. This represents the discharge loss cost of the i-th electric vehicle. Indicates the duration of the scheduling period; Adjusting the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase includes: constructing an objective function with the objective of minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; and constructing a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase. The expression for the objective function includes: ,in, ; In the formula, This represents the actual charging and discharging power of the i-th electric vehicle at time t; and Let represent the actual charging power of the i-th electric vehicle at time t and the actual discharging power of the i-th electric vehicle at time t, respectively. and These represent the corresponding obstacle factors.

2. The method according to claim 1, characterized in that, The day-ahead scheduling model must satisfy the following constraints: ; ; ; ; ; ; ; ; In the formula, and Let represent the maximum charging power of the i-th electric vehicle and the maximum discharging power of the i-th electric vehicle, respectively. and These are binary variables, representing the electric vehicle being in a charging state and the electric vehicle being in a discharging state, respectively. and These represent the times when the i-th electric vehicle connects to and disconnects from the power grid, respectively. and Let represent the minimum state of charge and the maximum state of charge of the i-th electric vehicle, respectively. Let represent the state of charge of the i-th electric vehicle at time t; The expected charge state of the i-th electric vehicle when it leaves the power grid. and These represent the efficiency during the charging and discharging processes of an electric vehicle, respectively. Indicates the first The capacity of an electric vehicle's battery; express Transformer capacity at any given time; express The total charging and discharging power of an electric vehicle at any given time.

3. The method according to claim 1, characterized in that, The expression for the objective function constraint includes: ; ; In the formula, The state of charge reference value for the i-th electric vehicle obtained during the previous scheduling phase is given. For time and the Preset values ​​for the offline time of electric vehicles. This represents the SOC adjustment amount, which is a constant.

4. A two-stage charging and discharging scheduling device for electric vehicles, characterized in that, include: The extraction module is used to obtain the time-of-use electricity price for the electric vehicle's charging and discharging on the following day when the electric vehicle is in the pre-charging and discharging scheduling phase. The module is used to establish a day-ahead scheduling model based on the time-of-use electricity price for the electric vehicle's charging and discharging on the next day, with the goal of minimizing the total cost of the electric vehicle's charging and discharging on the next day. The scheduling model is used for analysis to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling phase. The target total charging and discharging power curve is used to represent the target total charging and discharging power of the electric vehicle in multiple preset time periods in the real-time scheduling phase. The adjustment module is used to adjust the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase when the electric vehicle is in the real-time scheduling phase, so that the difference between the actual total charging and discharging power and the target total charging and discharging power is minimized, and the day-ahead scheduling phase is before the real-time scheduling phase. The step of establishing a day-ahead scheduling model with the goal of minimizing the total cost of charging and discharging the electric vehicle based on the time-of-use electricity price for charging and discharging on the next day includes: collecting information reported by electric vehicle owners to obtain statistical results, which at least include: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge of the electric vehicles when they connect to the grid, and the expected state of charge of the electric vehicles when they leave the grid; and establishing the day-ahead scheduling model based on the statistical results. The expression for the day-ahead scheduling model includes: ; In the formula, This represents the total cost of charging and discharging an electric vehicle. This represents the charging power of the i-th electric vehicle at time t. This represents the discharge power of the i-th electric vehicle at time t. and Let N represent the charging price at time t and the discharging price at time t, respectively. Let N represent the number of electric vehicles and T represent the total number of scheduling periods. This represents the discharge loss cost of the i-th electric vehicle. Indicates the duration of the scheduling period; Adjusting the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase includes: constructing an objective function with the objective of minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; and constructing a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase. The expression for the objective function includes: ,in, ; In the formula, This represents the actual charging and discharging power of the i-th electric vehicle at time t; and Let represent the actual charging power of the i-th electric vehicle at time t and the actual discharging power of the i-th electric vehicle at time t, respectively. and These represent the corresponding obstacle factors.

5. A computer device, characterized in that, include: Memory, used to store program instructions; A processor, connected to the memory, is configured to execute program instructions for the following functions: when the electric vehicle is in the day-ahead scheduling phase for charging and discharging, obtain the time-of-use electricity price for charging and discharging the electric vehicle on the next day; based on the time-of-use electricity price for charging and discharging the electric vehicle on the next day, with the goal of minimizing the total cost of charging and discharging the electric vehicle on the next day, establish a day-ahead scheduling model; use the scheduling model for analysis to determine the target total charging and discharging power curve of the electric vehicle in the real-time scheduling phase, the target total charging and discharging power curve representing the target total charging and discharging power of the electric vehicle within multiple preset time periods in the real-time scheduling phase; when the electric vehicle is in the real-time scheduling phase for charging and discharging, adjust the actual total charging and discharging power of the electric vehicle in each preset time period of the real-time scheduling phase to minimize the difference between the actual total charging and discharging power and the target total charging and discharging power, wherein the day-ahead scheduling phase precedes the real-time scheduling phase; The step of establishing a day-ahead scheduling model with the goal of minimizing the total cost of charging and discharging the electric vehicle based on the time-of-use electricity price for charging and discharging on the next day includes: collecting information reported by electric vehicle owners to obtain statistical results, which at least include: the number of electric vehicles, the time when the electric vehicles connect to the grid, the time when the electric vehicles leave the grid, the state of charge of the electric vehicles when they connect to the grid, and the expected state of charge of the electric vehicles when they leave the grid; and establishing the day-ahead scheduling model based on the statistical results. The expression for the day-ahead scheduling model includes: ; In the formula, This represents the total cost of charging and discharging an electric vehicle. This represents the charging power of the i-th electric vehicle at time t. This represents the discharge power of the i-th electric vehicle at time t. and Let N represent the charging price at time t and the discharging price at time t, respectively. Let N represent the number of electric vehicles and T represent the total number of scheduling periods. This represents the discharge loss cost of the i-th electric vehicle. Indicates the duration of the scheduling period; Adjusting the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase includes: constructing an objective function with the objective of minimizing the difference between the actual total charging and discharging power and the target total charging and discharging power; and constructing a rolling optimization real-time scheduling model based on the objective function to adjust the actual total charging and discharging power of the electric vehicle for each preset time period in the real-time scheduling phase. The expression for the objective function includes: ,in, ; In the formula, This represents the actual charging and discharging power of the i-th electric vehicle at time t; and Let represent the actual charging power of the i-th electric vehicle at time t and the actual discharging power of the i-th electric vehicle at time t, respectively. and These represent the corresponding obstacle factors.

6. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the two-stage charging and discharging scheduling method for electric vehicles according to any one of claims 1 to 3 by running the computer program.