Electric vehicle charging and discharging configuration method and device and electronic equipment

By clustering electric vehicles and building a double-layer optimization model, combined with the time-sharing electricity price strategy, the problem of inaccurate charging and discharge configuration of electric vehicles is solved, and the reduction of battery loss cost and efficient allocation of power resources is achieved.

CN120396760APending Publication Date: 2025-08-01STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510278470.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, the charging and discharging configuration of electric vehicles is inaccurate, resulting in high battery loss cost, unable to adapt to the flexibility of the power grid, and neglecting the mutual influence between charging stations.

Method used

By clustering electric vehicles, an upper-level optimization model is built to minimize load fluctuations in the power system, a battery loss cost model is built, a time-sharing electricity price period division strategy is adopted, and a double-layer optimization model is combined to optimize charging and discharge behavior to ensure the minimization of costs of the power system and user.

Benefits of technology

It has achieved improved the accuracy of electric vehicle charging and discharging configuration, reduced battery loss costs, optimized power resource configuration, and improved grid stability and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120396760A_ABST
    Figure CN120396760A_ABST
Patent Text Reader

Abstract

The invention discloses an electric vehicle charging and discharging configuration method and device and electronic equipment. The method comprises the following steps: clustering a plurality of electric vehicles to obtain a plurality of electric vehicle groups; constructing an upper-layer optimization model by taking the minimum load fluctuation of the power system as a target; based on the new energy power generation prediction data and the power load data of the power system, constructing a time-of-use electricity price period division model; constructing a lower-layer optimization model based on the battery loss cost model; and under an electricity price adjustment strategy determined based on the time-of-use electricity price period division model, with the minimum electricity utilization cost of each electricity utilization account of the electric power system and the minimum difference value between the power optimization results of the upper-layer optimization model and the lower-layer optimization model as the target, optimizing the charging and discharging behaviors corresponding to the plurality of electric vehicles. According to the invention, the technical problem of inaccurate charging and discharging configuration of the electric vehicle in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grids, and more particularly, to a method, device, and electronic device for configuring electric vehicle charging and discharging. Background Art

[0002] With the increase in the proportion of renewable energy access in the power grid, the randomness, intermittency, and uncertainty of distributed power sources have had a huge impact on the operation of the power grid. The access of energy storage systems can suppress the output fluctuations of distributed power sources, optimize the load curve, and improve the operational stability of the power grid. Electric vehicles in cities, as energy storage systems, have a significant impact on the operation of the power grid through their charging and discharging behaviors.

[0003] In related technologies, the charging and discharging control methods of electric vehicles are mainly divided into two types: centralized control and decentralized control. The centralized control method treats electric vehicles as a single control unit and realizes load optimization configuration by setting a charging power curve or a charging and discharging power curve. The decentralized control method realizes load optimization configuration by establishing an interaction mechanism between charging stations with different demands and decentralized electric vehicles. Both methods have certain defects. The centralized control method centrally manages electric vehicles and requires pre-training and control of the charging and discharging behaviors of electric vehicles, which greatly restricts the charging and discharging behaviors of electric vehicles and cannot meet the flexibility requirements of the power grid. The decentralized control method only considers the interaction between charging stations and electric vehicles and ignores the mutual influence between charging stations, which limits the optimization effect of the charging and discharging behaviors of electric vehicles. At the same time, the charging and discharging control methods in related technologies ignore the battery loss situation during the charging and discharging process of electric vehicles, resulting in inaccurate charging and discharging configuration of electric vehicles and a problem of high battery loss cost in the charging and discharging configuration of electric vehicles.

[0004] To address the above problems, no effective solution has been proposed yet. Summary of the Invention

[0005] Embodiments of the present invention provide a method, device, and electronic device for configuring electric vehicle charging and discharging to at least solve the technical problem of inaccurate charging and discharging configuration of electric vehicles in related technologies.

[0006] According to one aspect of an embodiment of the present invention, there is provided a method for configuring charging and discharging of electric vehicles, including: clustering a plurality of electric vehicles to obtain a plurality of electric vehicle groups, wherein the number of the plurality of electric vehicle groups is less than the number of the plurality of electric vehicles; constructing an upper-layer optimization model with the goal of minimizing the load fluctuation of the power system, wherein the upper-layer optimization model is used to determine the charging and discharging requirements of each electric vehicle group; constructing a battery loss cost model, wherein the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during the charging and discharging process; constructing a time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system, wherein the time-of-use electricity price period division model is used to dynamically determine an electricity price adjustment strategy, wherein the electricity price adjustment strategy includes an electricity price adjustment period and the electricity price information of the electricity price adjustment period; constructing a lower-layer optimization model based on the battery loss cost model, wherein the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model; and optimizing the charging and discharging behaviors corresponding to the plurality of electric vehicles with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model.

[0007] According to another aspect of an embodiment of the present invention, there is also provided a device for configuring charging and discharging of electric vehicles, including: a clustering module, configured to cluster a plurality of electric vehicles to obtain a plurality of electric vehicle groups, wherein the number of the plurality of electric vehicle groups is less than the number of the plurality of electric vehicles; a first model construction module, configured to construct an upper-layer optimization model with the goal of minimizing the load fluctuation of the power system, wherein the upper-layer optimization model is used to determine the charging and discharging requirements of each electric vehicle group; a second model construction module, configured to construct a battery loss cost model, wherein the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during the charging and discharging process; a third model construction module, configured to construct a time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system, wherein the time-of-use electricity price period division model is used to dynamically determine an electricity price adjustment strategy, wherein the electricity price adjustment strategy includes an electricity price adjustment period and the electricity price information of the electricity price adjustment period; a fourth model construction module, configured to construct a lower-layer optimization model based on the battery loss cost model, wherein the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model; and a charging and discharging optimization module, configured to optimize the charging and discharging behaviors corresponding to the plurality of electric vehicles with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model.

[0008] According to another aspect of the embodiments of the present invention, a non-volatile storage medium is further provided. The non-volatile storage medium stores multiple instructions, and the instructions are adapted to be loaded and executed by a processor to perform the electric vehicle charging and discharging configuration method of any one of the above.

[0009] According to another aspect of the embodiments of the present invention, an electronic device is further provided, including one or more processors and a memory. The memory is used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the electric vehicle charging and discharging configuration method of any one of the above.

[0010] In the embodiments of the present invention, by clustering multiple electric vehicles, multiple electric vehicle groups are obtained, where the number of the multiple electric vehicle groups is less than the number of the multiple electric vehicles; aiming at minimizing the load fluctuation of the power system, an upper-layer optimization model is constructed, where the upper-layer optimization model is used to determine the charging and discharging requirements of each electric vehicle group; a battery loss cost model is constructed, where the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during the charging and discharging process; based on the new energy power generation prediction data and power load data of the power system, a time-of-use electricity price period division model is constructed, where the time-of-use electricity price period division model is used to dynamically determine the electricity price adjustment strategy, where the electricity price adjustment strategy includes the electricity price adjustment period and the electricity price information of the electricity price adjustment period; based on the battery loss cost model, a lower-layer optimization model is constructed, where the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model; under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, aiming at minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, the charging and discharging behaviors corresponding to multiple electric vehicles are optimized. The purpose of effectively realizing the efficient allocation of power resources is achieved by adopting cluster analysis, a two-layer optimization model (including an upper-layer power system load minimization model and a lower-layer electric vehicle charging and discharging power optimization model based on battery loss cost) and a dynamic time-of-use electricity price period division strategy, thereby achieving the technical effect of improving the accuracy of electric vehicle charging and discharging configuration, and further solving the technical problem of inaccurate electric vehicle charging and discharging configuration existing in the related art. Description of the Drawings

