Electric vehicle two-way charging and discharging control method and system based on vehicle network interaction
By establishing dynamic user demand models and short-term load forecasting models, the charging and discharging control of electric vehicles is optimized, solving the problems of low prediction accuracy, single optimization target, and insufficient battery protection in existing technologies, and achieving a win-win effect of matching user demand, grid optimization, and battery safety.
Patent Information
- Application Number
- CN202511604304.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-11-05
AI Technical Summary
Existing technologies for bidirectional charging and discharging control of electric vehicles suffer from problems such as low prediction accuracy, single optimization objective, insufficient battery protection, and low personalization, resulting in a poor user experience.
By acquiring users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established. Combined with a dynamic priority algorithm and a short-term load forecasting model, the charging and discharging priorities are optimized, and personalized solutions are provided through battery status monitoring and intelligent recommendation models.
It achieves precise matching of user needs, coordinated optimization of power grid operation, and battery safety assurance, thereby improving user experience and power grid stability, and reducing charging costs.
Smart Images

Figure CN121043684A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electric vehicle charging and discharging control technology, specifically a bidirectional charging and discharging control method and system for electric vehicles based on vehicle-to-grid interaction. Background Technology
[0002] With the increasing popularity of electric vehicles, their large-scale charging demand poses new challenges to the stability and economy of the power grid. Traditional one-way charging modes can only achieve one-way power supply from the grid to the vehicle, failing to fully tap the energy storage potential of electric vehicles. However, vehicle-to-grid (V2G) technology, as a core solution, can build a two-way energy flow mechanism between electric vehicles and the grid, transforming electric vehicles into mobile energy storage units. This allows them to participate in grid load regulation, frequency response, and renewable energy consumption, thereby optimizing grid operating efficiency, improving renewable energy utilization, and helping users reduce charging costs.
[0003] However, current V2G-based bidirectional charging and discharging control technology for electric vehicles still has several shortcomings. First, its prediction accuracy is low, making it difficult to accurately predict user travel demand and short-term grid load changes, resulting in a lack of scientific rigor and foresight in dispatching schemes. Second, its optimization objectives are singular, focusing primarily on either grid stability or user cost, failing to achieve synergistic optimization of grid safety, user needs, and battery health. Third, battery protection is insufficient, lacking dynamic monitoring and refined control of battery status, making it prone to shortening battery life due to improper charging and discharging. Fourth, its personalization level is low, failing to provide customized solutions based on user behavior habits and vehicle condition differences, ultimately leading to a poor user experience. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a bidirectional charging and discharging control method and system for electric vehicles based on vehicle-grid interaction. This method achieves precise matching of user needs, coordinated optimization of grid operation, effective protection of battery safety, and provision of personalized charging and discharging solutions. It effectively solves the problems of low prediction accuracy, single optimization target, insufficient battery protection, and poor user experience in existing technologies.
[0005] To achieve the above objectives, the present invention provides the following technical solution: A bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction includes the following steps: Acquire user historical travel data, vehicle status data, external dynamic data, and power grid data; Based on users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established to obtain output rigid demand indicators, elastic demand periods, and demand confidence levels. Combined with a dynamic priority algorithm, charging and discharging priorities are obtained. Based on power grid data and combined with a short-term load forecasting model, the resilience margin of the power grid is obtained. Based on the charging and discharging priority and the elasticity margin, an optimization model is established, and the optimal charging and discharging scheme is obtained by finding the optimal solution of the optimization model. The system acquires the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, it triggers a protection / adjustment scheme; otherwise, it continues to run. Based on user behavior data, power grid data, and vehicle status data, an intelligent recommendation model is built to obtain recommended charging and discharging schemes, and charging and discharging control is performed based on the recommended charging and discharging schemes.
[0006] Preferably, when establishing a dynamic user demand model, the user's historical travel data, vehicle status data, and external dynamic data are preprocessed first, including: User historical travel data includes charging time, charging frequency, charging location coordinates, charging amount, driving mileage, and frequently used charging location coordinates; Vehicle status data includes the remaining battery charge percentage, battery cycle count, battery health status, battery temperature, and electric vehicle rated power. External dynamic data include temperature, rainfall, wind speed, and traffic congestion index near frequently visited locations.
[0007] Preferably, a dynamic user demand model is established, including: The probability distribution of historical charging times is statistically analyzed to generate a charging time probability matrix, and the probability of charging periods is calculated based on the charging time probability matrix. Calculate the average energy consumption based on historical driving mileage, and combine it with the battery capacity to obtain the average daily energy consumption based on the remaining battery power percentage; Based on the remaining battery power percentage and charging volume, user charging habits are extracted to obtain the threshold for the remaining battery power percentage when charging is terminated. The probability of charging period, daily energy consumption of battery remaining percentage, and threshold of battery remaining percentage at charging termination are integrated into a user behavior feature dataset. The user behavior feature dataset, battery remaining percentage, battery health status, real-time electricity price, temperature, and traffic congestion index near the frequent charging location are integrated into model input data. The model input data is divided into training set and validation set. The training set is input into a random forest model, low-contribution features are removed, and hyperparameters are optimized to obtain a dynamic user demand model. Output rigid demand indicators, elastic demand periods, and demand confidence levels; The validation set is input into the trained dynamic user demand model to validate the dynamic user demand model.
[0008] Preferably, the charging and discharging priority is obtained by combining a dynamic priority algorithm, including the following steps; Grid data includes real-time electricity prices, peak-valley unit prices, grid load factor, node voltage, line rated capacity, frequency, photovoltaic power output forecast, and wind power output forecast. Based on the remaining battery percentage, the maximum remaining battery percentage, the minimum remaining battery percentage, and the required confidence level, determine the relationship between the remaining battery percentage and the minimum remaining battery percentage: If the remaining battery percentage is less than the minimum remaining battery percentage, the user demand score is 1, and a rigid demand flag is output, which is used to prompt immediate charging; if the remaining battery percentage is not less than the minimum remaining battery percentage, the user demand score is obtained by multiplying the ratio of the difference between the current remaining battery percentage and the minimum remaining battery percentage to the difference between the maximum remaining battery percentage and the minimum remaining battery percentage by the demand confidence score. Based on real-time electricity price, peak-valley unit price, and grid load factor, the grid load factor is compared with each reference grid load factor stored in the data repository. The grid load factor corresponding to the closest reference grid load factor is obtained as the grid load factor corresponding to the current grid load factor. The grid value score is obtained by multiplying the ratio of real-time electricity price to peak-valley electricity price with the grid load factor. Based on the battery health status and battery temperature, the battery temperature is compared with the reference battery temperatures stored in the data repository. The temperature correction factor corresponding to the closest reference battery temperature is obtained as the temperature correction factor corresponding to the current battery temperature. The battery health status is multiplied by the temperature correction factor to obtain the battery health score. The user demand score, grid value score, and battery health score are weighted and summed to obtain the charging and discharging priority score. If the charge / discharge priority score is less than 0.2, the charge / discharge priority is determined to be level one, and the state is maintained. If the charge / discharge priority score is not less than 0.2 and not greater than 0.5, the charge / discharge priority is determined to be level two, prompting the user to perform off-peak charging or peak discharge. If the charge / discharge priority score is greater than 0.5, the charge / discharge priority is determined to be level three, prompting the user to charge or discharge immediately.
[0009] Preferably, the power grid resilience margin is obtained based on power grid data and combined with a short-term load forecasting model, including the following steps: Based on the acquired power grid data, a training set and a test set are divided. The training set is input into the long short-term memory network model to obtain the short-term load forecasting model, and the test set is input into the short-term load forecasting model to test the short-term load forecasting model. Input the current grid load data into the short-term load forecasting model to obtain the load forecast value in the short term. Subtract the load forecast value from the sum of the photovoltaic power forecast and the wind power forecast, and record the difference as the net load. Plot the predicted net load curve in the short term. The line's remaining capacity is obtained by subtracting the line's rated capacity from the net load. Combined with the load fluctuation standard deviation stored in the data repository, the ratio of the difference between the line's remaining capacity and the load fluctuation standard deviation to the line's rated capacity is recorded as the power grid's elasticity margin. If the power grid's flexibility margin is less than 5%, the power grid's margin level is considered low, and discharging is prohibited, with only off-peak charging permitted. If the power grid's flexibility margin is not less than 5% and not more than 20%, then the power grid's margin level is considered to be medium margin, and charging and discharging power is restricted to prioritize serving high-priority users. If the power grid's flexibility margin is greater than 20%, the power grid's margin level is considered high, and full-power discharge is allowed, permitting charging.
[0010] Preferably, based on charging / discharging priority and flexibility margin, an optimization model is established, and the optimal charging / discharging scheme is obtained by finding the optimal solution of the optimization model, including the following steps: Based on the acquired power grid data, net load, load fluctuation standard deviation, electric vehicle rated power, user demand score, power grid value score, battery health score, power grid resilience margin, and number of online electric vehicles, an objective function is defined. Define the constraints, including grid security constraints, user demand constraints, battery health constraints, and margin level constraints. The elasticity margin level of each region, the distribution of user priorities, and the total number of dispatchable vehicles are input into the upper-level model of the master-slave hierarchical optimization model to obtain the regional scheduling model, and output the total charging and discharging power quota of each region and the cross-regional power support instructions. The total charging and discharging power quota, charging and discharging priority, and remaining battery power percentage allocated by the upper layer are input into the lower-level vehicle-level scheduling of the master-slave hierarchical optimization model to obtain the vehicle-level scheduling model, and the charging and discharging power curve of each vehicle is output. The optimal solution of the objective function is determined based on the improved particle swarm optimization algorithm. The optimal solution includes maximizing the utilization rate of the elasticity margin, minimizing the deviation of the user's charge and discharge plan, and minimizing the battery loss cost, and is denoted as the optimal charge and discharge scheme.
[0011] Preferably, determining the optimal solution of the objective function based on the improved particle swarm optimization algorithm includes the following steps: The particles are encoded, and the charging and discharging power, user priority, remaining battery power percentage, and battery health status are mapped to the particle position vector; An initial population is randomly generated, with each particle representing a charge / discharge scheduling scheme. Construct a fitness function and impose an exponential penalty on all particles that violate grid safety, user requirements, and battery health, which is the objective function value; The particle velocity and position are dynamically adjusted according to the power grid status, and the search is directed toward high-weight targets. Add Gaussian noise to particles that have not been updated for three consecutive generations, and force derated to a safe power level for particles whose battery temperature exceeds the limit. If the charging cost exceeds the discharging benefit during a certain period, a forced switch to discharging or idle mode is implemented. The top 10% of Pareto solutions are selected in each generation, and charging and discharging scheduling schemes with a user demand satisfaction rate of no less than 95% are prioritized for retention. Non-inferior solutions are then selected. Iterate until convergence or the maximum number of iterations is reached, and output the current optimal solution, which is the optimal charging and discharging scheme.
[0012] Preferably, determining whether the battery status is abnormal includes the following steps: Battery cell operating data includes voltage, voltage range, operating temperature, operating temperature difference, and rate of change of remaining battery capacity percentage; Based on the acquired voltage and voltage range, it is determined whether the voltage falls within the safe voltage range stored in the data repository. If it does not fall within the safe voltage range, emergency protection is triggered. If it falls into the range, it is determined whether the voltage range is greater than the reference range stored in the data storage repository. If it is greater, and the duration of the voltage range being greater than the reference range exceeds 5 minutes, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as voltage imbalance. Conversely, the battery cell is determined to be in a normal state, and the abnormal state is marked as normal. Based on the acquired operating temperature and operating temperature difference, it is determined whether the operating temperature difference is greater than the temperature difference threshold stored in the data storage repository. If it is greater, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as thermal runaway. If it is not greater than, then determine whether the operating temperature is greater than the reference temperature stored in the data storage repository. If it is greater than, then determine that the battery cell is in an abnormal state and mark the abnormal state as over-temperature. Otherwise, determine that the battery cell is in a normal state and mark the abnormal state as normal. Based on the obtained percentage change rate of remaining battery power, it is determined whether the percentage change rate of remaining battery power is greater than the threshold of percentage change rate of remaining battery power stored in the data repository. If it is greater than the threshold and the duration of the percentage change rate of remaining battery power is greater than the threshold for more than 10 minutes, the battery cell is determined to be in an abnormal state and is marked as overcharged or over-discharged. Otherwise, the battery cell is determined to be in a normal state and is marked as normal. If the total harmonic distortion (THD) detection result at the charging / discharging port is the total harmonic distortion (THD), the THD is compared with the harmonic distortion threshold range stored in the data repository. If the THD falls within the harmonic distortion threshold range, the battery cell is determined to have abnormal harmonics, and the harmonic abnormality type is labeled as harmonic pollution. If it does not fall into the range, and the total harmonic distortion rate is greater than the maximum value of the harmonic distortion rate threshold range, then the battery cell is determined to have abnormal harmonics, and the harmonic abnormality type label is marked as a specific harmonic source abnormality. If the total harmonic distortion rate is less than the minimum value of the harmonic distortion rate threshold range, then the battery cell is determined to have normal harmonics, and the harmonic abnormality type label is marked as normal.
[0013] Preferably, based on user behavior data, power grid data, and vehicle status data, an intelligent recommendation model is constructed to obtain recommended charging and discharging solutions, including the following steps: Feature extraction is performed on power grid data, vehicle status data, and user behavior data to obtain a feature dataset, which includes power grid feature data, vehicle feature data, and user feature data. Design the forest structure in the random forest model to obtain the designed random forest model. The forest structure is set with 500 trees, a maximum depth of 15 layers, and the node splitting criterion is minimizing Gini impurity. The feature dataset is divided into a training set, a validation set, and a test set. The training set is input into a pre-designed random forest model to obtain a trained intelligent recommendation model. The validation set is input into the trained intelligent recommendation model for validation. Validation is terminated when the error of the validation set does not decrease for 10 consecutive times, and a validated intelligent recommendation model is obtained. The test set is input into the validated intelligent recommendation model, and the test results are output. Based on the mapping set of each test result and the recommended charging and discharging scheme stored in the database, the recommended charging and discharging scheme corresponding to the test results is obtained.
[0014] A bidirectional charging and discharging control system for electric vehicles based on vehicle-to-grid interaction, used to implement the above method, includes: The dynamic user demand establishment module is used to acquire users' historical travel data, vehicle status data, external dynamic data, and power grid data. Based on users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established to obtain the output rigid demand indicator, elastic demand period, and demand confidence. Combined with the dynamic priority algorithm, the charging and discharging priority is obtained. The power grid condition perception and prediction module is used to obtain the power grid's resilience margin based on power grid data and combined with a short-term load forecasting model. The optimal charging and discharging scheme acquisition module is used to establish an optimization model based on charging and discharging priority and elasticity margin, and to obtain the optimal charging and discharging scheme by finding the optimal solution of the optimization model. The battery diagnostic module is used to acquire the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, a protection / adjustment scheme is triggered; otherwise, it continues to run. The intelligent recommendation scheme acquisition module is used to build an intelligent recommendation model based on user behavior data, power grid data, and vehicle status data, obtain recommended charging and discharging schemes, and perform charging and discharging control based on the recommended charging and discharging schemes.
[0015] The present invention has the following beneficial effects: In terms of user demand and vehicle-to-grid (V2G) collaboration, this invention constructs a dynamic user demand model based on historical user travel data and vehicle status data. This model accurately outputs rigid demand indicators and elastic demand periods. Combined with a dynamic priority algorithm (integrating user demand score, grid value score, and battery health score), it determines charging and discharging priorities. This ensures both the user's essential electricity needs for travel (e.g., triggering immediate charging prompts when battery is low) and the real-time grid status (e.g., peak and off-peak electricity prices, load factor) to guide charging and discharging behavior, achieving a win-win situation of reduced user charging costs and optimized grid load. Simultaneously, based on a short-term load forecasting model, it calculates grid elasticity margin and implements tiered control (prohibiting discharging under low margin and allowing full power under high margin), further improving grid operational stability and preventing disorderly charging and discharging from impacting the grid.
[0016] In terms of system safety and personalized services, this invention establishes a multi-dimensional battery anomaly judgment mechanism (such as voltage imbalance, thermal runaway, and overcharge / over-discharge identification) by acquiring battery cell operating data and charge / discharge port harmonic detection results. This mechanism can trigger protection / adjustment schemes in real time, effectively protecting battery safety and extending battery life. Furthermore, based on a master-slave hierarchical optimization model and an improved particle swarm optimization algorithm, it can generate the optimal charge / discharge scheme while meeting grid safety, user needs, and battery health constraints, maximizing the utilization of the elasticity margin and minimizing battery loss. In addition, the random forest intelligent recommendation model built based on user behavior data can output customized charge / discharge schemes that fit user habits, solving the problem of insufficient personalization in traditional schemes and significantly improving user experience. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the steps of the method of the present invention; Figure 2 This is a schematic diagram of the modules of the system of the present invention. Detailed Implementation
[0018] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0019] Example 1: As Figure 1 As shown, the bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction includes the following steps: Acquire user historical travel data, vehicle status data, external dynamic data, and power grid data. Based on the user historical travel data, vehicle status data, and external dynamic data, establish a dynamic user demand model to obtain output rigid demand indicators, elastic demand periods, and demand confidence levels. Combined with a dynamic priority algorithm, obtain charging and discharging priorities.
[0020] Preprocessing user historical travel data, vehicle status data, and external dynamic data is performed. User historical travel data includes charging time, charging frequency, charging location coordinates, charging amount, driving mileage, and coordinates of regular charging locations. Vehicle status data includes battery remaining percentage, battery cycle count, battery health status, and battery temperature. External dynamic data includes temperature, rainfall, wind speed, and traffic congestion index near regular charging locations.
[0021] The probability distribution of historical charging time is statistically analyzed to generate a charging time probability matrix, and the probability of charging periods is calculated based on the charging time probability matrix; the average energy consumption of historical driving mileage is calculated, and the average daily energy consumption of the remaining battery power percentage is obtained by combining the battery capacity; the user's charging habits are extracted based on the remaining battery power percentage and the charging amount, and the threshold of the remaining battery power percentage at the end of charging is obtained.
[0022] The user behavior feature dataset is integrated with charging period probability, daily average energy consumption of remaining battery power percentage, and charging termination battery power percentage threshold. This user behavior feature dataset, along with remaining battery power percentage, battery health status, real-time electricity price, temperature, and traffic congestion index near frequent charging locations, is integrated as model input data. The model input data is then divided into training and validation sets. The training set is input into a random forest model, low-contribution features are removed, and hyperparameters are optimized to obtain a dynamic user demand model. The model outputs rigid demand indicators, flexible demand periods, and demand confidence. The validation set is input into the trained dynamic user demand model to validate it.
[0023] The power grid data includes real-time electricity prices, peak-valley unit prices, grid load factor, node voltage, line rated capacity, frequency, photovoltaic power output forecast, and wind power output forecast.
[0024] Based on the remaining battery percentage, maximum remaining battery percentage, minimum remaining battery percentage, and demand confidence level, the relationship between the remaining battery percentage and the minimum remaining battery percentage is determined: If the remaining battery percentage is less than the minimum remaining battery percentage, the user demand score is 1, and a rigid demand flag is output to prompt immediate charging; if the remaining battery percentage is not less than the minimum remaining battery percentage, the ratio of the difference between the current remaining battery percentage and the minimum remaining battery percentage to the difference between the maximum remaining battery percentage and the minimum remaining battery percentage is multiplied by the demand confidence level to obtain the user demand score.
[0025] Based on real-time electricity price, peak-valley unit price, and grid load factor, the grid load factor is compared with each reference grid load factor stored in the data repository. The grid load factor corresponding to the closest reference grid load factor is obtained as the grid load factor corresponding to the current grid load factor. The grid value score is obtained by multiplying the ratio of real-time electricity price to peak-valley electricity price with the grid load factor.
[0026] Based on the battery health status and battery temperature, the battery temperature is compared with the reference battery temperatures stored in the data repository. The temperature correction factor corresponding to the closest reference battery temperature is obtained as the temperature correction factor corresponding to the current battery temperature. The battery health status is multiplied by the temperature correction factor to obtain the battery health score.
[0027] The user demand score, grid value score, and battery health score are weighted and summed to obtain the charging and discharging priority score. If the charging and discharging priority score is less than 0.2, the charging and discharging priority is identified as Level 1, and the state is maintained. If the charging and discharging priority score is not less than 0.2 and not greater than 0.5, the charging and discharging priority is identified as Level 2, and a prompt is made to charge during off-peak hours or discharge during peak hours. If the charging and discharging priority score is greater than 0.5, the charging and discharging priority is identified as Level 3, and a prompt is made to charge or discharge immediately.
[0028] From the user's perspective, by analyzing historical travel data such as charging time, frequency, and mileage, combined with status data such as the vehicle's remaining battery power percentage and battery temperature, as well as external environmental data, we can accurately grasp the user's charging patterns and habits. For example, we can obtain the probability of charging periods and the threshold of the remaining battery power percentage when charging ends, providing users with charging plans that meet their actual needs. This avoids insufficient charging affecting travel or overcharging causing resource waste, thereby improving ease of use and user satisfaction.
[0029] From the perspective of vehicle-grid interaction, prioritizing data such as real-time grid electricity prices and load factors, as well as battery health-related data (battery health status, battery temperature), can achieve a win-win situation for both vehicles and the grid. During peak grid load periods and high electricity prices, vehicles can be guided to discharge to generate revenue; during off-peak periods and low electricity prices, charging is encouraged, optimizing the allocation of grid power resources. Simultaneously, adjusting charging and discharging strategies based on battery condition can reduce battery wear, extend battery life, and lower user operating costs.
[0030] Based on power grid data and combined with a short-term load forecasting model, the power grid's resilience margin is obtained.
[0031] Based on the acquired power grid data, a training set and a test set are divided. The training set is input into the Long Short-Term Memory (LSTM) network model to obtain the short-term load forecasting model, and the test set is input into the short-term load forecasting model to test the short-term load forecasting model.
[0032] The current grid load data is input into the short-term load forecasting model to obtain the load forecast value in the future short term. The load forecast value is then subtracted from the sum of the photovoltaic power forecast and the wind power forecast, and the difference is recorded as the net load. The predicted net load curve in the future short term is then plotted.
[0033] The line's remaining capacity is obtained by subtracting the line's rated capacity from the net load. Combined with the load fluctuation standard deviation stored in the data repository, the ratio of the difference between the line's remaining capacity and the load fluctuation standard deviation to the line's rated capacity is recorded as the power grid's elasticity margin.
[0034] If the grid's flexibility margin is less than 5%, the grid's margin level is considered low, and discharging is prohibited, with charging only allowed during off-peak hours. If the grid's flexibility margin is not less than 5% and not greater than 20%, the grid's margin level is considered medium, and charging and discharging power is limited, prioritizing high-priority users. If the grid's flexibility margin is greater than 20%, the grid's margin level is considered high, and full-power discharging is allowed, permitting charging.
[0035] By training a long short-term memory (LSTM) network model using grid data to predict short-term load, and thus obtaining the grid's resilience margin, we can anticipate the grid's carrying capacity and potential risks. Implementing corresponding charging and discharging strategies based on different resilience margin levels can effectively balance the grid load. When the grid resilience margin is low, discharging is prohibited and charging is only allowed during off-peak hours to prevent grid overload caused by electric vehicle charging and discharging, maintain grid power balance, ensure the safe and stable operation of the grid, avoid voltage fluctuations, frequency anomalies, and reduce the possibility of power outages.
[0036] Adjusting electric vehicle charging and discharging strategies based on grid flexibility margins enables the rational allocation of power resources. During periods of high grid flexibility, full-power discharging and charging are permitted, fully utilizing the characteristics of electric vehicles as mobile energy storage units. This allows for the storage of excess energy during off-peak hours and its release during peak hours, improving the grid's capacity to absorb distributed energy, reducing energy waste, optimizing the temporal and spatial distribution of electricity, and enhancing the overall efficiency of the power system.
[0037] Different levels of flexibility margin correspond to different charging and discharging management methods, providing clear guidance for the charging and discharging of electric vehicles. With a medium margin, charging and discharging power is limited, and high-priority users are prioritized. This approach considers both the grid's carrying capacity and allows for reasonable scheduling based on the urgency of user needs, preventing disorderly charging and discharging of electric vehicles from impacting the grid and other users, thus improving the efficiency and fairness of electric vehicle charging and discharging management.
[0038] By monitoring the grid's resilience margin and adjusting charging and discharging strategies, the additional investment and operating costs incurred by the grid in responding to load fluctuations can be reduced. Simultaneously, the rational utilization of electric vehicle charging and discharging improves the efficiency of existing grid resources and reduces the unit cost of electricity transmission and distribution.
[0039] Based on the charging and discharging priority and the elasticity margin, an optimization model is established, and the optimal charging and discharging scheme is obtained by finding the optimal solution of the optimization model.
[0040] Based on the acquired power grid data, net load, load fluctuation standard deviation, electric vehicle rated power, user demand score, power grid value score, battery health score, power grid resilience margin, and number of online electric vehicles, an objective function is defined.
[0041] Define the constraints, including grid security constraints, user demand constraints, battery health constraints, and margin level constraints.
[0042] The power grid safety constraints are as follows: line power constraints, the real-time transmission power of each line shall not exceed 90% of its rated capacity; node voltage constraints, the voltage fluctuation range of the power grid nodes shall not exceed ±5% of the rated value of the node voltage; frequency stability constraints, the frequency shall not be less than the minimum reference frequency stored in the data repository and shall not be greater than the maximum reference frequency stored in the data repository.
[0043] User demand constraints include: minimum battery capacity guarantee constraint, the minimum remaining battery capacity percentage must not be less than the preset minimum battery capacity limit; charging and discharging time window constraint, charging and discharging operations must be completed within the user-defined vehicle idle time window; and priority service constraint, the battery capacity needs of high-priority users must be 100% met, and the battery capacity needs of low-priority users must be met at least 80% during the schedulable time period.
[0044] Battery health constraints include: charging and discharging power limits, where the charging and discharging power does not exceed the maximum value allowed for the battery's healthy state; depth of discharge constraints, where the depth of discharge in a single cycle does not exceed 60%; temperature control constraints, where the battery operating temperature is not less than 20℃ and not more than 45℃; and cycle life protection constraints, where the number of charge and discharge cycles in the same vehicle does not exceed 2 times within 24 hours, and the continuous discharge time does not exceed 1 hour.
[0045] The margin level constraints are as follows: charging and discharging behavior are tiered; low margin prohibits all charging behavior and only allows vehicles with a remaining battery charge percentage of ≥50% to discharge at rated power; medium margin allows charging power ≤50% of the rated value and discharging power up to 100%; high margin allows full power charging and discharging, but charging must prioritize the consumption of excess wind and solar power; time continuity constraints require that adjacent charging and discharging operations of the same vehicle must be spaced at least 30 minutes apart.
[0046] The elasticity margin level of each region, the distribution of user priorities, and the total number of dispatchable vehicles are input into the upper-level model of the master-slave hierarchical optimization model to obtain the regional scheduling model, which outputs the total charging and discharging power quota of each region and the cross-regional power support instructions.
[0047] The total charging and discharging power quota, charging and discharging priority, and remaining battery power percentage allocated by the upper layer are input into the lower-level vehicle-level scheduling of the master-slave hierarchical optimization model to obtain the vehicle-level scheduling model, and the charging and discharging power curve of each vehicle is output.
[0048] The optimal solution of the objective function is determined based on the improved particle swarm optimization algorithm. The optimal solution includes maximizing the utilization rate of the elasticity margin, minimizing the deviation of the user's charge and discharge plan, and minimizing the battery loss cost, and is denoted as the optimal charge and discharge scheme.
[0049] The particles are encoded, mapping charging / discharging power, user priority, remaining battery percentage, and battery health status to their position vectors. An initial population is randomly generated, with each particle representing a charging / discharging scheduling scheme. A fitness function is constructed, imposing an exponential penalty on particles that violate grid safety, user needs, and battery health, which is the objective function value. The particle speed and position are dynamically adjusted based on the grid status, searching towards higher-weighted objectives. Gaussian noise is added to particles that have not been updated for three consecutive generations, and particles whose battery temperature exceeds the limit are forcibly derated to a safe power. If the charging cost is greater than the discharging benefit during a certain period, a forced switch to discharging or idle is initiated. The top 10% of Pareto solutions are selected in each generation, prioritizing charging / discharging scheduling schemes with a user demand satisfaction rate of no less than 95%, and selecting non-dominated solutions. The process iterates until convergence or the maximum number of iterations is reached, outputting the current optimal solution, which is the optimal charging / discharging scheme.
[0050] A multi-objective function is defined and solved using an improved algorithm. Under complex constraints, it can balance the flexible utilization of the power grid, the satisfaction of user needs, and the control of battery losses, thereby achieving an overall improvement in benefits.
[0051] By rationally allocating the total charging and discharging power quota for each region and developing charging and discharging power curves for each vehicle based on their charging and discharging priorities and status, resource waste and irrational energy flow can be avoided. For example, when the grid load is low and there is surplus wind and solar power, vehicle charging should be prioritized to achieve efficient energy utilization; when the grid load is high, vehicle discharging should be rationally scheduled.
[0052] The master-slave hierarchical optimization model considers the elasticity margin level of the region, the distribution of user priorities, and the total number of schedulable vehicles at the upper layer, while the lower layer performs scheduling based on the resources allocated by the upper layer and individual vehicle information. This hierarchical architecture is suitable for scenarios involving large-scale electric vehicle access.
[0053] By allocating total charging and discharging power quotas and cross-regional power support instructions through a regional-level scheduling model, and performing fine-grained scheduling for each vehicle through a vehicle-level scheduling model, orderly management of a large number of electric vehicles can be achieved, avoiding excessive impact on the power grid caused by disorderly charging and discharging of electric vehicles, and ensuring that the power grid can still operate stably under the condition of large-scale electric vehicle access.
[0054] The system acquires the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, it triggers a protection / adjustment scheme; otherwise, it continues to run.
[0055] The battery cell operating data includes voltage, voltage range, operating temperature, operating temperature difference, and the percentage change rate of remaining battery charge. Based on the acquired voltage and voltage range, it is determined whether the voltage falls within the safe voltage range stored in the data repository. If it does not fall within this range, emergency protection is triggered. If it does fall within this range, it is determined whether the voltage range is greater than the reference range stored in the data repository. If it is greater, and the duration of the voltage range being greater than the reference range exceeds 5 minutes, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as voltage imbalance. Conversely, the battery cell is determined to be in a normal state, and the abnormal state is marked as normal.
[0056] Based on the acquired operating temperature and operating temperature difference, it is determined whether the operating temperature difference is greater than the temperature difference threshold stored in the data repository. If it is greater, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as thermal runaway. If it is not greater, it is determined whether the operating temperature is greater than the reference temperature stored in the data repository. If it is greater, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as overheating. Otherwise, the battery cell is determined to be in a normal state, and the abnormal state is marked as normal.
[0057] Based on the obtained percentage change rate of remaining battery power, it is determined whether the percentage change rate of remaining battery power is greater than the threshold of percentage change rate of remaining battery power stored in the data repository. If it is greater than the threshold and the duration of the percentage change rate of remaining battery power is greater than the threshold for more than 10 minutes, the battery cell is determined to be in an abnormal state and is marked with the abnormal state label as overcharge and over-discharge. Otherwise, the battery cell is determined to be in a normal state and is marked with the abnormal state label as normal.
[0058] If the total harmonic distortion (THD) detection result at the charging / discharging port is the total harmonic distortion rate (THD), the THD is compared with the harmonic distortion threshold range stored in the data repository. If the THD falls within the harmonic distortion threshold range, the battery cell is determined to have a harmonic abnormality, and the harmonic abnormality type is labeled as harmonic pollution.
[0059] If the total harmonic distortion rate (THD) does not fall within the threshold range and is greater than the maximum value of the harmonic distortion rate threshold range, then the harmonic distortion of the battery cell is determined to be abnormal, and the harmonic distortion type label is marked as a specific harmonic source abnormality. If the total harmonic distortion rate (THD) is less than the minimum value of the harmonic distortion rate threshold range, then the harmonic distortion of the battery cell is determined to be normal, and the harmonic distortion type label is marked as normal.
[0060] Real-time acquisition of individual battery cell operating data and harmonic detection results at the charging and discharging ports enables rapid detection of abnormal battery conditions during operation. For example, if a voltage exceeding the safe range is detected, emergency protection is immediately triggered to prevent serious damage to the battery due to overvoltage or undervoltage, or even to prevent safety accidents. This provides immediate protection for battery safety during use and effectively reduces the safety risks caused by battery malfunctions.
[0061] By using different data indicators and thresholds, the type of battery malfunction can be accurately determined. This helps technicians quickly understand the battery's fault condition, providing a clear direction for subsequent repair and maintenance, saving troubleshooting time, and improving repair efficiency.
[0062] Timely detection of early battery abnormalities and corresponding measures can effectively prevent the escalation of battery problems. Preventing continuous operation of the battery in suboptimal conditions reduces battery wear, extends overall battery life, and lowers replacement costs for users. Furthermore, it ensures the stability and reliability of the entire charging and discharging system, reduces system downtime, and improves system operating efficiency.
[0063] Based on user behavior data, power grid data, and vehicle status data, an intelligent recommendation model is built to obtain recommended charging and discharging schemes, and charging and discharging control is performed based on the recommended charging and discharging schemes.
[0064] Feature extraction is performed on power grid data, vehicle status data, and user behavior data to obtain a feature dataset, which includes power grid feature data, vehicle feature data, and user feature data. The forest structure in the random forest model is designed to obtain the designed random forest model, wherein the forest structure includes 500 trees, a maximum depth of 15 layers, and the node splitting criterion is minimizing Gini impurity.
[0065] The feature dataset is divided into a training set, a validation set, and a test set. The training set is input into a pre-designed random forest model to obtain a trained intelligent recommendation model. The validation set is input into the trained intelligent recommendation model for validation until the error of the validation set does not decrease for 10 consecutive tests, at which point the validation is terminated, resulting in a validated intelligent recommendation model. The test set is input into the validated intelligent recommendation model to output the test results. Based on the mapping set of each test result and the corresponding recommended charging and discharging scheme stored in the database, the recommended charging and discharging scheme corresponding to the test result is obtained.
[0066] By extracting and analyzing features from user behavior data, power grid data, and vehicle status data, intelligent recommendation models can gain a deep understanding of each user's unique needs and usage scenarios. For example, for users who frequently travel at night and have large vehicle battery capacities, the model may recommend charging during off-peak hours at night, taking into account the low power grid load and low electricity prices, to meet their travel needs while reducing charging costs.
[0067] Personalized recommendations take into account users' driving habits, vehicle conditions, and real-time grid conditions, making charging and discharging plans more tailored to users' actual needs, improving user experience, and enhancing the convenience and efficiency of charging and discharging decisions. Users can adjust their charging and discharging behavior, promoting the rational allocation of electricity resources at different times and improving the flexibility and resource allocation efficiency of the electricity market.
[0068] Example 2: Based on Example 1, when performing a weighted summation of user demand score, grid value score, and battery health score, a dynamic weight adjustment mechanism for the scenario is introduced: Obtain the current grid urgency, user demand urgency, and battery health risk level. Among them, the grid urgency is determined based on the grid's elasticity margin. If the grid elasticity margin is less than 5%, it is considered high urgency (grid safety must be prioritized). If it is not less than 5% and not more than 20%, it is considered medium urgency. If it is greater than 20%, it is considered low urgency. The urgency of a user's needs is determined based on the confidence level of the need and the remaining battery percentage. If the confidence level of the need is greater than 0.8 and the remaining battery percentage is less than 80% of the minimum remaining battery percentage, it is considered high urgency (the user's travel power needs should be prioritized). If the confidence level of the need is not less than 0.5 and not greater than 0.8, or the remaining battery percentage is not less than 80% of the minimum remaining battery percentage and less than the minimum remaining battery percentage, it is considered medium urgency. If the confidence level of the need is less than 0.5 and the remaining battery percentage is not less than the minimum remaining battery percentage, it is considered low urgency. The battery health risk level is determined based on the battery temperature and battery health status. If the battery temperature is greater than 110% of the reference temperature or the battery health status is less than 80%, it is considered high risk (the battery should be protected first). If the battery temperature is not less than 90% of the reference temperature and not greater than 110% of the reference temperature or the battery health status is not less than 80% and not greater than 90%, it is considered medium risk. If the battery temperature is less than 90% of the reference temperature and the battery health status is greater than 90%, it is considered low risk. Based on a combination of grid urgency, user demand urgency, and battery health risk level, the weighting coefficients for user demand score, grid value score, and battery health score are dynamically allocated: when the grid is at high urgency, the weighting coefficient for grid value score is set to 0.5, user demand score to 0.3, and battery health score to 0.2; when the user is at high urgency, the weighting coefficient for user demand score is set to 0.5, grid value score to 0.3, and battery health score to 0.2; when the battery is at high risk, the weighting coefficient for battery health score is set to 0.5, user demand score to 0.3, and grid value score to 0.2; when all three are at a medium level, the weighting coefficients for all three are set to 0.33. The user demand score, grid value score, and battery health score are weighted and summed based on dynamically allocated weight coefficients to obtain the charging and discharging priority score.
[0069] The protection / adjustment scheme can adopt existing corresponding schemes suitable for electric vehicles, or it can adopt: Protection scheme: On the grid side, based on real-time monitoring of voltage and frequency data, when the grid connection point voltage exceeds 90%-110% of the rated value or the frequency deviates from the 49.5Hz-50.5Hz range, the reactive power is first adjusted through the bidirectional converter to support the grid. If it does not recover within 3 seconds, the charging and discharging circuit is immediately cut off. In the event of a short-circuit fault, the fault section is located and isolated using the positive sequence current fault component, and non-faulty areas are switched to islanding mode to ensure power supply. On the battery side, the status is monitored in real time by the BMS. When the remaining battery charge (SOC) is below 20% or above 8%, the battery will be charged. When the temperature of a single unit exceeds 45℃ or rises by 5℃ in 1 minute, the voltage difference of a single unit exceeds 50mV, or the total harmonic distortion rate is greater than 5%, the charging and discharging function is immediately locked, and the liquid cooling or equalization circuit is activated to prevent the risk of overcharging, over-discharging and thermal runaway. For situations such as charging and discharging current overload (exceeding the rated value by 120%), short circuit, or vehicle-to-pile / pile-to-cloud communication interruption for more than 10 seconds, hardware protection is achieved by IGBT shutdown and fuse blowing. When communication is interrupted, it automatically switches to local control mode. If it is not restored within 30 seconds, the circuit is cut off and the log is saved.
[0070] Adjustment plan: At the grid level, control is tiered according to elasticity margin. High margin (>20%) allows full power to support peak-valley arbitrage; medium margin (5%-20%) limits power to 60% to prioritize frequency regulation needs; low margin (<5%) prohibits discharge and only allows charging for essential needs. At the battery level, dynamic adaptation is combined with SOC and temperature. Low battery (20%-40%) uses constant current fast charging; medium battery (40%-80%) switches to constant voltage slow charging. In low temperatures, preheating is performed before charging, and in high temperatures, power is linearly reduced to avoid battery stress accumulation. At the user level, differentiated scheduling is based on demand confidence. High demand (>0.8) prioritizes charging and prohibits discharge; medium demand (0.5-0.8) limits power and avoids peak travel times; low demand (<0.5) responds to grid peak shaving and valley filling at all times.
[0071] Example 3: Based on Example 1, when calculating the grid's resilience margin, a real-time renewable energy fluctuation correction coefficient is introduced to dynamically adjust the load fluctuation standard deviation. This specifically includes the following steps: Obtain real-time photovoltaic (PV) output data and wind power output data for the current moment and the next hour. Calculate the PV output fluctuation amplitude (the absolute value of the difference between the current output and the average output of the previous 15 minutes) and the wind power output fluctuation amplitude. Ratios of these two values to the maximum PV output and maximum wind power output stored in the data repository are denoted as PV fluctuation coefficient and wind power fluctuation coefficient, respectively. Based on the photovoltaic fluctuation coefficient, the wind power fluctuation coefficient, and their respective weights in the total power supply of the power grid (the sum of the photovoltaic weight and the wind power weight is 1, determined based on the power structure data issued in real time by the power grid dispatch center), the comprehensive fluctuation coefficient of renewable energy is obtained by weighted summation. The formula is: Comprehensive fluctuation coefficient of renewable energy = photovoltaic fluctuation coefficient × photovoltaic weight + wind power fluctuation coefficient × wind power weight. The load fluctuation standard deviation stored in the data repository is multiplied by the comprehensive fluctuation coefficient of renewable energy to obtain the dynamically corrected load fluctuation standard deviation; The calculation method of line remaining capacity = line rated capacity - net load is still used. The ratio of the difference between the line remaining capacity and the dynamically corrected standard deviation of load fluctuation to the line rated capacity is recorded as the corrected grid elasticity margin. Subsequently, the margin level is determined and the corresponding charging and discharging control strategy is implemented according to the rule of prohibiting discharge when the margin is low (<5%), limiting power when the margin is medium (5%-20%), and opening full power when the margin is high (>20%).
[0072] Example 4: Figure 2 As shown, the bidirectional charging and discharging control system for electric vehicles based on vehicle-to-grid interaction is used to implement the methods in Embodiment 1, Embodiment 2, or Embodiment 3, including: The dynamic user demand establishment module is used to acquire users' historical travel data, vehicle status data, external dynamic data, and power grid data. Based on users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established to obtain the output rigid demand indicator, elastic demand period, and demand confidence. Combined with the dynamic priority algorithm, the charging and discharging priority is obtained. The power grid condition perception and prediction module is used to obtain the power grid's resilience margin based on power grid data and combined with a short-term load forecasting model. The optimal charging and discharging scheme acquisition module is used to establish an optimization model based on charging and discharging priority and elasticity margin, and to obtain the optimal charging and discharging scheme by finding the optimal solution of the optimization model. The battery diagnostic module is used to acquire the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, a protection / adjustment scheme is triggered; otherwise, it continues to run. The intelligent recommendation scheme acquisition module is used to build an intelligent recommendation model based on user behavior data, power grid data, and vehicle status data, obtain recommended charging and discharging schemes, and perform charging and discharging control based on the recommended charging and discharging schemes.
[0073] This invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. A bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction, characterized in that, Includes the following steps: Acquire user historical travel data, vehicle status data, external dynamic data, and power grid data; Based on users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established to obtain output rigid demand indicators, elastic demand periods, and demand confidence levels. Combined with a dynamic priority algorithm, charging and discharging priorities are obtained. Based on power grid data and combined with a short-term load forecasting model, the resilience margin of the power grid is obtained. Based on the charging and discharging priority and the elasticity margin, an optimization model is established, and the optimal charging and discharging scheme is obtained by finding the optimal solution of the optimization model. The system acquires the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, it triggers a protection / adjustment scheme; otherwise, it continues to run. Based on user behavior data, power grid data, and vehicle status data, an intelligent recommendation model is built to obtain recommended charging and discharging schemes, and charging and discharging control is performed based on the recommended charging and discharging schemes.
2. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 1, characterized in that, When establishing a dynamic user demand model, the user's historical travel data, vehicle status data, and external dynamic data are first preprocessed, including: User historical travel data includes charging time, charging frequency, charging location coordinates, charging amount, driving mileage, and frequently used charging location coordinates; Vehicle status data includes the remaining battery charge percentage, battery cycle count, battery health status, battery temperature, and electric vehicle rated power. External dynamic data include temperature, rainfall, wind speed, and traffic congestion index near frequently visited locations.
3. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 2, characterized in that, Establish a dynamic user demand model, including: The probability distribution of historical charging times is statistically analyzed to generate a charging time probability matrix, and the probability of charging periods is calculated based on the charging time probability matrix. Calculate the average energy consumption based on historical driving mileage, and combine it with the battery capacity to obtain the average daily energy consumption based on the remaining battery power percentage; Based on the remaining battery power percentage and charging volume, user charging habits are extracted to obtain the threshold for the remaining battery power percentage when charging is terminated. The probability of charging period, daily energy consumption of battery remaining percentage, and threshold of battery remaining percentage at charging termination are integrated into a user behavior feature dataset. The user behavior feature dataset, battery remaining percentage, battery health status, real-time electricity price, temperature, and traffic congestion index near the frequent charging location are integrated into model input data. The model input data is divided into training set and validation set. The training set is input into a random forest model, low-contribution features are removed, and hyperparameters are optimized to obtain a dynamic user demand model. Output rigid demand indicators, elastic demand periods, and demand confidence levels; The validation set is input into the trained dynamic user demand model to validate the dynamic user demand model.
4. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 2, characterized in that, The charging and discharging priority is obtained by combining a dynamic priority algorithm, including the following steps; Grid data includes real-time electricity prices, peak-valley unit prices, grid load factor, node voltage, line rated capacity, frequency, photovoltaic power output forecast, and wind power output forecast. Based on the remaining battery percentage, the maximum remaining battery percentage, the minimum remaining battery percentage, and the required confidence level, determine the relationship between the remaining battery percentage and the minimum remaining battery percentage: If the remaining battery percentage is less than the minimum remaining battery percentage, the user demand score is 1, and a rigid demand flag is output, which is used to prompt immediate charging; if the remaining battery percentage is not less than the minimum remaining battery percentage, the user demand score is obtained by multiplying the ratio of the difference between the current remaining battery percentage and the minimum remaining battery percentage to the difference between the maximum remaining battery percentage and the minimum remaining battery percentage by the demand confidence score. Based on real-time electricity price, peak-valley unit price, and grid load factor, the grid load factor is compared with each reference grid load factor stored in the data repository. The grid load factor corresponding to the closest reference grid load factor is obtained as the grid load factor corresponding to the current grid load factor. The grid value score is obtained by multiplying the ratio of real-time electricity price to peak-valley electricity price with the grid load factor. Based on the battery health status and battery temperature, the battery temperature is compared with the reference battery temperatures stored in the data repository. The temperature correction factor corresponding to the closest reference battery temperature is obtained as the temperature correction factor corresponding to the current battery temperature. The battery health status is multiplied by the temperature correction factor to obtain the battery health score. The user demand score, grid value score, and battery health score are weighted and summed to obtain the charging and discharging priority score. If the charge / discharge priority score is less than 0.2, the charge / discharge priority is determined to be level one, and the state is maintained. If the charge / discharge priority score is not less than 0.2 and not greater than 0.5, the charge / discharge priority is determined to be level two, prompting the user to perform off-peak charging or peak discharge. If the charge / discharge priority score is greater than 0.5, the charge / discharge priority is determined to be level three, prompting the user to charge or discharge immediately.
5. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 4, characterized in that, Based on power grid data and combined with a short-term load forecasting model, the resilience margin of the power grid is obtained, including the following steps: Based on the acquired power grid data, a training set and a test set are divided. The training set is input into the long short-term memory network model to obtain the short-term load forecasting model, and the test set is input into the short-term load forecasting model to test the short-term load forecasting model. Input the current grid load data into the short-term load forecasting model to obtain the load forecast value in the short term. Subtract the load forecast value from the sum of the photovoltaic power forecast and the wind power forecast, and record the difference as the net load. Plot the predicted net load curve in the short term. The line's remaining capacity is obtained by subtracting the line's rated capacity from the net load. Combined with the load fluctuation standard deviation stored in the data repository, the ratio of the difference between the line's remaining capacity and the load fluctuation standard deviation to the line's rated capacity is recorded as the power grid's elasticity margin. If the power grid's flexibility margin is less than 5%, the power grid's margin level is considered low, and discharging is prohibited, with only off-peak charging permitted. If the power grid's flexibility margin is not less than 5% and not more than 20%, then the power grid's margin level is considered to be medium margin, and charging and discharging power is restricted to prioritize serving high-priority users. If the power grid's flexibility margin is greater than 20%, the power grid's margin level is considered high, and full-power discharge is allowed, permitting charging.
6. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 5, characterized in that, Based on charging / discharging priorities and flexibility margins, an optimization model is established. The optimal charging / discharging scheme is obtained by finding the optimal solution to the optimization model, including the following steps: Based on the acquired power grid data, net load, load fluctuation standard deviation, electric vehicle rated power, user demand score, power grid value score, battery health score, power grid resilience margin, and number of online electric vehicles, an objective function is defined. Define the constraints, including grid security constraints, user demand constraints, battery health constraints, and margin level constraints. The elasticity margin level of each region, the distribution of user priorities, and the total number of dispatchable vehicles are input into the upper-level model of the master-slave hierarchical optimization model to obtain the regional scheduling model, and output the total charging and discharging power quota of each region and the cross-regional power support instructions. The total charging and discharging power quota, charging and discharging priority, and remaining battery power percentage allocated by the upper layer are input into the lower-level vehicle-level scheduling of the master-slave hierarchical optimization model to obtain the vehicle-level scheduling model, and the charging and discharging power curve of each vehicle is output. The optimal solution of the objective function is determined based on the improved particle swarm optimization algorithm. The optimal solution includes maximizing the utilization rate of the elasticity margin, minimizing the deviation of the user's charge and discharge plan, and minimizing the battery loss cost, and is denoted as the optimal charge and discharge scheme.
7. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 6, characterized in that, The optimal solution to the objective function is determined based on an improved particle swarm optimization algorithm, including the following steps: The particles are encoded, and the charging and discharging power, user priority, remaining battery power percentage, and battery health status are mapped to the particle position vector; An initial population is randomly generated, with each particle representing a charge / discharge scheduling scheme. Construct a fitness function and impose an exponential penalty on all particles that violate grid safety, user requirements, and battery health, which is the objective function value; The particle velocity and position are dynamically adjusted according to the power grid status, and the search is directed toward high-weight targets. Add Gaussian noise to particles that have not been updated for three consecutive generations, and force derated to a safe power level for particles whose battery temperature exceeds the limit. If the charging cost exceeds the discharging benefit during a certain period, a forced switch to discharging or idle mode is implemented. The top 10% of Pareto solutions are selected in each generation, and charging and discharging scheduling schemes with a user demand satisfaction rate of no less than 95% are prioritized for retention. Non-inferior solutions are then selected. Iterate until convergence or the maximum number of iterations is reached, and output the current optimal solution, which is the optimal charging and discharging scheme.
8. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 1, characterized in that, Determining if the battery status is abnormal includes the following steps: Battery cell operating data includes voltage, voltage range, operating temperature, operating temperature difference, and rate of change of remaining battery capacity percentage; Based on the acquired voltage and voltage range, it is determined whether the voltage falls within the safe voltage range stored in the data repository. If it does not fall within the safe voltage range, emergency protection is triggered. If it falls into the range, it is determined whether the voltage range is greater than the reference range stored in the data storage repository. If it is greater, and the duration of the voltage range being greater than the reference range exceeds 5 minutes, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as voltage imbalance. Conversely, the battery cell is determined to be in a normal state, and the abnormal state is marked as normal. Based on the acquired operating temperature and operating temperature difference, it is determined whether the operating temperature difference is greater than the temperature difference threshold stored in the data storage repository. If it is greater, the battery cell is determined to be in an abnormal state, and the abnormal state is marked as thermal runaway. If it is not greater than, then determine whether the operating temperature is greater than the reference temperature stored in the data storage repository. If it is greater than, then determine that the battery cell is in an abnormal state and mark the abnormal state as over-temperature. Otherwise, determine that the battery cell is in a normal state and mark the abnormal state as normal. Based on the obtained percentage change rate of remaining battery power, it is determined whether the percentage change rate of remaining battery power is greater than the threshold of percentage change rate of remaining battery power stored in the data repository. If it is greater than the threshold and the duration of the percentage change rate of remaining battery power is greater than the threshold for more than 10 minutes, the battery cell is determined to be in an abnormal state and is marked as overcharged or over-discharged. Otherwise, the battery cell is determined to be in a normal state and is marked as normal. If the total harmonic distortion (THD) detection result at the charging / discharging port is the total harmonic distortion (THD), the THD is compared with the harmonic distortion threshold range stored in the data repository. If the THD falls within the harmonic distortion threshold range, the battery cell is determined to have abnormal harmonics, and the harmonic abnormality type is labeled as harmonic pollution. If it does not fall into the range, and the total harmonic distortion rate is greater than the maximum value of the harmonic distortion rate threshold range, then the battery cell is determined to have abnormal harmonics, and the harmonic abnormality type label is marked as a specific harmonic source abnormality. If the total harmonic distortion rate is less than the minimum value of the harmonic distortion rate threshold range, then the battery cell is determined to have normal harmonics, and the harmonic abnormality type label is marked as normal.
9. The bidirectional charging and discharging control method for electric vehicles based on vehicle-to-grid interaction according to claim 1, characterized in that, Based on user behavior data, power grid data, and vehicle status data, an intelligent recommendation model is constructed to obtain recommended charging and discharging schemes, including the following steps: Feature extraction is performed on power grid data, vehicle status data, and user behavior data to obtain a feature dataset, which includes power grid feature data, vehicle feature data, and user feature data. Design the forest structure in the random forest model to obtain the designed random forest model. The forest structure is set with 500 trees, a maximum depth of 15 layers, and the node splitting criterion is minimizing Gini impurity. The feature dataset is divided into a training set, a validation set, and a test set. The training set is input into a pre-designed random forest model to obtain a trained intelligent recommendation model. The validation set is input into the trained intelligent recommendation model for validation. Validation is terminated when the error of the validation set does not decrease for 10 consecutive times, and a validated intelligent recommendation model is obtained. The test set is input into the validated intelligent recommendation model, and the test results are output. Based on the mapping set of each test result and the recommended charging and discharging scheme stored in the database, the recommended charging and discharging scheme corresponding to the test results is obtained.
10. A bidirectional charging and discharging control system for electric vehicles based on vehicle-to-grid interaction, used to implement the method described in any one of claims 1-9, characterized in that, include: The dynamic user demand establishment module is used to acquire users' historical travel data, vehicle status data, external dynamic data, and power grid data. Based on users' historical travel data, vehicle status data, and external dynamic data, a dynamic user demand model is established to obtain the output rigid demand indicator, elastic demand period, and demand confidence. Combined with the dynamic priority algorithm, the charging and discharging priority is obtained. The power grid condition perception and prediction module is used to obtain the power grid's resilience margin based on power grid data and combined with a short-term load forecasting model. The optimal charging and discharging scheme acquisition module is used to establish an optimization model based on charging and discharging priority and elasticity margin, and to obtain the optimal charging and discharging scheme by finding the optimal solution of the optimization model. The battery diagnostic module is used to acquire the working data of individual battery cells and the harmonic detection results of the charging and discharging ports to determine whether the battery status is abnormal. If so, a protection / adjustment scheme is triggered; otherwise, it continues to run. The intelligent recommendation scheme acquisition module is used to build an intelligent recommendation model based on user behavior data, power grid data, and vehicle status data, obtain recommended charging and discharging schemes, and perform charging and discharging control based on the recommended charging and discharging schemes.
Citation Information
Patent Citations
New energy charging pile charging control method and system
CN119428301A
Optical storage charging and discharging integrated power station vehicle network interaction method considering demand side response
CN120566606A
Charging and discharging control strategy optimization method and system of V2G applied to virtual power plant
CN120582188A
Multi-energy micro-grid scheduling method considering electric vehicle load control
CN120749915A
Method for optimizing dispatching of charging loads of electric vehicles to promote wind power consumption
US20230064940A1
Cited By
Method and system for preventing abnormity caused by battery aging and medium
CN121633892A