An electric vehicle adjustable capacity prediction method considering vehicle inventory feedback
Patent Information
- Application Number
- CN202611089721.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-09
AI Technical Summary
[0042]本发明提供一种考虑车辆存量反馈的电动汽车可调容量预测方法,所述方法包括:基于多源数据融合的充电区域运行状态构建。采集充电区域内电动汽车状态参数以及外部环境影响因素,构建用于后续流量预测和可调容量预测的区域运行状态数据集。基于多任务学习的时间融合Transformer模型的电动汽车流入数量和流出数量预测。提取影响车辆流入和流出的关键时序特征,利用多头注意力机制学习不同时间步之间的时间依赖关系,并通过流入数量预测分支和流出数量预测分支分别输出未来预测时段内的电动汽车流入数量和流出数量。基于区域现存数量反馈的流入流出量预测修正。根据充电区域内电动汽车现存数量与预测流入数量、预测流出数量之间的数量守恒关系,对流入流出预测结果进行闭环反馈修正,降低连续预测过程中的累计误差。基于用户离开时间约束的电动汽车充电需求建模。根据电动汽车的预计离开时间、当前荷电状态、目标荷电状态和电池容量,计算车辆在离开前必须满足的最低充电需求,为最小充电功率建模提供约束条件。基于充电需求约束的功率边界与可调容量计算。根据车辆存量反馈结果、车辆荷电状态、用户离开时间和充电需求约束,分别计算充电区域在某一时刻的最大充电功率和最小充电功率,并以二者差值作为该时刻的电动汽车可调容量。基于物理约束神经网络的电动汽车可调容量预测。将流入数量、流出数量、区域现存数量、车辆荷电状态分布、用户离开时间分布和充电需求紧迫度输入物理约束神经网络,预测未来时段内充电区域的可调容量。基于滚动校正的可调容量预测结果输出。根据实时采集的车辆流入数量、流出数量、现存数量和实际充电功率,对预测模型进行滚动校正,并输出未来时段内充电区域的可调容量预测结果。
Smart Images