[0011] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0012] Figure 1 is a flowchart of an electric vehicle charging and discharging configuration method according to an embodiment of the present invention;

[0013] Figure 2 It is a schematic diagram showing an optional relationship between the depth of discharge and the cycle life of a battery implemented according to the present invention;

[0014] Figure 3 It is a schematic diagram showing an optional division of time-of-use electricity price periods according to an embodiment of the present invention;

[0015] Figure 4 It is a flowchart of an optional method for configuring the charging and discharging of an electric vehicle according to an embodiment of the present invention;

[0016] Figure 5 It is a schematic diagram of a device for configuring the charging and discharging of an electric vehicle according to an embodiment of the present invention. Detailed implementation manners

[0017] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0019] First, for the convenience of understanding the embodiments of the present invention, some terms or nouns involved in the present invention will be explained below:

[0020] The K-means algorithm is an iterative clustering analysis method. Its basic idea is to group n samples in a dataset into K different clusters. The goal of the algorithm is to minimize the sum of the distances from each sample to its corresponding cluster center (i.e., the mean point or centroid) through an optimization process. By continuously updating the cluster centers and adjusting the membership of samples, the K-means algorithm can gradually achieve the optimal partitioning of the data, thus effectively completing the clustering task. The K-means algorithm continuously optimizes the clustering results through an iterative approach, making the objects within each cluster as close as possible, while the objects between different clusters are as far apart as possible. This optimization process is usually based on a certain objective function, such as the Sum of Squared Errors (SSE), which measures the sum of the distances from all objects to their respective cluster centers.

[0021] Two-layer optimization means that the constraint set of an optimization problem is defined by the optimal solution set of another optimization problem. That is, within the constraints of an optimization problem, there is another optimization problem. We usually refer to the optimization problem in the constraints as the lower-level problem and the optimization problem in the objective function as the upper-level problem.

[0022] According to an embodiment of the present invention, there is provided an embodiment of a method for configuring electric vehicle charging and discharging. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0023] Figure 1 is a flowchart of the method for configuring electric vehicle charging and discharging according to an embodiment of the present invention. As Figure 1 shown, the method includes the following steps:

[0024] Step S102, clustering multiple electric vehicles to obtain multiple electric vehicle groups, where the number of multiple electric vehicle groups is less than the number of multiple electric vehicles;

[0025] Optionally, by determining the locations of charging piles and clustering electric vehicles based on this information, centralized management and scheduling of electric vehicles can be achieved, reducing unnecessary movement during the charging process.

[0026] In an optional embodiment, clustering multiple electric vehicles to obtain multiple electric vehicle groups includes: determining the charging piles included in the corresponding area of the power system; based on the location information of the charging piles, performing spatial clustering on multiple electric vehicles to obtain multiple electric vehicle groups.

[0027] Optionally, determining the charging piles within the corresponding area of the power system is the basis for the entire clustering process. In the context of smart grids and electric vehicle charging infrastructure, the power system usually covers multiple geographical regions, with different numbers and types of charging piles deployed within each region. First, identify the specific locations of these charging piles, which can be achieved by collecting the geographical coordinate information of the charging piles, and can be realized through the power system database, the application programming interface of the charging service provider, or the public charging pile map service. Once the location information of the charging piles is determined, the next task is to perform spatial clustering on the electric vehicles distributed around these charging piles. The purpose of this operation is to more effectively manage and regulate the charging demands of a large number of electric vehicles. By allocating electric vehicles to nearby charging pile groups, the load on the charging infrastructure can be reduced, and at the same time, the utilization of charging resources can be optimized. The K-means clustering algorithm can be used, but is not limited to, to cluster multiple electric vehicles. This algorithm divides electric vehicles into different groups based on the distance between the charging piles and the electric vehicles, and each group has one or more charging piles. Through clustering, centralized management and scheduling of electric vehicles can be achieved, unnecessary movement during the charging process can be reduced, and charging efficiency and convenience can be improved.

[0028] In the above method, by determining the locations of the charging piles and performing spatial clustering of electric vehicles based on this information, the demand and supply between the charging piles and electric vehicles can be more precisely matched, providing structured electric vehicle group information for the subsequent upper-layer optimization model and lower-layer optimization model, making the scheduling of the power system more efficient. At the same time, it can also promote the interaction between electric vehicle users and the power grid, improving resource utilization efficiency and user satisfaction.

[0029] Optionally, the K-means clustering algorithm can be used to manage the grouping of electric vehicles (EVs). Within a fixed area, the charging load of electric vehicles is generally a relatively stable value. Therefore, electric vehicles can be spatially clustered based on the locations of the charging piles, and then each cluster can be assigned to different agents for management.

[0030] The core idea of the K-means clustering algorithm is to judge the similarity of objects by calculating the distance between them. The smaller the distance, the more similar the objects are judged to be. In this way, the algorithm assigns objects to the cluster with the smallest distance, and finally forms multiple non-overlapping clusters. During the execution of the algorithm, first, K cluster centers need to be set, and each cluster center represents the core of a cluster. During the iteration process, according to the distance between the object and the cluster center, each object is classified into the cluster with the closest central value to it, and the central value is continuously adjusted to optimize the clustering result until the division of the clusters converges.

[0031] The specific implementation steps of the K-means algorithm are as follows:

[0032] Step S1021, determine the sample set charging pile x i (1≤i≤n) and the number of cluster centers N. Randomly select N initial values from the available sample set as cluster centers c r (r), where k = 1, 2, ... N, and the number of iterations R is determined.

[0033] Step S1022: First, calculate the distance between each charging pile and the center of each cluster in the sample set, and then assign each data object to the cluster U closest to it. k .

[0034] Step S1023: For each cluster, recalculate the cluster center, as shown in formula (1):

[0035]

[0036] The function for calculating the clustering judgment standard is:

[0037]

[0038] Step S1024: Determine whether the score value D has converged. If so, the iteration is terminated; if not, the process returns to step S1022.

[0039] Step S104, constructing an upper-level optimization model with the goal of minimizing load fluctuations in the power system, wherein the upper-level optimization model is used to determine the charging and discharging requirements of each electric vehicle group;

