An electric bus flexibility resource matching optimization method, device and medium

By constructing a temperature-sensitive energy consumption prediction model and traffic flow probability distribution, combined with a graded response mechanism, the prediction bias and scheduling inaccuracy of the flexible supply capacity of electric buses were solved, thereby optimizing the stability and economy of the power grid.

CN122242874APending Publication Date: 2026-06-19STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2026-05-19
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies cannot effectively balance the temperature effects, randomness of group behavior, and the multi-scenario needs of the power grid for electric buses, resulting in prediction errors and scheduling inaccuracies in the flexibility supply capacity, making it difficult to achieve accurate assessment of vehicle-grid interaction.

Method used

A single-vehicle energy consumption prediction model incorporating a quadratic temperature term is constructed. The traffic flow probability distribution is fitted using a kernel density estimation method. A hierarchical response mechanism and a distributed model predictive control are employed to optimize the matching of flexible resources.

Benefits of technology

Precisely quantifying energy consumption under extreme temperatures reflects traffic randomness, enables efficient matching of flexible resources, ensures grid stability and economy, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122242874A_ABST
    Figure CN122242874A_ABST
Patent Text Reader

Abstract

This invention relates to a method, device, and medium for optimizing the matching of flexibility resources for electric buses. It constructs a single-vehicle energy consumption prediction model for electric buses that includes a quadratic temperature term, and establishes a battery capacity correction model that considers low-temperature degradation and limited regenerative braking to obtain the physical boundary of flexibility resources. The method uses kernel density estimation to fit the probability distribution of bus return time and dwell time, and combines this with the energy consumption prediction model to establish state-of-charge (SOC) opportunity constraints. Under the physical boundary of flexibility resources and SOC opportunity constraints, a hierarchical response mechanism with dead-zone control is used to implement vehicle-grid flexibility supply and demand matching, and to formulate an optimal vehicle-grid coordinated flexibility resource allocation scheme. Compared with existing technologies, this invention can correct the energy consumption prediction bias of traditional linear models under extreme temperatures, alleviate the scheduling mismatch problem caused by the randomness of return time, and improve the response capability of electric bus clusters to participate in grid peak load reduction while considering battery life.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system operation optimization technology, and in particular to a multi-scenario flexibility matching optimization method for electric buses that takes into account ambient temperature and traffic randomness. Background Technology

[0002] With the development of clean energy technologies, the full electrification of public transportation has become an inevitable trend. Large-scale electric bus fleets are not only means of transportation but also enormous distributed mobile energy storage resources. Through vehicle-to-grid (V2G) and vehicle-to-building (V2B) technologies, electric buses can participate in grid peak shaving and frequency regulation during off-peak hours, absorbing renewable energy and providing crucial flexibility support. However, the flexibility supply capacity of electric buses is not constant; it is heavily influenced by both environmental and meteorological conditions and traffic operation status, posing a significant challenge to the accurate assessment of vehicle-to-grid interaction.

[0003] First, ambient temperature has a significant nonlinear impact on the energy consumption characteristics of electric buses. Existing studies mostly use linear energy consumption models, considering only vehicle drag and neglecting the surge in energy consumption of the heating, ventilation, and air conditioning (HVAC) system under extreme temperatures. In hot summer or extremely cold winter conditions, air conditioning energy consumption may account for more than 30% of the total energy consumption, resulting in actual remaining power being far lower than predicted, thus causing an overstatement of flexibility capacity. If the dispatching system fails to accurately correct this deviation, it may cause vehicles to be unable to complete the next day's operation after performing V2G discharge tasks, triggering serious safety concerns.

[0004] Secondly, urban traffic flow exhibits a high degree of spatiotemporal randomness. The return and departure times of electric buses are affected by factors such as traffic congestion and temporary scheduling, exhibiting a non-deterministic distribution. Traditional deterministic optimization methods typically assume that vehicles operate according to a fixed timetable, which cannot cope with the risk of compressed charging windows caused by random delays. Although Monte Carlo simulation can handle randomness, its computational cost is enormous, making it difficult to meet the timeliness requirements of real-time scheduling; while robust optimization methods are often too conservative, sacrificing economic efficiency.

[0005] Furthermore, on the power grid side, coordinating the massive, dispersed electric bus resources with the grid's control needs is also a major challenge. Traditional centralized control struggles to protect user privacy and places significant communication burdens, while completely decentralized control struggles to respond to grid-level emergency support needs. Existing technologies lack an efficient assessment and matching method that can take into account the physical characteristics of individual vehicles (temperature effects), the randomness of group behavior (traffic flow), and the multi-scenario needs of the power grid (economic / supply guarantee). Summary of the Invention

[0006] The purpose of this invention is to address the current problems in electric bus-grid interaction, which cannot simultaneously consider the temperature effect of individual vehicles, the randomness of traffic flow due to group behavior, and the multi-scenario needs of the power grid. This invention provides a method, device, and medium for optimizing the flexibility resource matching of electric buses.

[0007] The objective of this invention can be achieved through the following technical solutions: As a first aspect of the present invention, a method for optimizing the flexibility resource matching of electric buses is provided, comprising the following steps: A single-vehicle energy consumption prediction model for electric buses with a quadratic temperature term is constructed, and a battery capacity correction model considering low-temperature degradation and limited regenerative braking is established to obtain the physical boundary of flexibility resources. The probability distribution of bus return time and dwell time is fitted using the kernel density estimation method, and a state of charge chance constraint is established in combination with the energy consumption prediction model. Under the constraints of physical boundaries and state-of-charge opportunities of flexibility resources, a hierarchical response mechanism based on dead-zone control is used to match the supply and demand of vehicle-network flexibility and formulate the optimal allocation scheme for vehicle-network collaborative flexibility resources.

