Micro-grid multi-time scale optimization scheduling method and device considering flexibility of electric vehicle, medium and product

By constructing electric vehicle and photovoltaic energy storage models and combining them with the multi-objective gray wolf optimization algorithm for day-ahead and intraday scheduling optimization, the scheduling challenges of electric vehicle charging and discharging uncertainty and renewable energy intermittency in microgrids are solved, thereby improving the economy and reliability of microgrids.

CN121584766APending Publication Date: 2026-02-27HENAN LONGYUAN NEW ENERGY DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511725960.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

The uncertainty of electric vehicle charging and discharging and the intermittency of renewable energy in microgrids increase the difficulty of dispatching, affecting the economy and reliability of the system.

Method used

The Monte Carlo method is used to fit the probability density function of electric vehicle grid entry and exit time. Combined with photovoltaic and energy storage battery models, a microgrid system output model is constructed. The multi-objective gray wolf optimization algorithm is used for day-ahead scheduling optimization. Combined with intraday rolling optimization adjustment, a day-ahead and intraday scheduling model is constructed to achieve collaborative optimization at multiple time scales.

Benefits of technology

It improves the microgrid's ability to absorb renewable energy, reduces operating costs, and enhances the system's economy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121584766A_ABST
    Figure CN121584766A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-grid multi-time-scale optimization scheduling method and device considering flexibility of an electric vehicle, a medium and a product, and relates to the technical field of power grid scheduling. The economical efficiency and stability of the photovoltaic storage and charging micro-grid under the participation of the electric vehicle are considered. A day-ahead scheduling model with the minimum operating cost of the micro-grid and the minimum standard deviation of the tie line power as the optimization target is established based on the prediction data, and the intra-day optimization scheduling model is established on the basis of the result of the day-ahead optimization scheduling model and performs rolling optimization according to the short-term prediction data of the photovoltaic and load; the charging and discharging power of the electric vehicle and the stored energy and the power grid interaction power are adjusted on a short time scale, and the photovoltaic consumption rate is improved while the optimization target is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power grid dispatching technology, and in particular to a multi-timescale optimization dispatching method, device, medium and product for microgrids that takes into account the flexibility of electric vehicles. Background Technology

[0002] With the acceleration of the global energy transition and the advancement of "dual carbon" goals, distributed generation systems dominated by renewable energy are playing an increasingly important role in the energy system. Microgrids, as a crucial carrier integrating distributed energy resources, loads, and energy storage units, are an effective solution for achieving local energy consumption and improving power supply reliability. However, renewable energy generation is significantly affected by natural conditions; its inherent intermittency and volatility, along with the time-varying characteristics of diverse loads, pose significant challenges to the safe and stable operation of microgrids.

[0003] Meanwhile, the widespread adoption and application of electric vehicles (EVs) are constantly expanding, leading to uneven spatial and temporal distribution and high power demands for charging. Without proper guidance and control, the concentrated and disorderly charging behavior of a large number of EVs will further exacerbate the load peak-valley differences in microgrids, increasing the pressure on microgrid system scheduling and operation. On the other hand, as a mobile energy storage unit, EVs possess bidirectional energy flow capabilities through vehicle-to-grid technology. This dual role of charging and discharging gives EVs the characteristics of both load and power source in microgrids. However, the high degree of uncertainty in their behavior, including the randomness of charging start time, charging duration, and discharging intentions, greatly increases the difficulty of microgrid scheduling problems. Summary of the Invention

[0004] The purpose of this application is to provide a multi-timescale optimized scheduling method, device, medium, and product for microgrids that takes into account the flexibility of electric vehicles, which can better adapt to the uncertainty of electric vehicle charging and discharging, promote the consumption of renewable energy, reduce the operating cost of microgrids, and improve the economy and reliability of the system.