[0040] Optionally, the construction and operation of the upper-level optimization model is to deal with the load fluctuation problem caused by the introduction of a high proportion of new energy and the large-scale access of electric vehicles in the power system. This model takes minimizing the load fluctuation of the entire power system as the optimization goal, and dynamically adjusts and optimizes the charging and discharging plan of the electric vehicle group by analyzing and predicting the power system's new energy power generation (such as wind power and solar power generation), basic load power (that is, power demand excluding electric vehicles), and the charging and discharging characteristics of electric vehicles. Specifically, the upper-level optimization model calculates the optimal charging and discharging power curve of each electric vehicle group to smooth the power system load and reduce load fluctuations, thereby promoting the stable operation of the power system and the effective absorption of new energy.

[0041] In an alternative embodiment, an upper-layer optimization model is constructed with the goal of minimizing the load fluctuation of the power system, including: determining the grid power balance constraint as: the total power consumption of the power system is equal to the total power generation, where the total power consumption includes the base load of the power system and the charging and discharging powers of multiple electric vehicle groups, and the total power generation includes the thermal power, new energy power generation, and the charging and discharging power of the energy storage system in the power system; determining the new energy power generation prediction constraint as: the charging and discharging powers of multiple electric vehicle groups are within the preset power generation range of the new energy power generation; determining the state of charge constraint of the electric vehicle as: the state of charge of each electric vehicle during the charging and discharging process is within the preset state of charge range; based on the grid power balance constraint, the new energy power generation prediction constraint, and the state of charge constraint of the electric vehicle, an upper-layer optimization model is constructed with the goal of minimizing the load fluctuation of the power system.

[0042] Optionally, the grid power balance constraint requires that the total power consumption of the power system be equal to the total power generation at any point in time. This constraint ensures the balance between power supply and demand, avoiding the situations of power surplus or shortage. Specifically in this embodiment, the total power consumption includes the base load of the power system and the charging and discharging powers of multiple electric vehicle groups. The base load refers to the daily load of the power system other than electric vehicle charging, including industrial and commercial electricity and residential electricity, etc. The charging and discharging powers of the electric vehicle groups can reflect the energy demands of electric vehicles during the charging and discharging processes. The total power generation includes thermal power, new energy power generation (such as wind power and solar power generation), and the charging and discharging power of the energy storage system. This constraint can guarantee the overall power balance of the power system and is the basis for constructing the upper-layer optimization model.

[0043] The new energy power generation prediction constraint is based on the prediction of the renewable energy power generation, ensuring that the charging and discharging powers of the electric vehicle groups are within the preset power generation range of the new energy power generation. Since the output of new energy power generation is affected by natural conditions such as weather and sunlight, its power generation has a certain degree of uncertainty. Therefore, predicting the new energy power generation and using it as a constraint condition can guide the charging behavior of electric vehicles, enabling them to charge when the new energy power generation is sufficient and reducing charging or discharging when the power generation is insufficient, so as to avoid imposing an additional burden on the power grid. This constraint condition helps to improve the consumption rate of new energy, reduce the phenomenon of abandoned electricity, and ensure the stable operation of the power system.

[0044] The state of charge (SOC) constraint for electric vehicles is a limiting condition set for the SOC of each electric vehicle during the charging and discharging process. The state of charge can reflect the charging level of the battery and is expressed as a percentage of the battery capacity. The preset state of charge range is to ensure that electric vehicle users can obtain sufficient electrical energy when needed, while avoiding overcharging or over-discharging of the battery to protect the battery health and extend its service life. This constraint combines user needs and the battery loss cost model, which can ensure that the charging and discharging behavior of electric vehicles not only meets the needs of users' travel but also controls battery loss and reduces the operating costs of users.

[0045] Based on the above grid power balance constraint, new energy power generation prediction constraint, and electric vehicle state of charge constraint, the upper-layer optimization model is constructed with the goal of minimizing the load fluctuation of the power system. By comprehensively considering the base load of the power system, new energy power generation prediction, and electric vehicle charging and discharging demands, the model solves the charging and discharging power of each electric vehicle group to minimize the load fluctuation of the power system. The optimization process of this objective function can involve, but is not limited to, using mathematical optimization methods such as linear programming, nonlinear programming, or mixed-integer programming to find the best charging and discharging strategy that meets all constraint conditions.

[0046] Optionally, with the goal of minimizing load fluctuation, the optimal charging and discharging power curve of electric vehicles is determined by establishing the corresponding upper-layer optimization model. The corresponding objective function is set as:

[0047]

[0048] In the formula: F1 represents the degree of load fluctuation, P load (t) is the base load at time t; P nf (t) is the predicted new energy power generation at time t; P EV (t) is the total charging and discharging power of electric vehicles; P av is the daily average load.

[0049] The set constraint conditions include grid power balance constraint, new energy output constraint (i.e., new energy power generation prediction constraint), electric vehicle charging and discharging power constraint, and electric vehicle power constraint (i.e., electric vehicle state of charge constraint), where:

[0050] The grid power balance constraint can be expressed in the following form:

[0051]

[0052] In the formula: P N (t) is the actual new energy field power value at time t; P G,j (t) is the output value of thermal power unit j at time t.

[0053] The new - energy output constraint (i.e., the new - energy power - generation prediction constraint) is expressed as follows:

[0054] 0≤P N (t)≤P nf (t) (6)

[0055] The electric - vehicle charge - and - discharge power constraint is expressed as follows:

[0056]

[0057] In the formula: η d and η c are the discharge efficiency and charge efficiency of the electric vehicle; N EV is the number of electric vehicles; and are the maximum discharge power and maximum charge power of a single electric vehicle, respectively.

[0058] The electric - vehicle battery - charge constraint (i.e., the state - of - charge constraint of the electric vehicle) is expressed as follows:

[0059] N EV DH min ≤DH(t)≤N EV DH max (8)

[0060] In the formula: DH min and DH max are the upper and lower limits of the state - of - charge to protect the service life of the electric - vehicle battery, respectively. The upper - layer model is constrained by the upper and lower limits of the total state - of - charge of all electric vehicles; DH(t) is the total state - of - charge of the electric vehicles at time t.

[0061] Step S106, construct a battery - loss cost model, where the battery - loss cost model is used to indicate the battery - loss situation of each electric vehicle during the charge - and - discharge process;

[0062] Optionally, the construction of the battery - loss cost model aims to quantify and evaluate the battery - loss situation of the electric vehicle during the charge - and - discharge process, and reflect the impact of battery loss on the electric - vehicle user in the form of cost. As the core component of the electric vehicle, the performance and life of the battery are directly related to the use cost and user experience of the electric vehicle. Quantifying the battery - loss cost through the battery - loss cost model can help the lower - layer optimization model determine the optimal charge - and - discharge power to minimize battery loss, thereby reducing the total cost of the user, including the maintenance and replacement costs of the battery.

[0063] In an alternative embodiment, a battery loss cost model is constructed, including: obtaining charge and discharge depth data of batteries of multiple electric vehicles, where the charge and discharge depth data is used to indicate the percentage of the battery discharging from a fully charged state to a preset state of charge; and constructing a battery loss cost model based on the charge and discharge depth data and the cycle life of the battery.