[0008] As a preferred technical solution, the electric bus energy consumption prediction model including a quadratic temperature term is expressed as follows: In the formula, for t Time of the first i Energy consumption per unit distance of a vehicle; As a reference constant; Average vehicle speed; Road slope; For docking density; The ambient temperature; , , These are the linear regression coefficients of the physical operating parameters; The coefficient for the temperature linear term characterizes the changes in mechanical resistance and foundation thermal load with temperature; The coefficient of the quadratic term of temperature; This is the random error term.

[0009] As a preferred technical solution, the state-of-charge opportunity constraint is specifically established as follows: An adaptive kernel density estimation method is used to construct the probability density function of the bus's return time and dwell time. Integrating the probability density function yields the cumulative distribution function, which is used to calculate the probability that the vehicle will return to the field before any time. By combining the energy consumption prediction model and the battery capacity correction model, a chance constraint condition is constructed for the state of charge of the vehicle at the time of departure, which has a probability of being greater than a preset threshold and is not lower than the confidence level. The state-of-charge constraint utilizes the inverse cumulative distribution function to transform the probabilistic constraint into a deterministic linear constraint: In the formula, and These are the expected value and standard deviation of the state of charge upon leaving the field, taking into account the randomness of the return time and energy consumption; Φ -1 ( () is the inverse function of the cumulative distribution function of the standard normal distribution; For a pre-set confidence level; In the formula, and Var ( ) represent the expectation and variance operators, respectively; The remaining energy for the return field; For the energy replenished during the stay; The remaining energy for the return field; This refers to the battery's rated capacity. This is the capacity decay factor after temperature correction; This is the initial state of charge; This is the time to leave the venue; It's time for the encore; for Time of the first i Energy consumption per unit distance of a vehicle; Instantaneous velocity; This is the corrected maximum usable battery capacity.

[0010] As a preferred technical solution, the energy consumption integral calculation in the residual energy of the return field is subject to a feedback power limitation constraint: In the formula, This is the maximum allowable regenerative braking power. Rated feedback power; For feedback-restricted state of charge threshold; When the vehicle is in braking condition and the calculated theoretical regenerative braking power exceeds the current maximum allowable regenerative braking power, the excess energy will be discarded and will not be included in the battery charging capacity.

[0011] As a preferred technical solution, the corrected maximum usable battery capacity in the battery capacity correction model Represented as: In the formula, This refers to the battery's factory rated capacity. This is a temperature correction factor; Based on cumulative loop count aging degradation rate; Low temperature is an influencing factor; This is the optimal operating temperature for the battery.

[0012] As a preferred technical solution, the hierarchical response mechanism that introduces dead zone control adopts dead zone control logic as the first-level response and distributed model predictive control as the second-level response, triggering peak shaving and valley filling only when the load deviation exceeds the dead zone threshold, and performing multi-objective collaborative optimization within the safety boundary.

[0013] As a preferred technical solution, the dead zone control logic sets the dead zone threshold according to the net load deviation of the power grid and divides the adjustment mode into three modes: dead zone maintenance, economic peak shaving and emergency support. When the absolute value of the load deviation is within the dead zone range, it enters the dead zone holding mode, and the response power is set to zero. At this time, the electric bus does not perform charging and discharging regulation. When the absolute value of the load deviation exceeds the dead zone and the net load of the grid does not exceed the limit, the economic peak shaving mode is triggered, prioritizing the response to time-of-use pricing to carry out off-peak charging and peak discharge arbitrage, and controlling the number of battery cycles to extend life. When the net load of the power grid exceeds the limit or an emergency dispatch order is received from the superior authority, the emergency support mode is triggered, ignoring the cost of battery aging, and all available flexibility resources are forcibly used for full-power discharge.

[0014] As a preferred technical solution, the distributed model predictive control decomposes the optimization problem into the following two collaborative levels: The first level is the station-level local optimization, which is deployed at the edge computing nodes of each bus station. It receives the modified physical boundary and state of charge opportunity constraints, calculates the schedulable power feasible region of the entire station in each time period under the premise of meeting the charging needs of individual vehicles, and reports the station-level constraints to the grid layer. The second level is grid-level global coordination, deployed at the distribution network dispatch center. Based on the feasible domain reported by each substation, combined with grid-side constraints and a global objective function, it calculates the optimal power allocation command for each substation and issues it for execution. The global objective function aims to minimize the total operating cost of the distribution network and the bus cluster within the dispatch cycle, and establishes a multi-objective optimization function that takes into account grid interaction costs, battery aging costs, and grid peak penalties. In the formula, J The overall optimization objective function; T The scheduling period; N The number of electric buses; for t Real-time grid interaction costs; For the first i The cost of battery aging in a vehicle; The peak penalty coefficient; The maximum net load within the scheduling period; , These are the buying and selling electricity prices, respectively. Basic load; , These are the charging and discharging power, respectively. Reset battery costs; This represents the cycle life at the current depth of discharge. Battery throughput power; This is the scheduling time step.

[0015] As a second aspect of the present invention, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the electric bus flexibility resource matching optimization method as described above.

[0016] As a third aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the electric bus flexibility resource matching optimization method as described above.

