Power grid peak shaving method and device considering participation of electric vehicle, equipment and storage medium
By improving the Wild Dog optimization algorithm to optimize the charging and discharging strategy of electric vehicles, the problem of increased peak-valley difference in the power grid caused by disordered charging and discharging of electric vehicles is solved, thereby achieving stable power grid load and optimization of electric vehicle operating costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2022-12-19
- Publication Date
- 2026-07-21
AI Technical Summary
The disorderly charging and discharging of electric vehicles on a large scale leads to an increase in the peak-valley difference of the power grid, increasing the burden on the power system.
An improved wild dog optimization algorithm is adopted. By obtaining the rated charging and discharging power and number of electric vehicles, the wild dog behavior strategy is determined by dynamic probability value, the charging and discharging power is updated, and the survival rate is calculated to optimize the charging and discharging strategy of electric vehicles and reduce the peak-valley difference of the power grid.
It improves the speed and accuracy of electric vehicle charging and discharging optimization, stabilizes the power grid load curve, reduces the peak-valley difference in the power grid, and optimizes the operating costs of electric vehicles.
Smart Images

Figure CN115833205B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a power grid peak shaving method, apparatus, equipment and storage medium that takes into account the participation of electric vehicles. Background Technology
[0002] As the number of electric vehicles continues to rise, various new energy vehicles, represented by pure electric vehicles, will replace gasoline vehicles as the main means of transportation for people's daily travel. With a large number of electric vehicles connecting to the grid for charging and discharging, the disorderly charging and discharging of these vehicles will bring new load growth to the grid. If electric vehicles are concentrated in charging during peak grid load periods, it will cause "peak-on-peak" conditions, further burdening the power system. Therefore, a method is needed to guide the orderly charging and discharging of electric vehicles to reduce the peak-to-valley difference in the power grid through the positive interaction between electric vehicles and microgrids. Summary of the Invention
[0003] This application provides a grid peak shaving method, apparatus, equipment, and storage medium that takes into account the participation of electric vehicles, in order to solve the technical problem that the large-scale entry of electric vehicles into the grid can easily lead to an increase in the peak-valley difference of the grid.
[0004] To address the aforementioned technical problems, in a first aspect, this application provides a grid peak-shaving method that considers the participation of electric vehicles, comprising:
[0005] Obtain the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the grid in the current time period;
[0006] Using the rated charging and discharging power as the current target individual in the improved wild dog optimization algorithm, the wild dog behavior strategy of the current target individual is determined based on its dynamic probability value. The dynamic probability value is an indicator for determining the target individual's optimization strategy, including a first dynamic probability value P and a second dynamic probability value Q. The first dynamic probability value P indicates whether the current target individual should employ a hunting strategy, and the second dynamic probability value Q indicates which hunting strategy the current target individual should choose. The first dynamic probability value of the current target individual is calculated based on a preset first dynamic probability function. The second dynamic probability value of the current target individual is calculated based on a preset second dynamic probability function. The preset first dynamic probability function is: The second dynamic probability function is preset as follows: ;in, This is the first dynamic probability value. This is the second dynamic probability value. To improve the iteration count of the Wild Dog optimization algorithm, , and These are preset parameters, and can be set to -0.2, 25, and 0.9 respectively.
[0007] Based on the wild dog behavior strategy, the latest charging and discharging power of the target electric vehicle is updated, and the latest charging and discharging power is used as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm.
[0008] Based on the latest charging / discharging power and the number of electric vehicles, the survival rate of the latest optimized individual is calculated, including: using a preset objective function, calculating the objective function value of the target electric vehicle's charging based on the latest charging / discharging power; using preset charging constraints, determining the charging flag bit of the target electric vehicle at the current moment based on the latest charging / discharging power and the number of electric vehicles; using a preset fitness formula, calculating the individual fitness of the latest optimized individual based on the objective function value and the charging flag bit; and using a preset survival rate formula, calculating the survival rate of the latest optimized individual based on the individual fitness; wherein, the objective function is:
[0009] ;
[0010] in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for target electric vehicles. To pre-set carbon emissions, Interval period This refers to the range of distances that a target electric vehicle can travel per unit of battery power. Carbon emissions per unit of fuel-powered vehicle and These are the weighting coefficients. The objective function value, This represents the difference between the peak and valley loads. The maximum operating cost of the target electric vehicle;
[0011] If the number of iterations of the improved Wild Dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold, then the latest charging and discharging power is determined as the optimal charging and discharging power of the target electric vehicle in the current time period, and the optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
[0012] In some implementations, using the rated charging and discharging power as the current target individual in the improved wild dog optimization algorithm, and determining the wild dog behavior strategy of the current target individual based on its dynamic probability value, includes:
[0013] The wild dog population of the improved wild dog optimization algorithm is initialized with the rated charging and discharging power, and the rated charging and discharging power is used as the current optimal individual in the wild dog population;
[0014] Based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual, the stray dog behavior strategy of the current optimization individual is determined.
[0015] In some implementations, determining the stray dog behavior strategy of the current optimization individual based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual includes:
[0016] The first dynamic probability value of the current optimization individual is calculated based on the preset first dynamic probability function;
[0017] If the first dynamic probability value is not greater than the first preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a scavenging strategy.
[0018] If the first dynamic probability value is greater than the first preset probability value, then the second dynamic probability value of the current optimization individual is calculated based on the preset second dynamic probability function.
[0019] If the second dynamic probability value is not greater than the second preset probability value, then the stray dog behavior strategy of the current optimization individual is determined to be a persecution strategy.
[0020] If the second dynamic probability value is greater than the second preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a group attack strategy.
[0021] In some implementations, updating the latest charging and discharging power of the target electric vehicle based on the stray dog behavior strategy includes:
[0022] If the wild dog's behavior strategy is a scavenging strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the scavenging strategy, wherein the scavenging strategy is:
[0023] ;
[0024] If the stray dog behavior strategy is a persecution strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the persecution strategy, wherein the persecution strategy is:
[0025] ;
[0026] If the wild dog behavior strategy is a group attack strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the group attack strategy, wherein the group attack strategy is:
[0027] ;
[0028] in, This refers to the latest charge / discharge power or the latest optimized individual in this iteration. The first randomly selected from the wild dog population A search for the best individual For the current search for the best individual, This is the latest optimized individual from the previous iteration. The optimal subset of individuals for group attacks within a wild dog population. The first random number, The second random number, It is a binary random number. A random integer generated based on the size of the wild dog population.
[0029] In some implementations, after calculating the survival rate of the latest optimized individual based on the latest charging / discharging power and the number of electric vehicles, the method further includes:
[0030] If the survival rate is not greater than the preset threshold, then based on a preset selection strategy, the latest optimal individual is reselected from the wild dog population, wherein the reselected latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm; the preset selection strategy is:
[0031] ;
[0032] in, For the newly selected optimal individuals, This is the latest optimized individual from the previous iteration. The first randomly selected from the wild dog population A search for the best individual The first randomly selected from the wild dog population A search for the best individual It is a binary random number.
[0033] Secondly, this application also provides a grid peak-shaving device that takes into account the participation of electric vehicles, comprising:
[0034] The acquisition module is used to acquire the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the power grid in the current time period.
[0035] The first determining module is used to determine the wild dog behavior strategy of the current optimizing individual based on the rated charging and discharging power as the current optimizing individual in the improved wild dog optimization algorithm, and based on the dynamic probability value of the current optimizing individual; wherein, the dynamic probability value is an indication value for determining the optimizing strategy of the optimizing individual, which includes a first dynamic probability value P and a second dynamic probability value Q, the first dynamic probability value P being an indication value for whether the current optimizing individual adopts a hunting strategy, and the second dynamic probability value Q being an indication value for which hunting strategy the current optimizing individual chooses; the first dynamic probability value of the current optimizing individual is calculated based on a preset first dynamic probability function; the second dynamic probability value of the current optimizing individual is calculated based on a preset second dynamic probability function; wherein, the preset first dynamic probability function is: The second dynamic probability function is preset as follows: ;in, This is the first dynamic probability value. This is the second dynamic probability value. To improve the iteration count of the Wild Dog optimization algorithm, , and These are preset parameters, and can be set to -0.2, 25, and 0.9 respectively.
[0036] The update module is used to update the latest charging and discharging power of the target electric vehicle based on the wild dog behavior strategy, and use the latest charging and discharging power as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm.
[0037] The calculation module is used to calculate the survival rate of the latest optimized individual based on the latest charging / discharging power and the number of electric vehicles, including: calculating the objective function value of the target electric vehicle's charging based on the latest charging / discharging power using a preset objective function; determining the charging flag bit of the target electric vehicle at the current moment based on the latest charging / discharging power and the number of electric vehicles using preset charging constraints; calculating the individual fitness of the latest optimized individual based on the objective function value and the charging flag bit using a preset fitness formula; and calculating the survival rate of the latest optimized individual based on the individual fitness using a preset survival rate formula; wherein, the objective function is:
[0038] ;
[0039] in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for target electric vehicles. To pre-set carbon emissions, Interval period This refers to the range of distances that a target electric vehicle can travel per unit of battery power. Carbon emissions per unit of fuel-powered vehicle and These are the weighting coefficients. The objective function value, This represents the difference between the peak and valley loads. The maximum operating cost of the target electric vehicle;
[0040] The second determining module is used to determine the latest charging and discharging power as the optimal charging and discharging power of the target electric vehicle in the current time period if the number of iterations of the improved wild dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold. The optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
[0041] Thirdly, this application also provides a computer device including a processor and a memory, the memory being used to store a computer program that, when executed by the processor, implements the power grid peak shaving method considering electric vehicle participation as described in the first aspect.
[0042] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the power grid peak shaving method considering the participation of electric vehicles as described in the first aspect.
[0043] Compared with the prior art, this application has at least the following beneficial effects:
[0044] By obtaining the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the grid in the current time period, the rated charging and discharging power is used as the current optimization individual in the improved wild dog optimization algorithm. Based on the dynamic probability value of the current optimization individual, the wild dog behavior strategy of the current optimization individual is determined, thereby using the dynamic probability value to accelerate the individual optimization decision of the improved wild dog optimization algorithm and improve the individual optimization speed. Then, based on the wild dog behavior strategy, the latest charging and discharging power of the target electric vehicle is updated, and the latest charging and discharging power is used as the latest optimization individual in the improved wild dog optimization algorithm. The latest optimization individual is used as the current optimization individual in the next iteration of the improved wild dog optimization algorithm. The algorithm calculates the survival rate of the latest optimized individual based on the latest charging and discharging power and the number of electric vehicles, thereby ensuring a balance between global search and local optimization and improving the accuracy of individual optimization. Finally, if the number of iterations of the improved wild dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold, the latest charging and discharging power is determined as the optimal charging and discharging power of the target electric vehicle in the current time period. The optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle, so that the power grid charges the target electric vehicle with the charging and discharging power optimized by the improved wild dog optimization algorithm, reducing the peak-valley difference of the power grid and making the power grid load curve more stable. Attached Figure Description
[0045] Figure 1 This is a schematic flowchart illustrating a power grid peak-shaving method that takes into account the participation of electric vehicles, as shown in an embodiment of this application.
[0046] Figure 2 This is a schematic diagram illustrating the application process of a power grid peak-shaving method that considers the participation of electric vehicles, as shown in an embodiment of this application.
[0047] Figure 3 This is a schematic diagram illustrating the iterative comparison after optimization, as shown in an embodiment of this application.
[0048] Figure 4 This is a schematic diagram illustrating the comparison of daily power grid load after optimization, as shown in an embodiment of this application.
[0049] Figure 5 This is a schematic diagram of the structure of a power grid peak-shaving device that takes into account the participation of electric vehicles, as shown in an embodiment of this application.
[0050] Figure 6 This is a schematic diagram of the structure of a computer device shown in an embodiment of this application. Detailed Implementation
[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0052] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a power grid peak-shaving method considering the participation of electric vehicles, provided as an embodiment of this application. The power grid peak-shaving method considering the participation of electric vehicles in this embodiment can be applied to computer equipment, including but not limited to smartphones, laptops, tablets, desktop computers, physical servers, and cloud servers. Figure 1 As shown, the power grid peak shaving method considering electric vehicle participation in this embodiment includes steps S101 to S105, which are detailed below:
[0053] Step S101: Obtain the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the power grid in the current time period.
[0054] In this step, the target electric vehicle is the electric vehicle that is currently connected to the power grid and ready to charge, and the number of electric vehicles is the number of electric vehicles that are currently connected to the power grid and charging during the current time period.
[0055] Step S102: Using the rated charging and discharging power as the current target individual in the improved wild dog optimization algorithm, determine the wild dog behavior strategy of the current target individual based on the dynamic probability value of the current target individual.
[0056] In this step, the Dingo Optimization Algorithm (DOA) is an optimization algorithm that simulates the foraging process of wild dogs. The improved Dingo Optimization Algorithm in this application is an improved algorithm that introduces dynamic probability values and individual survival rates on the basis of the DOA algorithm. The wild dog behavioral strategy is the optimization strategy of the current seeking individual, which includes non-hunting strategies and hunting strategies. The non-hunting strategy is specifically the scavenging strategy, and the hunting strategy includes the group attack strategy and the persecution strategy.
[0057] Optionally, the dynamic probability value is an indicator value for determining the optimization strategy (wild dog behavior strategy) of the optimization individual, which includes a first dynamic probability value P and a second dynamic probability value Q. The first dynamic probability value P is an indicator value for whether the current optimization individual adopts a hunting strategy, and the second dynamic probability value Q is an indicator value for which hunting strategy the current optimization individual chooses.
[0058] Optionally, a first dynamic probability value of the currently optimized individual is calculated based on a preset first dynamic probability function; a second dynamic probability value of the currently optimized individual is calculated based on a preset second dynamic probability function. The preset first dynamic probability function is:
[0059] ;
[0060] The second dynamic probability function is preset as follows:
[0061] ;
[0062] in, This is the first dynamic probability value. This is the second dynamic probability value. To improve the iteration count of the Wild Dog optimization algorithm, , and These are preset parameters, and can be set to -0.2, 25, and 0.9 respectively.
[0063] In some embodiments, step S102 includes:
[0064] The wild dog population of the improved wild dog optimization algorithm is initialized with the rated charging and discharging power, and the rated charging and discharging power is used as the current optimal individual in the wild dog population;
[0065] Based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual, the stray dog behavior strategy of the current optimization individual is determined.
[0066] In this embodiment, the rated charging and discharging power is used as the current optimal individual in the wild dog population to initialize the wild dog population size:
[0067] ,in For the current optimal individual, namely the rated charge / discharge power, This represents the lower limit of the rated charging and discharging power. These are the upper and lower values of the rated charging and discharging power. A random number uniformly generated between [0,1].
[0068] Optionally, determining the stray dog behavior strategy of the current optimization individual based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual includes: calculating the first dynamic probability value of the current optimization individual based on a preset first dynamic probability function; if the first dynamic probability value is not greater than a first preset probability value, then determining that the stray dog behavior strategy of the current optimization individual is a scavenging strategy; if the first dynamic probability value is greater than the first preset probability value, then calculating the second dynamic probability value of the current optimization individual based on a preset second dynamic probability function; if the second dynamic probability value is not greater than a second preset probability value, then determining that the stray dog behavior strategy of the current optimization individual is a persecution strategy; if the second dynamic probability value is greater than the second preset probability value, then determining that the stray dog behavior strategy of the current optimization individual is a group attack strategy.
[0069] In this optional embodiment, both the first preset probability value and the second preset probability value are That is, the above initialization process is based on random numbers uniformly generated between [0,1].
[0070] Step S103: Based on the wild dog behavior strategy, update the latest charging and discharging power of the target electric vehicle, and use the latest charging and discharging power as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm.
[0071] In this step, each wild dog behavior strategy corresponds to an update formula. Based on the corresponding update formula, the latest charging and discharging power of the target electric vehicle is updated.
[0072] In some embodiments, if the stray dog behavior strategy is a scavenging strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the scavenging strategy, wherein the scavenging strategy is:
[0073] ;
[0074] If the stray dog behavior strategy is a persecution strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the persecution strategy, wherein the persecution strategy is:
[0075] ;
[0076] If the wild dog behavior strategy is a group attack strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the group attack strategy, wherein the group attack strategy is:
[0077] ;
[0078] in, This refers to the latest charge / discharge power or the latest optimized individual in this iteration. The first randomly selected from the wild dog population A search for the best individual For the current search for the best individual, This is the latest optimized individual from the previous iteration. The optimal subset of individuals for group attacks within a wild dog population. The first random number, The second random number, It is a binary random number. A random integer generated based on the size of the wild dog population.
[0079] In this embodiment, It is a uniformly generated random number within [-2,2], which is a scaling factor that can change the size of the trajectory of the wild dog (the optimal individual); It is a random number generated in the range [-1, 1]. These are random numbers generated within an interval ranging from 1 to the maximum size of the optimized individual. ; , Is Random integers generated in reverse order. This refers to the size of the wild dog population.
[0080] Step S104: Calculate the survival rate of the latest optimized individual based on the latest charging / discharging power and the number of electric vehicles.
[0081] In this step, since wild dogs may be attacked and face the risk of extinction during hunting, this embodiment considers the survival rate of wild dogs, that is, the survival rate of the latest optimal individuals.
[0082] In some embodiments, step S104 includes:
[0083] Using a preset objective function, the objective function value for charging the target electric vehicle is calculated based on the latest charging and discharging power;
[0084] Using preset charging constraints, based on the latest charging and discharging power and the number of electric vehicles, the charging flag of the target electric vehicle at the current moment is determined;
[0085] Using a preset fitness formula, the individual fitness of the latest optimized individual is calculated based on the objective function value and the charging flag bit;
[0086] Using a preset survival rate formula, the survival rate of the latest optimized individual is calculated based on the individual's fitness.
[0087] In this embodiment, the objective function for electric vehicles participating in the grid peak-shaving strategy includes the peak-to-valley difference in grid load and the operating cost of electric vehicles. The operating cost of electric vehicles includes charging costs, discharge revenue, and revenue from selling carbon credits. To consider both low-carbon and economic efficiency, the optimization objective is to minimize the objective function.
[0088] Optionally, the objective function is:
[0089] ;
[0090] in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time (positive during charging and negative during discharging). In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for the target electric vehicle (e.g., 0.3 yuan / kg). The preset carbon emissions (specifically, the carbon emissions of a gasoline vehicle with the same driving range as an electric vehicle on a full charge). The interval period (can be 1). This refers to the range of a target electric vehicle per unit of battery power (generally, an electric vehicle can travel 5km on 1kWh of battery power). This refers to the carbon emissions per unit of fuel-powered vehicles (e.g., 0.197 kg / km). and This is the weighting coefficient (all values can be 0.5). The objective function value, This represents the difference between the peak and valley loads. This represents the maximum operating cost of the target electric vehicle.
[0091] Optionally, the preset charging constraints are:
[0092] ;
[0093] in, In order to be in The number of electric vehicles at any given time Rated charge / discharge power; For target electric vehicles The charging and discharging power at any given time is the latest charging and discharging power. When the latest charging and discharging power meets the preset charging constraint condition, the value of the charging flag is 0; when the latest charging and discharging power does not meet the preset charging constraint condition, the value of the charging flag is 1.
[0094] Optionally, the preset fitness formula is:
[0095] ;
[0096] in, For the first Individual fitness of an optimal individual The objective function value, For the first An individual seeking optimization The charging indicator at any time. The penalty coefficient for exceeding the boundary (can be 10). 9 ).
[0097] Optionally, the preset survival rate formula is:
[0098] ;
[0099] in, For the first The survival rate of each optimal individual. For the first Individual fitness of an optimal individual and These represent the maximum and minimum fitness values, respectively. It is understandable that... and The fitness can be calculated using the above-mentioned preset fitness formula, based on the maximum and minimum values of the wild dog population size.
[0100] Step S105: If the number of iterations of the improved Wild Dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold, then the latest charging and discharging power is determined to be the optimal charging and discharging power of the target electric vehicle in the current time period. The optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
[0101] In this step, the preset threshold can be set to 0.3, meaning that when the survival rate... When the time limit is reached, it is determined whether the number of iterations of the improved Wild Dog optimization algorithm has reached the preset number. If not, the latest charging and discharging power is used as the current optimal individual for the next iteration. If so, the latest charging and discharging power is used as the optimal charging and discharging power to charge and discharge the target electric vehicle.
[0102] Optionally, if the survival rate is not greater than the preset threshold, then based on a preset selection strategy, the latest optimal individual is reselected from the wild dog population, wherein the reselected latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm; the preset selection strategy is:
[0103] ;
[0104] in, For the newly selected optimal individuals, This is the latest optimized individual from the previous iteration. The first randomly selected from the wild dog population A search for the best individual The first randomly selected from the wild dog population A search for the best individual It is a binary random number.
[0105] In this optional embodiment, and All are random numbers generated within an interval ranging from 1 to the maximum size of the optimized individual. It is understandable that the latest optimal individual would be reselected for the next iteration.
[0106] This is an example, not a limitation. Figure 2 A schematic diagram illustrating the application process of a power grid peak-shaving method considering electric vehicle participation is shown. Taking a daily load curve of a certain region as an example, the time-of-use electricity price includes a peak period (10:00-14:00) price of 1.256 yuan / (kW•h), an off-peak period (23:00-7:00) price of 0.249 yuan / (kW•h), and a flat price of 0.503 yuan / (kW•h) for the remaining periods; the rated charging and discharging power of the electric vehicles is 7kW. An improved Wild Dog optimization algorithm is used to... Figure 2 The application process shown is used to perform peak shaving for multiple electric vehicles, and simulations are performed using Matlab software to obtain the following results: Figure 3 The comparison chart of iterations after optimization is shown, and as shown in the figure. Figure 4 The graph shows a comparison of the daily load of the power grid after optimization.
[0107] from Figure 3 The comparison chart clearly shows that the DOA optimization algorithm with improved P value reduced the number of iterations to 8 from the original 27 to achieve the optimal result; the DOA optimization algorithm with changed P and Q values reduced the number of iterations to 7, further decreasing the number of optimization iterations. Combined with... Figure 4 The optimized daily load comparison chart of the power grid, shown below, compares the peak-valley load difference and vehicle owner benefits using the improved Wild Dog optimization algorithm with the previous data, resulting in the following comparison table of peak-valley load difference and vehicle owner benefits:
[0108]
[0109] according to Figure 4 As can be seen from the data in the table above, through dynamic probability values and the dynamic probability value when the optimal individual executes the hunting strategy. The calculation formula is used to propose an improved Wilddog optimization algorithm, which can effectively improve the algorithm's optimization accuracy and speed. The electric vehicle peak shaving model can fully consider factors such as grid peak-valley difference, time-of-use electricity price, and carbon revenue. Applying the improved Wilddog optimization algorithm to solve the electric vehicle peak shaving model can further reduce the grid peak-valley difference rate, make the grid load curve smoother, and further reduce the operating cost of electric vehicles.
[0110] To implement the power grid peak-shaving method considering electric vehicle participation in the above-described method embodiments, and to achieve the corresponding functional and technical effects, see [link to relevant documentation]. Figure 5 , Figure 5 This diagram illustrates a structural block diagram of a power grid peak-shaving device considering the participation of electric vehicles, according to an embodiment of this application. For ease of explanation, only the parts relevant to this embodiment are shown. The power grid peak-shaving device considering the participation of electric vehicles provided in this embodiment includes:
[0111] The acquisition module 501 is used to acquire the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the power grid in the current time period.
[0112] The first determining module 502 is used to determine the wild dog behavior strategy of the current optimization individual based on the dynamic probability value of the current optimization individual, using the rated charging and discharging power as the current optimization individual of the improved wild dog optimization algorithm.
[0113] Update module 503 is used to update the latest charging and discharging power of the target electric vehicle based on the wild dog behavior strategy, and use the latest charging and discharging power as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm.
[0114] The calculation module 504 is used to calculate the survival rate of the latest optimized individual based on the latest charging and discharging power and the number of electric vehicles;
[0115] The second determining module 505 is used to determine the latest charging and discharging power as the optimal charging and discharging power of the target electric vehicle in the current time period if the number of iterations of the improved wild dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold. The optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
[0116] In some embodiments, the first determining module 502 includes:
[0117] An initialization unit is used to initialize the wild dog population of the improved wild dog optimization algorithm with the rated charging and discharging power, and to use the rated charging and discharging power as the current optimal individual of the wild dog population.
[0118] The determining unit is used to determine the wild dog behavior strategy of the current optimization individual based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual.
[0119] In some embodiments, the determining unit is specifically used for:
[0120] The first dynamic probability value of the current optimization individual is calculated based on the preset first dynamic probability function;
[0121] If the first dynamic probability value is not greater than the first preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a scavenging strategy.
[0122] If the first dynamic probability value is greater than the first preset probability value, then the second dynamic probability value of the current optimization individual is calculated based on the preset second dynamic probability function.
[0123] If the second dynamic probability value is not greater than the second preset probability value, then the stray dog behavior strategy of the current optimization individual is determined to be a persecution strategy.
[0124] If the second dynamic probability value is greater than the second preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a group attack strategy.
[0125] In some embodiments, the update module 503 is specifically used for:
[0126] If the wild dog's behavior strategy is a scavenging strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the scavenging strategy, wherein the scavenging strategy is:
[0127] ;
[0128] If the stray dog behavior strategy is a persecution strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the persecution strategy, wherein the persecution strategy is:
[0129] ;
[0130] If the wild dog behavior strategy is a group attack strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the group attack strategy, wherein the group attack strategy is:
[0131] ;
[0132] in, This refers to the latest charge / discharge power or the latest optimized individual in this iteration. The first randomly selected from the wild dog population A search for the best individual For the current search for the best individual, This is the latest optimized individual from the previous iteration. The optimal subset of individuals for group attacks within a wild dog population. The first random number, The second random number, It is a binary random number. A random integer generated based on the size of the wild dog population.
[0133] In some embodiments, the computing module 504 is specifically used for:
[0134] Using a preset objective function, the objective function value for charging the target electric vehicle is calculated based on the latest charging and discharging power;
[0135] Using preset charging constraints, based on the latest charging and discharging power and the number of electric vehicles, the charging flag of the target electric vehicle at the current moment is determined;
[0136] Using a preset fitness formula, the individual fitness of the latest optimized individual is calculated based on the objective function value and the charging flag bit;
[0137] Using a preset survival rate formula, the survival rate of the latest optimized individual is calculated based on the individual's fitness.
[0138] In some embodiments, the objective function is:
[0139] ;
[0140] in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for target electric vehicles. To pre-set carbon emissions, Interval period This refers to the range of distances that a target electric vehicle can travel per unit of battery power. Carbon emissions per unit of fuel-powered vehicle and These are the weighting coefficients. The objective function value, This represents the difference between the peak and valley loads. This represents the maximum operating cost of the target electric vehicle.
[0141] In some embodiments, the power grid peak-shaving device further includes:
[0142] The selection module is configured to, if the survival rate is not greater than the preset threshold, reselect the latest optimal individual from the wild dog population based on a preset selection strategy, wherein the reselected latest optimal individual is used as the current optimal individual in the next iteration of the improved wild dog optimization algorithm; the preset selection strategy is:
[0143] ;
[0144] in, For the newly selected optimal individuals, This is the latest optimized individual from the previous iteration. The first randomly selected from the wild dog population A search for the best individual The first randomly selected from the wild dog population A search for the best individual It is a binary random number.
[0145] The aforementioned grid peak-shaving device considering electric vehicle participation can implement the grid peak-shaving method considering electric vehicle participation described in the above method embodiments. The options in the above method embodiments are also applicable to this embodiment, and will not be detailed here. The remaining content of this application's embodiments can be referred to the content of the above method embodiments, and will not be repeated in this embodiment.
[0146] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 6 As shown, the computer device 6 of this embodiment includes: at least one processor 60 ( Figure 6 (Only one is shown in the diagram), memory 61, and computer program 62 stored in said memory 61 and executable on said at least one processor 60, wherein the processor 60 executes said computer program 62 to implement the steps in any of the above method embodiments.
[0147] The computer device 6 may be a smartphone, tablet, desktop computer, or cloud server, among other computing devices. This computer device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 6The computer device 6 is merely an example and does not constitute a limitation on the computer device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0148] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0149] In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as a hard disk or memory of the computer device 6. In other embodiments, the memory 61 may be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Furthermore, the memory 61 may include both internal and external storage units of the computer device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0150] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above method embodiments.
[0151] This application provides a computer program product that, when run on a computer device, enables the computer device to execute the steps described in the various method embodiments above.
[0152] In the several embodiments provided in this application, it will be understood that each block in the flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the figures. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0153] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0154] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.
Claims
1. A power grid peak-shaving method considering the participation of electric vehicles, characterized in that, include: Obtain the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the grid in the current time period; Using the rated charging and discharging power as the current target individual in the improved wild dog optimization algorithm, the wild dog behavior strategy of the current target individual is determined based on its dynamic probability value. The dynamic probability value is an indicator for determining the target individual's optimization strategy, including a first dynamic probability value P and a second dynamic probability value Q. The first dynamic probability value P indicates whether the current target individual should employ a hunting strategy, and the second dynamic probability value Q indicates which hunting strategy the current target individual should choose. The first dynamic probability value of the current target individual is calculated based on a preset first dynamic probability function. The second dynamic probability value of the current target individual is calculated based on a preset second dynamic probability function. The preset first dynamic probability function is: The second dynamic probability function is preset as follows: ;in, This is the first dynamic probability value. This is the second dynamic probability value. To improve the iteration count of the Wild Dog optimization algorithm, , and These are preset parameters, and can be set to -0.2, 25, and 0.9 respectively. Based on the wild dog behavior strategy, the latest charging and discharging power of the target electric vehicle is updated, and the latest charging and discharging power is used as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm. Based on the latest charging / discharging power and the number of electric vehicles, the survival rate of the latest optimized individual is calculated, including: using a preset objective function, calculating the objective function value of the target electric vehicle's charging based on the latest charging / discharging power; using preset charging constraints, determining the charging flag bit of the target electric vehicle at the current moment based on the latest charging / discharging power and the number of electric vehicles; using a preset fitness formula, calculating the individual fitness of the latest optimized individual based on the objective function value and the charging flag bit; and using a preset survival rate formula, calculating the survival rate of the latest optimized individual based on the individual fitness; wherein, the objective function is: ; in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for target electric vehicles. To pre-set carbon emissions, Interval period This refers to the range of distances that a target electric vehicle can travel per unit of battery power. Carbon emissions per unit of fuel-powered vehicle and These are the weighting coefficients. The objective function value, This represents the difference between the peak and valley loads. The maximum operating cost of the target electric vehicle; If the number of iterations of the improved Wild Dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold, then the latest charging and discharging power is determined as the optimal charging and discharging power of the target electric vehicle in the current time period, and the optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
2. The power grid peak-shaving method considering the participation of electric vehicles as described in claim 1, characterized in that, The step of using the rated charging and discharging power as the current target individual in the improved wild dog optimization algorithm, and determining the wild dog behavior strategy of the current target individual based on the dynamic probability value of the current target individual, includes: The wild dog population of the improved wild dog optimization algorithm is initialized with the rated charging and discharging power, and the rated charging and discharging power is used as the current optimal individual in the wild dog population; Based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual, the stray dog behavior strategy of the current optimization individual is determined.
3. The power grid peak-shaving method considering the participation of electric vehicles as described in claim 2, characterized in that, The step of determining the stray dog behavior strategy of the current optimization individual based on the first dynamic probability value and / or the second dynamic probability value of the current optimization individual includes: The first dynamic probability value of the current optimization individual is calculated based on the preset first dynamic probability function; If the first dynamic probability value is not greater than the first preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a scavenging strategy. If the first dynamic probability value is greater than the first preset probability value, then the second dynamic probability value of the current optimization individual is calculated based on the preset second dynamic probability function. If the second dynamic probability value is not greater than the second preset probability value, then the stray dog behavior strategy of the current optimization individual is determined to be a persecution strategy. If the second dynamic probability value is greater than the second preset probability value, then the wild dog behavior strategy of the current optimization individual is determined to be a group attack strategy.
4. The power grid peak-shaving method considering the participation of electric vehicles as described in claim 1, characterized in that, The step of updating the latest charging and discharging power of the target electric vehicle based on the wild dog behavior strategy includes: If the wild dog's behavior strategy is a scavenging strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the scavenging strategy, wherein the scavenging strategy is: ; If the stray dog behavior strategy is a persecution strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the persecution strategy, wherein the persecution strategy is: ; If the wild dog behavior strategy is a group attack strategy, then the latest charging and discharging power of the target electric vehicle is updated based on the group attack strategy, wherein the group attack strategy is: ; in, This refers to the latest charge / discharge power or the latest optimized individual in this iteration. The first randomly selected from the wild dog population A search for the best individual For the current search for the best individual, This is the latest optimized individual from the previous iteration. The optimal subset of individuals for group attacks within a wild dog population. The first random number, The second random number, It is a binary random number. A random integer generated based on the size of the wild dog population.
5. The power grid peak-shaving method considering the participation of electric vehicles as described in claim 1, characterized in that, After calculating the survival rate of the latest optimized individual based on the latest charging and discharging power and the number of electric vehicles, the method further includes: If the survival rate is not greater than the preset threshold, then based on a preset selection strategy, the latest optimal individual is reselected from the wild dog population, wherein the reselected latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm; the preset selection strategy is: ; in, For the newly selected optimal individuals, This is the latest optimized individual from the previous iteration. The first randomly selected from the wild dog population A search for the best individual The first randomly selected from the wild dog population A search for the best individual It is a binary random number.
6. A power grid peak-shaving device that considers the participation of electric vehicles, characterized in that, include: The acquisition module is used to acquire the rated charging and discharging power of the target electric vehicle and the number of electric vehicles connected to the power grid in the current time period. The first determining module is used to determine the wild dog behavior strategy of the current optimizing individual based on the rated charging and discharging power as the current optimizing individual in the improved wild dog optimization algorithm, and based on the dynamic probability value of the current optimizing individual; wherein, the dynamic probability value is an indication value for determining the optimizing strategy of the optimizing individual, which includes a first dynamic probability value P and a second dynamic probability value Q, the first dynamic probability value P being an indication value for whether the current optimizing individual adopts a hunting strategy, and the second dynamic probability value Q being an indication value for which hunting strategy the current optimizing individual chooses; the first dynamic probability value of the current optimizing individual is calculated based on a preset first dynamic probability function; the second dynamic probability value of the current optimizing individual is calculated based on a preset second dynamic probability function; wherein, the preset first dynamic probability function is: The second dynamic probability function is preset as follows: ;in, This is the first dynamic probability value. This is the second dynamic probability value. To improve the iteration count of the Wild Dog optimization algorithm, , and These are preset parameters, and can be set to -0.2, 25, and 0.9 respectively. The update module is used to update the latest charging and discharging power of the target electric vehicle based on the wild dog behavior strategy, and use the latest charging and discharging power as the latest optimal individual of the improved wild dog optimization algorithm. The latest optimal individual is used as the current optimal individual for the next iteration of the improved wild dog optimization algorithm. The calculation module is used to calculate the survival rate of the latest optimized individual based on the latest charging / discharging power and the number of electric vehicles, including: calculating the objective function value of the target electric vehicle's charging based on the latest charging / discharging power using a preset objective function; determining the charging flag bit of the target electric vehicle at the current moment based on the latest charging / discharging power and the number of electric vehicles using preset charging constraints; calculating the individual fitness of the latest optimized individual based on the objective function value and the charging flag bit using a preset fitness formula; and calculating the survival rate of the latest optimized individual based on the individual fitness using a preset survival rate formula; wherein, the objective function is: ; in, For the peak-valley difference of the power grid load, For target electric vehicles The charging and discharging power at any given time In order to be in Power grid load at any given time The operating cost of the target electric vehicle, The charging and discharging costs of the target electric vehicle, The real-time electricity price of the power grid for a 24-hour period. The revenue from saleable carbon credits for the target electric vehicles. The carbon allowance price for target electric vehicles. To pre-set carbon emissions, Interval period This refers to the range of distances that a target electric vehicle can travel per unit of battery power. Carbon emissions per unit of fuel-powered vehicle and These are the weighting coefficients. The objective function value, This represents the difference between the peak and valley loads. The maximum operating cost of the target electric vehicle; The second determining module is used to determine the latest charging and discharging power as the optimal charging and discharging power of the target electric vehicle in the current time period if the number of iterations of the improved wild dog optimization algorithm reaches a preset number and the survival rate is greater than a preset threshold. The optimal charging and discharging power is used to control the charging and discharging power of the power grid for the target electric vehicle.
7. A computer device, characterized in that, It includes a processor and a memory, the memory being used to store a computer program that, when executed by the processor, implements the grid peak shaving method considering electric vehicle participation as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the power grid peak shaving method considering the participation of electric vehicles as described in any one of claims 1 to 5.