[0064] Optionally, the depth of discharge (DOD) is a core parameter of the battery loss cost model, which can reflect the percentage of the battery discharging from a fully charged state to a certain preset state of charge. This data can be obtained through real-time monitoring by the battery management system (BMS) of the electric vehicle battery, or based on statistical analysis of historical charging records. The acquisition of the charge and discharge depth data is the basis for constructing the battery loss cost model because it is directly related to the health status and life of the battery. After obtaining the charge and discharge depth data, the next step is to construct the battery loss cost model. The construction of the model needs to consider the cycle life of the battery, that is, the number of times the battery can still maintain a certain performance after multiple charge and discharge cycles. The cycle life of the battery is affected by various factors, and the depth of discharge is a key variable. The greater the depth of discharge, the shorter the cycle life of the battery. Therefore, the battery loss cost model needs to quantify the relationship between the depth of discharge and battery loss, and a mathematical function can be used to describe this relationship, such as an exponential function, a logarithmic function, or a polynomial function, etc. Through the construction of the battery loss cost model, this embodiment not only focuses on load management at the power system level, but also delves into the electric vehicle user level, fully considering battery health and economy, and realizing the organic combination of grid dispatching and user interests, thereby improving the intelligent level and economic efficiency of electric vehicle charging management.

[0065] Optionally, in the process of optimizing the charging and discharging configuration of electric vehicles, the role of user participation in the optimization effect is crucial. Therefore, when performing the lower-layer optimization, in addition to considering the constraint conditions of the upper-layer optimization results, the willingness of users to participate should also be emphasized. On the basis of ensuring that the charging needs of users are met, reducing their costs is the core means to promote user participation. User costs mainly include the loss costs generated by the electric vehicle battery during charging and discharging and the electricity costs required.

[0066] The loss of the battery is closely related to its cycle life, and there are many factors affecting the battery life. Among them, the depth of discharge has a greater impact on battery loss and is controllable. By reasonably controlling the depth of discharge of the battery, the battery loss can be significantly reduced, the service life of the battery can be extended, and the total cost of users during the charging and discharging process of electric vehicles can be reduced. The depth of discharge of the battery refers to the absolute value of the electric quantity experienced during the battery discharge process under a certain rated capacity, which can be represented by the state of charge SOC:

[0067] D = DH s -DH f (9)

[0068] Where: D represents the absolute value of the electric quantity experienced during the battery discharge process, and DH s is the state of charge when the electric vehicle starts to discharge; DH f is the state of charge when the electric vehicle finishes discharging.

[0069] Figure 2 is a schematic diagram of an optional relationship between the depth of discharge and the cycle life of a battery implemented according to the present invention. There is a logarithmic relationship between the cycle life of a lithium-ion battery and the depth of discharge. As the depth of discharge deepens, the cycle life of the battery will show an exponential decline. As Figure 2 shown by the curve, it can be analyzed by fitting with a corresponding equation, and the expression is:

[0070] L D = 694D -0.795 (10)

[0071] According to the depth of discharge L D of the battery and the cycle life, the total discharge amount of the battery can be obtained, as shown in Equation (11):

[0072] L ET = L D C max D (11)

[0073] Where: L ET represents the total discharge amount of the battery, and C max is the battery capacity.

[0074] The battery loss cost model caused by vehicle discharge can be expressed as:

[0075] c d = c bat / L ET (12)

[0076] Where: c d is the battery loss cost, and c bat is the battery cost.

[0077] Step S108, based on the new energy power generation prediction data and power load data of the power system, construct a time-of-use electricity price period division model, where the time-of-use electricity price period division model is used to dynamically determine the electricity price adjustment strategy, and the electricity price adjustment strategy includes the electricity price adjustment period and the electricity price information of the electricity price adjustment period;

[0078] Optionally, in a smart grid and renewable energy power generation system, a time-of-use electricity price period division model is a key component. This model can utilize predicted new energy power generation and actual power load data to dynamically adjust electricity prices in order to achieve optimal allocation of power resources.

[0079] In an optional embodiment, based on new energy power generation prediction data and power load data of the power system, a time-of-use electricity price period division model is constructed, including: determining the difference information between the new energy power generation prediction data and the power load data, where the new energy power generation prediction data includes wind power generation prediction data and solar power generation prediction data; constructing a time-of-use electricity price period division model based on the difference information, where the time-of-use electricity price period division model is used to determine the electricity price adjustment period and the electricity price information of the electricity price adjustment period based on the difference information, and the electricity price adjustment period includes a low valley period, a peak period, and other periods other than the low valley period and the peak period.

[0080] Optionally, the new energy power generation prediction data includes wind power generation prediction data and solar power generation prediction data, which can reflect the expected power generation of renewable energy in a future period. The power load data can reflect the total power demand in the power system, including base load (such as industrial, commercial, and residential electricity) and electric vehicle charging demand. By comparing the new energy power generation prediction data and the power load data, the difference information between the two, that is, the real-time supply-demand gap of the power system, can be determined. This information is crucial for constructing a time-of-use electricity price period division model because it is directly related to the dynamic adjustment strategy of electricity prices. Based on the difference information between the new energy power generation prediction data and the power load data, the load curve of the power system can be analyzed to determine the electricity price adjustment period. The electricity price adjustment period includes a low valley period, a peak period, and other periods between the two. The low valley period refers to the period when the power demand is low and the new energy power generation is relatively high. At this time, the electricity price is low to encourage users (such as electric vehicles) to charge during this period and make full use of the surplus power resources. The peak period is the period when the power demand surges and the new energy power generation may be insufficient. At this time, the electricity price is high to suppress additional power demand and avoid overloading of the power system. The electricity price in other periods is between the two to balance the supply-demand relationship. The determination of the electricity price information is also based on the difference information. During the low valley period, the electricity price will be lowered, and during the peak period, the electricity price will be raised, which can be achieved by setting an electricity price adjustment coefficient or directly adjusting the electricity price level. The electricity price adjustment strategy should be able to reflect the real-time changes in power supply and demand, ensure the reasonable allocation of power resources, and at the same time encourage users to charge during the period with a low electricity price, discharge or reduce charging during the period with a high electricity price, so as to achieve the effect of peak shaving and valley filling and improve the operating efficiency of the power system.

[0081] By constructing a time-of-use electricity price period division model, it is possible to monitor the changes in power supply and demand in real time, reasonably adjust electricity prices, promote the effective consumption of new energy, reduce the load fluctuations of the power system, and at the same time provide users with more economical charging options, achieving the stability and economy of the power system operation and the minimization of user costs.

[0082] Optionally, by predicting the wind power generation and power load data for each period, the equivalent load of new energy and basic load and its average value can be calculated, and the peak-valley difference of the equivalent load within a day can be further analyzed. According to the specific situation of the average value and peak-valley difference of the equivalent load, the periods of the power system can be reasonably divided. Figure 3 It is a schematic diagram of an optional time-of-use electricity price period division according to an embodiment of the present invention.

[0083] If the equivalent load in a certain period exceeds its mean value plus σ times the peak-valley difference, then this period is defined as a peak period; if the equivalent load in this period is lower than the mean value minus σ times the peak-valley difference, then this period is regarded as a valley period; the remaining periods are divided into normal periods. Through this division method, different electricity price periods can be reasonably determined according to the load fluctuation situation, thereby optimizing the allocation and utilization efficiency of power resources.