[0017] Compared with the prior art, the present invention has the following beneficial effects: 1) This invention proposes a nonlinear energy consumption correction model that includes a quadratic temperature term, solving the problem of large prediction deviations in the energy consumption of electric buses by traditional linear models under extreme temperatures (such as extreme cold in winter and extreme heat in summer). By introducing a temperature nonlinear coefficient c5, the energy consumption surge characteristics of the HVAC system can be accurately captured, effectively correcting the risk of overstated flexibility capacity and ensuring the reliability of the vehicle-to-grid interaction strategy in all-weather environments.

[0018] 2) This invention utilizes the kernel density estimation (KDE) method to establish a probability distribution model of the spatiotemporal state of a bus fleet, eliminating the dependence on a specific probability distribution (such as the normal distribution) and more realistically reflecting the randomness of return times under complex urban traffic flows. Combined with chance-constrained programming, it maximizes the flexibility of vehicle charging time windows while ensuring the punctuality rate of bus operations.

[0019] 3) This invention constructs a hierarchical response mechanism based on dead-zone control and distributed MPC, achieving optimal allocation of flexible resources. Compared with traditional centralized optimization or simulation methods (SAA), this method can significantly reduce peak grid load and lower system operating costs, while greatly improving computational efficiency and meeting real-time requirements, providing an efficient and feasible technical solution for large-scale electric bus clusters to participate in grid dispatch. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating an embodiment of the present invention of a method for optimizing the flexibility of electric buses that considers ambient temperature and traffic randomness.

[0021] Figure 2 This is a nonlinear sensitivity curve of ambient temperature to the energy consumption per unit mileage of an electric bus according to an embodiment of the present invention.

[0022] Figure 3 This is a probability distribution diagram of the bus return time and dwell time based on kernel density estimation (KDE) modeling in an embodiment of the present invention.

[0023] Figure 4 This is a graph comparing the net grid load under the balance control strategy and the baseline disordered charging scheme according to an embodiment of the present invention. Detailed Implementation

[0024] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0025] Example 1 This invention proposes a multi-scenario flexibility matching optimization method for electric buses that considers ambient temperature and traffic randomness. It has the advantages of accurately quantifying flexibility capacity, characterizing traffic spatiotemporal randomness, and improving the computational efficiency of supply and demand matching, thereby solving the problems of capacity mismatch caused by ignoring ambient temperature and scheduling inaccuracy caused by traffic randomness.

[0026] like Figure 1 As shown, a multi-scenario flexibility matching optimization method for electric buses considering ambient temperature and traffic randomness includes the following steps: S1. Based on nonlinear regression, a single-vehicle energy consumption prediction model and a battery available capacity correction model for electric buses with a quadratic temperature term are constructed. The nonlinear influence of ambient temperature on the energy consumption of HVAC systems and the battery capacity decay at low temperatures are quantified to obtain the physical boundary of flexibility resources.

[0027] S2. Considering the characteristics of urban road traffic flow and congestion uncertainty, kernel density estimation (KDE) is used to fit the probability distribution of bus return time and dwell time, and a state-of-charge chance constraint that meets a specific confidence level is established to characterize the scheduling uncertainty caused by traffic congestion.

[0028] S3. Implement a vehicle-grid flexibility supply and demand matching strategy based on a graded response mechanism. For daily peak shaving and emergency supply guarantee scenarios, construct a multi-objective optimization model that takes into account battery aging costs, introduce dead zone control logic and supply and demand matching function, transform nonlinear chance constraints into deterministic second-order cone programming or mixed integer programming problems, and formulate the optimal allocation scheme for vehicle-grid collaborative supply and demand matching flexibility resources.

[0029] This invention addresses the problem of large prediction errors in energy consumption using traditional linear models under extreme winter and summer temperatures. It constructs an energy consumption prediction model incorporating a quadratic temperature term through nonlinear regression, eliminating the overestimation of remaining mileage and providing accurate physical state input for subsequent steps. Historical GPS trajectory data and check-in / check-in times of vehicles are collected via onboard terminals and the dispatch center to obtain vehicle mobility data samples. Based on the accurate energy consumption status output in step S1, the probability distribution features of return time and dwell time are mined using kernel density estimation (KDE). Specifically, historical return time samples are extracted, a Gaussian kernel function and optimal smoothing bandwidth are selected, and a continuous probability density function (PDF) is generated by superposition and integration to obtain the cumulative distribution function (CDF). This probability distribution feature quantifies the likelihood of a vehicle being present at different times. Subsequently, the inverse function of the cumulative distribution function (CDF) is used to map the preset confidence level to a specific time boundary. Then, combined with the energy consumption prediction model, the minimum state of charge (SOC) requirement at departure is derived, transforming uncertain vehicle mobility into SOC opportunity constraints that satisfy a specific confidence level. This establishes the safe and feasible domain boundary for vehicle-to-grid interaction. Under the constraints of the physical boundary determined in step S1 and the SOC opportunity constraints and spatiotemporal distribution characteristics determined in step S2, a hierarchical response-based optimization strategy is constructed. Dead-zone control logic is introduced as the first-level response to filter out minor grid fluctuations and extend battery life. Distributed model predictive control (MPC) is used as the second-level response, triggering V2G peak shaving and valley filling only when the load deviation exceeds the dead-zone threshold. Ultimately, multi-objective collaborative optimization that balances grid safety and user lifespan is achieved within the safe boundary.

[0030] In one embodiment, step S1 constructs a vehicle energy consumption and available capacity correction model based on environmental thermal effects, establishes a vehicle unit mileage energy consumption prediction model including a quadratic temperature term, and obtains the baseline energy consumption at different temperatures.

