Hierarchical scheduling method and system for grid connection of new energy and electric vehicles
By improving the fitness function and parameter settings of the genetic algorithm and combining it with error models for new energy and electric vehicles, a two-level scheduling model was established. This solved the problems of untimely and inaccurate scheduling of electric vehicles and new energy grid connection in the power system, and realized fast and accurate grid scheduling and new energy utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID JIANGSU ELECTRIC POWER CO LTD SUZHOU BRANCH
- Filing Date
- 2022-02-08
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, when power systems face the integration of electric vehicles and new energy sources, centralized control is prone to collapse, and distributed control algorithms are complex and difficult to solve, resulting in untimely and inaccurate scheduling. In particular, genetic algorithms suffer from premature convergence and computationally expensive problems.
An improved genetic algorithm is adopted, which adaptively adjusts the fitness function, crossover rate and mutation rate, and combines the new energy prediction error model and the electric vehicle response error model to establish a two-level scheduling model, optimize the coding process, and improve the convergence speed and accuracy of the algorithm.
It achieves fast and accurate power grid dispatching, reduces premature convergence of algorithms, improves the accuracy and stability of the global optimal solution, optimizes the dispatching potential of new energy and electric vehicles, and reduces coding complexity.
Smart Images

Figure CN114462854B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid dispatching, and more specifically, to a hierarchical dispatching method and system that includes grid integration of new energy sources and electric vehicles. Background Technology
[0002] With the accelerating pace of global industrialization, environmental pollution and energy shortages have become pressing issues. Since the beginning of this century, with the continuous advancement of the energy revolution, replacing traditional fossil fuels with clean energy sources such as wind and solar power has become a significant trend in power grid reform. Electric vehicles, as environmentally friendly modes of transportation, have enjoyed considerable development opportunities in recent years, and the number of electric vehicles in my country has now exceeded 3 million. This has led to a serious problem of large-scale, unregulated grid connection of electric vehicles, which not only exacerbates the peak-valley load difference in the power grid but also severely impacts power quality. Simultaneously, the integration of new energy sources into the traditional power grid, coupled with the uncertainty of power output, makes the coupling between electric vehicles and the grid more complex. All of these issues pose new challenges to power system security.
[0003] In existing technologies, power system control methods mainly fall into two categories: centralized control and distributed control. On the one hand, centralized control methods employ centralized management of individual electric vehicles (EVs) to achieve precise control of EV grid connection. For example, background document CN106712012A discloses a centralized control method for large-scale EV grid-connected charging and discharging. This method utilizes the low-voltage bus voltage amplitude of substations and grid load margin indicators to perform support vector machine calculations. This existing method can also use indicators such as optimal charging power, regional power limits, minimum load variance, and maximum load factor as single global grid optimization objectives to accurately allocate controllable resources within the grid. Generally, this method can achieve good control effects on renewable energy output and EV grid connection. However, when the centralized controller malfunctions, the control system collapses completely, affecting the overall performance of the grid. Furthermore, this method places high demands on the reliability and bandwidth of communication network transmission; therefore, when the power system's transmission network does not meet these requirements, centralized control becomes difficult to implement.
[0004] On the other hand, distributed control methods pre-divide the power system dispatch center into multiple levels, controlling the electric vehicle charging process relatively independently while adhering to the overall objective. For example, background document CN112350357A discloses a distributed grid-connected electric vehicle adaptive SoC balance control method, specifically disclosing the use of multiple electric vehicles as a distributed energy storage system. It obtains the required total power according to the upper-level dispatch instructions, the battery capacity according to the electric vehicle's energy storage system, and achieves initial power allocation, introducing adaptive power regulation to ultimately achieve SoC balance. Background document "Research on Dispatch Strategies for Electric Vehicles Participating in Grid Voltage Regulation," Wu Xinxin's master's thesis at the University of Electronic Science and Technology of China, discloses an electric vehicle optimal dispatch model. It solves the optimal dispatch model by setting objective functions and constraints, and mentions various model solution methods such as sequential quadratic programming, trust region method, and genetic algorithm. It should be noted that although this method can consider different optimization objectives and constraints hierarchically, it also often involves game theory in the computation and iterative optimization processes due to the existence of multiple different stakeholders and inconsistent computational objectives. All of the above problems will lead to increased algorithm complexity and reduced accuracy. At the same time, with the continuous increase in the output of new energy sources and the number of electric vehicles connected to the grid, it is even more difficult to solve complex algorithms, and grid dispatching based on the above algorithms is even more difficult to achieve.
[0005] Furthermore, when using genetic algorithms to solve distributed power grid models, although the offspring population can improve the matching degree of the optimization space through crossover and mutation processes, ensuring the correctness of the search direction and ensuring that global optimization of individuals is achieved from the population trigger, the encoding and decoding process of genetic algorithms is relatively complex, with poor local search capabilities. The search process, especially the later search process, consumes a lot of time, making the hierarchical scheduling process untimely. Therefore, the selection of parameters such as the size of the initial population and the number of iterations in the genetic algorithm must take into account the impact of the total computation time. This makes the parameter selection inaccurate, which not only easily leads to problems such as premature convergence in the algorithm itself, but also affects the accuracy of the model solution and scheduling.
[0006] To address the aforementioned issues, there is an urgent need for a hierarchical scheduling method and system that incorporates both new energy sources and electric vehicles for grid connection. Summary of the Invention
[0007] To address the shortcomings of existing technologies, the present invention aims to provide a hierarchical scheduling method and system for grid-connected new energy sources and electric vehicles. This method can adjust the fitness function based on the fitness value of the genetic population during the iteration process, and adaptively set the crossover rate and mutation rate, thereby achieving fast and accurate model solving and scheduling implementation.
[0008] The present invention adopts the following technical solution.
[0009] The first aspect of this invention relates to a hierarchical scheduling method for grid-connected new energy sources and electric vehicles, wherein the method includes the following steps: Step 1, based on the characteristics of grid-connected new energy sources and electric vehicles, establishing a new energy prediction error model and an electric vehicle response error model; Step 2, establishing an upper-level model with the minimum total system load and the maximum total absorption of new energy sources as objective functions, and establishing a lower-level model with the minimization of electric vehicle dealer costs, the minimization of the deviation between dealer output and scheduling plan, and the maximization of electric vehicle response priority as objective functions, and substituting the model from Step 1 into the two-level model of Step 2; Step 3, solving the two-level model using an improved genetic algorithm and obtaining the scheduling results.
[0010] Preferably, the discrete variables in the two-level model are filled with data using the linear interpolation method; the continuous variables in the two-level model and the optimized discrete variables are encoded together with real numbers to obtain encoded data.
[0011] Preferably, the discrete variables in the two-layer model include the switching status data of electric vehicles in the time dimension; the continuous variables in the two-layer model include the node voltage of the distribution network, the charging power of the charging stations in the distribution network, and the power output of the electric vehicle operators in the distribution network.
[0012] Preferably, Monte Carlo random sampling is performed on the encoded data, and initial populations for multiple scenarios are generated based on the sampling results.
[0013] Preferably, the fitness function of the genetic algorithm is obtained by transforming the single-objective fitness function after multi-objective normalization; the transformation method is as follows:
[0014] In the formula, f is the reciprocal of the normalized single-objective fitness function, F is the fitness function obtained after transformation using the transformation method, t is the current iteration number, T is the maximum iteration number of the genetic algorithm, and a and b are the first transformation parameter and the second transformation parameter of the transformation method, respectively.
[0015] Preferably, the values of the first transformation parameter and the second transformation parameters a and b are chosen such that the population generated by the genetic algorithm simultaneously satisfies the following conditions:
[0016]
[0017] In the formula, F i,t Let F be the fitness function of the i-th individual in the population at the current iteration number t, where i takes the value of any individual in the current population, ∑F i,t S is the sum of the fitness of all individuals in the current population, and S() is the variance of the fitness of all individuals in the current population.
[0018] Preferably, the genetic algorithm selects operations that satisfy... Where, p i,t Let be the probability that the i-th individual is selected in the t-th iteration.
[0019] Preferably, the crossover operator determines the total number of offspring chromosomes based on the crossover rate, and the crossover rate is...
[0020]
[0021] In the formula, N is a pre-defined cross parameter, and N∈[1,2], P c1 F represents the random crossover rate of the crossover individuals, with a range of [0.4, 0.99]; c The larger fitness value among the crossover individuals, This represents the average fitness value of the current population.
[0022] Preferably, the mutation operator determines the total number of mutated chromosomes based on the mutation rate, and the mutation rate is...
[0023]
[0024] In the formula, c and d are pre-defined cross parameters, and c,d∈[1,2], P m1 F represents the random mutation rate of the mutated individual, where the random mutation rate ranges from [0.0001, 0.1]. m This represents the fitness value of the mutated individual. This represents the average fitness value of the current population.
[0025] A second aspect of the present invention relates to a hierarchical scheduling system that includes grid connection of new energy sources and electric vehicles, wherein the system is implemented using the hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in the first aspect of the present invention.
[0026] The beneficial effects of this invention are that, compared with the prior art, the hierarchical scheduling method and system for grid-connected new energy and electric vehicles in this invention adjusts the fitness function based on the fitness value of the genetic population during the iteration process, and adaptively sets the crossover rate and mutation rate, thereby achieving fast and accurate model solving and scheduling. This invention optimizes the encoding process, ensuring that the differences in fitness between individuals continuously increase as the iteration process progresses, and reasonably controls the crossover rate and mutation rate, thus maintaining the diversity of the solution space, fully avoiding premature convergence, and improving the convergence speed of the algorithm and the accuracy of the global optimal solution.
[0027] The beneficial effects of the present invention also include:
[0028] 1. This invention combines hierarchical control theory to optimize power grid dispatching strategies that take into account the uncertainties of new energy sources and electric vehicles. It generates multiple scenarios through new energy prediction error models and electric vehicle response error models. The upper layer aims to minimize the variance of the total system load level and maximize the absorption of new energy sources, while the lower layer aims to minimize the deviation between the output of electric vehicle agents and the dispatching plan and maximize the response priority of electric vehicles. This alleviates the impact of centralized control on the centralized controller and fully leverages the dispatching potential of new energy sources and electric vehicles.
[0029] 2. This invention addresses the problems of slow convergence and high time consumption in the early stages of the genetic algorithm in the iteration process, as well as poor local search ability and inaccurate search direction in the later stages. The fitness function is improved by using different calculation methods to obtain the fitness function in the first and second halves of the algorithm, thereby improving the convergence speed of the algorithm in the early stages of the iteration process and providing a basis for obtaining the optimal solution in the later stages of the algorithm, effectively avoiding premature convergence of the algorithm.
[0030] 3. In the method of this invention, by adjusting the parameters of the fitness function, the total fitness of the population is kept constant during multiple iterations, thereby further ensuring the stability of the genetic algorithm.
[0031] 4. This invention improves the values of crossover rate and mutation rate in the prior art, enabling the algorithm to selectively provide the degree of change of individuals by crossover and mutation based on the quality of individuals in the population. This allows poorer solutions in the population to be quickly improved through poorer mutation, while better solutions are effectively retained in the next generation.
[0032] 5. This invention uses a matrix method to realize the arrangement of various different input parameters of the algorithm. The reasonable selection of electric vehicle-related parameters enables the matrix to achieve binary encoding, thereby effectively reducing the complexity of the encoding and decoding process and improving the algorithm speed. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating the genetic algorithm in the hierarchical scheduling method for grid connection of new energy sources and electric vehicles in this invention.
[0034] Figure 2 This is a schematic diagram of the power grid system model structure under the condition of grid connection of new energy sources and electric vehicles in the hierarchical dispatching method of the present invention;
[0035] Figure 3 This is a schematic diagram of the power grid topology in one embodiment of the hierarchical dispatching system for grid connection of new energy and electric vehicles of the present invention.
[0036] Figure 4 This is a schematic diagram of the scheduling model generated in the first embodiment of the hierarchical scheduling method for grid connection of new energy and electric vehicles of the present invention;
[0037] Figure 5 This is a schematic diagram of the scheduling model generated in the second embodiment of the hierarchical scheduling method for grid connection of new energy and electric vehicles in this invention;
[0038] Figure 6 This is a schematic diagram of the scheduling model generated in the third embodiment of the hierarchical scheduling method for grid connection of new energy and electric vehicles in this invention;
[0039] Figure 7 This is a schematic diagram of the parameters used in the scheduling model of the hierarchical scheduling method for grid connection of new energy and electric vehicles in this invention. Detailed Implementation
[0040] The present application will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and should not be construed as limiting the scope of protection of the present application.
[0041] Figure 1 This is a flowchart illustrating the genetic algorithm used in the hierarchical scheduling method for grid-connected new energy sources and electric vehicles in this invention. Figure 1 As shown, the first aspect of the present invention relates to a hierarchical scheduling method for grid connection of new energy sources and electric vehicles, wherein the method includes steps 1 to 3.
[0042] Step 1: Based on the characteristics of grid-connected new energy and electric vehicles, establish a new energy prediction error model and an electric vehicle response error model.
[0043] Since the power system targeted in this invention is a power system that includes both renewable energy output and electric vehicles, the model can be based on renewable energy and electric vehicles respectively. Figure 2 This is a schematic diagram of the power grid system model under the condition of new energy sources and electric vehicles being connected to the grid, in the hierarchical dispatching method of the present invention. (See diagram for example.) Figure 2 As shown, this invention can predict renewable energy load errors based on the grid connection status of renewable energy plants, and construct upper-level scheduling objectives based on the renewable energy absorption level and the total system load. This invention can also achieve the optimal state of peak shaving and valley filling based on the integration of electric vehicles, that is, minimizing scheduling plan deviation and maximizing the operating revenue of electric vehicle operators, thereby obtaining lower-level scheduling objectives. Therefore, by assuming different grid operation scenarios, the optimal scheduling schemes for renewable energy, electric vehicles, and the grid can be solved.
[0044] First, a new energy prediction error model can be set up. When establishing this model, two typical new energy output types, wind power and photovoltaic power generation, can be taken into account, so that the corresponding parts in the model can be calculated separately.
[0045] In this invention, considering that existing technologies, such as weather forecasts, have certain prediction errors in wind speed prediction, these errors will lead to prediction errors in the power output of wind farm clusters. This invention assumes that the prediction error model for wind farm clusters follows a normal distribution, thus yielding the probability distribution for different actual wind speed values.
[0046]
[0047] in, The standard deviation of the measured wind speed at different time points.
[0048] θP L This refers to the actual wind speed.
[0049] The above formula assumes that the predicted wind speed is 0.
[0050] f(ΔP L ) represents the probability of different actual wind speed values.
[0051] Similarly, in order to obtain the prediction error model for photovoltaic power plants in this invention, the probability distribution of different actual radiation values can first be obtained as follows:
[0052]
[0053] Where, ΔP R This is the value of natural light radiation.
[0054] The standard deviation of natural light radiation at different time points.
[0055] The above formula assumes that the predicted radiation value is 0.
[0056] f(ΔP R ) represents the probability of different actual radiation values.
[0057] In this invention, the probability of the values of wind power output and photovoltaic power output mentioned later can be directly calculated based on the probability distribution of wind speed and natural light radiation.
[0058] In addition, an electric vehicle response error model can be established in this invention. Specifically, it can be assumed that the charging power of electric vehicle m at time k is p. m,k The battery's state of charge is SOC. m,k Assume that the maximum allowable charging power sent by the electric vehicle charging station to the electric vehicle at this time is p. c,m,k Then you can get
[0059] p m,k =αp c,m,k +(1-α)p min,k
[0060] Wherein, parameter p min,k This is the minimum charging power for an electric vehicle. When the actual charging power of the electric vehicle is less than this parameter, the charging process will be stopped.
[0061] α is a scenario-related factor. In this invention, the value of α varies depending on the state of charge (SBC) of the electric vehicle battery. This invention defines the value of the scenario-related factor α based on different scenarios of electric vehicle grid connection. In one embodiment, the value of α can be set to 0.15, 0.25, 0.75, and 0.85 depending on the scenario. Generally, different scenarios can be determined based on the current SBC of the electric vehicle; for example, when 0... <SOC m,k In the scenario of ≤15%, α can be set to 0.15, while when it is 85%... <SOC m,k If the percentage is ≤100%, then α = 0.85 can be set.
[0062] In other words, this invention can obtain four different values for the scenario influencing factors for four different battery state of charge ranges. It's easy to understand that when the battery state of charge is greater than 85% or less than 15%, the battery's power self-regulation capability is weak, and in these two scenarios, the electric vehicle's charging power is closer to the maximum or minimum charging power. However, when the battery state of charge is between 15% and 85%, the battery's power self-regulation function is strong, and the charging power falls between the maximum and minimum charging power.
[0063] Step 2: Establish an upper-level model with the objective functions of minimizing the total system load and maximizing the total absorption of new energy sources. Establish a lower-level model with the objective functions of minimizing the cost of electric vehicle dealers, minimizing the deviation between dealer output and scheduling plan, and maximizing the corresponding priority of electric vehicles. Substitute the model from Step 1 into the two-level model of Step 2.
[0064] After obtaining the new energy prediction error model and the electric vehicle response error model respectively, a two-layer model of the power grid can be realized based on the above models.
[0065] Specifically, in this invention, the model can be implemented by considering the overall peak shaving and valley filling strategy of the power grid. First, in order to achieve the goals of carbon reduction and minimizing the use of traditional energy, the objectives of the upper-level model can be set as minimizing the variance of the total load level of the system and maximizing the absorption of new energy sources. The charging and discharging power of electric vehicles during the grid connection period can be used as the optimization variable to establish the objective function.
[0066] Therefore, the objective function of the upper-level model can be obtained as follows:
[0067]
[0068] Wherein, min F1 is the minimum value of the variance of the total system load level.
[0069] max F2 is the maximum value of renewable energy consumption.
[0070] P b (s) represents the basic load of the power grid during the grid connection period s.
[0071] P m (s) represents the sum of the actual charging and discharging power of electric vehicles in the power grid during the grid connection period s.
[0072] P WT (s) represents the wind power output during the grid connection period s.
[0073] P PV (s) represents the photovoltaic output during the grid connection period s.
[0074] The average value of the total system load level in the formula for the variance of the total system load level is given.
[0075] Specifically Its value is the average of the total system load power at each time point.
[0076] N c Let n be the number of electric vehicle charging stations in the power grid. If we assume that the number of electric vehicles charging at a charging station during the current time period is n, or the number of different types of electric vehicles charging during the current time period is n, then we have:
[0077]
[0078] Where, p m(s) represents the total power exchange between all electric vehicles and the distribution network during the grid connection period s, or the total power exchange between all types of electric vehicles and the distribution network during the grid connection period s. ε m (s) represents the operability of the current electric vehicle or electric vehicle of the current type mentioned above. When its value is 1, it indicates that the electric vehicle is connected to the grid and can provide power to the grid in real time as distributed energy storage. When its value is 0, it indicates that the electric vehicle is not connected to the grid. s is a marker symbol for multiple consecutive time periods, and each of its markers can be equivalent to the sum of multiple consecutive time periods k mentioned above.
[0079] As can be seen from the above formula, the actual charging and discharging power of an electric vehicle can be the sum of the power exchange between various types of electric vehicles and the power distribution network at multiple charging stations, calculated by the scheduling method of this invention after collecting the operability data of multiple electric vehicles within a certain time period. In this invention, the principle of the above scheduling is peak shaving and valley filling, which will be explained in detail in the constraint section.
[0080] After establishing the objective function mentioned above, the adaptive weighting method can be used to solve the objective function.
[0081] Specifically, the iterative method used in this invention is as follows:
[0082]
[0083] In the above iterative method, the expression for the iterative weight is:
[0084] To solve the objective function using an iterative method, this invention also involves several constraints. In general, the constraints in this invention include at least distribution network power flow constraints, distribution network power balance constraints, distribution network node voltage limits, distribution network branch power flow limits, power generation constraints for new energy wind farms and photovoltaic power plants, and charging power limits for electric vehicle charging stations. These constraints are described in detail below.
[0085] First, the formula for power flow constraints in a distribution network is:
[0086]
[0087] Among them, P i and Q i These represent the active power and reactive power injected into the i-th node of the distribution network, respectively.
[0088] U i and U j These are the node voltages of the current node i and another node j in the distribution network, respectively.
[0089] G ij B ij and θ ij These are the conductance, susceptance, and power factor angle of the branch ij between the two nodes mentioned above.
[0090] Secondly, the formula for the power balance constraint of the distribution network is:
[0091]
[0092] Among them, P G (s) represents the energy transmitted from the power system to the distribution network during the grid connection period s.
[0093] P L (s) represents the electricity load during the grid connection period s.
[0094] P m (s) represents the total charging amount of electric vehicles during the grid connection period s.
[0095] P LOSS The average network loss during the network access period s.
[0096] Third, the formula for voltage constraints at distribution network nodes is:
[0097]
[0098] in, and These are the minimum and maximum values of the voltage at the distribution network nodes, respectively.
[0099] Fourth, the formula for power flow constraints in distribution network branches is:
[0100] |P l (s)|≤P lmax
[0101] Among them, P l (s) represents the branch power flow on branch l, P lmax This indicates the maximum power flow value of the branch on that branch.
[0102] Fifth, since this invention incorporates new energy output, corresponding new energy constraints are designed based on the operational capacity and output limitations of new energy wind farm clusters and photovoltaic power stations. The formula for these constraints is as follows:
[0103]
[0104] in, and These represent the upper and lower limits of power output for wind farm clusters and photovoltaic power plants, respectively.
[0105] Sixth, since the network of this invention also includes electric vehicles connected to the grid, a power constraint for electric vehicle charging stations is correspondingly designed into the constraints of the objective function. The formula for this constraint is as follows:
[0106]
[0107] in, This represents the maximum total charging power of the charging station.
[0108] Since this invention employs a two-layer model to solve the system scheduling scheme, it also includes a lower-layer model. The lower-layer model in this invention can have the objective function of minimizing the deviation between the output of electric vehicle dealers and the scheduling plan. Furthermore, considering the responsiveness of electric vehicle operators to demand, it is also necessary to ensure that the revenue of electric vehicle dealers is maximized during operation.
[0109] To minimize the deviation between the power output of the agents and the dispatch plan, the charging and discharging of electric vehicles should be able to meet the peak shaving and valley filling needs as much as possible. In other words, the sum of the load power consumption in the power system and the charging and discharging of electric vehicles should meet the minimum difference in power consumption between peak and valley.
[0110] Therefore, the objective function of the lower-level model is
[0111]
[0112] Where, minΔC peal-vellay It is the minimum sum of load electricity consumption and electric vehicle charging / discharging amount during the grid connection period s.
[0113] maxW profit This represents the maximum operating revenue for electric vehicle dealers.
[0114] λ sale (s) represents the unit electricity price for electric vehicle dealers during the grid connection period s.
[0115] Q(s) represents the total charging power of the electric vehicle during the grid connection period s.
[0116] W user (s) represents the total cost of electricity repurchased by the electric vehicle operator from the electric vehicle user during the grid connection period s.
[0117] W opr (s) represents the total cost of electricity purchased by the electric vehicle operator from the power system during the grid connection period s.
[0118] In addition, in this invention, the parameters related to electric vehicles can be prioritized for adjustment, that is, the electric vehicle has the highest responsiveness and the priority is maximized.
[0119] After establishing the lower-level objective function, this invention provides various constraints. In general, the constraints of the lower-level objective function include system power balance constraints, electric vehicle charging demand energy balance constraints, electric vehicle charging power constraints, and electric vehicle schedulable time constraints.
[0120] First, the formula for the system power balance constraint is:
[0121]
[0122] In other words, the total amount of charging and discharging by electric vehicle dealers in this invention should be equal or have a sufficient amount.
[0123] Secondly, the formula for calculating the energy balance constraint of electric vehicle charging demand is as follows:
[0124]
[0125] Among them, s arrive The time when the electric vehicle arrives at the charging station.
[0126] s leave The moment an electric vehicle leaves a charging station.
[0127] E m,set (s arrive ) for electric vehicles m in s arrive The remaining battery power at any given time.
[0128] E m,set (s leave ) for electric vehicles m in s leave The remaining battery power at any given time.
[0129] η m,c The average charging efficiency of electric vehicle m during each grid connection period s.
[0130] Third, the charging power constraint for electric vehicles is as described above, and the formula is:
[0131] Fourth, the formula for the time constraint of electric vehicle scheduling is as follows:
[0132]
[0133] The above formula means that electric vehicles cannot be scheduled when the selected time period is not the middle period between when an electric vehicle arrives at the charging station and when it leaves the charging station.
[0134] In this invention, the range of values for the optimal scheduling potential threshold can be obtained by calculating the objective function of the lower-level model.
[0135] Specifically, the optimal scheduling potential threshold η in this invention T The calculation formula is:
[0136]
[0137] The optimal scheduling potential threshold extraction dataset Ω is obtained as follows:
[0138] T represents the total time corresponding to the dataset Ω. If it includes d days, then the optimal scheduling potential threshold η is... T During the calculation process, the average value needs to be calculated on a daily basis.
[0139] η Ω This refers to the scheduling potential threshold extracted from a pre-set optimal scheduling potential dataset. The method for obtaining the pre-set optimal scheduling potential dataset in this invention can be trained from a large amount of historical data.
[0140] Step 3: Solve the two-level model using an improved genetic algorithm and obtain the scheduling results.
[0141] Based on the two-layer model established in steps 1 and 2 of this invention, the overall scheduling result can be obtained. Specifically, a genetic algorithm can be used to solve the two-layer model in this invention.
[0142] In this invention, if a genetic algorithm is used, the offspring population can improve the matching degree of the optimization space through crossover and mutation processes, while individuals carrying superior genes can also ensure the accuracy of the search direction. As a global optimization algorithm, the genetic algorithm can search from the population level and compare multiple individuals simultaneously. Therefore, the method of this invention employs a genetic algorithm.
[0143] However, due to the encoding and decoding processes involved in genetic algorithms, and the relatively complex deprogramming process, their local search capabilities are relatively poor. Therefore, the algorithms converge slowly and consume a lot of time, especially in the later stages of evolution when search efficiency is very low. Furthermore, the selection of parameters such as the initial population size and the maximum number of iterations in existing genetic algorithms makes it difficult to maintain a balance between convergence speed and accuracy, easily leading to premature convergence. Therefore, this invention improves upon existing genetic algorithms.
[0144] Preferably, the discrete variables in the two-level model are filled with data using the linear interpolation method; the continuous variables in the two-level model and the optimized discrete variables are encoded together with real numbers to obtain coded data. The discrete variables in the two-level model include the switching status data of electric vehicles in the time dimension; the continuous variables in the two-level model include the node voltage of the distribution network, the charging power of charging stations in the distribution network, and the output of electric vehicle operators in the distribution network.
[0145] In this invention, matrices can be constructed for various variables required in the two-layer model. For discrete variables, such as the switching states of an electric vehicle in different time periods, linear interpolation can be used first to obtain more raw data, thereby achieving sufficient input data filling.
[0146] In addition, for continuous variables, such as the node voltage of the distribution network, the charging power of electric vehicles at charging stations, and the output of electric vehicle dealers within a certain time period, the present invention can use multiple adjustment levels to discretize the simulation data.
[0147] For example, ΔP = D T ×P0, where D T P0 represents the gear position value, P0 represents real-time data, and ΔP represents the adjustment range of the current gear position value.
[0148] After acquiring various data describing the state of the power grid, the method of the present invention can encode the data.
[0149] Specifically, in this invention, encoding can be used to construct the initial population, wherein the encoding matrix of each individual in the initial population is as follows:
[0150]
[0151] in, For the genetic population numbered individuals,
[0152] V t This provides the power grid status data for different time periods.
[0153] x i,t This refers to the i-th data item within the current time period t. Specifically, it can be the charging status of a certain electric vehicle, the node voltage of a certain node in the power distribution network, the charging power of a certain electric vehicle in a certain charging station, the output of a certain electric vehicle dealer in the current time period, etc.
[0154] In this invention, if the scheduling is only for the grid-connected status of electric vehicles, the matrix can be simplified to a binary encoding form, for example, where each item in the matrix takes the value of 0 or 1.
[0155]
[0156] The value is 1 when an electric vehicle is charging during a certain period of time, and 0 otherwise.
[0157] This allows for the creation of a very simple, but high-dimensional matrix. Since the grid connection status of electric vehicles is itself two-dimensional data, the method in this invention avoids the number system conversion process, thereby avoiding the large computational scale, low computational efficiency, and low computational accuracy of encoding and decoding. This improves the convergence speed of the algorithm, allowing genetic algorithm operations to be performed directly on the original data, while ensuring both the accuracy and speed of the algorithm.
[0158] In one embodiment of the present invention, a matrix is established with a time period of 1 hour. Therefore, the matrix has 24 columns and rows representing the total number of electric vehicles in the system within a day. That is, the initial population is X = [x...]. i,t ] m×24 .
[0159] According to the constraints, the value of each initial individual in this invention should ensure that each individual can meet the total power requirements. Thus, individuals that meet the conditions can be screened out and divided into multiple subspaces, and different individual offspring can be generated through a crossover process.
[0160] Preferably, Monte Carlo random sampling is performed on the encoded data, and initial populations for multiple scenarios are generated based on the sampling results. It is understood that, due to the large amount of encoded data in this invention, Monte Carlo random sampling can be used to obtain the initial populations first.
[0161] Preferably, the fitness function of the genetic algorithm is obtained by transforming the single-objective fitness function after multi-objective normalization; the transformation method is as follows:
[0162] In the formula, f is the reciprocal of the normalized single-objective fitness function, F is the fitness function obtained after transformation using the transformation method, t is the current iteration number, T is the maximum iteration number of the genetic algorithm, and a and b are the first transformation parameter and the second transformation parameter of the transformation method, respectively.
[0163] In this invention, the fitness function can be used to measure whether the solution strategy is optimal. The fitness function in this invention is originally the reciprocal f of the normalized single-objective fitness function. Its calculation formula can adopt the fitness function calculation method commonly used in the prior art, such as the fitness function commonly used in adaptive genetic algorithms.
[0164] In this invention, to prevent excessively large fitness differences among individuals in the early stages of computation, resulting in poor diversity within the population, and simultaneously to prevent excessively small fitness differences in the later stages of computation, which would hinder the efficient acquisition of the optimal solution, an improved fitness function is employed. The formula for calculating this fitness function is as follows:
[0165]
[0166] By appropriately setting the values of parameters a and b, after the transformation described in this invention, the fitness function enables the algorithm to converge quickly in the early stages of the computation and accurately obtain the optimal solution in the later stages. This method not only ensures the diversity of individuals in the population in the early stages of the computation but also expands the difference in fitness in the later stages, ensuring that individuals with superior traits are retained to the next generation, thereby avoiding premature convergence and getting trapped in local optima.
[0167] In one embodiment of the present invention, the maximum number of iterations is an even number.
[0168] Preferably, the values of the first transformation parameter and the second transformation parameters a and b are chosen such that the population generated by the genetic algorithm simultaneously satisfies the following conditions:
[0169]
[0170] In the formula, F i,t Let f be the fitness function of the i-th individual in the population after transformation at the current iteration number t. i,t Let F be the fitness function before individual transformation, where i takes the value of the individual ID in the current population, and ∑F i,t S is the sum of the fitness of all individuals in the current population, and S() is the variance of the fitness of all individuals in the current population.
[0171] When selecting parameters a and b, this invention should also ensure that the total fitness value of the population remains constant during the fitness transformation process. Furthermore, during multiple iterations of the population, the differences in fitness values among multiple individuals also change according to the way individual fitness values themselves change; that is, in the first half of the iteration process, the fitness difference gradually decreases, and in the second half, the fitness difference gradually increases. For example, parameter b can be set to a real number greater than zero, etc.
[0172] In addition, to ensure the stability of the fitness values of multiple different individuals, the transformed fitness values also need to be within, for example, 1 ≤ F. i,t Within a pre-defined range of ≤2.
[0173] Preferably, the genetic algorithm selects operations that satisfy... Where, p i,t Let be the probability that the i-th individual is selected in the t-th iteration.
[0174] The genetic algorithm in this invention can be implemented using a selection operator commonly used in existing technologies. In this invention, the probability of selection can be the probability that an individual's fitness is proportional to the total fitness of the population.
[0175] It should be noted that the improved crossover operator in the genetic algorithm can adopt commonly used crossover operators in existing technologies. The improvement of the crossover operator in this invention mainly focuses on improving the crossover rate. Preferably, the crossover operator determines the total number of offspring chromosomes based on the crossover rate, and the crossover rate is...
[0176]
[0177] In the formula, N is a pre-defined cross parameter, and N∈[1,2], P c1 F represents the random crossover rate among crossover individuals, ranging from 0.4 to 0.99. c The larger fitness value among the crossover individuals, This represents the average fitness value of the current population.
[0178] In this invention, the crossover process can realize the exchange of chromosomes between offspring in different populations, thereby achieving individual evolution.
[0179] In selecting the crossover rate, existing technologies typically set a fixed constant as the crossover rate value, so the crossover length of the offspring chromosomes remains completely unchanged throughout the algorithm. Although existing technologies also include adaptive calculation of the crossover rate value, such algorithms are relatively simple, basically only able to change the mutation rate value based on the fitness value and the number of iterations.
[0180] However, in this invention, the fitness value itself changes in segments based on the number of iterations, and the way it changes in different iteration segments is also different. Furthermore, in reality, the crossover effect varies depending on the individual's performance within the population. Therefore, this invention improves the crossover rate based on the fitness value, providing three different crossover rate values for each individual's fitness and the average fitness of the population. Thus, when an individual is a relatively good individual in the population (i.e., the individual has a high fitness and a large difference from the population's average fitness), its crossover mutation probability is low; conversely, when an individual is a poor solution in the population (the individual's fitness is lower than the population's average fitness), its crossover rate is relatively high. This crossover algorithm not only makes the evolutionary direction of the crossover operation clearer but also improves the algorithm's convergence speed.
[0181] It should be noted that the improved mutation operator in the genetic algorithm can be a commonly used mutation operator in existing technologies. The improvement of the mutation operator in this invention mainly focuses on the selection of the mutation rate.
[0182] Preferably, the mutation operator determines the total number of mutated chromosomes based on the mutation rate, and the mutation rate is...
[0183]
[0184] In the formula, c and d are pre-defined cross parameters, and c,d∈[1,2], P m1 F represents the random mutation rate of the variant individuals, ranging from 0.0001 to 0.1. m This represents the fitness value of the mutated individual. This represents the average fitness value of the current population.
[0185] Mutation transforms certain genes in the chromosome coding string of individuals within a population, generating diverse new individuals and making the generation of individuals in the population highly random. Existing techniques typically set the mutation rate to a fixed value, ensuring that the proportion of mutated genes in the overall chromosome string is predetermined. This approach maintains a fixed mutation rate in both the initial and later stages of the algorithm, and the convergence speed and the diversity of the solution space remain unchanged.
[0186] This invention improves the mutation rate by defining its value in segments based on the fitness of different individuals in the population—that is, the degree of superiority or inferiority of an individual within the population. Specifically, the mutation rate is...
[0187]
[0188] It is evident that when an individual has a very high fitness value, it does not mutate; when an individual has a relatively high fitness value, it mutates less; and when an individual's fitness is less than the population's average fitness, its mutation rate is high.
[0189] In this invention, when the individual fitness value is small, the individual variation rate can be appropriately increased according to the value of the random variation rate. Since the values of parameters c and d range between 1 and 2, the individual variation rate after transformation can be about 1 to 4 times that of the individual variation rate before transformation.
[0190] The improved genetic algorithm in this invention introduces an improved fitness function, a simpler encoding method, and improved crossover and mutation operators on the basis of the traditional genetic algorithm. This makes the algorithm more suitable for calculating and obtaining the optimal scheduling method for electric vehicles entering the network, and improves the accuracy of the global optimal solution while accelerating the convergence speed.
[0191] Figure 3 This is a schematic diagram of the power grid topology in one embodiment of the hierarchical dispatching system for grid integration of new energy sources and electric vehicles according to the present invention. Figure 3 As shown, the method described above was verified based on one embodiment in this invention.
[0192] Figure 3 The diagram includes an improved power grid topology with 33 nodes, some of which are connected to renewable energy power plants. CS1 to CS7 represent the access nodes for renewable energy plants such as wind or solar power, providing renewable energy output to the grid. It is assumed that 800 electric vehicles in the area covered by this grid require intermittent grid charging, and that 400 of these electric vehicle users can receive dispatch policies, enabling them to participate in grid output regulation.
[0193] In addition, to simplify the model, we can assume that the battery capacity of the electric vehicles is 30kWh, and that they are all charged with a constant power of 5kW, with a charge-discharge efficiency of 0.9. The upper and lower limits of the battery state of charge are 0.9 and 0.3, respectively.
[0194] Based on historical data, peak electricity consumption of the power grid occurs between 8:00-11:00 and 16:00-21:00 daily, while off-peak consumption occurs between 23:00 and 7:00 the next day. Electricity consumption remains relatively stable during other periods. Therefore, in this embodiment, we can assume that the time-of-use electricity prices for peak, off-peak, and stable periods are 0.9 yuan / kWh, 0.5 yuan / kWh, and 0.7 yuan / kWh, respectively.
[0195] This invention uses three different methods to obtain the calculated scheduling results, thereby comparing and illustrating the advantages of the method of this invention.
[0196] The first embodiment includes a hierarchical scheduling scenario that guides electric vehicles to perform orderly charging and discharging, assuming that the power grid does not implement peak-valley electricity pricing and does not consider the participation of electric vehicle dealers.
[0197] The second embodiment includes a scenario where the power grid implements peak-valley electricity pricing, without considering the costs of electric vehicle dealers, i.e., dealers charge electric vehicles in an unordered manner, and the power grid is in a hierarchical scheduling scenario.
[0198] The third embodiment includes a scenario where the power grid implements peak-valley electricity pricing, and on this basis, the charging and discharging methods that minimize costs and maximize profits for electric vehicle dealers are considered, so that electric vehicles can charge and discharge in an orderly manner. This is a scenario of hierarchical scheduling of the power grid.
[0199] Figure 4 This is a schematic diagram of the scheduling model generated in the first embodiment of the hierarchical scheduling method for grid connection of new energy and electric vehicles of the present invention. Figure 7This diagram illustrates the parameters used in the scheduling model of the hierarchical scheduling method for grid-connected new energy sources and electric vehicles in this invention. It includes two types of new energy output: wind power and photovoltaic power generation. Distribution network power purchase refers to electricity purchased by electric vehicle dealers, which is generated using traditional generator sets. Distribution network power generation also uses traditional generator sets, specifically thermal power generation. The charging power of electric vehicles and the total system load share the total system power generation. In other words, the optimal scheduling method of this invention assumes that power generation and power consumption are completely equal. When an electric vehicle is connected to the grid and discharging, its value is negative.
[0200] like Figure 4 As shown, since peak-valley electricity pricing is not implemented, the electricity price is consistent across all time periods. In the upper-level model, during peak electricity consumption periods on the distribution network, traditional generator sets operate at near full capacity as electric vehicles feed energy back into the grid. During off-peak hours on the distribution network, the grid charges electric vehicles, absorbing the output of renewable energy. Figure 4 The charging and discharging capacity of electric vehicles is taken as negative. In this method, the participation of electric vehicle dealers is not considered. Instead, the system's total load variance is reduced by guiding the orderly charging of electric vehicles, thereby increasing the electricity load during off-peak hours to fill the peak-valley difference. However, since electric vehicle dealers are not considered at this point, the underlying model is incomplete, and the method cannot accurately predict the actual situation of electric vehicles entering the grid, nor can it provide an accurate scheduling scheme.
[0201] Figure 5 This is a schematic diagram of the scheduling model generated in the second embodiment of the hierarchical scheduling method for grid connection of new energy vehicles and electric vehicles in this invention. Figure 5 As shown, peak-valley pricing is implemented in the power grid to regulate peak and off-peak electricity consumption. However, this scheme still doesn't consider the maximum cost of electric vehicle (EV) dealers, only providing grid connection scheduling for EVs during peak and off-peak periods. In this case, in the upper-level model, EV grid connection mitigates peak and off-peak periods to some extent, while renewable energy grid connection provides supplementary power output during peak hours. However, in this situation, the cost of EV dealers in the lower-level model is high, their power purchase from the distribution network is relatively high, they receive less compensation for EV discharge, and EV responses lack priority.
[0202] Figure 6 This is a schematic diagram of the scheduling model generated in the third embodiment of the hierarchical scheduling method for grid connection of new energy vehicles and electric vehicles in this invention. Figure 6 As shown, in the third embodiment, the factor of minimizing the operating costs of electric vehicle dealers is taken into consideration. In this case, the dealers continuously obtain peak-valley electric vehicle discharge from the electric vehicle user side, and electric vehicles participate more in the energy supply and consumption of the distributed grid, thereby reducing the dealers' grid purchase of electricity, reducing the dealers' operating costs, and thus improving the response priority of electric vehicles.
[0203] A second aspect of the present invention relates to a hierarchical scheduling system that includes grid connection of new energy sources and electric vehicles, wherein the system is implemented using the hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in the first aspect of the present invention.
[0204] The beneficial effects of this invention are that, compared with the prior art, the hierarchical scheduling method and system for grid-connected new energy and electric vehicles in this invention adjusts the fitness function based on the fitness value of the genetic population during the iteration process, and adaptively sets the crossover rate and mutation rate, thereby achieving fast and accurate model solving and scheduling. This invention is simple to improve, optimizes the encoding process, ensures that the differences in fitness between individuals continuously increase as the iteration process progresses, and reasonably controls the crossover rate and mutation rate, thus maintaining the diversity of the solution space, fully avoiding premature convergence, and improving the convergence speed of the algorithm and the accuracy of the global optimal solution.
[0205] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.
Claims
1. A hierarchical scheduling method including grid connection of new energy sources and electric vehicles, characterized in that, The method includes the following steps: Step 1: Based on the characteristics of the grid-connected new energy and electric vehicles, establish a new energy prediction error model and an electric vehicle response error model; Step 2: Establish an upper-level model with the objective functions of minimizing the total system load and maximizing the total absorption of new energy sources. Establish a lower-level model with the objective functions of minimizing the cost of electric vehicle dealers, minimizing the deviation between dealer output and scheduling plan, and maximizing the response priority of electric vehicles. Substitute the model described in Step 1 into the two-level model in Step 2. Step 3: Solve the two-layer model using an improved genetic algorithm and obtain the scheduling results; The fitness function of the genetic algorithm is obtained by transforming the single-objective fitness function after multi-objective normalization. The transformation method is as follows: In the formula, The reciprocal of the normalized single-objective fitness function. The fitness function obtained after transformation using the aforementioned transformation method is... This represents the current iteration number. This represents the maximum number of iterations for the genetic algorithm. and These are the first transformation parameter and the second transformation parameter of the transformation method, respectively. First transformation parameters and second transformation parameters and The value of ensures that the population of the genetic algorithm simultaneously satisfies the following conditions: In the formula, The current iteration number is The first in the population The fitness function of each individual, where, The value range is the individual ID of all individuals in the current population. The sum of the fitness of all individuals in the current population. Let be the variance of the fitness of all individuals in the current population.
2. The hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in claim 1, characterized in that: The discrete variables in the two-level model are filled with data using the linear interpolation method; The continuous variables in the two-layer model are encoded together with the optimized discrete variables using real-number encoding to obtain encoded data.
3. The hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in claim 2, characterized in that: The discrete variables in the two-layer model include the switching state data of electric vehicles in the time dimension; The continuous variables in the two-layer model include the node voltage of the distribution network, the charging power of the charging stations in the distribution network, and the output of electric vehicle operators in the distribution network.
4. The hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in claim 3, characterized in that: Monte Carlo random sampling is performed on the encoded data, and initial populations for multiple scenarios are generated based on the sampling results.
5. The hierarchical scheduling method for grid connection of new energy vehicles and electric vehicles as described in claim 4, characterized in that: The genetic algorithm selects operations that satisfy... , in, For the first During the nth iteration, the 1st The probability of an individual being selected.
6. The hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in claim 5, characterized in that: The crossover operator determines the total number of offspring chromosomes based on the crossover rate, where the crossover rate is... In the formula, The cross parameters are preset, and , The random crossover rate value is the crossover rate of the crossover individuals, and the random crossover rate ranges from [0.4, 0.99]. The larger fitness value among the crossover individuals, This represents the average fitness value of the current population.
7. The hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in claim 5, characterized in that: The mutation operator determines the total number of mutated chromosomes based on the mutation rate, where the mutation rate is... In the formula, and These are pre-defined cross parameters, and , The random mutation rate is the value of the mutated individual, and the random mutation rate ranges from [0.0001, 0.1]. This represents the fitness value of the mutated individual. This represents the average fitness value of the current population.
8. A hierarchical dispatching system including grid connection of new energy and electric vehicles, characterized in that: The system is implemented using the hierarchical scheduling method for grid connection of new energy sources and electric vehicles as described in any one of claims 1-7.