[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a multi-time-scale optimal scheduling method for microgrids that considers the flexibility of electric vehicles, including: Based on the Monte Carlo method, taking advantage of the fact that the entry / exit time of electric vehicles follows a normal distribution, the probability density function of the entry / exit time of electric vehicles is fitted to construct an electric vehicle model; Based on the output characteristics of photovoltaic units, the charging and discharging efficiency of energy storage battery units, and the charging and discharging characteristics of electric vehicles, a microgrid system output model is constructed; the microgrid system output model includes: a photovoltaic unit output characteristic model, an energy storage battery unit output characteristic model, and an electric vehicle unit output characteristic model; Based on the microgrid system output model and the electric vehicle model, an objective function and model constraints are constructed with the minimum operating cost of the microgrid and the minimum standard deviation of tie-line power as optimization objectives, resulting in a day-ahead dispatch optimization model. The model constraints include microgrid constraints, energy storage battery constraints, and electric vehicle constraints. The microgrid constraints include microgrid power balance constraints; the energy storage battery constraints include energy storage battery charge / discharge power and energy storage battery SOC constraints; and the electric vehicle constraints include electric vehicle charge / discharge state, electric vehicle power, and electric vehicle SOC constraints. The day-ahead scheduling optimization model is solved using the multi-objective gray wolf optimization algorithm to obtain the day-ahead scheduling optimization results; the day-ahead scheduling optimization results include: the charging power plan for electric vehicles and energy storage batteries for the next day; Divide a day into k For a given time period, based on the day-ahead scheduling optimization results, an intraday scheduling optimization model is constructed with the objectives of minimizing total cost and maintaining stable main network interaction power. The objective function of the intraday scheduling optimization model is: ;in, , , As the weight of the intraday scheduling target, For the current time step, To predict the time step forward, For relative to the first k The deviation of the day-ahead scheduling optimization results for each segment. C grid ( t )for t The cost of purchasing and selling electricity from the grid at any given time. For the cost of photovoltaic power generation, C BA ( t )for t The maintenance cost of energy storage batteries at all times. The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the average daily power purchase by the power grid. Before the start of each time period, real-time photovoltaic power output data, load data, electric vehicle connection status and electric vehicle SOC are acquired. The intraday scheduling optimization model is then solved using a multi-objective gray wolf optimization algorithm to obtain the intraday scheduling optimization results for each time period.

[0006] Optionally, the electric vehicle model includes: ; ; in, f s ( iLet be the probability density function of the time when an electric vehicle enters the grid. f e ( y Let be the probability density function of the off-grid time of electric vehicles. y represents the time when the electric vehicle enters the grid, and y represents the time when the electric vehicle leaves the grid. The expected value at the time of network access. The variance of the network entry time. Let be the expected value at the time of disconnection. This represents the variance of the time spent offline.

[0007] Optionally, The photovoltaic unit output characteristic model is as follows: ; in, Photovoltaic power generation capacity, For the conversion efficiency of photovoltaic systems, For the area of ​​the photovoltaic array, Light intensity, The power-temperature conversion factor of the photovoltaic panel. The current ambient temperature of the photovoltaic array. Standard values ​​for measuring the surface temperature of photovoltaic panels; The energy storage unit output characteristic model is as follows: ; in, For energy storage battery capacity, P BA ( t ( ) represents the energy storage charging and discharging power at time t. SOC BA ( t )for t The state of charge (SOC) of the energy storage unit at any given time. SOC BA ( t -1) is t The state of charge (SOC) of the energy storage unit at time -1. , To improve the discharge and charging efficiency of energy storage batteries; The electric vehicle unit output characteristic model is as follows: ; in, SOC ( t )for t Electric vehicle unit SOC at any time SOC ( t -1) is t The state of charge (SOC) of the electric vehicle unit at time -1. , To improve the discharge and charging efficiency of electric vehicles. Let the charging power of the nth electric vehicle at time t be... Let be the discharge power of the nth electric vehicle at time t. This refers to the battery capacity of electric vehicles.

[0008] Optionally, the objective function of the day-ahead scheduling optimization model is: ; In the formula, The objective function is the microgrid operating cost function. The objective function is the standard deviation of tie-line power. To reduce the maintenance costs of energy storage batteries, For the cost of photovoltaic power generation, For the cost of purchasing and selling electricity to the power grid, The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the total number of time periods. This represents the average power purchased by the power grid. The model constraints of the day-ahead scheduling optimization model include: ; In the formula, , This represents the minimum and maximum charge / discharge power of the energy storage battery. Let SOC be the stored energy value at time t; , The upper and lower limits of the energy storage SOC; , The charging and discharging status of the electric vehicle at time t; Let be the charge of the nth electric vehicle at time t; , These represent the minimum and maximum SOC values ​​for electric vehicles. The SOC value of the electric vehicle when it is off-grid. This represents the expected SOC value of the electric vehicle when it is off-grid. P BA ( t () represents the energy storage charging and discharging power at time t; P EV ( t Let t be the total charging and discharging power of the electric vehicle at time t; P PV ( t Let t be the photovoltaic output power at time t; P load ( t Let t be the power of the power grid at time t; , These are the maximum charging and discharging power of electric vehicles; , Let be the charging and discharging power of the nth electric vehicle at time t.

[0009] Optionally, the calculation formulas for each cost in the objective function of the day-ahead scheduling optimization model include: ; In the formula, This refers to the maintenance factor of the energy storage battery. This represents the cost coefficient for photovoltaic power generation. , Let t be the power purchased or sold to the power grid at time t; The total charging and discharging cost of electric vehicles; N represents the total cost of battery degradation for electric vehicles; N is the number of electric vehicles. The electricity purchase price at time t; Let t be the electricity price at time t, and n be the current electric vehicle number. This represents the battery loss coefficient for electric vehicles.

[0010] Optionally, relative to the first k The formula for calculating the deviation of the day-ahead scheduling optimization results for each segment is: ; In the formula, This refers to the adjustment amount of the scheduling plan for adjacent time periods; , This represents the system power state vector for the k-th and (k-1)-th scheduling periods; , The energy storage charging and discharging power during the k-th and k-1th scheduling periods; , The photovoltaic power output during the k-th and k-1th scheduling periods; , The charging and discharging power of electric vehicles during the k-th and k-1th scheduling periods; , This represents the main network interaction power during the k-th and k-1th scheduling periods.

[0011] Optionally, a day can be divided into k The time period specifically includes dividing the day into 96 time periods.

[0012] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles as described above.

[0013] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles as described above.

[0014] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles as described above.

[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a multi-timescale optimization scheduling method, device, medium, and product for microgrids considering the flexibility of electric vehicles. The method includes: based on the Monte Carlo method, utilizing the characteristic that the electric vehicle's grid connection / disconnection time follows a normal distribution, fitting the probability density function of the electric vehicle's grid connection / disconnection time to construct an electric vehicle model; constructing a microgrid system output model based on the output characteristics of photovoltaic units, the charging and discharging efficiency of energy storage battery units, and the charging and discharging characteristics of electric vehicles; the microgrid system output model includes: a photovoltaic unit output characteristic model, an energy storage battery unit output characteristic model, and an electric vehicle unit output characteristic model; and, based on the microgrid system output model and the electric vehicle model, optimizing the microgrid's scheduling across multiple time scales. The objective function and model constraints are constructed with the minimum operating cost and minimum tie-line power standard deviation as the optimization objectives, resulting in a day-ahead scheduling optimization model. The model constraints include microgrid constraints, energy storage battery constraints, and electric vehicle constraints. The microgrid constraints include microgrid power balance constraints; the energy storage battery constraints include energy storage battery charging / discharging power and energy storage battery SOC constraints; the electric vehicle constraints include electric vehicle charging / discharging state, electric vehicle power, and electric vehicle SOC constraints. The day-ahead scheduling optimization model is solved using the multi-objective gray wolf optimization algorithm to obtain the day-ahead scheduling optimization results. The day-ahead scheduling optimization results include the charging power plan for electric vehicles and energy storage batteries for the next day. The day is divided into... kBased on the day-ahead scheduling optimization results, an intraday scheduling optimization model is constructed with the objectives of minimizing total cost and stabilizing power interaction with the main grid. Before the start of each time period, real-time photovoltaic output data, load data, electric vehicle connection status, and electric vehicle SOC are acquired. The intraday scheduling optimization model is then solved using a multi-objective gray wolf optimization algorithm to obtain the intraday scheduling optimization results for each time period. This application introduces an intraday adjustment mechanism into the scheduling framework, using rolling optimization to compensate for the shortcomings of the day-ahead plan and achieve coordinated optimization between the day-ahead and intraday phases. Combining day-ahead and intraday multi-timescale scheduling strategies can better adapt to the uncertainties of electric vehicle charging and discharging, promote renewable energy consumption, reduce microgrid operating costs, and improve the system's economy and reliability. Attached Figure Description

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

[0017] Figure 1 This is an application environment diagram of a microgrid multi-timescale optimization scheduling method that considers the flexibility of electric vehicles, according to one embodiment of this application.

[0018] Figure 2 This is a flowchart illustrating a multi-time-scale optimized scheduling method for microgrids that considers the flexibility of electric vehicles, provided as an embodiment of this application.

[0019] Figure 3 This is a schematic diagram of the day-to-day optimized scheduling process provided in an embodiment of this application.

[0020] Figure 4 This is a schematic diagram of the microgrid optimization device framework provided in an embodiment of this application.

[0021] Figure 5 This is a schematic diagram of a photovoltaic prediction error curve provided in an embodiment of this application.

[0022] Figure 6 This is a schematic diagram of a load forecasting error curve provided in an embodiment of this application.

[0023] Figure 7 This is a schematic diagram of the total power curve of an electric vehicle from day to day, provided as an embodiment of this application.

[0024] Figure 8 A schematic diagram of the total energy storage power curve from day to day provided in an embodiment of this application.

[0025] Figure 9 A schematic diagram of the day-to-day main network interaction power curve provided for an embodiment of this application.

[0026] Figure 10 A schematic diagram of day-ahead dispatching microgrid power balance provided for an embodiment of this application.

[0027] Figure 11 This is a schematic diagram of intraday dispatch microgrid power balance provided in an embodiment of this application.

[0028] Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] There is limited research on day-ahead and intraday dispatching of photovoltaic-storage-charging microgrids with electric vehicle (EV) participation. Most studies focus on the day-ahead phase, using forecasts of renewable energy output and load demand to formulate day-ahead generation plans and tie-line power. However, relying solely on day-ahead dispatching is insufficient to effectively address the real-time uncertainties of EV charging and discharging. Furthermore, during the intraday rolling optimization phase, there is a lack of dynamic real-time control mechanisms for EV charging and discharging behavior, preventing the full utilization of EVs' flexibility advantages.

[0031] Against this backdrop, this application introduces an intraday adjustment mechanism into the scheduling framework, using rolling optimization to compensate for the shortcomings of day-ahead planning and achieve synergistic optimization between the day-ahead and intraday phases. Combining day-ahead and intraday multi-timescale scheduling strategies can better adapt to the uncertainties of electric vehicle charging and discharging, promote renewable energy consumption, reduce microgrid operating costs, and improve the system's economy and reliability.

[0032] This application provides a multi-timescale optimal scheduling method for microgrids that considers the flexibility of electric vehicles. This method is applicable to photovoltaic-storage-charging microgrid systems. The final result can balance microgrid economy, maximum photovoltaic absorption, and tie-line power stability.

[0033] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0034] The microgrid multi-timescale optimization scheduling method considering the flexibility of electric vehicles provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server.

[0035] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0036] In one exemplary embodiment, such as Figure 2 As shown, a multi-time-scale optimal scheduling method for microgrids considering the flexibility of electric vehicles is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S1 to S6. Wherein: S1. Based on the Monte Carlo method, taking advantage of the fact that the entry / exit time of electric vehicles conforms to a normal distribution, the probability density function of the entry / exit time of electric vehicles is fitted to construct an electric vehicle model.

[0037] This embodiment takes into account the consistency of electric vehicle travel patterns. Based on the Monte Carlo method, the electric vehicle entry / exit time follows a normal distribution. The fitted probability density functions of electric vehicle entry / exit time are shown in formulas (1) and (2). Electric vehicle data is simulated to establish an electric vehicle model: (1) (2) in, f s ( i Let be the probability density function of the time when an electric vehicle enters the grid. f e ( y Let be the probability density function of the off-grid time of electric vehicles. y represents the time when the electric vehicle enters the grid, and y represents the time when the electric vehicle leaves the grid. The expected value at the time of network access. The variance of the network entry time. Let be the expected value at the time of disconnection. This represents the variance of the time spent offline.

[0038] S2. Based on the output characteristics of photovoltaic units, the charging and discharging efficiency of energy storage battery units, and the charging and discharging characteristics of electric vehicles, construct a microgrid system output model; the microgrid system output model includes: photovoltaic unit output characteristic model, energy storage battery unit output characteristic model, and electric vehicle unit output characteristic model.

[0039] In this embodiment, a power output model of a microgrid system based on photovoltaic, energy storage, and charging is established. The power output characteristics of the photovoltaic unit are mainly affected by the light intensity and ambient temperature, as shown in formula (3). A charging and discharging model of the energy storage battery considering charging and discharging efficiency is established, as shown in formula (4). Electric vehicles, as a mobile energy storage unit, have charging and discharging characteristics similar to those of energy storage batteries, as shown in formula (5).

[0040] The photovoltaic unit output characteristic model is as follows: ; (3) in, Photovoltaic power generation capacity, For the conversion efficiency of photovoltaic systems, For the area of ​​the photovoltaic array, Light intensity, The power-temperature conversion factor of the photovoltaic panel. The current ambient temperature of the photovoltaic array. The standard value for measuring the surface temperature of a photovoltaic panel is 25°C.

[0041] The energy storage unit output characteristic model is as follows: ; (4) in, For energy storage battery capacity, P BA ( t ( ) represents the energy storage charging and discharging power at time t. SOC BA ( t )for t The state of charge (SOC) of the energy storage unit at any given time. SOC BA ( t -1) is t The state of charge (SOC) of the energy storage unit at time -1. , This refers to the discharge and charging efficiency of energy storage batteries.

[0042] The electric vehicle unit output characteristic model is as follows: ; (5) in, SOC ( t )for t Electric vehicle unit SOC at any time SOC ( t -1) is t The state of charge (SOC) of the electric vehicle unit at time -1. , To improve the discharge and charging efficiency of electric vehicles. Let the charging power of the nth electric vehicle at time t be... Let be the discharge power of the nth electric vehicle at time t. This refers to the battery capacity of electric vehicles.

[0043] S3. Based on the microgrid system output model and the electric vehicle model, construct the objective function and model constraints with the minimum operating cost of the microgrid and the minimum standard deviation of tie-line power as the optimization objectives to obtain the day-ahead dispatch optimization model. The model constraints include microgrid constraints, energy storage battery constraints, and electric vehicle constraints. The microgrid constraints include microgrid power balance constraints. The energy storage battery constraints include energy storage battery charging and discharging power and energy storage battery SOC constraints. The electric vehicle constraints include electric vehicle charging and discharging state, electric vehicle power, and electric vehicle SOC constraints.

[0044] Based on the established output characteristic models of photovoltaic, energy storage battery and electric vehicle units, combined with the travel patterns and charging demand of electric vehicles, this embodiment formulates a 24-hour scheduling plan for the next 24 hours, taking into account the photovoltaic output, load and electric vehicle power, and the day-ahead scheduling model considering grid electricity prices. The day-ahead optimization time scale is 1 hour.

[0045] The current scheduling optimization model generates an objective function with the goal of minimizing the microgrid's minimum operating cost and the minimum standard deviation of tie-line power, as shown in equation (6): ; (6) In the formula, The objective function is the microgrid operating cost function. The objective function is the standard deviation of tie-line power. To reduce the maintenance costs of energy storage batteries, For the cost of photovoltaic power generation, For the cost of purchasing and selling electricity to the power grid, The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the total number of time periods. This represents the average power purchased by the power grid.

[0046] The cost calculations for each part are shown in Equation (7), and the calculation of the purchased power is shown in Equation (8): ; (7) (8) In the formula, This refers to the maintenance factor of the energy storage battery. This represents the cost coefficient for photovoltaic power generation. , Let t be the power purchased or sold to the power grid at time t; The total charging and discharging cost of electric vehicles; N represents the total cost of battery degradation for electric vehicles; N is the number of electric vehicles. The electricity purchase price at time t; Let t be the electricity price at time t, and n be the current electric vehicle number. This represents the battery loss coefficient for electric vehicles.

[0047] The model constraints of the day-ahead scheduling optimization model include microgrid power balance constraints, energy storage battery charging and discharging power and SOC constraints, electric vehicle charging and discharging state, power and SOC constraints, as shown in equation (9): ; (9) In the formula, , This represents the minimum and maximum charge / discharge power of the energy storage battery. Let SOC be the stored energy value at time t; , The upper and lower limits of the energy storage SOC; , The charging and discharging status of the electric vehicle at time t; Let be the charge of the nth electric vehicle at time t; , These represent the minimum and maximum SOC values ​​for electric vehicles. The SOC value of the electric vehicle when it is off-grid; Let SOC be the expected SOC value of the electric vehicle when it is off-grid. P BA ( t ( ) represents the energy storage charging and discharging power at time t. P EV ( t Let t be the total charging and discharging power of the electric vehicle at time t. P PV ( t Let t be the photovoltaic output power at time t. P load ( t Let t be the power of the power grid at time t. , For the maximum charging and discharging power of electric vehicles, , Let t be the charging and discharging power of the nth electric vehicle.

[0048] S4. Solve the day-ahead scheduling optimization model using the multi-objective gray wolf optimization algorithm to obtain the day-ahead scheduling optimization results; the day-ahead scheduling optimization results include: the charging power plan for electric vehicles and energy storage batteries for the next day.

[0049] Specifically, this embodiment uses the multi-objective gray wolf optimization algorithm to solve the day-ahead scheduling optimization model to obtain the next day's electric vehicle and energy storage charging power plan, thus completing the day-ahead scheduling plan for the photovoltaic-storage-charging microgrid. The core idea of ​​the algorithm is to introduce key technologies in the multi-objective domain, mainly external archiving mechanisms and Pareto-dominance-based leader selection strategies, while retaining the gray wolf algorithm's simulation of the social hierarchy and hunting mechanism of gray wolves. This enables the simultaneous optimization of multiple conflicting objectives.

[0050] Step S41: The algorithm initializes a random population and an empty outer archive. In each iteration, it evaluates multiple objective values ​​for each individual in the population. It updates the outer archive with newly generated non-dominated solutions and manages its capacity. It selects α, β, and δ leaders from the outer archive using a roulette wheel selection method based on crowding distance.

[0051] Step S42: Update the position of the entire population based on the leader's position. Repeat this process until the termination condition of the maximum number of iterations is met, and find a set of Pareto optimal solutions representing the best trade-off. Formulate a day-ahead scheduling plan based on the optimal solution, determine the charging and discharging plans for electric vehicles and energy storage, and calculate the day-ahead scheduling microgrid operating cost. The electric vehicle charging and discharging power update formulas are shown in equations (11)-(14), and the electric vehicle charging and discharging power update formula is shown in equation (15).

[0052] (10) (11) (12) ; (13) (14) (15) In the formula The distance between the gray wolf and its prey; , This is a dynamically adjusted coefficient vector; Let this be the gray wolf's position vector; This is the position of the current optimal solution. , , The optimal, suboptimal, and third-optimal solutions for the charging and discharging power of electric vehicles are obtained using the Grey Wolf algorithm. , , The optimal, suboptimal, and third-optimal solutions for energy storage charging and discharging power are obtained using the Grey Wolf algorithm. , Electric vehicle charging and discharging power The optimal solution sought by the wolf.

[0053] ; (16) In the formula, The convergence factor of the algorithm. , It is a random vector. This represents the number of algorithm iterations.

[0054] S5. Divide the day into k For a given time period, based on the day-ahead scheduling optimization results, an intraday scheduling optimization model is constructed with the objectives of minimizing total cost and maintaining stable main network interaction power. The objective function of the intraday scheduling optimization model is: ;in, , , As the weight of the intraday scheduling target, For the current time step, To predict the time step forward, For relative to the first k The deviation of the day-ahead scheduling optimization results for each segment. C grid ( t )for t The cost of purchasing and selling electricity from the grid at any given time. For the cost of photovoltaic power generation, C BA ( t )for t The maintenance cost of energy storage batteries at all times. The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the average daily power purchase by the power grid.

[0055] S6. Before the start of each time period, acquire real-time photovoltaic output data, load data, electric vehicle connection status and electric vehicle SOC, and use the multi-objective gray wolf optimization algorithm to perform rolling optimization solution on the intraday scheduling optimization model to obtain the intraday scheduling optimization results for each time period.

[0056] In this embodiment, based on the day-ahead scheduling plan, combined with short-term forecasts and real-time data, the day is divided into 96 15-minute time periods on a shorter time scale and executed in a rolling manner. The day-ahead scheduling optimization results are then finely adjusted to obtain the optimized intraday scheduling plan.

[0057] At the beginning of each period, since the photovoltaic output and load in the day-ahead scheduling optimization results will inevitably deviate from the actual values, the latest short-term photovoltaic output and load forecasts, as well as the real-time connection status and SOC of electric vehicles, are used as a reference. The optimization variable is the adjustment amount relative to the day-ahead scheduling optimization results, and a penalty cost is assigned to the adjustment amount to avoid excessive deviation from the day-ahead plan. The intraday scheduling objective function is shown in equation (17). ; (17) ; (18) In the formula , , As the weight of the intraday scheduling target, For the current time step, To predict the time step forward, This represents the deviation from the current day's plan. This represents the average daily power purchase by the power grid. This represents the adjustment amount of the scheduling plan for adjacent time periods. , Let k and (k-1) be the system power state vectors for the scheduling periods. , For the energy storage charging and discharging power during the k-th and k-1th scheduling periods, , For the photovoltaic power output during the k-th and k-1th scheduling periods, , For the charging and discharging power of electric vehicles in the k-th and k-1th scheduling periods, , This represents the main network interaction power during the k-th and k-1th scheduling periods.

[0058] The core objective of intraday scheduling is to minimize the total system operating cost and maintain stable power interaction with the main grid, with constraints consistent with day-ahead scheduling. Intraday optimization employs Model Predictive Control (MPC) to re-optimize the scheduling plan for the next eight time periods. Specifically, MPC predicts eight time steps forward, each 15 minutes, providing sufficient future information for optimization decisions. Real-time rolling optimization uses the current state as initial values, collecting real-time output data from photovoltaic (PV), energy storage, and electric vehicles, as well as measurements of energy storage SOC and load power. This data, combined with short-term forecasts of PV and load power for the next seven steps, forms the input to the intraday scheduling model. The Grey Wolf algorithm is then used to solve the optimization problem, formulating the output plan for PV, energy storage, and charging piles for the next two hours.

[0059] In actual implementation, the day-ahead scheduling optimization results are also divided into kAfter a certain time period, the daily output plan for each step is obtained. The daily output plan for the current step, real-time data (including real-time PV output data, load data, electric vehicle connection status, and electric vehicle SOC), and forecast information (directly acquired existing short-term PV and load power forecast data) are input into the intraday scheduling optimization model to obtain the output plan for the current step. Only the output plan for the current step is issued as an instruction to each unit controller for execution. Upon reaching the next time step, the system again calls the intraday planning module to collect updated real-time data and forecast information, generating a new round of intraday plans, achieving rolling optimization. After 10 PM, cross-day scheduling is involved; the intraday planning module needs to read the next day's daily scheduling scheme and corresponding power forecast curve. The intraday model runs in a 15-minute cycle, and in the next rolling cycle, it readjusts the PV and load deviations, cycling through 96 time periods from 0 AM to 12 AM to obtain a complete intraday scheduling scheme. Through this mechanism, intraday optimization can respond promptly to system changes and uncertainties, obtaining the optimal adjustment instructions for each unit.

[0060] This embodiment presents a microgrid day-to-day multi-timescale optimal scheduling method that considers the flexibility of electric vehicles, a method not previously found in research. Please refer to... Figure 3 This method considers the economic efficiency and stability of a photovoltaic-storage-charging microgrid with electric vehicle participation, while meeting the base load and electric vehicle charging demands of the microgrid system. A day-ahead scheduling model is established based on forecast data, with the optimization objectives of minimizing the microgrid's operating cost and the minimum standard deviation of tie-line power. An intraday optimization scheduling model is built upon the results of the day-ahead model, performing rolling optimization based on short-term forecast data for photovoltaics and loads. This adjusts the charging and discharging power of electric vehicles and energy storage, as well as the grid interaction power, on a short timescale to meet the optimization objectives while improving the photovoltaic absorption rate.

[0061] This embodiment can also be implemented in the form of a device, specifically as follows: Figure 4 As shown.

[0062] To demonstrate the effectiveness of this embodiment, a specific experiment was conducted. This experiment focused on the day-ahead-intraday optimized scheduling of a photovoltaic-storage-charging microgrid. Figures 5 to 9 Here is a rendering of the design. Figure 5 and Figure 6 The image shows the error curves for photovoltaic and load forecasting. From... Figure 7It can be seen that under the optimized algorithm, the charging time of electric vehicles is concentrated between 0:00 and 7:00 AM, charging electric vehicles connected to the grid during the low electricity price period; during the evening peak electricity consumption period, electric vehicles are in a discharging state, reducing the overall load fluctuation of the power grid. There is a slight deviation between the daily electric vehicle power and the previous day's power, originating from the actual daily electric vehicle grid connection and disconnection time and the error between the SOC and the previous day's prediction. The optimized electric vehicles complete the task of peak shaving and valley filling by discharging during peak electricity price periods and charging during off-peak electricity price periods, thus reducing the charging and discharging costs of electric vehicles. Figure 8 Energy storage charges the solar power system during the day when solar power output is high, and discharges in conjunction with electric vehicles during peak electricity consumption periods at night to alleviate grid pressure, reduce the amount of electricity purchased from the grid, and lower the cost of purchasing electricity from the grid. Figure 9 Comparing the day-to-day mainnet interaction power, the day-to-day optimized scheduling plan and the intraday scheduling plan show the same overall trend, with no significant deviation within a suitable range.

[0063] from Figure 10 and Figure 11 As can be seen, the day-ahead and intraday optimized scheduling strategy for microgrids can meet the basic load and electric vehicle charging needs of the microgrid system. By introducing an intraday adjustment mechanism into the scheduling framework, and using rolling optimization to compensate for the shortcomings of the day-ahead plan, it achieves coordinated optimization between the day-ahead and intraday phases. This better adapts to the uncertainties of electric vehicle charging and discharging and the prediction errors of photovoltaics and loads, promotes photovoltaic absorption, reduces microgrid operating costs, and improves the system's economy and reliability.

[0064] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 12 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a multi-timescale optimal scheduling method for microgrids that considers the flexibility of electric vehicles.

[0065] Those skilled in the art will understand that Figure 12The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0066] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0067] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0068] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0070] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0071] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0072] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0073] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A multi-time-scale optimal scheduling method for microgrids considering the flexibility of electric vehicles, characterized in that, include: Based on the Monte Carlo method, taking advantage of the fact that the entry / exit time of electric vehicles follows a normal distribution, the probability density function of the entry / exit time of electric vehicles is fitted to construct an electric vehicle model; Based on the output characteristics of photovoltaic units, the charging and discharging efficiency of energy storage battery units, and the charging and discharging characteristics of electric vehicles, a microgrid system output model is constructed; the microgrid system output model includes: a photovoltaic unit output characteristic model, an energy storage battery unit output characteristic model, and an electric vehicle unit output characteristic model; Based on the microgrid system output model and the electric vehicle model, an objective function and model constraints are constructed with the minimum operating cost of the microgrid and the minimum standard deviation of tie-line power as optimization objectives, resulting in a day-ahead dispatch optimization model. The model constraints include microgrid constraints, energy storage battery constraints, and electric vehicle constraints. The microgrid constraints include microgrid power balance constraints; the energy storage battery constraints include energy storage battery charge / discharge power and energy storage battery SOC constraints; and the electric vehicle constraints include electric vehicle charge / discharge state, electric vehicle power, and electric vehicle SOC constraints. The day-ahead scheduling optimization model is solved using the multi-objective gray wolf optimization algorithm to obtain the day-ahead scheduling optimization results; the day-ahead scheduling optimization results include: the charging power plan for electric vehicles and energy storage batteries for the next day; Divide a day into k For a given time period, based on the day-ahead scheduling optimization results, an intraday scheduling optimization model is constructed with the objectives of minimizing total cost and maintaining stable main network interaction power. The objective function of the intraday scheduling optimization model is: ;in, , , As the weight of the intraday scheduling target, For the current time step, To predict the time step forward, For relative to the first k The deviation of the day-ahead scheduling optimization results for each segment. C grid ( t )for t The cost of purchasing and selling electricity from the grid at any given time. For the cost of photovoltaic power generation, C BA ( t )for t The maintenance cost of energy storage batteries at all times. The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the average daily power purchase by the power grid. Before the start of each time period, real-time photovoltaic power output data, load data, electric vehicle connection status and electric vehicle SOC are acquired. The intraday scheduling optimization model is then solved using a multi-objective gray wolf optimization algorithm to obtain the intraday scheduling optimization results for each time period.

2. The microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles according to claim 1, characterized in that, The electric vehicle model includes: ; ; in, f s ( i Let be the probability density function of the time when an electric vehicle enters the grid. f e ( y Let be the probability density function of the off-grid time of electric vehicles. y represents the time when the electric vehicle enters the grid, and y represents the time when the electric vehicle leaves the grid. The expected value at the time of network access. The variance of the network entry time. Let be the expected value at the time of disconnection. This represents the variance of the time spent offline.

3. The microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles according to claim 1, characterized in that, The photovoltaic unit output characteristic model is as follows: ; in, Photovoltaic power generation capacity, For the conversion efficiency of photovoltaic systems, For the area of ​​the photovoltaic array, Light intensity, The power-temperature conversion factor of the photovoltaic panel. The current ambient temperature of the photovoltaic array. Standard values ​​for measuring the surface temperature of photovoltaic panels; The energy storage unit output characteristic model is as follows: ; in, For energy storage battery capacity, P BA ( t ( ) represents the energy storage charging and discharging power at time t. SOC BA ( t )for t The state of charge (SOC) of the energy storage unit at any given time. SOC BA ( t -1) is t The state of charge (SOC) of the energy storage unit at time -1. , To improve the discharge and charging efficiency of energy storage batteries; The electric vehicle unit output characteristic model is as follows: ; in, SOC ( t )for t Electric vehicle unit SOC at any time SOC ( t -1) is t The state of charge (SOC) of the electric vehicle unit at time -1. , To improve the discharge and charging efficiency of electric vehicles. Let the charging power of the nth electric vehicle at time t be... Let be the discharge power of the nth electric vehicle at time t. This refers to the battery capacity of electric vehicles.

4. The microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles according to claim 1, characterized in that, The objective function of the day-ahead scheduling optimization model is: ; In the formula, The objective function is the microgrid operating cost function. The objective function is the standard deviation of tie-line power. To reduce the maintenance costs of energy storage batteries, For the cost of photovoltaic power generation, For the cost of purchasing and selling electricity to the power grid, The total cost of electric vehicle batteries, Let t be the power purchased by the power grid. This represents the total number of time periods. This represents the average power purchased by the power grid. The model constraints of the day-ahead scheduling optimization model include: ; In the formula, , This represents the minimum and maximum charge / discharge power of the energy storage battery. Let SOC be the stored energy value at time t; , The upper and lower limits of the energy storage SOC; , The charging and discharging status of the electric vehicle at time t; Let be the charge of the nth electric vehicle at time t; , These represent the minimum and maximum SOC values ​​for electric vehicles. The SOC value of the electric vehicle when it is off-grid. This represents the expected SOC value of the electric vehicle when it is off-grid. P BA ( t () represents the energy storage charging and discharging power at time t; P EV ( t Let t be the total charging and discharging power of the electric vehicle at time t; P PV ( t Let t be the photovoltaic output power at time t; P load ( t Let t be the power of the power grid at time t; , These are the maximum charging and discharging power of electric vehicles; , Let be the charging and discharging power of the nth electric vehicle at time t.

5. The microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles according to claim 4, characterized in that, The formulas for calculating each cost in the objective function of the day-ahead scheduling optimization model include: ; In the formula, This refers to the maintenance factor of the energy storage battery. This represents the cost coefficient for photovoltaic power generation. , Let t be the power purchased or sold to the power grid at time t; The total charging and discharging cost of electric vehicles; N represents the total cost of battery degradation for electric vehicles; N is the number of electric vehicles. The electricity purchase price at time t; Let t be the electricity price at time t, and n be the current electric vehicle number. This represents the battery loss coefficient for electric vehicles.

6. The microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles according to claim 1, characterized in that, Compared to the first k The formula for calculating the deviation of the day-ahead scheduling optimization results for each segment is: ; In the formula, This refers to the adjustment amount of the scheduling plan for adjacent time periods; , This represents the system power state vector for the k-th and (k-1)-th scheduling periods; , The energy storage charging and discharging power during the k-th and k-1th scheduling periods; , The photovoltaic power output during the k-th and k-1th scheduling periods; , The charging and discharging power of electric vehicles during the k-th and k-1th scheduling periods; , This represents the main network interaction power during the k-th and k-1th scheduling periods.

7. The microgrid multi-time-scale optimal scheduling method considering the flexibility of electric vehicles according to claim 1, characterized in that, Divide a day into k The time period specifically includes dividing the day into 96 time periods.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the microgrid multi-timescale optimal scheduling method considering the flexibility of electric vehicles as described in any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the microgrid multi-timescale optimal scheduling method that takes into account the flexibility of electric vehicles, as described in any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the microgrid multi-timescale optimal scheduling method that takes into account the flexibility of electric vehicles, as described in any one of claims 1-7.