[0031] S11. Environmental temperature nonlinear sensitivity characterization: Based on historical operating data and meteorological data, a single vehicle unit mileage energy consumption prediction model containing a quadratic temperature term is established using nonlinear regression to correct the auxiliary system energy consumption under extreme temperatures and obtain accurate energy consumption status input. S12. Considering the impact of battery aging losses and grid peak demand penalties on operational economics, a comprehensive objective function is established that includes electricity trading costs, battery degradation costs, and peak demand penalties. S13. Considering the influence of ambient temperature on the physical characteristics of the battery, establish battery available capacity constraints and state of charge constraints that take into account temperature correction factors, so as to construct an energy consumption and available capacity correction model for electric buses.

[0032] Considering that the energy consumption of electric buses depends not only on driving dynamics but also on the nonlinear effects of ambient temperature on the HVAC system and battery internal resistance, this embodiment constructs an energy consumption prediction model based on a fusion of physics and data-driven approaches to accurately quantify the energy consumption of a single vehicle in different seasons and time periods. The expression for the single-vehicle unit-mileage energy consumption prediction model, including a quadratic temperature term, is as follows: In the formula, for t Time of the first i Energy consumption per unit distance of a vehicle; As a reference constant; Average vehicle speed; Road slope; For docking density; The ambient temperature; , , These are the linear regression coefficients of the physical operating parameters; The coefficient for the temperature linear term characterizes the changes in mechanical resistance and foundation thermal load with temperature; The coefficient for the quadratic temperature term characterizes the nonlinear high energy consumption characteristics of HVAC systems under extreme low or high temperature conditions. This is the random error term.

[0033] The process of correcting energy consumption prediction bias based on quadratic term coefficients involves: firstly, constructing a multi-dimensional feature dataset by collecting historical operating data of electric buses (covering indicators such as speed, energy consumption, and SOC changes) and meteorological data such as ambient temperature for the corresponding time periods to extract data features. Based on this, the least squares method is used to perform nonlinear regression fitting and parameter identification on the aforementioned single-vehicle energy consumption prediction model formula to extract the key temperature quadratic term coefficients. The specific steps are as follows: 1) Construct an observation matrix, including the collected data. n Substituting historical sample data into the linear form of the single-vehicle unit mileage energy consumption prediction model, a response vector is constructed: and design matrix X ,in X Each line contains Characteristic variables; 2) Construct the loss function and establish the residual sum of squares loss function. ,in The parameter vector to be identified; 3) Solve for the parameters, let the loss function be applied to... θ The partial derivatives are zero, and this is achieved through the normal equation. The solution yields the coefficients of the quadratic term including temperature. The optimal parameter vector, including...

[0034] This correction mechanism directly compensates for the systematic bias caused by the traditional linear model neglecting the heating or cooling power of HVAC, effectively preventing the dispatch system from misjudging the remaining battery power of vehicles and ensuring the accuracy of energy consumption prediction.

[0035] like Figure 2 The figure shown is a simulation diagram of the nonlinear effect of ambient temperature on energy consumption in this embodiment. Figure 2 It is known that when the ambient temperature deviates from the comfortable range (approximately 15-20°C), the energy consumption curve shows a significant upward trend. For example, under extreme conditions of -5°C, energy consumption increases by approximately 18%-20% compared to the baseline value. Ignoring the quadratic term would lead to a serious overestimation of the remaining battery power, causing the system to misjudge that the vehicle has remaining battery power to participate in V2G, thus triggering the risk of vehicle-to-network mismatch.

[0036] Specifically, a battery capacity correction model that takes into account low-temperature degradation and limited regenerative braking is established to clarify the physical boundaries of flexibility resources.

[0037] Besides energy consumption, ambient temperature directly affects the electrochemical activity of the battery, leading to a decrease in usable capacity. (Corrected maximum usable battery capacity) The expression is: In the formula, This refers to the battery's factory rated capacity. This is a temperature correction factor; Based on cumulative loop count The aging degradation rate is used to characterize the state of battery health (SOH).

[0038] The temperature correction factor uses a quadratic decay function to describe the decrease in activity at low temperatures, and its expression is: In the formula, This is a low-temperature influencing factor, characterizing the decrease in the utilization rate of active materials caused by the increase in electrolyte viscosity; This is the optimal operating temperature for the battery.

[0039] Considering that the battery cannot accept large current regenerative braking under high state of charge (SOC), the regenerative power limit constraint expression is established as follows: In the formula, This is the maximum allowable regenerative braking power. Rated feedback power; The state of charge threshold is a feedback-restricted threshold.

[0040] The aforementioned feedback power limitation constraint is mainly reflected in the correction of the remaining energy in the return field in subsequent specific applications. In the following energy consumption integral calculation, when the vehicle is in braking condition and the calculated theoretical feedback power exceeds... At this time, any excess energy will be considered as mechanical braking heat dissipation and discarded, not included in the battery charge. This constraint effectively corrects the overestimation of energy recovery caused by the traditional model neglecting charging limitations at high SOC, ensuring the calculated expected value of the remaining energy in the return field. The true boundary conforms to the physical characteristics of the battery, thus preventing the scheduling system from making incorrect charge and discharge plans based on artificially high remaining power in subsequent steps.

[0041] Based on the above model, electric buses i Upon returning to the depot after completing operational tasks Expected residual energy at time The expression is: In the formula, The remaining energy for the return field; This refers to the battery's rated capacity. This is the capacity decay factor after temperature correction; This is the initial state of charge; This is the time to leave the venue; It's time for the encore; This refers to instantaneous velocity.