[0084] At this time, the time-of-use electricity price period division model can be expressed in the following way:

[0085]

[0086] P eq (t) = P load (t) + P nf (t) (14)

[0087]

[0088] In the formula: c(t) represents the time-of-use electricity price, c0 is the charging and discharging electricity price during the normal period of the equivalent load; δ is the fluctuation range of the electricity price in the peak period and valley period above and below the electricity price during the normal period of the equivalent load; P eq (t) is the equivalent load of new energy power generation and basic load; P av,1 (t) is the average value of the equivalent load of new energy power generation and basic load; P h is the peak-valley difference of the equivalent load of new energy power generation and basic load.

[0089] Step S110, based on the battery loss cost model, construct a lower-layer optimization model, where the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model;

[0090] Optionally, the lower-layer optimization model is a key component in the electric vehicle charging and discharging configuration method. It is designed to finely control the charging and discharging power of a single electric vehicle by considering the output of the battery loss cost model. This model is directly related to electric vehicle users and optimizes the charging and discharging behavior from the perspective of the user side, ensuring that while meeting the charging needs of electric vehicles, the battery loss cost is minimized as much as possible, improving user economy and satisfaction.

[0091] Step S112, under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, optimize the charging and discharging behaviors corresponding to multiple electric vehicles.

[0092] It should be noted that in the electric vehicle charging and discharging configuration method, the time-of-use electricity price period division model dynamically adjusts the electricity price strategy to encourage users to charge during low electricity price periods and discharge during high electricity price periods, thereby achieving peak shaving and valley filling and optimizing the utilization of power resources. However, simply relying on the time-of-use electricity price strategy may not fully consider the specific needs and costs of users, as well as the coordination between this strategy and the overall optimization goal of the power system. To solve the above problems, two-layer optimization models are introduced in this embodiment: The upper-layer optimization model focuses on the overall operation of the power system, and its goal is to minimize the load fluctuation of the power system by optimizing the charging and discharging demands of the electric vehicle group, ensuring the stable and economic operation of the power system; the lower-layer optimization model focuses on the electric vehicle user level and optimizes the charging and discharging power of a single electric vehicle based on the battery loss cost model to reduce the total cost of users, including electricity cost and battery loss cost.

[0093] In an optional embodiment, the method further includes: determining the first goal as: minimizing the electricity cost of each electricity consumption account in the power system; determining the second goal as: minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model; determining the first weight corresponding to the first goal and the second weight corresponding to the second goal; based on the first goal, the second goal, the first weight, and the second weight, determining the optimization goal; under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, based on the optimization goal, optimizing the charging and discharging behaviors corresponding to multiple electric vehicles.

[0094] Optionally, the first objective focuses on reducing the electricity cost of each electricity consumption account in the power system. Especially for electric vehicle users, this means minimizing the electricity bill of users while meeting the charging demand. The realization of this objective depends on the time-of-use electricity price mechanism. By charging during the periods with lower electricity prices (such as off-peak periods) and reducing charging or discharging during the periods with higher electricity prices (peak periods), the electricity cost can be reduced while meeting the user's demand. The second objective focuses on the consistency of the power optimization results between the upper-layer optimization model and the lower-layer optimization model. The upper-layer optimization model mainly starts from the overall perspective of the power system, considering the impacts of new energy generation, power load, and electric vehicle charging and discharging behaviors on the power grid to achieve the stable and economic operation of the power system. The lower-layer optimization model focuses on the user level and minimizes the electricity cost of users by optimizing the charging and discharging behaviors of individual electric vehicles. Minimizing the difference in power optimization results between the two models means that the efficiency and stability of the power system can be maximized while meeting the user's demand. In multi-objective optimization, determining the weights of each objective is a key step. The weights can reflect the relative importance between objectives and can be set based on user preferences, system requirements, or economic analysis. The determination of the first weight and the second weight enables the optimization algorithm to balance the relationship between the economic operation of the power system and the minimization of user costs and find a comprehensive optimal solution. The setting of the weights needs to be adjusted according to specific application scenarios and objectives to ensure that the optimization results meet both the operation requirements of the power system and the economic interests of users.

[0095] Under the electricity price adjustment strategy determined by the time-of-use electricity price period division model, the lower-layer optimization model comprehensively considers the first objective (minimizing electricity cost) and the second objective (minimizing the difference in power optimization results), as well as their respective objective weights. Through optimization algorithms (such as the linear weighted method, genetic algorithm, or particle swarm optimization algorithm, etc.), the lower-layer optimization model can solve the optimal charging and discharging strategies for each electric vehicle, that is, on the basis of meeting all constraint conditions (such as charging and discharging power constraints, state of charge constraints, user demand constraints, charging time constraints, charging and discharging times constraints, and charging and discharging state uniqueness constraints), the set optimization objectives can be achieved. During the entire optimization process, information such as the real-time data of the power system, the personalized needs of users, and the battery loss model is comprehensively analyzed and processed to find the optimal charging and discharging strategy that is beneficial to the economic operation of the power system and also considers the user cost and the battery health status. The realization of the optimization results also depends on the cooperation with agents and users to ensure that the charging and discharging behaviors are executed as expected, so as to achieve the intelligent management of the charging and discharging behaviors of multiple electric vehicles and promote the efficient utilization of power resources.

[0096] Optionally, during the construction of the lower-layer optimization model, from the perspective of power grid optimization, the lower-layer optimization should focus on user-side demands and minimize the difference from the upper-layer optimization results as much as possible. To improve users' enthusiasm for participation, it is also necessary to ensure that the users' electricity costs are as low as possible. Therefore, for the charging and discharging power of a single electric vehicle, the lower-layer optimization uses a two-objective optimization model to solve the problem, considering the balance between grid requirements and user costs simultaneously. Specifically, the objective functions are set as follows:

[0097] The difference between the two-layer optimizations is minimized, and the specific formula is as follows:

[0098]

[0099] The users' electricity costs are minimized, and the specific formula is as follows:

[0100]

[0101] In the formula: λ c and λ d are the charging electricity price and discharging electricity price of the electric vehicle at time t, respectively; is the total battery loss cost of all electric vehicles managed by agent k; c B is the battery investment cost.

[0102] The linear weighted method is used to normalize the multi-objective function. By assigning different weights to each objective, multiple objective functions are combined into a comprehensive evaluation function, and the objective functions F2 and F3 are normalized, as shown in Eqs. (23) to (27).

[0103] minF = μ1(F2 / F 2max ) + μ2(F3 / F 3max ) (23)

[0104] μ1 + μ2 = 1 (24)

[0105]

[0106] In the formula: F 2max is the equivalent load variance of the base load and new energy power generation; F 3max is the charging cost of electric vehicle users when connecting to the grid disorderly; F EV,f (t) is the charging power of electric vehicle users when connecting to the grid disorderly for charging; μ1 and μ2 are the weight coefficients of F2 and F3, respectively.

