A dynamic optimization construction method of an electric vehicle V2G contract
By dynamically updating user profiles through a Bayesian learning mechanism to optimize electric vehicle V2G contracts, the problem of contract deviation caused by static assumptions is solved, achieving efficient and reliable user response and resource aggregation, and supporting integration with existing scheduling systems.
Patent Information
- Application Number
- CN202512049904.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2045-12-31
AI Technical Summary
Existing electric vehicle V2G contract designs rely on static user type assumptions and lack dynamic adjustment capabilities, resulting in a disconnect between contracts and actual user preferences, low user participation rates, and difficulty for VPPs to efficiently aggregate flexible resources.
The user profile is dynamically updated using a Bayesian learning mechanism. Contract parameters are optimized based on user selection behavior to establish a dynamic optimization closed loop and generate adaptive contracts to maximize the utility of the virtual power plant.
By learning user preferences online, we can significantly improve contract signing rates and response volumes, enhance V2G resource utilization efficiency, ensure contract physical feasibility, and support seamless integration with existing scheduling systems.
Smart Images

Figure CN121840628B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid and demand-side response technology, and in particular to a dynamic optimization method for constructing V2G contracts for electric vehicles. Background Technology
[0002] With the large-scale integration of electric vehicles (EVs) into the power grid, utilizing their onboard batteries to provide flexible resources to the grid through vehicle-to-grid (V2G) technology has become an important way for virtual power plants (VPPs) to achieve peak shaving and valley filling and improve operational efficiency. VPPs typically need to sign discharge contracts with EV users to stipulate the discharge amount, charging station occupancy time, and corresponding economic compensation.
[0003] Existing technologies typically employ contract design based on a principal-agent model to incentivize EV users to participate in V2G; however, such methods have two significant drawbacks: First, it relies on a static prior distribution of user types. This method typically assumes that a user's sensitivity to factors such as battery wear and time consumption (i.e., user type) follows a pre-defined fixed distribution (such as a uniform distribution). However, the actual user group is dynamic, unknown, and varies geographically and temporally. Static assumptions can lead to a significant deviation between the model and reality.
[0004] Second, it lacks closed-loop feedback and dynamic adjustment capabilities. The contract menu is generated offline and remains fixed once generated, making it impossible to learn and optimize online based on users' actual "accept / reject" choices. This causes the attractiveness and suitability of contracts to decline over time, ultimately resulting in low user engagement and making it difficult for VPPs to stably and efficiently aggregate sufficient EV flexibility resources.
[0005] Therefore, overcoming the limitations of static contract design and realizing an adaptive method that can learn user preferences online and dynamically optimize contract parameters accordingly is crucial for improving the practical application efficiency of V2G technology. Summary of the Invention
[0006] The purpose of this invention is to provide a dynamic optimization method for constructing V2G contracts for electric vehicles to solve the problems mentioned in the background art. The method treats the user's "acceptance / rejection / selection" behavior on the contract as a feedback signal, uses a Bayesian learning mechanism to reverse correct the profile of the user group, and dynamically generates contract parameters that can maximize the grid response capability.
[0007] To achieve the above objectives, this invention provides a dynamic optimization method for constructing V2G contracts for electric vehicles, comprising the following steps: S1. Model electric vehicle users as two-dimensional user types that include energy type and duration type, and define a utility function for each user type for the contract. Based on the utility function, establish a selection probability model for users to select from the contract menu. S2. Initialize the prior probability distribution of each user type in the electric vehicle user group, push the current contract menu containing at least one contract to the connected electric vehicles, and collect the selection behavior data of each electric vehicle on the current contract menu. S3. Based on the selection behavior data, update the prior probability distribution of user types using the Bayesian update rule to obtain the posterior probability of user types; S4. Establish an objective function with the goal of maximizing the expected utility of the virtual power plant. Based on the posterior probability distribution, optimize the solution to meet the constraints of the objective function and generate new contract menu parameters. S5. Send the new contract menu parameters to the charging pile control system for electric vehicle users to select. After the user accepts, the charging pile control system will execute V2G discharge scheduling according to the selected contract parameters.
[0008] Preferably, the user type, contract, and utility function in S1 are defined as follows: User type : ; in, The energy type represents the user's acceptance of the battery life loss caused by discharge. The duration type indicates the user's level of acceptance of occupying the charging station for an extended period of time; contract : ; in, For incentive amount, For maximum discharge, For contract duration; Utility function : ; in, This serves as the baseline cost factor for battery degradation. This represents the time-occupancy cost coefficient.
[0009] Preferably, the user selection probability model in S1 adopts the Multinomial Logit model to calculate the user's choice probability from the included... The probability of selecting a contract from its menu, where the contract menu is defined as... ; User type Users select the first Contract probability The calculation is as follows: ; in, For contract indexing, The utility function represents the user's option to reject all contracts. Defined as 0, A rational factor is chosen to characterize the randomness of user behavior. For summation index variables.
[0010] Preferably, the specific steps of S2 include: S21. Establish a discrete user type space. The user type space consists of all possible two-dimensional user types. It constitutes and sets the prior probability distribution of user types. ,in It is either a uniform distribution or a distribution based on historical statistical data; S22. Push a contract menu containing at least one contract to the connected electric vehicles within a time window. Inside, records Decision dataset of individual users ,in Indicates the first One user, Indicates user Select the first option from the contract menu. This contract.
[0011] Preferably, the dataset in S3 is based on user selection behavior. The obtained posterior probability The specific formula is: ; in, For user type At any moment The prior probability, To traverse the user type space in the summation operation Variables.
[0012] Preferably, the objective function for maximizing the expected utility of the virtual power plant in S4 is: ; in, Let be the value function that a virtual power plant obtains from the grid by acquiring the maximum discharge capacity and contract duration. and For value coefficient, , and These are the incentive amount, maximum discharge amount, and contract duration in the contract designed for each user type.
[0013] Preferably, the constraints on the objective function in S4 include: Individual rationality constraint: for each user type The corresponding contract Must meet ; Incentive compatibility constraint: For any two different user types and , must meet ; Physical feasibility constraint: the maximum discharge amount agreed upon in the contract. The discharge power must not exceed the product of the charging pile's rated discharge power and the contract duration. And it must not exceed the available capacity of the electric vehicle battery. .
[0014] Therefore, the present invention employs the above-mentioned dynamic optimization construction method for electric vehicle V2G contracts, which has the following beneficial effects: (1) This invention abandons the premise that the distribution of user types must be statically set in advance in the existing methods. By introducing a Bayesian learning mechanism, the real-time selection behavior of users on the contract menu is used as a feedback signal to update the estimation of the group user profile online and dynamically. There is no need to conduct a large-scale user survey in advance. In actual operation, it can automatically converge to the real user profile quickly through a small amount of interactive data, effectively solving the problems of "cold start" and model inaccuracy.
[0015] (2) This invention does not generate a fixed contract at once, but establishes a dynamic optimization closed loop: based on the updated user profile, with the goal of maximizing the expected revenue of VPP, the contract parameters are adjusted in real time (for example, automatically reducing the discharge requirement and adjusting the price when users are reluctant to sell), which can improve the V2G response volume, significantly improve the user's signing rate, and thus discover more available distributed energy storage resources.
[0016] (3) The contract generation process of this invention explicitly includes physical constraints on the power of the charging pile and the battery capacity, ensuring from the source that each generated contract is within the physical capabilities of the electric vehicle and the charging facility, thus avoiding scheduling failures or equipment safety issues caused by the contract being unexecutable.
[0017] (4) The output of this invention is standardized contract parameters (incentive amount, discharge amount, duration), which can be seamlessly connected with any existing underlying scheduling and control system (PID, MPC, etc.), making it easy to integrate, deploy and promote application.
[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0019] Figure 1 This is a flowchart of a dynamic optimization construction method for V2G contracts for electric vehicles according to the present invention. Figure 2 This is a schematic diagram illustrating the principle of a dynamic optimization construction method for V2G contracts for electric vehicles according to the present invention. Detailed Implementation
[0020] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0021] Example like Figure 1 and Figure 2 As shown, this invention provides a dynamic optimization method for constructing V2G contracts for electric vehicles, comprising the following steps: S1. Electric vehicle users are modeled as two-dimensional user types that include energy type and duration type. A utility function for each user type is defined for the contract. Based on the utility function, a selection probability model for users to choose from the contract menu is established. This model can quantify user preferences and simulate their decision-making behavior, providing a theoretical basis for subsequent learning and optimization.
[0022] The definitions of user type, contract, and utility function are as follows: User type : ; in, The energy type represents the user's level of acceptance of the battery life loss caused by discharge (the higher the value, the less concerned the user is about the loss). The duration type represents the user's acceptance of occupying the charging station for a long time (the larger the value, the more willing the user is to connect for a long time); these two dimensions together depict the user's core preference characteristics.
[0023] contract : ; in, For incentive amount, For maximum discharge, The duration of the contract; a contract is a complete scheme that includes economic and physical terms.
[0024] Utility function : ; in, This serves as the baseline cost factor for battery degradation. This is the time occupancy cost coefficient; this utility function quantifies the net benefit perceived by the user from the contract, which is the economic incentive minus their subjective assessment of battery wear and time costs.
[0025] The user choice probability model employs a Multinomial Logit (MNL) model to transform user utility comparisons into predictions of random choice behavior, thereby calculating the probability of a user choosing from a range of options. The probability of selecting a contract from its menu, where the contract menu is defined as... ; User type Users select the first Contract probability The calculation is as follows: ; in, For contract indexing, The utility function represents the user's option to reject all contracts. Defined as 0, A rational factor is chosen to characterize the randomness of user behavior. This is a summation index variable used to iterate through all possible choices, including the reject option.
[0026] The model established in this step is a crucial bridge connecting users' intrinsic preferences with observable behaviors.
[0027] S2. Initialize the prior probability distribution of each user type in the electric vehicle user group, push the current contract menu containing at least one contract to the connected electric vehicles, and collect the selection behavior data of each electric vehicle on the current contract menu.
[0028] S21. Establish a discrete user type space. The user type space consists of all possible two-dimensional user types. It constitutes and sets the prior probability distribution of user types. When the method described in this embodiment is run for the first time, due to the lack of historical data, it can be... Setting it to a uniform distribution means assuming all user types have an equal probability of occurrence. If historical data exists, a more accurate distribution can be set based on that data. ,Right now This is a distribution based on historical statistical data. This represents a probability distribution vector, where each component represents the probability of estimating the user type at the initial time.
[0029] S22. Push a contract menu containing at least one contract to the connected electric vehicles within a time window. Inside, records Decision dataset of individual users ,in Indicates the first One user, Indicates user Select the first option from the contract menu. If the contract, This means rejecting all contracts.
[0030] S3. Based on the selection behavior data, the prior probability distribution of user types is updated using the Bayesian update rule to obtain the posterior probability of user types, and the observed user behavior data is transformed into a correction of the user group profile.
[0031] Based on user selection behavior dataset The obtained posterior probability The specific formula is: ; in, For user type At any moment The prior probability, To traverse the user type space in the summation operation Variables.
[0032] If the observed user selection behavior is consistent with a certain user type Expected behavior (by If the descriptions are highly consistent, the posterior probability of that user type will be enhanced; otherwise, it will be weakened. This allows the system to "learn" the true preference distribution of the current user group. For example, if VPP issues a high-discharge contract but it is widely rejected, the probability corresponding to the high-tolerance type in the above formula will be enhanced. The probability will be very low, leading to a decrease in its posterior probability; conversely, the probability of the low-tolerance type will increase, thus "learning" that users are actually very reluctant to sell batteries.
[0033] S4. Establish an objective function with the goal of maximizing the expected utility of the virtual power plant. Based on the posterior probability distribution, satisfy the constraints of the objective function and perform optimization to generate new contract menu parameters. The aim is to use the updated user profile to generate a new generation of optimal contracts that maximize the expected revenue of the virtual power plant.
[0034] The objective function for maximizing the expected utility of the virtual power plant is: ; in, This is the value function (such as peak shaving and valley filling revenue) that a virtual power plant obtains from the grid side by acquiring the maximum discharge capacity and contract duration. and For value coefficient, , and The incentive amount, maximum discharge amount, and contract duration in the contract designed for user types are the decision variables to be optimized.
[0035] The constraints of the objective function include: Individual rationality constraint: for each user type The corresponding contract Must meet This constraint is to ensure that the contract has basic appeal to users and guarantees their willingness to participate.
[0036] Incentive compatibility constraint: For any two different user types and , must meet This constraint ensures that the contracts designed for users incentivize them to choose the appropriate contract based on their own type, which is key to achieving differentiation.
[0037] Physical feasibility constraint: the maximum discharge amount agreed upon in the contract. The discharge power must not exceed the product of the charging pile's rated discharge power and the contract duration. And it must not exceed the available capacity of the electric vehicle battery. This constraint ensures the physical enforceability and security of the contract from the source.
[0038] By solving this convex nonlinear programming problem (using the primal-dual interior-point method), a new set of contractual parameters can be obtained. .
[0039] S5. Send the new contract menu parameters (e.g., Contract A corresponds to 10kWh / 5 hours / compensation of 20 yuan; Contract B corresponds to 20kWh / 8 hours / compensation of 45 yuan) to the charging pile control system for electric vehicle users to select. After the user accepts the selection, the charging pile control system will execute V2G discharge scheduling according to the parameters of the selected contract. Once the user accepts a contract, the charging pile control system will lock the physical boundary corresponding to the contract and perform subsequent power scheduling within this range.
[0040] Therefore, the present invention adopts the above-mentioned dynamic optimization construction method for electric vehicle V2G contracts. By using user selection behavior as feedback signals and using Bayesian learning mechanism to dynamically update user group profiles and contract parameters, a closed loop of "perception-learning-optimization-execution" is formed. Thus, without the need for precise prior knowledge, it adaptively matches the user's real preferences, significantly improves the willingness and response capability of electric vehicles to participate in grid regulation, and realizes the efficient and reliable aggregation of distributed energy storage resources by virtual power plants.
[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for dynamically optimizing and constructing V2G contracts for electric vehicles, characterized in that, Includes the following steps: S1. Model electric vehicle users as two-dimensional user types that include energy type and duration type, and define a utility function for each user type for the contract. Based on the utility function, establish a selection probability model for users to select from the contract menu. S2. Initialize the prior probability distribution of each user type in the electric vehicle user group, push the current contract menu containing at least one contract to the connected electric vehicles, and collect the selection behavior data of each electric vehicle on the current contract menu. S3. Based on the selection behavior data, update the prior probability distribution of user types using the Bayesian update rule to obtain the posterior probability of user types; The user type is denoted as The selection behavior data constitutes the selection behavior dataset. The selection probability calculated by the selection probability model is denoted as , This represents a user's selection behavior record in the selection behavior dataset. Indicates user, This indicates the contract selected by the user; Based on selection behavior dataset The obtained posterior probability The specific formula is: ; in, For user type At any moment The prior probability, To traverse the user type space in the summation operation Variables; S4. Establish an objective function with the goal of maximizing the expected utility of the virtual power plant. Based on the posterior probability distribution, optimize the solution to meet the constraints of the objective function and generate new contract menu parameters. S5. Send the new contract menu parameters to the charging pile control system for electric vehicle users to select. After the user accepts, the charging pile control system will execute V2G discharge scheduling according to the selected contract parameters.
2. The method for dynamically optimizing and constructing V2G contracts for electric vehicles according to claim 1, characterized in that, The definitions of user type, contract, and utility function in S1 are as follows: User type : ; in, The energy type represents the user's acceptance of the battery life loss caused by discharge. The duration type indicates the user's level of acceptance of occupying the charging station for an extended period of time; contract : ; in, For incentive amount, For maximum discharge, For contract duration; Utility function : ; in, This serves as the baseline cost factor for battery degradation. This represents the time-occupancy cost coefficient.
3. The method for dynamically optimizing and constructing V2G contracts for electric vehicles according to claim 2, characterized in that: The user selection probability model in S1 uses a Multinomial Logit model to calculate the probability of a user choosing from a list of choices. The probability of selecting a contract from its menu, where the contract menu is defined as... ; User type Users select the first Contract probability The calculation is as follows: ; in, For contract indexing, The utility function represents the user's option to reject all contracts. Defined as 0, A rational factor is chosen to characterize the randomness of user behavior. For summation index variables.
4. The method for dynamically optimizing and constructing V2G contracts for electric vehicles according to claim 2, characterized in that, The specific steps of S2 include: S21. Establish a discrete user type space. The user type space consists of all possible two-dimensional user types. It constitutes and sets the prior probability distribution of user types. ,in It is either a uniform distribution or a distribution based on historical statistical data; S22. Push a contract menu containing at least one contract to the connected electric vehicles within a time window. Inside, records Dataset of user selection behavior ,in Indicates the first One user, Indicates user Select the first option from the contract menu. This contract.
5. The method for dynamically optimizing and constructing V2G contracts for electric vehicles according to claim 1, characterized in that, The objective function for maximizing the expected utility of the virtual power plant in S4 is: ; in, This is the value function that a virtual power plant obtains from the grid by acquiring the maximum discharge capacity and contract duration. and For value coefficient, , and These are the incentive amount, maximum discharge amount, and contract duration in the contract designed for each user type.
6. The method for dynamically optimizing and constructing V2G contracts for electric vehicles according to claim 5, characterized in that, The constraints on the objective function in S4 include: Individual rationality constraint: for each user type The corresponding contract Must meet ; Incentive compatibility constraint: For any two different user types and , must meet ; Physical feasibility constraint: the maximum discharge amount agreed upon in the contract. The discharge power must not exceed the product of the charging pile's rated discharge power and the contract duration. And it must not exceed the available capacity of the electric vehicle battery. .
Citation Information
Patent Citations
Electric vehicle charging scheduling optimization method
CN119228097A
Modular, multi-directional, battery-integrated smart electric vehicle charging station
US12459392B1