[0042] In one embodiment, step S2 establishes a probability distribution model of the spatiotemporal migration of the bus fleet based on chance constraints, and uses the kernel density estimation method to perform probability fitting on the vehicle return time and dwell time.

[0043] Specifically, the process of constructing the probability distribution model of the spatiotemporal migration of bus fleets is as follows: The input data for S2.1 is long-term historical data recorded by the bus operation dispatch system, including data for each bus. i actual return time set And the corresponding set of stay durations.

[0044] S2.2 Kernel Density Estimation Modeling: Traditional parametric models cannot accurately fit the bimodal characteristics of morning and evening rush hours in urban bus depots. This invention employs a non-parametric adaptive kernel density estimation method to construct a probability density function.

[0045] To avoid relying on specific parameter distribution assumptions, this invention employs a non-parametric kernel density estimation (KDE) method to characterize the temporal distribution features of the bus fleet. (Return time) t arr The probability density function (PDF) is expressed as follows: In the formula, Let be the probability density estimation function for the vehicle's return time; n The number of samples; h To smooth bandwidth; The Gaussian kernel function; This is a historical observation sample.

[0046] In this study, a Gaussian kernel function was selected to ensure smoothness, and the thumb rule was used to optimize the selection of the smoothing bandwidth. h To achieve a balance between bias and variance, and to accurately capture the multimodal characteristics of the data.

[0047] S2.3 Integrating the probability density function PDF yields the cumulative distribution function (CDF), which is used as the output of the spatiotemporal state model. This output is directly related to the subsequent optimization model, and the inverse function of the CDF determines the confidence level. β The latest return time boundary is used as a time input for flexibility assessment.