[0107] In an alternative embodiment, under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, with the goal of minimizing the electricity consumption cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, the charging and discharging behaviors corresponding to multiple electric vehicles are optimized, including: determining the charging and discharging power constraints of the electric vehicles as: the charging power of each electric vehicle is less than the preset charging power, and the discharging power of each electric vehicle is less than the preset discharging power; determining the state of charge (SOC) constraints of the electric vehicles as: the state of charge of each electric vehicle is within the preset state of charge range; determining the user demand constraints as: the state of charge of the battery when each electric vehicle leaves the charging pile is less than the expected state of charge preset for the corresponding account; determining the charging time constraints as: each electric vehicle charges within the preset charging period; determining the charging and discharging times constraints as: the number of charging and discharging times of each electric vehicle within the preset period is less than the predetermined number; determining the uniqueness constraint of the charging and discharging state as: at any moment, each electric vehicle is in any one of the following states: charging state, discharging state, idle state; under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, based on the charging and discharging power constraints of the electric vehicles, the state of charge constraints of the electric vehicles, the user demand constraints, the charging time constraints, the charging and discharging times constraints, and the uniqueness constraint of the charging and discharging state, with the goal of minimizing the electricity consumption cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, the charging and discharging behaviors corresponding to multiple electric vehicles are optimized.

[0108] Optionally, the charging and discharging power constraints of electric vehicles involve setting upper limits on the charging and discharging power of each electric vehicle. This constraint is designed to protect the electric vehicle battery from overcharging or over-discharging, while ensuring the stable operation of the power system. The upper limit of the charging power can be determined by the capacity of the electric vehicle charging facility and the maximum load that the power system can withstand during a specific period. The upper limit of the discharging power is based on the discharging capacity of the electric vehicle battery and the discharging power that can be effectively utilized by the power grid during the low-load period. The charging and discharging power constraints can ensure the rationality and safety of the charging and discharging behaviors of electric vehicles.

[0109] The state of charge (SOC) constraints of electric vehicles are the restrictions set on the state of charge of each electric vehicle during the charging and discharging process, ensuring that the state of charge of the battery is within the preset range, which can include the upper and lower limits of the state of charge. The state of charge constraints are formulated based on the battery loss cost model and user demands. It protects the battery health while meeting the user's planning for the travel needs of electric vehicles. This constraint can ensure the long-term performance and service life of the battery, thereby reducing the user's operating costs.

[0110] The user demand constraint ensures that when each electric vehicle leaves the charging pile, its state of charge reaches the expected state of charge preset in the user's account. This constraint can directly reflect the personalized requirements of users for electric vehicle charging. For example, users may need to ensure that the electric vehicle is fully charged before a specific time point to meet the travel plan for the next day. The setting of the user demand constraint can ensure that electric vehicles can meet the travel needs of users. At the same time, by coordinating with the power optimization results of the upper-layer optimization model and the lower-layer optimization model, a balance can be achieved between user demands and the operating efficiency of the power system.

[0111] The charging time constraint ensures that the charging behavior of each electric vehicle occurs within the preset charging period, which usually matches the electricity price adjustment strategy determined by the time-of-use electricity price period division model. Charging during low electricity price periods can reduce the charging cost of users and contribute to the peak shaving and valley filling of the power system, improving the operating efficiency of the power grid. This constraint enables users to charge during low-cost periods, thereby reducing the electricity bills of users.

[0112] The charge-discharge cycle constraint can limit the number of charge-discharge conversions of each electric vehicle within the preset period, which helps to reduce battery loss and extend the battery life. Frequent charge-discharge conversions will accelerate the battery loss. By setting an upper limit on the number of charge-discharge cycles, unnecessary charge-discharge behaviors can be avoided, ensuring the battery health and reducing the maintenance cost of users.

[0113] The uniqueness constraint of charge-discharge state can ensure that at any moment, each electric vehicle can only be in one of the states of charging, discharging, or idle. This constraint can avoid the chaos of charge-discharge states and improve the efficiency and safety of charging management.

[0114] Based on the above constraints, under the electricity price adjustment strategy determined by the time-of-use electricity price period division model, the lower-layer optimization model aims to minimize the difference between the minimum electricity cost of each electricity consumption account and the power optimization result, and optimizes the charge-discharge behaviors of multiple electric vehicles. This optimization process uses a multi-objective optimization algorithm. Considering the economic cost of users and the operating efficiency of the power system, by adjusting the charge-discharge power, time, and other parameters, the reduction of user costs and the efficient utilization of power resources can be achieved.

[0115] Optionally, during the construction of the lower-layer optimization model, the constraint functions are set to include the charge-discharge power constraint of electric vehicles, the state of charge constraint of electric vehicles, the user demand constraint, the charging time constraint, the charge-discharge cycle constraint, and the uniqueness constraint of charge-discharge state, where:

[0116] The charge-discharge power constraint of a single electric vehicle can be expressed as follows:

[0117]

[0118] The state of charge constraint of an electric vehicle can be expressed as follows:

[0119] DH min ≤DH i (t) ≤ DH max (29)

[0120] Where: DH i (t) is the state of charge of electric vehicle i at time t.

[0121] User demand constraint. To ensure that the electricity demand of users is met, after the electric vehicle is fully charged, its state of charge should meet the expected charging requirements of users, which can be expressed as follows:

[0122] DH e,i ≤DH i (t out,i ) (30)

[0123] Where: DH e,i is the expected electricity amount when electric vehicle i leaves; DH i (t out,i ) is the electricity amount of electric vehicle i when it goes off the grid.

[0124] The charging time constraint can be expressed as follows:

[0125] t in,i <t < t out,i (31)

[0126] Where: t in,i and t out,i are the grid connection time and off-grid time of electric vehicle i respectively.

[0127] Charge and discharge cycle constraint. To minimize the battery loss during the charge and discharge process of electric vehicles, it is necessary to limit the number of charge and discharge cycles. The specific charge and discharge conversion times constraint conditions are shown in Equation (32).

[0128]

[0129] Where: u i (t) is the charge and discharge state of electric vehicle i at time t, taking the value of 1 during charging, -1 during discharging, and 0 when neither charging nor discharging; Z is the upper limit of the number of charge and discharge power conversion times within the grid connection period of the electric vehicle.

[0130] Charge and discharge state uniqueness constraint. At any given moment, an electric vehicle can only be in one of three states: charging, discharging, or idle. The charge and discharge state uniqueness constraint can be expressed as follows.

[0131]

[0132] Through the above steps S102 to S108, the purpose of efficiently allocating power resources can be achieved by adopting cluster analysis, a two-layer optimization model (including an upper-layer power system load fluctuation minimization model and a lower-layer electric vehicle charging and discharging power optimization model based on battery loss cost), and a dynamic time-of-use electricity price period division strategy, thereby achieving the technical effect of improving the accuracy of electric vehicle charging and discharging configuration, and further solving the technical problem of inaccurate electric vehicle charging and discharging configuration existing in the related art.

