Electric vehicle-containing micro-grid optimization scheduling method considering dynamic electricity price
EV charging load is predicted by kernel density estimation and Latin hypercube sampling technology. Combined with dynamic electricity price mechanism and optimization model, the randomness and uncertainty of electric vehicle charging behavior are solved, and efficient scheduling and load optimization of electric vehicles in microgrids are achieved.
Patent Information
- Application Number
- CN202510838359.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies are unable to accurately characterize the randomness and uncertainty of electric vehicle charging behavior. The traditional time-of-use electricity price mechanism cannot match users' electricity usage habits and the dynamic changes in electricity supply and demand, resulting in a deviation between price signals and actual load demand, affecting the EV regulation effect.
The kernel density estimation method and Latin hypercube sampling technology are used to predict EV charging load. Combined with the EV charging and discharging price update mechanism and user willingness, a dynamic electricity price mechanism is constructed. The charging and discharging plan of electric vehicles is formulated through the optimization model to guide them to arrange charging and discharging behavior reasonably.
It improves the accuracy of electric vehicle charging behavior prediction, optimizes the electricity price mechanism, realizes peak shaving and valley filling, reduces the peak-valley difference of load, and improves the operation economy and safety of microgrids.
Smart Images

Figure CN120728678A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of microgrid optimization and scheduling, and in particular relates to a method for optimizing and scheduling a microgrid containing electric vehicles taking into account dynamic electricity prices. Background Art
[0002] With the implementation of my country's "dual carbon" goals, the installed capacity and power generation of renewable energy sources such as wind power and photovoltaics have continuously set new records. Simultaneously, the large-scale integration of electric vehicles (EVs) into the power grid has become an inevitable trend. For microgrids, coordinating the charging and discharging behavior of EVs within them can effectively absorb local renewable resources and reduce wind and solar curtailment. This not only improves the utilization rate of renewable energy within the microgrid but also reduces the cost of electric vehicle users. Currently, there is an urgent need to accurately characterize EV charging behavior, formulate reasonable electricity pricing mechanisms that consider the fluctuating characteristics of load within the microgrid and the responsiveness of EVs, and, based on this, design optimal scheduling methods for microgrids involving EVs.
[0003] Currently, most estimates of EV charging behavior rely on traditional parameter estimation methods to construct probabilistic models of EV charging behavior. However, these methods typically require the pre-determination of specific probability density distribution functions. Electric vehicle charging behavior is affected by a variety of uncertain factors and exhibits strong randomness and uncertainty, making it difficult to accurately characterize using specific probability distribution functions. Consequently, this model fails to fully reflect the actual characteristics of EV charging behavior. Furthermore, EV pricing strategies based on time-of-use electricity prices also have limitations. Traditional time-of-use pricing mechanisms typically employ fixed time divisions, making it difficult to align user electricity usage habits with the dynamics of electricity supply and demand. While traditional multi-period dynamic electricity pricing optimizes the frequency of time divisions, it fails to fully consider the changing characteristics of microgrid load demand, making it difficult to accurately reflect microgrid load changes. This leads to deviations between price signals and actual load demand, impacting EV regulation effectiveness.
[0004] It can be seen that a reasonable dynamic electricity price update mechanism needs to be formulated to guide EVs to actively participate in peak shaving and valley filling. Summary of the Invention
[0005] In view of the above-mentioned shortcomings of the existing technology, the present invention proposes a method for optimizing the scheduling of microgrids containing electric vehicles, taking into account dynamic electricity prices. This method fully considers factors such as load randomness and user willingness, formulates a dynamic electricity price update mechanism, and provides important technical support for promoting the development of microgrids with a high proportion of renewable energy. The technical solution designed by the present invention includes the following steps:
[0006] S10: Obtain the original data of EVs in the microgrid and use kernel density estimation and Latin hypercube sampling techniques to predict EV charging load;
[0007] S20: Generate microgrid dispatch scenarios using Latin hypercube sampling and k-means++ clustering methods;
[0008] S30: Establish an EV charging and discharging price update mechanism and determine the EV interaction model based on user willingness and charging urgency indicators;
[0009] S40: Construct and solve an optimization model with the goal of minimizing the economic cost of electric vehicles and the variance of microgrid loads to obtain the charging and discharging plan of electric vehicles;
[0010] S50: Based on the latest charging and discharging plan of electric vehicles, the load data is updated, and the optimal dispatching model of the microgrid is solved to obtain the energy storage charging and discharging power and the power purchase and sales power of the microgrid.
[0011] Preferably, the S10 includes:
[0012] The original data of the starting charging SOC and starting charging time of EVs in the microgrid are obtained. The kernel density estimation method is used to fit the original data to output a probability density function. The probability density function is then sampled using Latin hypercube to obtain the starting charging SOC and starting charging time data of N EVs. The initial charging load curve of EVs within a day in the microgrid is output by superimposing them.
[0013] Preferably, the kernel density estimation method is used to fit the original data to output a probability density function, and the formula is as follows:
[0014]
[0015] Where, is the probability density function, x i is the ith measured data of a characteristic variable of electric vehicle charging behavior, and the variable has a domain [a, b], n is the sample size, and K(D) is the kernel function, h is the bandwidth, h>0, K h is the kernel function with bandwidth h.
[0016] Preferably, the superimposed output microgrid's initial charging load curve for EVs within a day includes:
[0017] The required charging amount is calculated based on the starting charging SOC and expected SOC of the nth EV, and the required charging time T of the nth EV is calculated based on the slow charging pile power. n , calculate the charging end time of the nth EV The initial charging load curve of the EV is obtained, and the output is repeated until N EVs are calculated. The charging load curves of all EVs are superimposed to obtain the initial charging load curve of EVs in the microgrid within one day.
[0018] Preferably, the EV charging and discharging electricity price update mechanism in S30 includes:
[0019] The EV charging price is composed of the time-of-use electricity price plus the EV charging service fee, and the EV discharging price is composed of the time-of-use electricity price combined with the EV discharging incentive price;
[0020] The EV charging service fee is dynamically adjusted based on the load demand and load peak and valley values of the microgrid at each time period. The formula is as follows:
[0021]
[0022] Where, is the charging service fee for EV in period t, Basic charging service fee for EV, is the charging service fee adjustment coefficient for period t, P t load is the load demand of the microgrid during period t, which is the superposition of the base load and charging load. and are the maximum and minimum values of the microgrid load demand, respectively;
[0023] The EV discharge incentive electricity price is related to the load demand and load average of the microgrid in each period, and the formula is as follows:
[0024]
[0025] Where, is the discharge incentive electricity price of EV in period t, is the basic discharge incentive electricity price of EV, which remains constant in each period. is the discharge incentive price adjustment coefficient for period t, is the average load of the microgrid on that day.
[0026] Preferably, the EV charging and discharging electricity price in each time period in the output microgrid in S30 is calculated as follows:
[0027]
[0028] Where, and are the charging and discharging electricity prices of EV in period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.
[0029] Preferably, the classification of EV types in S30 includes:
[0030] EV types are divided into passive EV users, neutral EV users and active EV users.
[0031] Preferably, the classification of EV types in S30 further includes:
[0032] For active EV users, an EV charging urgency index is introduced to quantify the charging urgency of active EVs. It reflects the remaining adjustable time and charging demand of each active EV in each time period. The formula is as follows:
[0033]
[0034] Where U n,j is the charging urgency index of the nth EV in period j, α and β are the weight coefficients corresponding to the remaining adjustable time and the remaining charging demand, respectively. and are the time when the nth EV enters and leaves the grid, is the SOC of the nth EV in period j-1, is the expected SOC of the nth EV, This is the lower limit of the EV battery state of charge.
[0035] Preferably, the construction of the optimization model in S40 with the goal of minimizing the economic cost of EVs and the variance of microgrid loads includes:
[0036] The objective function is established with the minimum economic cost of EV users as the optimization goal. The formula is as follows:
[0037]
[0038] Where, f ev is the economic cost of all EV users in the microgrid, J is the total time period during which EV participates in regulation in a day, and are the charging cost and discharging benefit of the nth EV in period j, is the battery loss cost of the nth EV in period j, and are the charging power and discharging power of the nth EV in period j, is the linear relationship coefficient between the lithium battery life of the nth EV and the number of battery cycles, is the battery capacity of the nth EV, is the battery purchase cost of the nth EV;
[0039] The objective function with the minimum microgrid load variance as the optimization goal is established, and the formula is as follows:
[0040]
[0041] Where, is the basic load in the microgrid during period j, P av is the average load power;
[0042] The objective function of minimizing the EV economic cost and microgrid load variance is established, and the formula is as follows:
[0043]
[0044] Where w1 and w2 are the weight coefficients of each optimization objective, w i ≥0, and are the ideal optimal values of the corresponding objective functions.
[0045] Preferably, the microgrid day-ahead optimization scheduling model constructed in S50 with the goal of minimizing the microgrid operation cost is formulated as follows:
[0046]
[0047] Where, f t bat is the charge and discharge loss cost of the battery energy storage device, f t grid is the cost of electricity purchase and sale from the microgrid to the distribution network, P t ch and P t dis are the charging and discharging power of the battery energy storage during period t, a ch 、b ch and c ch are the quadratic term, linear term and constant term coefficients of the battery energy storage charging cost function, respectively. dis 、b dis and c dis are the quadratic term, linear term and constant term coefficients of the battery energy storage discharge cost function, P t buy and P t sell are the power purchased and sold by the microgrid to the distribution network during period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.
[0048] Beneficial effects:
[0049] 1. This application addresses the problem that traditional parameterized probability distribution models are difficult to accurately characterize the characteristics of electric vehicle charging behavior. It uses the kernel density estimation method to construct a probability distribution model of electric vehicle charging behavior, and combines it with the Latin hypercube sampling algorithm to calculate and generate the electric vehicle charging load, thereby improving the accuracy of the prediction.
[0050] 2. This application fully considers user wishes and introduces an EV charging urgency index to quantify the charging urgency of active EVs. Based on the charging urgency index, different charging and discharging control mechanisms are formulated for active EVs. This can not only effectively control the discharge depth of EV batteries and delay battery aging, but also avoid the impact of insufficient power on users' sudden travel needs, which is more in line with actual application needs.
[0051] 3. This application constructs a dynamic update mechanism for EV charging and discharging electricity prices based on the peak and valley time-of-use electricity prices of the power grid. Although traditional multi-period dynamic electricity prices take load characteristics into account, they lack flexibility in adjustment when the net load curve changes due to the large-scale grid connection of distributed energy. The electricity price update mechanism proposed in this application dynamically adjusts the load demand and load peak and valley values of the microgrid in each period, which can more accurately reflect and characterize the load changes of the microgrid. This strategy aims to guide electric vehicle users to reasonably arrange charging and discharging behaviors, achieve peak shaving and valley filling, reduce the peak-valley difference of load, and improve the economy and safety of microgrid operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flow chart of a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0053] The embodiments of the present invention are described in detail below. The following embodiments are implemented based on the technical solutions of the present invention, and provide detailed implementation methods and specific operating procedures. However, the protection scope of the present invention is not limited to the following embodiments.
[0054] The present invention designs a method for optimizing the dispatch of microgrids containing electric vehicles taking into account dynamic electricity prices. The technical solution includes the following steps: Figure 1 As shown, specifically including:
[0055] S10: Obtain the original data of EVs in the microgrid and use kernel density estimation and Latin hypercube sampling techniques to predict EV charging load;
[0056] S20: Generate microgrid dispatch scenarios using Latin hypercube sampling and k-means++ clustering methods;
[0057] S30: Establish an EV charging and discharging price update mechanism and determine the EV interaction model based on user willingness and charging urgency indicators;
[0058] S40: Construct and solve an optimization model with the goal of minimizing the economic cost of electric vehicles and the variance of microgrid loads to obtain the charging and discharging plan of electric vehicles;
[0059] S50: Based on the latest charging and discharging plan of electric vehicles, the load data is updated, and the optimal dispatching model of the microgrid is solved to obtain the energy storage charging and discharging power and the power purchase and sales power of the microgrid.
[0060] Preferably, S10 includes:
[0061] The original data of the starting charging SOC and starting charging time of EVs in the microgrid are obtained. The kernel density estimation method is used to fit the original data to output a probability density function. The probability density function is then sampled using Latin hypercube to obtain the starting charging SOC and starting charging time data of N EVs. The initial charging load curve of EVs within a day in the microgrid is output by superimposing them.
[0062] Preferably, the kernel density estimation method is used to fit the original data to output the probability density function, and the formula is as follows:
[0063]
[0064] Where, is the probability density function, x i is the ith measured data of a characteristic variable of electric vehicle charging behavior, and the variable has a domain [a, b], n is the sample size, and K(D) is the kernel function, h is the bandwidth, h>0, K h is the kernel function with bandwidth h.
[0065] Preferably, the initial charging load curve of the EV in one day of the superimposed output microgrid includes:
[0066] The required charging amount is calculated based on the starting charging SOC and expected SOC of the nth EV, and the required charging time T of the nth EV is calculated based on the slow charging pile power. n , calculate the charging end time of the nth EV The initial charging load curve of the EV is obtained, and the output is repeated until N EVs are calculated. The charging load curves of all EVs are superimposed to obtain the initial charging load curve of EVs in the microgrid within one day.
[0067] Specifically, for S10, T n The calculation formula is:
[0068]
[0069] Where, and are the expected SOC and starting charging SOC of the nth EV respectively; is the battery capacity of the nth EV; and They are EV charging power and charging efficiency respectively.
[0070] In addition, for S20, the prediction error is considered to generate the dispatch scenario, the wind power output, photovoltaic output and basic load in the microgrid are modeled, and the actual value of the wind and photovoltaic load is expressed as the sum of the predicted value and the corresponding prediction error value. The formula is as follows:
[0071]
[0072] Where, and are the actual values of wind power output, photovoltaic output and base load in period t respectively; and are the predicted values of wind power output, photovoltaic output and base load in period t respectively; Δξ t wt 、 and are the prediction errors of wind power output, photovoltaic output and base load in period t respectively.
[0073] Among them, the normal distribution of the photovoltaic output and base load forecast error Δξ can be expressed as:
[0074]
[0075] Where σ and μ are the standard deviation and mean of the normal distribution respectively; σ 2 is the variance of the normal distribution;
[0076] In addition, the Beta distribution of wind power output forecast error can be expressed as:
[0077] f(Δξ)=N d ·Δξ α-1 (1-Δξ) β-1
[0078] In the formula, N d is the normalization factor; α and β are the shape parameters of the Beta distribution, which are used to control the shape of the distribution.
[0079] Furthermore, based on the aforementioned probability distribution model for wind power, PV output, and load forecast errors, a Latin hypercube sampling method was used to generate multiple scenarios to characterize source-load uncertainty. The K-means++ clustering algorithm was then used to reduce the scenarios, obtaining representative scenarios for wind power output, PV output, and baseload, along with their corresponding scenario probabilities. These scenarios were then weighted and summed, ultimately yielding wind power and PV output curves and baseload operating curves, which served as input data for the subsequent optimization scheduling model.
[0080] Preferably, the EV charging and discharging electricity price update mechanism in S30 includes:
[0081] The EV charging price is composed of the time-of-use electricity price plus the EV charging service fee, and the EV discharging price is composed of the time-of-use electricity price combined with the EV discharging incentive price;
[0082] The EV charging service fee is dynamically adjusted based on the load demand and load peak and valley values of the microgrid at each time period. The formula is as follows:
[0083]
[0084] Where, is the charging service fee for EV in period t, Basic charging service fee for EV, is the charging service fee adjustment coefficient for period t, P t load is the load demand of the microgrid during period t, which is the superposition of the base load and charging load. and are the maximum and minimum values of the microgrid load demand, respectively;
[0085] The EV discharge incentive price is related to the load demand and load average of the microgrid in each period. The formula is as follows:
[0086]
[0087] Where, is the discharge incentive electricity price of EV in period t, is the basic discharge incentive electricity price of EV, which remains constant in each period. is the discharge incentive price adjustment coefficient for period t, is the average load of the microgrid on that day.
[0088] Preferably, the EV charging and discharging electricity price in each time period in the output microgrid in S30 is as follows:
[0089]
[0090] Where, and are the charging and discharging electricity prices of EV in period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.
[0091] Preferably, the classification of EV types in S30 includes:
[0092] EV types are divided into passive EV users, neutral EV users and active EV users.
[0093] Preferably, the classification of EV types in S30 further includes:
[0094] For active EV users, an EV charging urgency index is introduced to quantify the charging urgency of active EVs. It reflects the remaining adjustable time and charging demand of each active EV in each time period. The formula is as follows:
[0095]
[0096] Where U n,j is the charging urgency index of the nth EV in period j, α and β are the weight coefficients corresponding to the remaining adjustable time and the remaining charging demand, respectively. and are the time when the nth EV enters and leaves the grid, is the SOC of the nth EV in period j-1, is the expected SOC of the nth EV, This is the lower limit of the EV battery state of charge.
[0097] Specifically, for S30, to reflect the diverse characteristics of EV users, considering their sensitivity to electricity prices and differences in charging behavior, they are divided into the following three types:
[0098] (i) Passive EV users:
[0099] Passive EV users are less sensitive to changes in electricity prices, have strong charging requirements, and are more inclined to maintain their original charging plans. After connecting to the microgrid, these EV users maintain their original disorderly charging plans and do not discharge into the system.
[0100] (ii) Neutral EV users:
[0101] Neutral EV users have a certain degree of time flexibility in their charging behavior. Without affecting their basic charging needs, they are willing to respond to the microgrid's dispatch instructions within an acceptable time range, but do not participate in the system's V2G discharge service.
[0102] (iii) Active EV users:
[0103] Active EV users have a strong price-responsiveness, are sensitive to electricity prices, and are willing to actively participate in the orderly charging and discharging control of the microgrid. These EV users can use V2G technology to provide reverse power supply services when needed, assisting the microgrid in peak load shifting and valley filling, thereby gaining additional economic benefits. Furthermore, to prevent these active EV users from excessively participating in V2G discharge services and thus affecting their travel needs, this paper introduces an EV charging urgency index to quantify the charging urgency of active EVs. The EV charging urgency index comprehensively reflects the remaining controllable time and charging demand of each active EV in each time period.
[0104] Preferably, the construction of the optimization model in S40 with the goal of minimizing the economic cost of EVs and the variance of microgrid loads includes:
[0105] The objective function is established with the minimum economic cost of EV users as the optimization goal. The formula is as follows:
[0106]
[0107] Where, f ev is the economic cost of all EV users in the microgrid, J is the total time period during which EV participates in regulation in a day, and are the charging cost and discharging benefit of the nth EV in period j, is the battery loss cost of the nth EV in period j, and are the charging power and discharging power of the nth EV in period j, is the linear relationship coefficient between the lithium battery life of the nth EV and the number of battery cycles, is the battery capacity of the nth EV, is the battery purchase cost of the nth EV;
[0108] The objective function with the minimum microgrid load variance as the optimization goal is established, and the formula is as follows:
[0109]
[0110]
[0111] Where, is the basic load in the microgrid during period j, P av is the average load power;
[0112] The objective function of minimizing the EV economic cost and microgrid load variance is established, and the formula is as follows:
[0113]
[0114] Where w1 and w2 are the weight coefficients of each optimization objective, w i ≥0, and are the ideal optimal values of the corresponding objective functions.
[0115] Specifically, for S40, is the base load of the microgrid during period j, which is obtained by converting the hourly base load data predicted a day ago into a 15-minute time scale. w1 and w2 are the weight coefficients of each optimization objective, and their values reflect the importance and priority of the corresponding optimization objective. and are the ideal optimal values of the corresponding objective functions, which are used to normalize the corresponding optimization objectives.
[0116] In addition, for the objective function of minimizing the EV economic cost and microgrid load variance, the constraints are as follows:
[0117] (i) Schedulable time constraints:
[0118]
[0119] (ii) Charge and discharge state variable constraints:
[0120]
[0121] Where, and are the charging and discharging states of the nth EV in period j, respectively, and are 0-1 variables. When , it means that the nth EV is in the charging state during the jth period, and when it is 0, it means that it is not in the charging state; Same thing.
[0122] (iii) Charge and discharge power upper and lower limit constraints:
[0123]
[0124] Where, P n char,max and They represent the maximum charging and discharging power of the nth EV respectively.
[0125] (iv) Battery SOC upper and lower limit constraints:
[0126]
[0127] Where, Update the expression for the EV battery's state of charge, and They are the upper and lower limits of the state of charge of the EV battery; is the state of charge of the nth EV in the j-1 period; ε n is the self-discharge rate of the nth EV battery; and are the charging and discharging efficiencies of the nth EV, respectively; Δt is the scheduling time interval of EV; is the rated capacity of the battery of the nth EV.
[0128] (v) Transformer capacity constraints:
[0129]
[0130] Where, is the maximum capacity of the transformer; is the power factor of the transformer.
[0131] Preferably, the microgrid day-ahead optimization scheduling model is constructed in S50 with the goal of minimizing the microgrid operation cost, and the formula is as follows:
[0132]
[0133] Where, f t bat is the charge and discharge loss cost of the battery energy storage device, f t grid is the cost of electricity purchase and sale from the microgrid to the distribution network, P t ch and P t dis are the charging and discharging power of the battery energy storage during period t, a ch 、b ch and c ch are the quadratic term, linear term and constant term coefficients of the battery energy storage charging cost function, respectively. dis 、b dis and c dis are the quadratic term, linear term and constant term coefficients of the battery energy storage discharge cost function, P t buy and P t sell are the power purchased and sold by the microgrid to the distribution network during period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.
[0134] Specifically, for S50, the constraints of the microgrid day-ahead optimal dispatch model with the goal of minimizing the microgrid operation cost are as follows:
[0135] (i) Upper and lower limits of battery charge and discharge power:
[0136]
[0137] Where, and are the charging and discharging states of the battery in period t, respectively, which are 0-1 variables; P ch,max and P dis,max Respectively represent the maximum charging power and discharging power of the battery. Formula (27) indicates that the battery cannot be in the charging or discharging state at the same time. When the battery is charging, It means the battery is not in charging state; Same thing.
[0138] (ii) Battery state of charge upper and lower limit constraints:
[0139] SOC min ≤SOC t ≤SOC max
[0140]
[0141] Where, SOC t and SOC t-1 The battery state of charge at time t and time t-1 respectively; SOC min and SOC max are the lower and upper limits of the battery state of charge respectively; ε is the self-discharge rate of the battery; η ch and η dis are the charging and discharging efficiencies of the battery respectively; Δt' is the time interval; E mg is the battery capacity of the battery.
[0142] (iii) Upper and lower limits on power purchase and sales:
[0143]
[0144] Where, and are the electricity purchasing and selling states of the microgrid in period t, which are 0-1 variables; P buy,max and P sell,max are the upper limits of the power purchase and sales of the microgrid to the distribution network respectively; Formula (31) indicates that it cannot be in the state of purchasing or selling power at the same time. When the microgrid purchases electricity from the distribution network, It means not purchasing electricity from the distribution network; Same thing.
[0145] (iv) Microgrid power balance constraints:
[0146] P t wt +P t pv +P t dis +P t buy =P t ch +P t sell +P t load
[0147] Where, P t wtand P t pv They are the wind power output and photovoltaic output in the microgrid respectively.
[0148] The above describes in detail the preferred embodiments of the present invention. It should be understood that numerous modifications and variations based on the concepts of the present invention are possible by those skilled in the art without inventive effort. Therefore, any technical solution that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A method for optimizing the scheduling of a microgrid containing electric vehicles taking into account dynamic electricity prices, characterized in that: include: S10: Obtain the original data of EVs in the microgrid and use kernel density estimation and Latin hypercube sampling techniques to predict EV charging load; S20: Generate microgrid dispatch scenarios using Latin hypercube sampling and k-means++ clustering methods; S30: Establish an EV charging and discharging price update mechanism and determine the EV interaction model based on user willingness and charging urgency indicators; S40: Construct and solve an optimization model with the goal of minimizing the economic cost of electric vehicles and the variance of microgrid loads to obtain the charging and discharging plan of electric vehicles; S50: Based on the latest charging and discharging plan of electric vehicles, the load data is updated, and the optimal dispatching model of the microgrid is solved to obtain the energy storage charging and discharging power and the power purchase and sales power of the microgrid.
2. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The S10 includes: The original data of the starting charging SOC and starting charging time of EVs in the microgrid are obtained. The kernel density estimation method is used to fit the original data to output a probability density function. The probability density function is then sampled using Latin hypercube to obtain the starting charging SOC and starting charging time data of N EVs. The initial charging load curve of EVs within a day in the microgrid is output by superimposing them.
3. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 2, characterized in that: The kernel density estimation method is used to fit the original data to output the probability density function, and the formula is as follows: Where, is the probability density function, x i is the ith measured data of a characteristic variable of electric vehicle charging behavior, and the variable has a domain [a, b], n is the sample size, and K(D) is the kernel function, h is the bandwidth, h>0, K h is the kernel function with bandwidth h.
4. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 2, characterized in that: The superimposed output microgrid's initial charging load curve for EVs within a day includes: The required charging amount is calculated based on the starting charging SOC and expected SOC of the nth EV, and the required charging time T of the nth EV is calculated based on the slow charging pile power. n , calculate the charging end time of the nth EV The initial charging load curve of the EV is obtained, and the output is repeated until N EVs are calculated. The charging load curves of all EVs are superimposed to obtain the initial charging load curve of EVs in the microgrid within one day.
5. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The EV charging and discharging electricity price update mechanism in S30 includes: The EV charging price is composed of the time-of-use electricity price plus the EV charging service fee, and the EV discharging price is composed of the time-of-use electricity price combined with the EV discharging incentive price; The EV charging service fee is dynamically adjusted based on the load demand and load peak and valley values of the microgrid at each time period. The formula is as follows: Where, is the charging service fee for EV in period t, Basic charging service fee for EV, is the charging service fee adjustment coefficient for period t, P t load is the load demand of the microgrid during period t, which is the superposition of the base load and charging load. and are the maximum and minimum values of the microgrid load demand, respectively; The EV discharge incentive electricity price is related to the load demand and load average of the microgrid in each period, and the formula is as follows: Where, is the discharge incentive electricity price of EV in period t, is the basic discharge incentive electricity price of EV, which remains constant in each period. is the discharge incentive price adjustment coefficient for period t, is the average load of the microgrid on that day.
6. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The EV charging and discharging electricity price in each time period of the output microgrid in S30 is as follows: Where, and are the charging and discharging electricity prices of EV in period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.
7. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The classification of EV types in S30 includes: EV types are divided into passive EV users, neutral EV users and active EV users.
8. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The classification of EV types in S30 further includes: For active EV users, an EV charging urgency index is introduced to quantify the charging urgency of active EVs. It reflects the remaining adjustable time and charging demand of each active EV in each time period. The formula is as follows: Where U n,j is the charging urgency index of the nth EV in period j, α and β are the weight coefficients corresponding to the remaining adjustable time and the remaining charging demand, respectively. and are the time when the nth EV enters and leaves the grid, is the SOC of the nth EV in period j-1, is the expected SOC of the nth EV, This is the lower limit of the EV battery state of charge.
9. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The optimization model constructed in S40 with the goal of minimizing the economic cost of EVs and the variance of microgrid loads includes: The objective function is established with the minimum economic cost of EV users as the optimization goal. The formula is as follows: Where, f ev is the economic cost of all EV users in the microgrid, J is the total time period during which EV participates in regulation in a day, and are the charging cost and discharging benefit of the nth EV in period j, is the battery loss cost of the nth EV in period j, and are the charging power and discharging power of the nth EV in period j, is the linear relationship coefficient between the lithium battery life of the nth EV and the number of battery cycles, is the battery capacity of the nth EV, is the battery purchase cost of the nth EV; The objective function with the minimum microgrid load variance as the optimization goal is established, and the formula is as follows: Where, is the basic load in the microgrid during period j, P av is the average load power; The objective function of minimizing the EV economic cost and microgrid load variance is established, and the formula is as follows: Where w1 and w2 are the weight coefficients of each optimization objective, w i ≥0, and are the ideal optimal values of the corresponding objective functions.
10. The method for optimizing the dispatch of a microgrid containing electric vehicles taking into account dynamic electricity prices according to claim 1, characterized in that: The microgrid day-ahead optimization scheduling model constructed in S50 with the goal of minimizing the microgrid operation cost is as follows: Where, f t bat is the charge and discharge loss cost of the battery energy storage device, f t grid is the cost of electricity purchase and sale from the microgrid to the distribution network, P t ch and P t dis are the charging and discharging power of the battery energy storage during period t, a ch 、b ch and c ch are the quadratic term, linear term and constant term coefficients of the battery energy storage charging cost function, respectively. dis 、b dis and c dis are the quadratic term, linear term and constant term coefficients of the battery energy storage discharge cost function, P t buy and P t sell are the power purchased and sold by the microgrid to the distribution network during period t, and are the electricity purchase and sales prices of the distribution network in period t, respectively.