[0048] In this embodiment, the kernel function K ( uThe Gaussian kernel function is selected, and its expression is: Specifically, the process of mining spatiotemporal distribution characteristics and establishing chance constraints based on kernel density estimation includes: firstly, performing kernel density estimation on the sample set of historical return times, and then using a Gaussian kernel function to generate a continuous probability density function (PDF) curve, as shown in the figure. Figure 3 As shown by the blue solid line, this curve accurately captures the bimodal distribution characteristics of morning and evening rush hours without requiring a pre-defined normal distribution assumption. Subsequently, the generated PDF is integrated to obtain the cumulative distribution function (CDF), which is used to calculate the vehicle's performance at any given time. t The probability of completing the return to the field is determined. Finally, combined with the modified energy consumption prediction model, the chance constraints of the State of Charge (SOC) are constructed. By introducing the Inverse Cumulative Distribution Function (ICDF), the above probabilistic constraints are transformed into deterministic linear constraints, thereby clarifying the safety margin boundary of the scheduling algorithm when facing uncertainties such as traffic congestion. This boundary is the state of charge lower bound constraint derived from the probability distribution characteristics and satisfying a specific confidence level.

[0049] Furthermore, such as Figure 3 The image shown is a KDE distribution diagram of bus return time and dwell time in this embodiment. Figure 3 Analysis reveals a distinct bimodal distribution in the return time (solid blue line). The first smaller peak occurs around 9:00 AM (after the morning rush hour), and the second major peak occurs around 6:30 PM (after the evening rush hour). This distribution pattern reflects the tidal operational pattern of urban public transport. Dwell time (dashed green line) exhibits a right-skewed distribution. Most vehicles have a dwell time concentrated between 8 and 10 hours, but this indicates that some vehicles still have extremely short dwell times. Accurately capturing this non-Gaussian distribution using KDE allows for a more precise calculation of the dispatchable time window for each vehicle compared to the traditional averaging method, avoiding charging task backlogs caused by underestimating the randomness of return time.

[0050] Specifically, traffic randomness is transformed into a probabilistic constraint of state of charge (SOC), and then analyzed. To ensure on-time operation the following day, a chance-constrained SOC boundary condition is established, requiring that the probability of a vehicle's charge level being greater than a preset threshold at the time of departure is not lower than a confidence level. β Its expression is: In the formula, The symbol represents the probability of the event within the parentheses occurring. The state of charge at the moment of departure; To ensure the minimum reserve power required for operation the following day; β The preset confidence level is used to mitigate the risk of insufficient charging caused by traffic congestion leading to delayed return to the site.

[0051] The inverse cumulative distribution function (ICDF) is used to transform uncertain constraints into deterministic constraints. Its expression is as follows: In the formula, and These are the expected value and standard deviation of the state of charge upon leaving the field, taking into account the randomness of the return time and energy consumption; Φ -1 ( () is the inverse function of the cumulative distribution function of the standard normal distribution; The confidence level is set in advance.

[0052] Specifically, and The specific calculation expression is as follows: In the formula, and Var ( ) represent the expectation and variance operators, respectively; Energy replenished during the stay.

[0053] In one embodiment, step S3 implements a vehicle-to-grid flexibility supply and demand matching strategy based on a hierarchical response mechanism, constructs a distributed model predictive control (MPC) architecture, and establishes a multi-objective function that includes energy cost, battery aging, and peak penalty. After clarifying the physical energy consumption boundary determined by S1 and the probabilistic safety boundary determined by S2, this step aims to solve the problem of how to perform optimal scheduling within these boundaries, and monetize flexibility resources through a hierarchical response mechanism.

[0054] S31. Design dead zone control logic, set the adjustment dead zone threshold according to the net load deviation of the power grid, and divide the adjustment mode into three states: dead zone maintenance, economic peak shaving and emergency support.

[0055] S32. Construct a distributed model predictive control architecture to decompose the large-scale cluster optimization problem into two levels: station-level local optimization and power grid-level global coordination.

[0056] S33. Through multi-scenario comparative analysis, verify the flexibility matching effect of different control strategies in daily peak shaving and extreme supply guarantee scenarios.

[0057] Specifically, by scheduling cycle TThe objective function of the collaborative optimization model is to minimize the total operating cost of the internal power distribution network and the bus cluster. J The expression is: In the formula, J The overall optimization objective function; T The scheduling period; N The number of electric buses; for t Real-time grid interaction costs; For the first i The cost of battery aging in a vehicle; The peak penalty coefficient; The maximum net load within the scheduling period; , These are the buying and selling electricity prices, respectively. Basic load; , These are the charging and discharging power, respectively. Reset battery costs; This represents the cycle life at the current depth of discharge. Battery throughput power; This is the scheduling time step.

[0058] Specifically, cycle life number With depth of discharge DOD The relationship is an exponential function, and its expression is: In the formula, A and B These are the fitting parameters for battery aging characteristics.

[0059] Specifically, to address the challenge of the exploding dimensionality in large-scale electric bus cluster scheduling calculations, this embodiment constructs an MPC architecture that decomposes the optimization problem into two collaborative levels: The first level is depot-level local optimization. This level is deployed at the edge computing nodes of each bus depot. Its core task is to receive the physical energy consumption boundary corrected by step S1 and the KDE probability boundary determined by step S2, calculate the feasible domain of the overall schedulable power of the depot in each time period while meeting the charging requirements of individual buses, and report the depot-level constraints to the grid layer. The second level is grid-level global coordination. This level is deployed at the distribution network dispatch center. Its core task is to calculate the optimal power allocation command for each depot based on the feasible domain reported by each depot, combined with grid-side constraints and the global objective function, and issue it for execution.

[0060] In one embodiment, constraints on the optimization model are determined, including power balance constraints, equipment physical constraints, SOC dynamic constraints, and dead zone control constraints.

[0061] Specifically, the power balance constraint expression for the distribution network is as follows: In the formula, For rigid foundation load; This refers to the photovoltaic power generation capacity.

[0062] Specifically, the expression for the charging and discharging power constraint of electric buses is as follows: In the formula, and These are the maximum charging and discharging power, respectively; and It is a 0-1 binary variable that represents the charging and discharging state.

[0063] Specifically, the expression for the dynamic equilibrium constraint of the state of charge (SOC) is: In the formula, and These are the charging efficiency and the discharging efficiency, respectively.

[0064] Specifically, the SOC safety boundary constraint expression is as follows: Specifically, in addition to the conventional SOC upper and lower limit constraints, this invention particularly emphasizes the safe operation boundaries of the distribution network. Transformer capacity limitation constraints must be met: In the formula, Net load of the power grid; This is a transformer capacity limitation. This constraint ensures that large-scale charging or discharging of electric bus fleets will not lead to transformer overload and burnout, and is a core condition for ensuring the physical safety of the power grid.

[0065] In one embodiment, dead zone control logic is designed to set the adjustment dead zone threshold according to the net load deviation of the power grid, and the adjustment mode is divided into three states: dead zone maintenance, economic peak shaving, and emergency support.

[0066] Specifically, define the net load deviation of the power grid. The expression is: In the formula, Net load of the power grid; This is the target load benchmark value for the distribution network.

[0067] Specifically, the response power of dead-time control P req,t Described using a piecewise function, the expression is: In the formula, This is the dead zone threshold; The gain is adjusted proportionally. This is a sign function. When the load deviation is within the dead zone, V2G regulation is not triggered to reduce ineffective battery operation; when it exceeds the dead zone, power support is provided proportionally.

[0068] Specifically, the difference between the economic peak shaving and emergency support modes lies in their triggering conditions and optimization weights. The economic peak shaving mode is triggered when the load deviation exceeds the dead zone and the grid net load does not exceed the limit. In this mode, the optimization objective function focuses on economy; the system prioritizes time-of-use pricing for off-peak charging and peak-peak discharging arbitrage, and strictly controls battery cycle count to extend battery life. The emergency support mode is triggered when the grid net load exceeds the limit or when an emergency dispatch order is received from the superior authority. In this mode, the optimization objective function focuses on safety, temporarily ignoring battery aging costs. The system will forcibly utilize all available flexibility resources for full-power discharge to prevent transformer overload damage.

[0069] The above solution is not a simple application of existing hierarchical optimization techniques, but rather a unique improvement and innovation tailored to the characteristics of electric bus clusters, introducing a dead-zone filtering pre-processing stage. Existing technologies typically respond directly to load fluctuations in real time, which can easily lead to frequent battery throughput under small fluctuations, accelerating aging. This invention introduces a dead-zone threshold, combining dead-zone control with MPC optimization. MPC calculations are triggered only when the load deviation has adjustment value, effectively filtering out some invalid adjustment commands and extending the life of bus batteries. Simultaneously, it is based on constraint reconstruction based on "probability-physical boundary." The underlying constraints of existing hierarchical optimization are usually fixed rated parameters. This invention embeds temperature correction parameters and KDE probability boundaries in the station-level optimization, ensuring that the feasible region uploaded to the grid level is a true feasible region that takes into account environmental thermal effects and traffic uncertainties, avoiding the problem of scheduling commands being unexecutable due to feasible region estimation errors in traditional solutions.

[0070] In this embodiment, the proposed optimization method is simulated and verified using an IEEE 33-bus power distribution system and 100 electric buses. Environmental parameters are based on typical meteorological data for the region, and the energy consumption prediction model parameters are shown in Table 1.

[0071] Table 1 Regression Parameters for Energy Consumption Prediction Model Specifically, Figure 2 This is a nonlinear sensitivity curve of ambient temperature to energy consumption. (From...) Figure 2 As shown in Table 1, the coefficient of the quadratic term A positive value results in a significant U-shaped energy consumption curve. Energy consumption is lowest at 20°C; however, it increases by approximately 18% at -5°C. If this is ignored... This will lead to an overestimation of the State of Charge (SOC) at low temperatures, and the vehicle may run out of power before returning to the depot.

[0072] Specifically, three comparative scenarios are set up to verify the proposed method: Scenario 1 (Case 0) is the baseline disordered charging strategy; Scenario 2 (Case 1) is the strategy that only considers the user's interests (i.e., only responds to time-of-use pricing); Scenario 3 (Case 2) is the collaborative optimization strategy proposed in this invention. Figure 4 The curves show a comparison of net grid load under the three strategies.

[0073] like Figure 4 As shown, in Case 0, the peak return of buses to the depot and the peak of residential electricity consumption severely overlapped, forming the highest peak load of the day, which could easily cause transformer overload. In Case 1, although the high electricity price period of the evening peak was avoided, the large number of vehicles charging at full power simultaneously at the beginning of the low electricity price period caused a sharp "secondary peak" rebound in the early morning, causing a new impact on the power grid. In Case 2, the strategy of this invention is the most effective. Through the MPC algorithm and dead zone control, the control system uses V2G technology to discharge in reverse to support the power grid during the evening peak period (as shown by the peak shaving effect in the green shaded area in the figure), significantly reducing the peak load; at the same time, the charging task is distributed smoothly and dispersed at night, avoiding the concentrated impact of Case 1, and achieving true peak shaving and valley filling and stable operation of the power grid.

[0074] Specifically, to quantify the effect, peak reduction rate is introduced. PDon With cost savings CS Its calculation expression is: In the formula, and These are the net load sequences of the power grid under the baseline strategy and the optimized strategy, respectively. and These represent the total operating costs under the baseline strategy and the optimized strategy, respectively. Table 2 compares the system performance indicators under different scenarios.

[0075] Table 2 Comparison of System Operation Performance Evaluation Based on the data analysis in Table 2, compared with Case 0, the method of this invention achieves a peak reduction of 56.00%, which significantly alleviates the risk of transformer overload. Although the cost of battery aging is taken into account, the total cost to users is reduced by 61.2% through precise off-peak charging and peak arbitrage. Compared with traditional global optimization or simulation methods, the solution speed of this invention based on distributed MPC and analytical transformation is faster and the computational efficiency is significantly improved.

[0076] To further verify the necessity of the temperature correction model in this invention, this embodiment compares the optimization deviations under different seasonal scenarios, as shown in Table 3.

[0077] Table 3 Comparison of System Operation Performance Evaluation As shown in Table 3, without the correction step S1 of this invention, the SOC prediction error can reach as high as 12%-18% in winter and summer. This means that the dispatch center may mistakenly believe that the vehicle still has remaining power available for V2G, when in fact the vehicle's power is severely depleted, which could easily lead to a safety accident. This invention eliminates this systematic bias by introducing a quadratic term.

[0078] In summary, this invention proposes a multi-scenario flexibility matching optimization method for electric buses that considers ambient temperature and traffic stochasticity. To address the capacity prediction bias caused by ambient temperature, an energy consumption correction model incorporating quadratic terms is constructed to accurately quantify energy consumption surges under extreme conditions. For traffic stochasticity, reliable scheduling under uncertainty is achieved using KDE and chance-constrained analytical transformation. To address the challenge of large-scale cluster control, a hierarchical response mechanism based on dead-zone control and the MPC algorithm are employed to decouple optimization variables from random variables and achieve efficient solution. The proposed method demonstrates significant advantages through numerical examples, fully exploiting the flexibility potential of electric buses. In the examples, it achieves a 56.00% peak reduction while significantly improving computational efficiency, providing an efficient and reliable flexibility assessment and scheduling solution for urban power distribution networks with a high proportion of electric buses.

[0079] Example 2 As a second aspect of the present invention, this application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the above-described electric bus flexibility resource matching optimization method. In addition to the processors, memory, and interfaces described above, any data processing device in the embodiments may also include other hardware depending on the actual function of the data processing device, which will not be elaborated further.

[0080] Example 3 As a third aspect of the present invention, this application also provides a computer-readable storage medium storing computer instructions thereon, which, when executed by a processor, implement the above-described method for optimizing the flexibility resource matching of electric buses. The computer-readable storage medium can be an internal storage unit of any data-processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data-processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data-processing device, and can also be used to temporarily store data that has been output or will be output.

[0081] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for optimizing resource matching for the flexibility of electric buses, characterized by the following steps: include: A single-vehicle energy consumption prediction model for electric buses with a quadratic temperature term is constructed, and a battery capacity correction model considering low-temperature degradation and limited regenerative braking is established to obtain the physical boundary of flexibility resources. The probability distribution of bus return time and dwell time is fitted using the kernel density estimation method, and a state of charge chance constraint is established in combination with the energy consumption prediction model. Under the constraints of physical boundaries and state-of-charge opportunities of flexibility resources, a hierarchical response mechanism based on dead-zone control is used to match the supply and demand of vehicle-network flexibility and formulate the optimal allocation scheme for vehicle-network collaborative flexibility resources.

2. The method for optimizing resource matching for flexibility in electric buses according to claim 1, characterized in that, The electric bus energy consumption prediction model, which includes a quadratic temperature term, is expressed as follows: In the formula, for t Time of the first i Energy consumption per unit distance of a vehicle; As a reference constant; Average vehicle speed; Road slope; For docking density; The ambient temperature; , , These are the linear regression coefficients of the physical operating parameters; The coefficient for the temperature linear term characterizes the changes in mechanical resistance and foundation thermal load with temperature; The coefficient of the quadratic term of temperature; This is the random error term.

3. The method for optimizing the matching of flexibility resources for electric buses according to claim 1, characterized in that, The specific state-of-charge opportunity constraints are established as follows: An adaptive kernel density estimation method is used to construct the probability density function of the bus's return time and dwell time. Integrating the probability density function yields the cumulative distribution function, which is used to calculate the probability that the vehicle will return to the field before any time. By combining the energy consumption prediction model and the battery capacity correction model, a chance constraint condition is constructed for the state of charge of the vehicle at the time of departure, which has a probability of being greater than a preset threshold and is not lower than the confidence level. The state-of-charge constraint utilizes the inverse cumulative distribution function to transform the probabilistic constraint into a deterministic linear constraint: In the formula, and These are the expected value and standard deviation of the state of charge upon leaving the field, taking into account the randomness of the return time and energy consumption; Φ -1 ( () is the inverse function of the cumulative distribution function of the standard normal distribution; For a pre-set confidence level; In the formula, and Var ( ) represent the expectation and variance operators, respectively; The remaining energy for the return field; For the energy replenished during the stay; This refers to the battery's rated capacity. This is the capacity decay factor after temperature correction; This is the initial state of charge; This is the time of departure; It's time for the encore; for Time of the first i Energy consumption per unit distance of a vehicle; Instantaneous velocity; This is the corrected maximum usable battery capacity.

4. The method for optimizing resource matching for flexibility in electric buses according to claim 3, characterized in that, The energy consumption integral calculation of the remaining energy in the return field is subject to a feedback power constraint: In the formula, This is the maximum allowable regenerative braking power. Rated feedback power; For feedback-restricted state of charge threshold; When the vehicle is in braking condition and the calculated theoretical regenerative braking power exceeds the current maximum allowable regenerative braking power, the excess energy will be discarded and will not be included in the battery charging capacity.

5. The method for optimizing resource matching for the flexibility of electric buses according to claim 3, characterized in that, The corrected maximum usable battery capacity in the battery capacity correction model Represented as: In the formula, This refers to the battery's factory rated capacity. This is a temperature correction factor; Based on cumulative loop count aging degradation rate; Low temperature is an influencing factor; This is the optimal operating temperature for the battery.

6. The method for optimizing the matching of flexibility resources for electric buses according to claim 1, characterized in that, The hierarchical response mechanism that introduces dead zone control uses dead zone control logic as the first-level response and distributed model predictive control as the second-level response. Peak shaving and valley filling are triggered only when the load deviation exceeds the dead zone threshold, and multi-objective collaborative optimization is performed within the safety boundary.

7. The method for optimizing resource matching for flexibility in electric buses according to claim 6, characterized in that, The dead zone control logic sets the dead zone threshold based on the net load deviation of the power grid and divides the adjustment mode into three modes: dead zone maintenance, economic peak shaving and emergency support. When the absolute value of the load deviation is within the dead zone range, it enters the dead zone holding mode, and the response power is set to zero. At this time, the electric bus does not perform charging and discharging regulation. When the absolute value of the load deviation exceeds the dead zone and the net load of the grid does not exceed the limit, the economic peak shaving mode is triggered, prioritizing the response to time-of-use pricing to carry out off-peak charging and peak discharge arbitrage, and controlling the number of battery cycles to extend life. When the net load of the power grid exceeds the limit or an emergency dispatch order is received from the superior authority, the emergency support mode is triggered, ignoring the cost of battery aging, and all available flexibility resources are forcibly used for full-power discharge.

8. The method for optimizing resource matching for flexibility in electric buses according to claim 6, characterized in that, The decentralized model predictive control decomposes the optimization problem into the following two collaborative levels: The first level is the station-level local optimization, which is deployed at the edge computing nodes of each bus station. It receives the modified physical boundary and state of charge opportunity constraints, calculates the schedulable power feasible region of the entire station in each time period under the premise of meeting the charging needs of individual vehicles, and reports the station-level constraints to the grid layer. The second level is grid-level global coordination, deployed at the distribution network dispatch center. Based on the feasible domain reported by each substation, combined with grid-side constraints and a global objective function, it calculates the optimal power allocation command for each substation and issues it for execution. The global objective function aims to minimize the total operating cost of the distribution network and the bus cluster within the dispatch cycle, and establishes a multi-objective optimization function that takes into account grid interaction costs, battery aging costs, and grid peak penalties. In the formula, J The overall optimization objective function; Describe the objective function that minimizes the overall optimization. T The scheduling period; N The number of electric buses; for t Real-time grid interaction costs; For the first i The cost of battery aging in a vehicle; The peak penalty coefficient; The maximum net load within the scheduling period; , These are the buying and selling electricity prices, respectively. Basic load; , These are the charging and discharging power, respectively. Reset battery costs; This represents the cycle life at the current depth of discharge. Battery throughput power; This is the scheduling time step.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the electric bus flexibility resource matching optimization method as described in any one of claims 1-8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the electric bus flexibility resource matching optimization method as described in any one of claims 1-8.