[0133] Based on the above embodiments and alternative embodiments, the present invention proposes an alternative implementation manner. Figure 4 It is a flowchart of an alternative electric vehicle charging and discharging configuration method according to an embodiment of the present invention, as Figure 4 shown. The method includes:

[0134] S1. Grouping electric vehicles. Taking distance as the evaluation criterion, spatial clustering is performed on multiple electric vehicles according to the positions of charging piles to form mutually exclusive clusters composed of objects with small distances. Each cluster is divided into a category, and each category is used as an electric vehicle group and assigned to an agent for management.

[0135] S2. Optimization on the grid side. An upper-layer optimization model with the goal of minimizing compliance fluctuations is constructed. Among them, the upper-layer optimization model is used to determine the charging and discharging demands of each electric vehicle group. Specifically, with the goal of minimizing load fluctuations, the set constraint conditions include grid power balance constraints, new energy output constraints (i.e., new energy power generation prediction constraints), electric vehicle charging and discharging power constraints, and electric vehicle power quantity constraints (i.e., electric vehicle state of charge constraints). The optimal charging and discharging power curve of the electric vehicle is determined by establishing the corresponding upper-layer optimization model. The specific implementation manners of the objective function and each constraint condition are the same as those described above and will not be elaborated here.

[0136] S3. Establishing a time-of-use electricity price period division model. By predicting the wind power generation and power load data of each period, the equivalent load and its average value of new energy and basic load can be calculated, and the peak-valley difference of the equivalent load within a day can be further analyzed. According to the specific conditions of the average value and peak-valley difference of the equivalent load, the periods of the power system are reasonably divided. The specific implementation process is the same as that of the foregoing embodiment and will not be elaborated here.

[0137] S4. User - side optimization. A two - layer optimization model is established with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper - layer optimization model and the lower - layer optimization model. The corresponding set constraints can include but are not limited to the charging and discharging power constraint of a single electric vehicle, the state of charge constraint of the electric vehicle, the user demand constraint, the charging time constraint, the charging and discharging times constraint, and the uniqueness constraint of the charging and discharging state. The specific implementation processes of the two - layer optimization model and each constraint are the same as those in the foregoing embodiments and will not be elaborated here.

[0138] In this embodiment, an optimization configuration strategy for electric vehicle loads considering new - energy consumption and user - participation uncertainty is proposed. The hierarchical control is used to reduce the dimension of the model optimization operation. Considering that the user's participation degree will have a certain impact on the optimization results, this embodiment also constructs a battery loss cost model, and proposes a method for formulating time - of - use electricity price periods with dynamic adjustment for the power fluctuations of new - energy power generation and basic load, so as to better adapt to the changes in power supply and demand. This embodiment proposes a method for formulating time - of - use electricity price periods with dynamic adjustment for the power fluctuations of new - energy power generation and basic load, so as to better adapt to the changes in power supply and demand.

[0139] In this embodiment, an electric vehicle charging and discharging configuration device is also provided. This device is used to implement the above - mentioned embodiments and preferred implementation manners, and those that have been described will not be elaborated again. As used hereinafter, the terms "module" and "device" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0140] According to an embodiment of the present invention, an apparatus embodiment for implementing the above - mentioned electric vehicle charging and discharging configuration method is also provided. Figure 5 is a schematic structural diagram of an electric vehicle charging and discharging configuration device according to an embodiment of the present invention, as Figure 5 shown. The above - mentioned electric vehicle charging and discharging configuration device includes: a clustering module 500, a first model construction module 502, a second model construction module 504, a third model construction module 506, a fourth model construction module 508, and a charging and discharging optimization module 510, where:

[0141] The clustering module 500 is used to cluster multiple electric vehicles to obtain multiple electric vehicle groups, where the number of multiple electric vehicle groups is less than the number of multiple electric vehicles;

[0142] The first model construction module 502 is used to construct an upper - layer optimization model with the goal of minimizing the load fluctuation of the power system, where the upper - layer optimization model is used to determine the charging and discharging demands of each electric vehicle group.

[0143] The second model construction module 504 is configured to construct a battery loss cost model, where the battery loss cost model is used to indicate the battery loss condition of each electric vehicle during charging and discharging;

[0144] The third model construction module 506 is configured to construct a time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system, where the time-of-use electricity price period division model is used to dynamically determine an electricity price adjustment strategy, and the electricity price adjustment strategy includes an electricity price adjustment period and electricity price information for the electricity price adjustment period;

[0145] The fourth model construction module 508 is configured to construct a lower-layer optimization model based on the battery loss cost model, where the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model;

[0146] The charging and discharging optimization module 510 is configured to optimize the charging and discharging behaviors corresponding to multiple electric vehicles with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model.

[0147] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following way: the above-mentioned various modules can be located in the same processor; or, the above-mentioned various modules are located in different processors in any combination.

[0148] It should be noted here that the above-mentioned clustering module 500, the first model construction module 502, the second model construction module 504, the third model construction module 506, the fourth model construction module 508, and the charging and discharging optimization module 510 correspond to steps S102 to S112 in the embodiment. The examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned embodiment. It should be noted that the above-mentioned modules can run in a computer terminal as part of the device.

[0149] It should be noted that the optional or preferred implementation manners of this embodiment can refer to the relevant descriptions in the embodiment, and will not be elaborated here.

[0150] The above-mentioned electric vehicle charging and discharging configuration device may further include a processor and a memory. The above-mentioned clustering module 500, the first model construction module 502, the second model construction module 504, the third model construction module 506, the fourth model construction module 508, the charging and discharging optimization module 510, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to implement the corresponding functions.

[0151] The processor contains a kernel, which retrieves the corresponding program module from the memory. One or more kernels can be set. The memory may include non-permanent memory in a computer-readable medium, forms such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.

[0152] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, where, when the program runs, it controls the device where the non-volatile storage medium is located to execute any one of the above electric vehicle charging and discharging configuration methods.

[0153] Optionally, in this embodiment, the non-volatile storage medium can be located in any one of the computer terminals in a computer terminal group in a computer network or in any one of the mobile terminals in a mobile terminal group. The non-volatile storage medium includes a stored program.

[0154] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, where, when the program runs, it executes any one of the above electric vehicle charging and discharging configuration methods.

[0155] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, it is adapted to execute a program that initializes the steps of any one of the above electric vehicle charging and discharging configuration methods.

[0156] Optionally, when the above computer program product is executed on a data processing device, it is adapted to execute a program initialized with the following method steps: clustering multiple electric vehicles to obtain multiple electric vehicle groups, where the number of multiple electric vehicle groups is less than the number of multiple electric vehicles; constructing an upper-layer optimization model with the goal of minimizing the load fluctuation of the power system, where the upper-layer optimization model is used to determine the charging and discharging requirements of each electric vehicle group; constructing a battery loss cost model, where the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during charging and discharging; constructing a time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system, where the time-of-use electricity price period division model is used to dynamically determine the electricity price adjustment strategy, where the electricity price adjustment strategy includes the electricity price adjustment period and the electricity price information of the electricity price adjustment period; constructing a lower-layer optimization model based on the battery loss cost model, where the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model; under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, optimizing the charging and discharging behaviors corresponding to multiple electric vehicles with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model.