Figure CN122886870A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of electric vehicle charging and discharging management, power system load regulation and demand response technology, and in particular to a method for predicting the adjustable capacity of electric vehicles that takes into account vehicle inventory feedback. Background Technology
[0002] With the continuous growth of electric vehicle ownership, the large-scale integration of electric vehicles into charging areas has significantly impacted the load curve of the distribution network, the peak-shaving capacity of the power system, and the effectiveness of demand response regulation. During charging, electric vehicles not only act as electrical loads but can also participate in grid regulation through reverse discharge when bidirectional charging and discharging conditions are available. Therefore, accurately predicting the adjustable capacity of electric vehicles in a given area for future periods is a crucial foundation for achieving orderly charging and discharging control of charging stations, peak shaving and valley filling in the distribution network, and demand response resource allocation.
[0003] In actual electric vehicle charging zones, the number of vehicles available for regulation, the distribution of vehicle state of charge, the expected departure time of users, and user charging demand all exhibit significant time-varying characteristics at any given moment. The number of vehicles flowing in determines the potential increase in future charging demand, while the number of vehicles flowing out affects the reduction in the number of vehicles available for regulation. The number of vehicles currently existing in the zone reflects the basic scale of the current adjustable resources. Furthermore, the calculation of the adjustable capacity of electric vehicles requires consideration not only of the presence of vehicles in the zone but also of whether users' charging needs can be met before they leave. The maximum charging power can generally be understood as the upper boundary of the power generated when vehicles in the zone that are not fully charged or have not reached the target state of charge are simultaneously charging under power constraints. The minimum charging power cannot be simply set to zero or a fixed lower limit. Instead, it should, under the premise of meeting the requirements of user departure time and target state of charge, arrange for vehicles with reverse charging capabilities to participate in discharging as much as possible, thereby obtaining the lower boundary of the zone's net charging power.
[0004] In summary, by predicting the number of vehicles flowing into and out of the charging area and combining this with closed-loop correction based on the existing number of vehicles in the area, the vehicle status for future periods is dynamically reconstructed. Simultaneously, charging demand constraints are established based on vehicle state of charge, expected departure time, and target charging demand, calculating the maximum and minimum charging power respectively, and using the difference between the two as the adjustable capacity of electric vehicles. This method improves the accuracy and interpretability of adjustable capacity prediction for charging areas, providing technical support for charging station energy management, distribution network demand response, and orderly charging and discharging control of electric vehicles. Summary of the Invention
[0005] Based on the above, the purpose of this invention is to provide a method for predicting the adjustable capacity of electric vehicles that considers vehicle stock feedback. Under the premise of obtaining the operating data of electric vehicle charging areas, the method dynamically predicts and corrects the number of electric vehicles flowing in, flowing out, and existing in the area. Combined with user charging demand constraints, an adjustable capacity prediction model for electric vehicles is constructed, thereby improving the accuracy and reliability of the adjustable capacity prediction of electric vehicles and providing support for charging station energy management, distribution network demand response, and orderly charging and discharging control of electric vehicles.
[0006] To achieve the above objectives, the present invention provides a method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback, the method comprising:
[0007] Step S1: Constructing the charging area operation status based on multi-source data fusion. Collect electric vehicle status parameters and external environmental influencing factors within the charging area to construct a regional operation status dataset for subsequent traffic flow prediction and adjustable capacity prediction.
[0008] Specifically, it includes:
[0009] Step S11: Obtain data on the number of vehicles entering and leaving the target charging area within a historical time period, including vehicle access time, vehicle departure time, charging pile occupancy status, charging power, and state of charge, to form a vehicle flow characteristic sequence divided by time intervals.
[0010] Step S12: Obtain date type, time period type, weather information, traffic congestion index, time-of-use electricity price, holiday information, and surrounding functional area type to construct an external feature matrix that influences the entry, exit, and charging behavior of electric vehicles.
[0011] Step S13: First, use the entropy method to calculate the information contribution of each candidate feature. Then, use the mutual information method to calculate the correlation between each candidate feature and the number of vehicles flowing in, the number of vehicles flowing out, and the charging demand. Finally, use the variance inflation factor to remove redundant features and obtain the set of key features for the prediction model input.
[0012] Step S2: Predicting the number of electric vehicles flowing in and out based on a temporal fusion Transformer model using multi-task learning. Key temporal features influencing vehicle inflow and outflow are extracted. A multi-head attention mechanism is used to learn the temporal dependencies between different time steps. The number of electric vehicles flowing in and out during the future prediction period is output through inflow prediction and outflow prediction branches, respectively.
[0013] Specifically, it includes:
[0014] Step S21: Input the key feature vectors of each sampling time within the historical time window into the embedding layer and variable selection network, calculate the selection weight of each key feature, and obtain the weighted flow feature representation of each sampling time, providing input for subsequent time dependency extraction.
[0015] Step S22: The weighted feature representations within the continuous historical time window are used to form the input sequence. By mapping the query vector, key vector, and value vector, the attention weights between different time steps are calculated, and the time-dependent features affecting vehicle inflow and outflow in the historical time series are extracted.
[0016] Step S23: Input the time-dependent feature representation into the inflow quantity prediction branch and the outflow quantity prediction branch respectively to obtain the predicted values of vehicle inflow quantity and vehicle outflow quantity at each prediction time in the future, and use the quantile regression loss function to generate vehicle inflow and outflow prediction scenarios at low, medium and high confidence levels.
[0017] Step S3: Inflow and outflow prediction correction based on feedback from the existing number of electric vehicles in the area. Based on the conservation relationship between the existing number of electric vehicles in the charging area and the predicted inflow and outflow numbers, a closed-loop feedback correction is performed on the inflow and outflow prediction results to reduce the cumulative error in the continuous prediction process.
[0018] Specifically, it includes:
[0019] Step S31: Based on the number of vehicles currently existing in the region, the predicted inflow, and the predicted outflow, calculate the predicted number of electric vehicles currently existing in the region at the next time moment, and use it as the basis state quantity for subsequent adjustable capacity modeling.
[0020] Step S32: Compare the actual number of vehicles in the charging area with the number of vehicles predicted by the model to obtain the vehicle number prediction deviation, and feed the deviation back to the time fusion Transformer model based on multi-task learning to correct the prediction results of the subsequent vehicle inflow and outflow.
[0021] Step S33: When the predicted number of existing vehicles is less than zero, the predicted number of outflows is greater than the number of existing vehicles, or the predicted number of existing vehicles exceeds the upper limit of the charging area's vehicle capacity, the inflow and outflow quantities for the corresponding time period are constrained and corrected.
[0022] Step S4: Modeling electric vehicle charging demand based on user departure time constraints. Based on the electric vehicle's expected departure time, current state of charge, target state of charge, and battery capacity, calculate the minimum charging demand the vehicle must meet before departure, providing constraints for minimum charging power modeling.
[0023] Specifically, it includes:
[0024] Step S41: Based on the vehicle access time, historical dwell time, user's historical charging habits, date type, and charging area type, use an attention mechanism model to predict the vehicle's expected departure time.
[0025] Step S42: Based on the vehicle access time, historical dwell time, user's historical charging habits, date type, and charging area type, a departure time prediction model based on long short-term memory network and attention mechanism is used to predict the vehicle's expected departure time.
[0026] Step S43: Using the remaining dwell time, amount of charge to be charged, target state of charge, user departure time and user willingness to participate in reverse charging as indicators, the basic weights are determined by the entropy method, and the basic weights are dynamically corrected by the attention weight normalization method to obtain the urgency of vehicle charging demand.
[0027] Step S5: Calculation of power boundary and adjustable capacity based on charging demand constraints. Based on the vehicle inventory feedback results, vehicle state of charge, user departure time, and charging demand constraints, calculate the maximum and minimum charging power of the charging area at a certain moment, and use the difference between the two as the adjustable capacity of the electric vehicle at that moment.
[0028] Specifically, it includes:
[0029] Step S51: Based on the corrected number of vehicles entering the area, the number of vehicles leaving the area, and the number of vehicles currently in the area, continuously update the vehicle set, vehicle state of charge, expected departure time, and the set of vehicles eligible to participate in reverse charging for the next predicted period.
[0030] Step S52: Under the conditions of satisfying the vehicle's maximum charging power, the charging pile's rated power, the battery's state of charge upper limit, and the area's power distribution capacity constraints, simultaneously charge electric vehicles in the charging area that have not reached the target state of charge, and obtain the maximum charging power at that moment.
[0031] Step S53: Calculate the minimum charging power based on user charging demand. While ensuring that each electric vehicle reaches its target state of charge before its expected departure time, prioritize vehicles with reverse charging capabilities to participate in discharging, and minimize the total net charging power of the charging area to obtain the minimum charging power at that moment.
[0032] Step S6: Electric vehicle adjustable capacity prediction based on physical constraint neural network. Input the inflow rate, outflow rate, existing number of vehicles in the area, vehicle state of charge distribution, user departure time distribution, and charging demand urgency into the physical constraint neural network to predict the adjustable capacity of the charging area in the future period.
[0033] Specifically, it includes:
[0034] Step S61: Based on the predicted inflow and outflow quantities for future periods, continuously update the number of vehicles in the charging area, vehicle state of charge, estimated departure time, and the set of vehicles eligible for reverse charging.
[0035] Step S62: Construct a physical constraint neural network model with the number of existing vehicles in the region, the number of inflows, the number of outflows, the state of charge distribution, the urgency of user demand, the time-of-use electricity price, and the distribution capacity as inputs, and the adjustable capacity as output. In the loss function, vehicle number conservation constraints, upper and lower limits of state of charge constraints, and power boundary constraints are added.
[0036] Step S63: Use a mixed integer programming method to perform boundary correction on the adjustable capacity prediction results output by the neural network, so that the prediction results meet the constraints of maximum charging power, minimum charging power and user departure time.
[0037] Step S7: Output the adjustable capacity prediction results based on rolling correction. Based on the real-time collected data on the number of vehicles entering and leaving the area, the current number of vehicles, and the actual charging power, the prediction model is rolled over, and the adjustable capacity prediction results for the charging area in the future period are output.
[0038] Specifically, it includes:
[0039] Step S71: Real-time acquisition of the actual inflow quantity, actual outflow quantity, actual existing quantity, actual charging power, and vehicle state of charge within the charging area, and comparison with the prediction results to calculate the inflow error, outflow error, existing quantity error, and adjustable capacity error.
[0040] Step S72: Based on the magnitudes of inflow error, outflow error, existing quantity error, and adjustable capacity error, an incremental training method triggered by an error threshold is used to update the parameters of the time fusion Transformer model, departure time prediction model, and physical constraint neural network model based on multi-task learning, and output the adjustable capacity prediction result of electric vehicles.
[0041] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0042] This invention provides a method for predicting the adjustable capacity of electric vehicles (EVs) considering vehicle inventory feedback. The method includes: constructing a charging area operational status based on multi-source data fusion. This involves collecting EV state parameters and external environmental influencing factors within the charging area to construct a regional operational status dataset for subsequent flow prediction and adjustable capacity prediction. Predicting the number of EV inflows and outflows based on a time-fusion Transformer model using multi-task learning. Key temporal features influencing vehicle inflows and outflows are extracted, and a multi-head attention mechanism is used to learn the temporal dependencies between different time steps. The number of EV inflows and outflows in the future prediction period is output through inflow prediction and outflow prediction branches, respectively. Correcting inflow and outflow predictions based on feedback from the existing number of EVs in the area. Based on the quantity conservation relationship between the existing number of EVs in the charging area and the predicted inflow and outflow numbers, closed-loop feedback correction is performed on the inflow and outflow prediction results to reduce the cumulative error in the continuous prediction process. Modeling EV charging demand based on user departure time constraints. Based on the expected departure time of the EVs, their current state of charge, target state of charge, and battery capacity, the minimum charging demand that the vehicles must meet before leaving is calculated, providing constraints for minimum charging power modeling. Power boundary and adjustable capacity calculation based on charging demand constraints. Based on vehicle inventory feedback, vehicle state of charge, user departure time, and charging demand constraints, the maximum and minimum charging power of the charging area at a given moment are calculated, and the difference between them is taken as the adjustable capacity of electric vehicles at that moment. Adjustable capacity prediction of electric vehicles based on a physical constraint neural network. The number of vehicles flowing in, flowing out, the current number of vehicles in the area, the distribution of vehicle state of charge, the distribution of user departure time, and the urgency of charging demand are input into the physical constraint neural network to predict the adjustable capacity of the charging area in the future. Adjustable capacity prediction results output based on rolling correction. Based on real-time collected data on the number of vehicles flowing in, flowing out, the current number of vehicles, and the actual charging power, the prediction model is rolled over, and the adjustable capacity prediction results of the charging area in the future are output. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart of an embodiment of the present invention regarding a method for predicting the adjustable capacity of electric vehicles based on vehicle stock feedback and charging demand constraints.
[0045] Figure 2The diagram shows the adjustable capacity prediction range and boundary curves of electric vehicles at different confidence levels, as provided in the embodiments of the present invention. Detailed Implementation
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] The purpose of this invention is to provide a method for predicting the adjustable capacity of electric vehicles that takes into account vehicle stock feedback. Under the premise of obtaining the operating data of electric vehicle charging areas, the method dynamically predicts and corrects the number of electric vehicles flowing in, flowing out, and existing in the area. Combined with user charging demand constraints, an adjustable capacity prediction model for electric vehicles is constructed, thereby improving the accuracy and reliability of the adjustable capacity prediction of electric vehicles and providing support for energy management of charging stations, demand response of distribution networks, and orderly charging and discharging control of electric vehicles.
[0048] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0049] like Figure 1 As shown, this invention discloses a method for predicting the adjustable capacity of electric vehicles that considers vehicle inventory feedback. The method includes:
[0050] Step S1: Constructing the charging area operation status based on multi-source data fusion. Collect electric vehicle status parameters and external environmental influencing factors within the charging area to construct a regional operation status dataset for subsequent traffic flow prediction and adjustable capacity prediction.
[0051] Step S11: Obtain data on the number of vehicles entering and leaving the target charging area within a historical time period, including vehicle access time, vehicle departure time, charging pile occupancy status, charging power, and state of charge, to form a vehicle flow characteristic sequence divided by time intervals.
[0052] Step S12: Obtain date type, time period type, weather information, traffic congestion index, time-of-use electricity price, holiday information, and surrounding functional area type to construct an external feature matrix that influences the entry, exit, and charging behavior of electric vehicles.
[0053] Step S13: First, the entropy method is used to calculate the information contribution of each candidate feature. Then, the mutual information method is used to calculate the correlation between each candidate feature and the number of vehicles entering and leaving the vehicle fleet, as well as the charging demand. Finally, the variance inflation factor is used to remove redundant features, resulting in the set of key features for the prediction model input. The specific implementation process is as follows:
[0054] (1) Construct the candidate feature matrix.
[0055] Assume there is a total One candidate feature, The first historical sample The first historical sample The normalized value of each candidate feature is ,in, Indicates the total number of candidate features. This represents the total number of historical samples. This represents the normalized candidate feature values.
[0056] (2) Calculate the information proportion of candidate features: ;in, Indicates the first The historical sample in the first The proportion of information under each candidate feature.
[0057] (3) Calculate the first Information entropy of each candidate feature: ;in, Indicates the first Information entropy of each candidate feature This represents the smallest positive number that prevents the logarithmic calculation from being zero.
[0058] (4) Calculate the first Information difference coefficient of each candidate feature: ;
[0059] in, Indicates the first Information difference coefficient of each candidate feature.
[0060] (5) Calculate the first Entropy weights of candidate features: ;in, Indicates the first Entropy weight of each candidate feature.
[0061] (6) Calculate the mutual information between candidate features and the predicted target. Let the predicted target type index be... express, Where in represents the number of vehicles entering the market, out represents the number of vehicles leaving the market, and dem represents the charging demand. The candidate feature and the first The mutual information between the predicted targets is: ;in, Indicates the first One candidate feature, Indicates the first Predictive targets, This represents the mutual information value between the two. Describes the joint probability distribution. Represents the marginal probability distribution of candidate features. This represents the marginal probability distribution of the predicted target.
[0062] (7) Calculate the overall correlation score: ;in, Indicates the first The comprehensive relevance score of each candidate feature. , , Let these represent the target weight coefficients corresponding to the number of vehicles entering the country, the number of vehicles leaving the country, and the charging demand, respectively, and satisfy the following: .
[0063] (8) Use variance inflation factor to remove redundant features. Let the first... The determination coefficients obtained by regressing the candidate features from the remaining candidate features are: Then the first The variance inflation factor for each candidate feature is: ;in, Indicates the first The variance inflation factor of each candidate feature. Indicates the measure of the first The determination coefficients of collinearity between one candidate feature and the remaining candidate features.
[0064] when Greater than the preset correlation threshold, and If the value is less than a preset redundancy threshold, the candidate feature is retained, resulting in the final set of key features: ;in, Represents the set of key features. Indicates the first One key feature This represents the total number of key features.
[0065] Step S2: Predicting the number of electric vehicles flowing in and out based on a temporal fusion Transformer model using multi-task learning. Key temporal features influencing vehicle inflow and outflow are extracted. A multi-head attention mechanism is used to learn the temporal dependencies between different time steps. The number of electric vehicles flowing in and out during the future prediction period is output through inflow prediction and outflow prediction branches, respectively.
[0066] Step S21: Input the key feature vectors of each sampling time within the historical time window into the embedding layer and variable selection network, calculate the selection weight of each key feature, and obtain the weighted flow feature representation of each sampling time, providing input for subsequent time dependency extraction.
[0067] Step S22: The weighted feature representations within consecutive historical time windows are used to form the input sequence. Through query vector, key vector, and value vector mapping, attention weights between different time steps are calculated to extract the time-dependent features affecting vehicle inflow and outflow in the historical time series. The specific implementation process is as follows:
[0068] (1) Let the length of the historical time window be . ,in This represents the number of historical sampling moments used for time dependency extraction; let... and These represent the time step indices within the historical time window; let... Indicates the first The feature representations after weighting by the variable selection network at each time step. The weighted traffic feature representations within the historical time window are then used to form the input sequence: ;in, Indicates the first The input sequence of historical time windows corresponding to each sampling moment.
[0069] (2) For the first in the input sequence The time step and the first Mapping query vectors, key vectors, and value vectors at each time step: ;in, Indicates the first Query vector at each time step Indicates the first The key vector at each time step Indicates the first A vector of values at each time step , , These represent the query mapping matrix, key mapping matrix, and value mapping matrix, respectively.
[0070] (3) Calculate the first The historical time step is the first Attention weights at each time step: ;in, Indicates the first The historical time step is the first Attention weights at each time step This represents the dimension of the key vector.
[0071] (4) Calculate the first Time dependency feature representation at each time step: ;in, Indicates the first The time-dependent feature representation after each time step is extracted by a multi-head attention mechanism.
[0072] Step S23: Input the time-dependent feature representations into the inflow and outflow prediction branches respectively to obtain the predicted vehicle inflow and outflow values for each future prediction time. Then, use the quantile regression loss function to generate vehicle inflow and outflow prediction scenarios at low, medium, and high confidence levels. The specific implementation process is as follows:
[0073] (1) Training the model using the quantile regression loss function: ;in, This represents the joint prediction loss function of quantile regression. Indicates the length of the prediction time domain. Indicates the future number The actual number of vehicles flowing in at the predicted time. Indicates the future number The actual number of vehicles leaving at each predicted time. Indicates the quantile level. Forecast of vehicle inflow at that time Indicates the quantile level. The predicted number of vehicles leaving the area at that time.
[0074] (2) Quantile loss function: ;in, Indicates the quantile level. The quantile loss function at that time Indicates the actual value. This represents the predicted value.
[0075] Step S3: Inflow and outflow prediction correction based on feedback from the existing number of electric vehicles in the area. Based on the conservation relationship between the existing number of electric vehicles in the charging area and the predicted inflow and outflow numbers, a closed-loop feedback correction is performed on the inflow and outflow prediction results to reduce the cumulative error in the continuous prediction process.
[0076] Step S31: Based on the current number of vehicles in the region, the predicted inflow, and the predicted outflow, calculate the predicted number of electric vehicles in the region at the next time step, and use this as the basis for subsequent adjustable capacity modeling. The specific implementation process is as follows: ;in, Indicates the future number Predicted number of vehicles in the region at each prediction time. Indicates the future number The predicted number of vehicles in the region at the predicted time.
[0077] Step S32: Compare the actual number of vehicles in the charging area as monitored with the number of vehicles predicted by the model to obtain the vehicle number prediction deviation. Feed this deviation back to the time fusion Transformer model based on multi-task learning to correct subsequent predictions of vehicle inflow and outflow. The specific implementation process is as follows:
[0078] (1) Calculate the prediction deviation of the current number of vehicles: ;in, Indicates the first The predicted deviation of the current number of vehicles at each sampling time. Indicates the first The actual number of vehicles currently existing in the area as monitored at each sampling time. Indicates the first The number of vehicles currently existing in the area as predicted by the model at each sampling time.
[0079] (2) Correcting the future Vehicle inflow at each predicted time: ;in, This represents the revised forecast of vehicle inflow. Indicates the future number The inflow feedback correction coefficient at each predicted time.
[0080] (3) Correcting the future Number of vehicles leaving at each predicted time: ;in, This represents the revised predicted number of vehicles leaving the area. Indicates the future number Outflow feedback correction coefficient at each predicted time.
[0081] Step S33: When the predicted number of existing vehicles is less than zero, the predicted number of outflows is greater than the number of existing vehicles, or the predicted number of existing vehicles exceeds the upper limit of the charging area's vehicle capacity, the inflow and outflow quantities for the corresponding time period are constrained and corrected.
[0082] Step S4: Modeling electric vehicle charging demand based on user departure time constraints. Based on the electric vehicle's expected departure time, current state of charge, target state of charge, and battery capacity, calculate the minimum charging demand the vehicle must meet before departure, providing constraints for minimum charging power modeling.
[0083] Step S41: Based on the vehicle access time, historical dwell time, user's historical charging habits, date type, and charging area type, use an attention mechanism model to predict the vehicle's expected departure time.
[0084] Step S42: Based on the vehicle's access time, historical dwell time, user's historical charging habits, date type, and charging area type, a departure time prediction model based on long short-term memory networks and attention mechanisms is used to predict the vehicle's expected departure time. The specific implementation process is as follows:
[0085] (1) Let the first The user history behavior feature sequence of electric vehicles is ,in, Indicates the first A sequence of historical user behavior characteristics for each electric vehicle. This represents the first historical behavior feature vector. This represents the length of the historical behavior sequence. The user's historical behavior feature sequence is input into the Long Short-Term Memory network to obtain the hidden states: ;in, Indicates the first electric vehicles in the first The hidden states of the long short-term memory network at each historical behavioral location. This represents the mapping function of the Long Short-Term Memory network. This represents the set of parameters for a long short-term memory network.
[0086] (2) Calculate the first Importance score of each historical behavioral feature: ;in, Indicates the first electric vehicle The importance score of each historical behavioral characteristic , , These represent the weight vector, weight matrix, and bias vector in the departure time prediction attention mechanism, respectively.
[0087] (3) Calculate attention weights: ;in, Indicates the first electric vehicle Attention weights for each historical behavioral feature.
[0088] (4) Calculate comprehensive user behavior characteristics: ;in, Indicates the first A comprehensive feature vector of user behavior for each electric vehicle.
[0089] (5) Predict the estimated dwell time of vehicles: ;in, Indicates the first The expected dwell time of each electric vehicle This represents the function for predicting the duration of stay.
[0090] (6) Calculate the vehicle's estimated departure time: ;in, Indicates the first The estimated departure time of the electric vehicles. Indicates the first The access time of electric vehicles.
[0091] (7) Calculate the minimum amount of battery power the vehicle needs to replenish before the estimated departure time: ;in, This represents the battery capacity of the nth electric vehicle. Indicates the first electric vehicles in the first The minimum amount of power that still needs to be replenished at each sampling time.
[0092] (8) Calculate the remaining stay time: ;in, Indicates the first electric vehicles in the first The remaining dwell time at each sampling time, Indicates the sampling time interval. Indicates the first The actual time corresponding to each sampling moment.
[0093] (9) Calculate the minimum average charging power requirement: ;in, Indicates the first electric vehicles in the first Minimum average charging power requirement at each sampling time.
[0094] Step S43: Using remaining dwell time, amount of charge to be collected, target state of charge, user departure time, and user willingness to participate in reverse charging as indicators, the entropy method is used to determine the basic weights, and the attention weight normalization method is used to dynamically adjust the basic weights to obtain the urgency of vehicle charging demand. The specific implementation process is as follows:
[0095] (1) Let the first electric vehicles in the first The normalized value for each charging demand evaluation indicator is: ,in, This represents the normalized value of the charging demand evaluation index. This represents the index of charging demand evaluation indicators.
[0096] (2) The entropy method is used to obtain the first... The basic weight of each charging demand evaluation indicator ,in, Indicates the first Entropy value method for basic weights of charging demand evaluation indicators.
[0097] (3) Obtain the first by using the attention mechanism electric vehicles in the first Dynamic correction coefficients for each indicator: ;in, Indicates the first electric vehicles in the first Dynamic correction coefficients for each charging demand evaluation indicator This represents the total number of evaluation indicators for charging demand.
[0098] (4) By combining the basic weights and dynamic correction coefficients, the final index weights are obtained: ;in, Indicates the first electric vehicles in the first The final weight of each charging demand evaluation indicator.
[0099] (5) Calculate the urgency of vehicle charging needs: ;in, Indicates the first electric vehicles in the first The urgency of charging needs at each sampling moment.
[0100] Step S5: Calculation of power boundary and adjustable capacity based on charging demand constraints. Based on the vehicle inventory feedback results, vehicle state of charge, user departure time, and charging demand constraints, calculate the maximum and minimum charging power of the charging area at a certain moment, and use the difference between the two as the adjustable capacity of the electric vehicle at that moment.
[0101] Step S51: Based on the corrected number of vehicles entering the area, the number of vehicles leaving the area, and the number of vehicles currently in the area, continuously update the vehicle set, vehicle state of charge, expected departure time, and the set of vehicles eligible to participate in reverse charging for the next predicted period.
[0102] Step S52: Under the conditions of satisfying the vehicle's maximum charging power, the charging pile's rated power, the battery's state of charge upper limit, and the area's power distribution capacity constraints, simultaneously charge electric vehicles in the charging area that have not reached the target state of charge, and obtain the maximum charging power at that moment.
[0103] Step S53: Calculate the minimum charging power based on user charging demand. While ensuring that each electric vehicle reaches its target state of charge before its expected departure time, prioritize vehicles with reverse charging capabilities to participate in discharging, and minimize the total net charging power of the charging area to obtain the minimum charging power at that moment.
[0104] Step S6: Electric vehicle adjustable capacity prediction based on physical constraint neural network. Input the inflow rate, outflow rate, existing number of vehicles in the area, vehicle state of charge distribution, user departure time distribution, and charging demand urgency into the physical constraint neural network to predict the adjustable capacity of the charging area in the future period.
[0105] Step S61: Based on the predicted inflow and outflow quantities for future periods, continuously update the number of vehicles in the charging area, vehicle state of charge, estimated departure time, and the set of vehicles eligible for reverse charging.
[0106] Step S62: Construct a physical constraint neural network model with the number of existing vehicles in the region, the number of inflows, the number of outflows, the state of charge distribution, the urgency of user demand, the time-of-use electricity price, and the distribution capacity as inputs, and the adjustable capacity as output. In the loss function, vehicle number conservation constraints, upper and lower limits of state of charge constraints, and power boundary constraints are added.
[0107] Step S63: Use a mixed integer programming method to perform boundary correction on the adjustable capacity prediction results output by the neural network, so that the prediction results meet the constraints of maximum charging power, minimum charging power and user departure time.
[0108] Step S7: Output the adjustable capacity prediction results based on rolling correction. Based on the real-time collected data on the number of vehicles entering and leaving the area, the current number of vehicles, and the actual charging power, the prediction model is rolled over, and the adjustable capacity prediction results for the charging area in the future period are output.
[0109] Step S71: Real-time acquisition of the actual inflow quantity, actual outflow quantity, actual existing quantity, actual charging power, and vehicle state of charge within the charging area, and comparison with the prediction results to calculate the inflow error, outflow error, existing quantity error, and adjustable capacity error.
[0110] Step S72: Based on the magnitudes of inflow error, outflow error, existing quantity error, and adjustable capacity error, an incremental training method triggered by an error threshold is used to update the parameters of the time fusion Transformer model, departure time prediction model, and physical constraint neural network model based on multi-task learning, and output the electric vehicle adjustable capacity prediction result, such as... Figure 2 As shown.
[0111] Figure 2 The horizontal axis represents time, and the vertical axis represents the charging power of the charging cluster. The figure shows the predicted range and boundaries of the adjustable capacity of electric vehicles at different confidence levels within a future prediction period. Specifically, the corresponding adjustable capacity ranges are determined based on the prediction results at 90%, 95%, and 99% confidence levels, and the upper and lower boundaries at each confidence level characterize the power adjustment range of the charging area at different times.
[0112] The adjustable capacity range is determined by the maximum charging power boundary and the minimum charging power boundary at the corresponding time. The maximum charging power boundary represents the upper limit of power that the charging area can achieve under the constraints of the vehicle's maximum charging power, the charging pile's rated power, the upper limit of the battery's state of charge, and the area's power distribution capacity. The minimum charging power boundary represents the lower limit of net charging power formed after reducing the charging power or arranging vehicles with reverse charging capabilities to participate in discharging, provided that the user's expected departure time and target state of charge requirements are met. Therefore, the area between the maximum charging power boundary and the minimum charging power boundary is the adjustable capacity prediction range of the electric vehicle at this confidence level.
[0113] from Figure 2 It can be seen that the adjustable capacity range of electric vehicles changes dynamically with the number of vehicles connecting and disconnecting, the state of charge distribution, and user charging demand over different time periods. By outputting the adjustable capacity range at different confidence levels, adjustable capacity prediction results with uncertainty characteristics can be provided for charging station energy management, distribution network demand response, and orderly charging and discharging control of electric vehicles.
Claims
1. A method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback, characterized in that, The method includes: Step S1: Constructing the charging area operation status based on multi-source data fusion; collecting electric vehicle status parameters and external environmental influencing factors within the charging area to construct an area operation status dataset for subsequent traffic flow prediction and adjustable capacity prediction; Step S2: Predict the number of electric vehicles entering and leaving the vehicle based on the temporal fusion Transformer model of multi-task learning; extract key temporal features that affect vehicle entry and exit, use multi-head attention mechanism to learn the temporal dependency between different time steps, and output the number of electric vehicles entering and leaving the vehicle in the future prediction period through the inflow prediction branch and the outflow prediction branch, respectively. Step S3: Inflow and outflow prediction correction based on feedback of existing quantity in the region; according to the quantity conservation relationship between the existing quantity of electric vehicles in the charging area and the predicted inflow and outflow quantities, the inflow and outflow prediction results are corrected by closed-loop feedback to reduce the cumulative error in the continuous prediction process. Step S4: Modeling electric vehicle charging demand based on user departure time constraints; Calculate the minimum charging demand that the vehicle must meet before leaving, based on the electric vehicle's expected departure time, current state of charge, target state of charge, and battery capacity, to provide constraints for minimum charging power modeling. Step S5: Calculation of power boundary and adjustable capacity based on charging demand constraints; Based on the vehicle inventory feedback results, vehicle state of charge, user departure time and charging demand constraints, calculate the maximum charging power and minimum charging power of the charging area at a certain moment, and use the difference between the two as the adjustable capacity of the electric vehicle at that moment. Step S6: Electric vehicle adjustable capacity prediction based on physical constraint neural network; input the inflow quantity, outflow quantity, existing quantity in the area, vehicle state of charge distribution, user departure time distribution and charging demand urgency into the physical constraint neural network to predict the adjustable capacity of the charging area in the future period. Step S7: Output the adjustable capacity prediction results based on rolling correction; Based on the real-time collected data on the number of vehicles entering and leaving the area, the existing number of vehicles, and the actual charging power, the prediction model is rolled and corrected, and the adjustable capacity prediction results of the charging area in the future period are output.
2. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S1 specifically includes: Step S11: Obtain data on the number of vehicles entering and leaving the target charging area within a historical time period, including vehicle access time, vehicle departure time, charging pile occupancy status, charging power, and state of charge, to form a vehicle flow characteristic sequence divided by time intervals. Step S12: Obtain date type, time period type, weather information, traffic congestion index, time-of-use electricity price, holiday information, and surrounding functional area type to construct an external feature matrix that influences the entry, exit, and charging behavior of electric vehicles; Step S13: First, use the entropy method to calculate the information contribution of each candidate feature. Then, use the mutual information method to calculate the correlation between each candidate feature and the number of vehicles flowing in, the number of vehicles flowing out, and the charging demand. Finally, use the variance inflation factor to remove redundant features and obtain the set of key features for the prediction model input.
3. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S2 specifically includes: Step S21: Input the key feature vectors of each sampling moment within the historical time window into the embedding layer and variable selection network, calculate the selection weight of each key feature, and obtain the weighted flow feature representation of each sampling moment, providing input for subsequent time dependency extraction; Step S22: The weighted feature representations within the continuous historical time window are used to form the input sequence. By mapping the query vector, key vector and value vector, the attention weights between different time steps are calculated, and the time-dependent features affecting vehicle inflow and outflow in the historical time series are extracted. Step S23: Input the time-dependent feature representation into the inflow quantity prediction branch and the outflow quantity prediction branch respectively to obtain the predicted values of vehicle inflow quantity and vehicle outflow quantity at each prediction time in the future, and use the quantile regression loss function to generate vehicle inflow and outflow prediction scenarios at low, medium and high confidence levels.
4. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S3 specifically includes: Step S31: Based on the number of vehicles currently existing in the region, the predicted inflow, and the predicted outflow, calculate the predicted number of electric vehicles currently existing in the region at the next time moment, and use it as the basis state quantity for subsequent adjustable capacity modeling; Step S32: Compare the actual number of vehicles in the charging area with the number of vehicles predicted by the model to obtain the vehicle number prediction deviation, and feed the deviation back to the time fusion Transformer model based on multi-task learning to correct the prediction results of the subsequent vehicle inflow and outflow. Step S33: When the predicted number of existing vehicles is less than zero, the predicted number of outflows is greater than the number of existing vehicles, or the predicted number of existing vehicles exceeds the upper limit of the charging area's vehicle capacity, the inflow and outflow quantities for the corresponding time period are constrained and corrected.
5. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S4 specifically includes: Step S41: Based on the vehicle access time, historical dwell time, user's historical charging habits, date type, and charging area type, use an attention mechanism model to predict the vehicle's expected departure time; Step S42: Based on the vehicle access time, historical dwell time, user's historical charging habits, date type, and charging area type, use a departure time prediction model based on long short-term memory network and attention mechanism to predict the vehicle's expected departure time; Step S43: Using the remaining dwell time, amount of charge to be charged, target state of charge, user departure time and user willingness to participate in reverse charging as indicators, the basic weights are determined by the entropy method, and the basic weights are dynamically corrected by the attention weight normalization method to obtain the urgency of vehicle charging demand.
6. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S5 specifically includes: Step S51: Based on the corrected number of vehicles entering the area, the number of vehicles leaving the area, and the number of vehicles currently in the area, continuously update the vehicle set, vehicle state of charge, estimated departure time, and the set of vehicles eligible to participate in reverse charging for the next predicted period. Step S52: Under the conditions of satisfying the vehicle's maximum charging power, the charging pile's rated power, the battery's state of charge upper limit, and the area's power distribution capacity constraints, enable electric vehicles in the charging area that have not reached the target state of charge to charge simultaneously, and obtain the maximum charging power at that moment. Step S53: Calculate the minimum charging power based on the user's charging demand; under the premise of ensuring that each electric vehicle reaches the target state of charge before the expected departure time, prioritize vehicles with reverse charging capability to participate in discharging, and minimize the total net charging power of the charging area to obtain the minimum charging power at that moment.
7. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S6 specifically includes: Step S61: Based on the predicted inflow and outflow quantities for future periods, continuously update the number of vehicles in the charging area, vehicle state of charge, estimated departure time, and the set of vehicles eligible for reverse charging. Step S62: Construct a physical constraint neural network model with the number of existing vehicles in the region, the number of inflows, the number of outflows, the state of charge distribution, the urgency of user demand, the time-of-use electricity price and the distribution capacity as inputs, and the adjustable capacity as output. In the loss function, vehicle number conservation constraints, upper and lower limits of state of charge constraints and power boundary constraints are added. Step S63: Use a mixed integer programming method to perform boundary correction on the adjustable capacity prediction results output by the neural network, so that the prediction results meet the constraints of maximum charging power, minimum charging power and user departure time.
8. The method for predicting the adjustable capacity of electric vehicles considering vehicle inventory feedback according to claim 1, characterized in that, Step S7 specifically includes: Step S71: Real-time acquisition of the actual inflow quantity, actual outflow quantity, actual existing quantity, actual charging power and vehicle state of charge within the charging area, and comparison with the prediction results to calculate the inflow error, outflow error, existing quantity error and adjustable capacity error; Step S72: Based on the magnitudes of inflow error, outflow error, existing quantity error, and adjustable capacity error, an incremental training method triggered by an error threshold is used to update the parameters of the time fusion Transformer model, departure time prediction model, and physical constraint neural network model based on multi-task learning, and output the adjustable capacity prediction result of electric vehicles.