[0157] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored on the memory and executable on the processor, and the processor executes the program of the above-mentioned electric vehicle charging and discharging configuration method steps.

[0158] The above order of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments.

[0159] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0160] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the above module division can be a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of modules or modules can be in an electrical or other form.

[0161] The modules described above as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed over multiple modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] In addition, the functional modules in various embodiments of the present invention may be integrated into a processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0163] If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned non-volatile storage media include: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical discs, etc., which can store program codes.

[0164] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for configuring the charging and discharging of an electric vehicle, characterized in that Including: Clustering multiple electric vehicles to obtain multiple electric vehicle groups, where the number of the multiple electric vehicle groups is less than the number of the multiple electric vehicles; Constructing an upper-layer optimization model with the goal of minimizing the load fluctuation of the power system, where the upper-layer optimization model is used to determine the charging and discharging demands of each electric vehicle group; Constructing a battery loss cost model, where the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during charging and discharging; Based on the new energy power generation prediction data and power load data of the power system, constructing a time-of-use electricity price period division model, where the time-of-use electricity price period division model is used to dynamically determine the electricity price adjustment strategy, and the electricity price adjustment strategy includes the electricity price adjustment period and the electricity price information of the electricity price adjustment period; Based on the battery loss cost model, constructing a lower-layer optimization model, where the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model; Under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, optimizing the charging and discharging behaviors corresponding to the multiple electric vehicles.

2. The method according to claim 1, wherein The clustering of the multiple electric vehicles to obtain multiple electric vehicle groups includes: Determining the charging piles included in the corresponding area of the power system; Based on the location information of the charging piles, spatially clustering the multiple electric vehicles to obtain the multiple electric vehicle groups.

3. The method according to claim 1, wherein The constructing of the upper-layer optimization model with the goal of minimizing the load fluctuation of the power system includes: Determining the grid power balance constraint as: the total electricity consumption of the power system is equal to the total power generation, where the total electricity consumption includes the basic load of the power system and the charging and discharging power of the multiple electric vehicle groups, and the total power generation includes the thermal power, new energy power generation and charging and discharging power of the energy storage system in the power system; Determining the new energy power generation prediction constraint as: the charging and discharging power of the multiple electric vehicle groups is within the preset power generation range of the new energy power generation; Determining the electric vehicle state of charge constraint as: the state of charge of each electric vehicle during charging and discharging is within the preset state of charge range; Based on the grid power balance constraint, the new energy power generation prediction constraint and the electric vehicle state of charge constraint, constructing the upper-layer optimization model with the goal of minimizing the load fluctuation of the power system.

4. The method according to claim 1, characterized in that The constructing of the battery loss cost model includes: Obtaining the charge and discharge depth data of the batteries of the multiple electric vehicles, where the charge and discharge depth data is used to indicate the percentage of the battery discharging from the full charge state to the preset state of charge; Based on the charge and discharge depth data and the cycle life of the battery, constructing the battery loss cost model.

5. The method according to claim 1, characterized in that, The constructing of the time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system includes: Determine the difference information between the new energy power generation prediction data and the power load data, where the new energy power generation prediction data includes wind power generation prediction data and solar power generation prediction data; Construct the time-of-use electricity price period division model based on the difference information, where the time-of-use electricity price period division model is used to determine the electricity price adjustment period and the electricity price information of the electricity price adjustment period based on the difference information, and the electricity price adjustment period includes a low valley period, a peak period, and other periods except the low valley period and the peak period.

6. The method according to claim 1, wherein Under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, with the goal of minimizing the electricity consumption cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, optimize the charging and discharging behaviors corresponding to the multiple electric vehicles, including: Determine the charging and discharging power constraints of the electric vehicles as: the charging power of each electric vehicle is less than the preset charging power, and the discharging power of each electric vehicle is less than the preset discharging power; Determine the state of charge constraints of the electric vehicles as: the state of charge of each electric vehicle is within the preset state of charge range; Determine the user demand constraints as: the state of charge of the battery of each electric vehicle when leaving the charging pile is less than the expected state of charge preset for the corresponding account; Determine the charging time constraints as: each electric vehicle charges within the preset charging period; Determine the charging and discharging times constraints as: the number of charging and discharging times of each electric vehicle within the preset period is less than the predetermined number of times; Determine the uniqueness constraint of the charging and discharging state as: at any moment, each electric vehicle is in any one of the following states: charging state, discharging state, idle state; Under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, based on the charging and discharging power constraints of the electric vehicles, the state of charge constraints of the electric vehicles, the user demand constraints, the charging time constraints, the charging and discharging times constraints, and the uniqueness constraint of the charging and discharging state, with the goal of minimizing the electricity consumption cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model, optimize the charging and discharging behaviors corresponding to the multiple electric vehicles.

7. The method according to claim 1, characterized in that, The method further includes: Determine the first goal as: minimizing the electricity consumption cost of each electricity consumption account in the power system; Determine the second goal as: minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model; Determine the first weight corresponding to the first goal and the second weight corresponding to the second goal; Based on the first goal, the second goal, the first weight, and the second weight, determine the optimization goal; Under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model, based on the optimization goal, optimize the charging and discharging behaviors corresponding to the multiple electric vehicles.

8. A method for configuring charging and discharging of an electric vehicle, characterized in that, Include: A clustering module for clustering multiple electric vehicles to obtain multiple electric vehicle groups, where the number of the multiple electric vehicle groups is less than the number of the multiple electric vehicles; The first model construction module is used to construct an upper-layer optimization model with the goal of minimizing the load fluctuation of the power system. Among them, the upper-layer optimization model is used to determine the charging and discharging demands of each electric vehicle group. The second model construction module is used to construct a battery loss cost model, where the battery loss cost model is used to indicate the battery loss situation of each electric vehicle during charging and discharging. The third model construction module is used to construct a time-of-use electricity price period division model based on the new energy power generation prediction data and power load data of the power system. Among them, the time-of-use electricity price period division model is used to dynamically determine the electricity price adjustment strategy, where the electricity price adjustment strategy includes the electricity price adjustment period and the electricity price information of the electricity price adjustment period. The fourth model construction module is used to construct a lower-layer optimization model based on the battery loss cost model. Among them, the lower-layer optimization model is used to determine the charging and discharging power of a single electric vehicle based on the battery loss cost model. The charging and discharging optimization module is used to optimize the charging and discharging behaviors corresponding to the multiple electric vehicles with the goal of minimizing the electricity cost of each electricity consumption account in the power system and minimizing the difference between the power optimization results of the upper-layer optimization model and the lower-layer optimization model under the electricity price adjustment strategy determined based on the time-of-use electricity price period division model.

9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by a processor to perform the electric vehicle charging and discharging configuration method according to any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes one or more processors and a memory. The memory is used to store one or more programs. Among them, when the one or more programs are executed by the one or more processors, the one or more processors implement the electric vehicle charging and discharging configuration method according to any one of claims 1 to 7.