A method and system for coordinated charging and discharging of an electric vehicle cluster based on swarm intelligence

By using a two-layer asynchronous cascaded control method based on swarm intelligence, electric vehicle clusters are dynamically divided and coordinated control commands are generated, which solves the problem of asynchronous execution in electric vehicle cluster scheduling and improves the accuracy of power grid scheduling and resource utilization efficiency.

CN121566574BActive Publication Date: 2026-06-02SHIJIAZHUANG TONHE ELECTRONICS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHIJIAZHUANG TONHE ELECTRONICS TECH CO LTD
Filing Date
2026-01-23
Publication Date
2026-06-02

Smart Images

  • Figure CN121566574B_ABST
    Figure CN121566574B_ABST
Patent Text Reader

Abstract

The application provides a kind of electric vehicle cluster charging and discharging collaborative control method and system based on swarm intelligence, and relates to the technical field of intelligent power distribution network operation control.The method first collects real-time status of electric vehicles in the region and transformer load data, and constructs a multi-objective optimization model considering power distribution network load variance and user battery aging cost.It implements double-layer asynchronous cascade control: by analyzing historical interaction logs to extract time response and power execution characteristics, response fingerprint indicators representing instruction execution reliability are generated;Accordingly, the cluster is dynamically divided into base load adjustment subgroups and rapid compensation subgroups.The system uses particle swarm optimization to solve the base load subgroup to generate a benchmark strategy, and establishes a physical model to predict the power lag residual during its execution;Further, the rapid compensation subgroup is optimized to generate a compensation strategy to suppress the residual.The application realizes the collaborative optimization of peak load shifting and user economic benefits of power distribution network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart power distribution network operation control technology, and in particular to a method and system for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence. Background Technology

[0002] Currently, with the explosive growth in the number of new energy vehicles, the connection of massive, dispersed electric vehicles to the power distribution network has become a significant trend. If these mobile energy storage units can be effectively aggregated, they will be a valuable resource for the power grid's flexible regulation. At present, the industry widely adopts virtual power plant or load aggregator models for centralized management and control of electric vehicles. However, most existing cluster scheduling strategies are based on idealized communication and control models, often assuming that all electric vehicles participating in the scheduling are homogeneous standard nodes, and that the terminal vehicles can execute power commands issued from the cloud with zero delay and without deviation.

[0003] However, in real-world industrial applications, electric vehicles exhibit significant heterogeneity and random time lag when executing cloud-based scheduling commands due to limitations imposed by complex communication network environments such as underground parking lots, differences in the processing performance of battery management systems (BMS) across different brands and years of vehicles, and the inherent hardware startup and ramp-up inertia of on-board chargers (OBCs). This physical-level command execution asynchrony is amplified in cluster control involving hundreds or thousands of vehicles, leading to a severe command disconnect between the ideal power curve optimized at the upper level and the actual execution curve at the lower level. Ignoring this objectively existing power lag residual and directly issuing unified commands to a large-scale cluster not only significantly reduces the actual effect of peak shaving and valley filling but may even introduce new artificial load fluctuations due to regulation lag, making it difficult to meet the high-precision load tracking requirements of modern power distribution networks. Furthermore, the lack of refined assessment of the reliability of individual vehicle execution also results in the waste of high-quality regulation resources and the drag on system control accuracy from inferior resources. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for coordinated charging and discharging of electric vehicles based on swarm intelligence, so as to solve the problems pointed out in the background art.

[0005] In a first aspect, the present invention provides a method for coordinated charging and discharging control of electric vehicle clusters based on swarm intelligence, the method comprising the following steps:

[0006] Collect real-time status data of electric vehicle clusters and real-time load data of power distribution transformers within the target area;

[0007] Based on the real-time status data and the real-time load data, a multi-objective optimization model is constructed.

[0008] The method further includes performing a two-level asynchronous cascading control step:

[0009] The historical interaction logs of the electric vehicle cluster are parsed to extract the time response characteristics and power execution characteristics of each electric vehicle, and a response fingerprint index characterizing the reliability of instruction execution is generated accordingly.

[0010] Based on the response fingerprint index, the electric vehicle cluster is dynamically divided into a base load adjustment subgroup and a rapid compensation subgroup.

[0011] The base charge adjustment subgroup is solved using the particle swarm optimization algorithm to generate a baseline charge-discharge scheduling strategy;

[0012] Based on the time response characteristics of the base load adjustment subgroup, predict the power lag residual that may be generated during the execution of the benchmark charge and discharge scheduling strategy;

[0013] With the goal of mitigating the power lag residual, the particle swarm optimization algorithm is used to solve the fast compensation subgroup to generate a compensation charge-discharge scheduling strategy.

[0014] The baseline charge / discharge scheduling strategy and the compensation charge / discharge scheduling strategy are combined to generate the final coordinated control command and issue it.

[0015] Optionally, the collection of real-time status data of the electric vehicle cluster within the target area specifically includes:

[0016] The battery state of charge, maximum allowable charging and discharging power, and user-set offline time of each electric vehicle in the electric vehicle cluster are periodically read through the vehicle network communication protocol.

[0017] The read data is validated to remove bad data that has logical conflicts or abnormal format.

[0018] The verified data is mapped onto a preset time series grid to form a standardized state matrix.

[0019] Optionally, the construction of the multi-objective optimization model specifically includes:

[0020] Establish a sub-target on the distribution network side to calculate the variance of the total load curve of the distribution network within the scheduling cycle;

[0021] Establish a user-side sub-objective to calculate the algebraic sum of the battery cycle aging cost and the electricity price difference revenue generated by the electric vehicle cluster participating in scheduling;

[0022] A fitness function is generated by coupling the sub-targets on the distribution network side and the sub-targets on the user side using a linear weighting method.

[0023] Optionally, the process of solving the basis charge adjustment subgroup using the particle swarm optimization algorithm specifically includes:

[0024] Initialize the first particle population corresponding to the said base charge regulation subgroup;

[0025] During the iteration process, the inertial weight parameters of the first particle population are dynamically adjusted according to the current iteration number, and a position limiting constraint is introduced when the particle position is updated to prevent the particle position from exceeding the physical power boundary of the electric vehicle cluster.

[0026] Optionally, the final collaborative control command must satisfy preset security constraints, which include:

[0027] The power value of any individual electric vehicle in the electric vehicle cluster when executing the final coordinated control command shall not exceed the rated power of the corresponding charger.

[0028] The combined load rate of the distribution network transformer does not exceed 90% of the transformer's rated capacity at any given time.

[0029] Optionally, parsing the historical interaction logs of the electric vehicle cluster to generate response fingerprint indicators characterizing the reliability of instruction execution specifically includes:

[0030] Extract the time difference sequence between the cloud command issuance time and the terminal action response time from the historical interaction log;

[0031] Calculate the mean and standard deviation of the time difference sequence as a response delay factor;

[0032] Extract the deviation sequence between the target power of the instruction and the actual execution power from the historical interaction log;

[0033] Calculate the root mean square error of the deviation sequence as an execution accuracy factor;

[0034] The response latency factor and the execution accuracy factor are weighted and normalized to obtain the response fingerprint index.

[0035] Optionally, the step of dynamically dividing the electric vehicle cluster into a baseload adjustment subgroup and a rapid compensation subgroup based on the response fingerprint index specifically includes:

[0036] Set fingerprint classification thresholds;

[0037] Electric vehicles whose response fingerprint index is higher than the fingerprint classification threshold are classified into the base load adjustment subgroup to undertake long-term base load shaving and valley filling tasks.

[0038] Electric vehicles whose response fingerprint index is lower than or equal to the fingerprint classification threshold are classified into the fast compensation subgroup to undertake the task of smoothing short-cycle power fluctuations.

[0039] Optionally, predicting the power lag residual that may be generated during the execution of the baseline charge-discharge scheduling strategy based on the time response characteristics of the base load adjustment subgroup specifically includes:

[0040] Obtain the historical average response delay time of each electric vehicle in the base load adjustment subgroup;

[0041] The power curve in the baseline charge-discharge scheduling strategy is reconstructed by time-domain shifting using the historical average response delay time to obtain the predicted execution curve.

[0042] The power hysteresis residual is obtained by calculating the difference between the ideal power curve of the benchmark charge-discharge scheduling strategy and the predicted execution curve.

[0043] Optionally, the step of using the particle swarm optimization algorithm to solve the fast compensation subgroup with the goal of mitigating the power lag residual and generating a compensation charge-discharge scheduling strategy specifically includes:

[0044] The power lag residual is inverted and superimposed onto the distribution network basic load prediction curve to form a compensation tracking target curve.

[0045] Initialize the second particle population corresponding to the fast compensation subgroup;

[0046] Through iterative optimization, the total power curve generated by the aggregation of the second particle population is made to approximate the compensation tracking target curve, and the converged optimal solution is output as the compensation charging and discharging scheduling strategy.

[0047] Secondly, the present invention provides a swarm intelligence-based electric vehicle cluster charging and discharging collaborative control system, the system comprising:

[0048] The data acquisition module is used to collect real-time status data of electric vehicle clusters and real-time load data of power distribution transformers within the target area.

[0049] The fingerprint analysis module is used to extract time response features and power execution features, and generate response fingerprint indicators that characterize the reliability of instruction execution.

[0050] The dynamic clustering module is used to dynamically divide the electric vehicle cluster into a base load adjustment subgroup and a rapid compensation subgroup based on the response fingerprint index.

[0051] The benchmark generation module is used to solve the base charge adjustment subgroup using the particle swarm optimization algorithm to generate a benchmark charge and discharge scheduling strategy.

[0052] The residual prediction module is used to predict the power lag residual that may be generated during the execution of the baseline charge-discharge scheduling strategy based on the time response characteristics of the base load adjustment subgroup.

[0053] The compensation generation module is used to solve the fast compensation subgroup using the particle swarm optimization algorithm with the optimization objective of smoothing out the power lag residual, and generate a compensation charge and discharge scheduling strategy.

[0054] The collaborative control module is used to merge the baseline charge-discharge scheduling strategy and the compensation charge-discharge scheduling strategy to generate and issue the final collaborative control command.

[0055] The present invention has achieved the following beneficial effects:

[0056] This invention significantly improves the execution reliability of large-scale electric vehicle clusters participating in grid dispatch by constructing a response fingerprint evaluation system and dynamic clustering mechanism based on historical interaction logs. Instead of indiscriminately treating all vehicles as homogeneous ideal nodes, the system deeply analyzes data to quantify and extract the response latency and execution accuracy characteristics of each vehicle, establishing a precise digital credit profile. Based on this fingerprint index, the system assigns vehicles with stable communication and rapid response to the baseload regulation subgroup to undertake long-cycle, high-capacity baseload regulation tasks, ensuring the stability of the grid's macro-control objectives. Simultaneously, vehicles with slightly slower responses or fluctuations are assigned to the fast compensation subgroup, utilizing the law of large numbers in statistics to smooth out individual random errors, specifically for handling high-frequency fluctuations. This hierarchical governance strategy maximizes the overall regulation efficiency of heterogeneous clusters without eliminating long-tail resources.

[0057] Furthermore, the proposed two-layer asynchronous cascaded control architecture effectively solves the common problems of policy lead and execution lag in traditional scheduling. By introducing a feedforward prediction model based on physical characteristics, the system can predict the power lag residuals that will inevitably occur during the execution of the baseline strategy due to communication delays and equipment inertia, and use a fast compensation subgroup for targeted real-time reverse smoothing. This closed-loop correction mechanism enables the final synthesized load curve to closely track the grid's optimization objectives, eliminating adjustment deviations caused by response lags. In addition, the multi-objective optimization model of this invention fully considers the safe operation boundary of the distribution network and the economic interests of users. While smoothing the grid load, it prevents over-scheduling from depleting battery life by introducing a battery aging cost model.

[0058] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0059] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0060] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0061] Figure 1 This is a flowchart illustrating a method for coordinated charging and discharging of electric vehicles based on swarm intelligence, as described in an embodiment of the present invention.

[0062] Figure 2 This is a schematic diagram of the composition structure of a swarm intelligence-based electric vehicle cluster charging and discharging collaborative control system in an embodiment of the present invention. Detailed Implementation

[0063] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0064] like Figure 1 As shown in the figure, this invention discloses a method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence. This method achieves precise aggregation and efficient scheduling of massive, dispersed electric vehicle resources through a two-layer asynchronous cascaded control strategy. The method includes the following detailed steps:

[0065] Step S1: Collect real-time status data of electric vehicle clusters and real-time load data of power distribution transformers within the target area.

[0066] In this embodiment, the target area can be a specific distribution area, an underground parking lot of a large commercial complex, or a geographically dispersed but electrically related logical area aggregated by virtual power plants (VPPs).

[0067] Specifically, the collection of real-time status data of the electric vehicle cluster within the target area includes periodically reading the battery state of charge (SOC), maximum allowable charging and discharging power, and user-set off-grid time of each electric vehicle in the cluster through a vehicle-to-everything (V2X) communication protocol.

[0068] In actual operation, the system is set to a sampling period of 100%. (For example, every 30 seconds). At each sampling time, the system broadcasts a status query to all online smart charging piles within the area. The charging piles act as gateways, transparently acquiring internal data from the vehicle's BMS via the CAN bus.

[0069] The collected data specifically includes:

[0070] Vehicle Identifier (VIN): Used to index the vehicle's historical fingerprint data in the system database; it is the vehicle's digital ID.

[0071] Battery physical state includes real-time SOC (accuracy 0.1%), state of health (SOH), average temperature of the battery pack, and maximum / minimum voltage of individual cells. These physical parameters directly determine the current charge / discharge capacity limits of the battery. For example, the risk of lithium plating at low temperatures can lead to a significant decrease in the maximum allowable charging current, and the system needs to sense this physical limitation in real time.

[0072] User intent data: including the expected disconnection time set by the user through a mobile app or charging station HMI interface. ) and expected target power ( This is a rigid constraint that the scheduling strategy must satisfy, namely, that the vehicle must have sufficient electrical energy when it leaves.

[0073] Electrical boundary data: including the maximum allowable charging current reported by the BMS in real time ( ) and maximum allowable discharge current ( (For V2G vehicles).

[0074] Furthermore, due to the complex electromagnetic environment in industrial settings, sensor drift, communication packet loss, or human error often lead to anomalies in uploaded data. The system incorporates a three-level verification and filtering mechanism:

[0075] Level 1 Physical Verification: Checks whether the data exceeds physical limits. For example, if the uploaded SOC is greater than 100% or less than 0%, or the battery temperature exceeds 80°C (risk of thermal runaway), or the power value is not a numerical value, the system immediately determines that the data frame is invalid and triggers an alarm.

[0076] Level 2 Logic Verification: This checks the internal logical consistency of the data. For example, if the user-set expected disconnection time is earlier than the current system time, or the target battery level is less than the current battery level, this is logically impossible. The system will identify such logical conflicts and automatically adopt a preset conservative strategy (such as immediately charging to full capacity at rated power) as an alternative, while sending a confirmation request to the user.

[0077] Level 3 timing verification: Checks the trend of data changes over time. The system uses a sliding window algorithm to monitor the rate of change of SOC. If a vehicle's SOC suddenly jumps from 30% to 90% within 1 minute without high-power charging during this period, this clearly violates the law of conservation of energy. The system will determine this as a sensor jump fault and fill in the gap using the effective value from the previous moment or the state estimate based on a Kalman filter.

[0078] Finally, the verified data is mapped onto a preset time series grid to form a standardized state matrix.

[0079] Because different vehicles have different online times and data upload frequencies (asynchronous), time-domain alignment is required to facilitate unified calculations for subsequent swarm intelligence algorithms. This embodiment defines the scheduling period as follows: (For example, the next 24 hours), discretize it into A standard time step (e.g.) The system employs a zero-order hold (ZOH) or linear interpolation to project the discrete state data of all vehicles onto this... At each standard time point, a dimension is constructed. The whole network state matrix ( (This represents the total number of vehicles). This standardized matrix structure greatly improves the parallel computation efficiency of the subsequent particle swarm optimization algorithm.

[0080] Meanwhile, based on the real-time load data of the distribution network transformers, the system obtains three-phase active power, reactive power, power factor, and transformer load rate by reading the register data of the intelligent circuit breaker on the low-voltage side of the transformer. This data constitutes the environmental constraint background in the subsequent optimization model.

[0081] Step S2: Based on the real-time status data and the real-time load data, construct a multi-objective optimization model.

[0082] This step is the theoretical core of the collaborative control strategy. To achieve harmonious interaction between vehicles and users, it is necessary to find the optimal balance between power grid security and user interests. This embodiment constructs a highly coupled multi-objective optimization model, specifically including the following steps:

[0083] Establish a sub-target on the distribution network side to calculate the variance of the total load curve of the distribution network within the scheduling cycle.

[0084] The core operational objective of a distribution network is peak shaving and valley filling, which involves straightening the load curve, reducing the peak-to-valley difference, thereby reducing transformer losses and delaying grid expansion investment. Statistically, variance is the best indicator for measuring data volatility. Therefore, a sub-objective function for the distribution network is defined. The variance of the total load sequence within the scheduling period:

[0085] ;

[0086] in, This represents the total number of time periods within the scheduling period. This is the index number for the current time period; For the first The total active power load (kW) of the distribution network during a given time period is calculated using the following formula: ,in This represents the baseline conventional load forecast for this period. The algebraic sum of the charging and discharging power of all electric vehicles during this period; This represents the arithmetic mean of the total load of the distribution network within the scheduling cycle. Minimize... This means that electric vehicles are driven to discharge (peak shaving) during peak load periods and charge (valley filling) during off-peak periods, thereby smoothing out the power grid operation curve.

[0087] A user-side sub-objective is established to calculate the algebraic sum of the battery cycle aging cost and the electricity price difference revenue generated by the electric vehicle cluster participating in scheduling.

[0088] Users' core demand is economy, that is, to obtain benefits by participating in V2G (vehicle-to-grid) while meeting their travel needs, and at the same time, to minimize battery consumption.

[0089] First, calculate the revenue from the electricity price difference. Based on the local time-of-use pricing policy, let the... The time-of-use electricity price is If the vehicle is charging (positive power), electricity costs are incurred; if it is discharging (negative power), revenue is generated.

[0090] Secondly, the battery cycle aging cost is calculated. Existing scheduling methods often overlook the damage to battery life caused by frequent charge-discharge cycles. This embodiment introduces a semi-empirical lifetime degradation model based on electrochemical mechanisms. Specifically, the weighted energy throughput method is used to statistically analyze the cumulative energy flow of the battery during the scheduling process in real time, and the charge-discharge rate is introduced as an accelerated aging factor to calculate the capacity degradation cost caused by this scheduling. The specific engineering calculation formula is as follows:

[0091] ;

[0092] In the formula, This indicates that the electric vehicle was in the... The actual charging and discharging power (kW) during the time period, with positive values ​​representing charging and negative values ​​representing discharging; Its absolute value; The duration of a single scheduling period (e.g., 0.25 hours) is used to convert power into energy. The aging loss coefficient (yuan / kWh) is calculated per unit of energy throughput. This coefficient is dynamically obtained by looking up a table based on the battery type (lithium iron phosphate / ternary lithium). In this embodiment, the dynamic table lookup refers to the following preset data:

[0093] For lithium iron phosphate (LFP) batteries, the following settings are provided. Yuan / kWh; for ternary lithium (NCM) batteries, set Yuan / kWh.

[0094] Charge / discharge rate correction factor The specific calculation formula is as follows: ,in This is the rated power. This formula shows that high-rate charging and discharging will accelerate battery aging exponentially.

[0095] when When approaching rated power, A value greater than 1 indicates accelerated aging at high rates; when the power is low, The value is 1.

[0096] In summary, the user-side sub-objective function Defined as: total aging costs minus total electricity revenue (i.e., net expenditure for users). Minimize. This means maximizing user arbitrage profits while ensuring battery life.

[0097] Furthermore, the user-side sub-objective function The complete calculation formula is:

[0098] ;

[0099] In the formula, The total number of vehicles in the electric vehicle cluster participating in the scheduling; For electric vehicles, the index number ( ); For the first The car in Power during the time period (positive values ​​for charging, negative values ​​for discharging). For the first Time-of-use electricity price (RMB / kWh); This represents the aging cost calculated above. The second term in the formula represents the net electricity cost.

[0100] A fitness function is generated by coupling the sub-targets on the distribution network side and the sub-targets on the user side using a linear weighting method.

[0101] because (Power variance, in units) )and The quantities (amount, unit: yuan) have different dimensions and significantly different orders of magnitude; directly adding them together will lead to optimization failure. This embodiment first performs maximum-minimum value normalization on both, mapping them to the [0,1] interval. Then, it constructs the overall fitness function. :

[0102] ;

[0103] In the formula, and These are the weighting coefficients for the distribution network-side sub-targets and the user-side sub-targets, respectively, and they satisfy the constraints. , ; This represents a normalization function used to map indices of different dimensions to... Interval. Max-min normalization is used: To ensure algorithm convergence, the variance index... ,set up , ( (Rated capacity of the transformer); for cost indicators ,set up and These are the minimum and maximum values ​​in the current iteration population, respectively. This system supports dynamic adjustment of weights based on the real-time status of the power grid. For example, when the transformer load rate exceeds the 90% warning line, the system automatically adjusts the weights. Adjusting it to 0.9 will force priority to ensure grid security; while when the grid is operating stably, it will... Adjusted to 0.7, with a focus on protecting user benefits.

[0104] Step S3: Analyze the historical interaction logs of the electric vehicle cluster, extract the time response characteristics and power execution characteristics of each electric vehicle, and generate a response fingerprint index that characterizes the reliability of instruction execution.

[0105] Traditional group control strategies often assume that all vehicles can execute commands without deviation. However, in reality, due to factors such as network environment, BMS performance, and driver behavior, vehicle response characteristics vary greatly. This invention uses data mining to create a dynamic credit profile for each vehicle. The specific generation process includes three sub-steps:

[0106] Step 1: Calculate the response delay factor ( ).

[0107] The system extracts historical interaction logs to record the times when commands are issued from the cloud. With terminal action response time The time difference sequence. The action response is defined as the moment when the actual change in vehicle power reaches 10% of the change required by the command.

[0108] Calculate the mean of this time difference series. and standard deviation .

[0109] The mean reflects the average lag time of the vehicle (systematic delay); the standard deviation reflects the stability of the vehicle's response (random fluctuation).

[0110] Define the response delay factor: The smaller this value, the faster and more stable the vehicle response. and These are the weighting coefficients for the mean and standard deviation of the time difference, respectively.

[0111] Step 2: Calculate the execution accuracy factor ( ).

[0112] System extracts target power command With the actual power of the vehicle deviation sequence.

[0113] Calculate the root mean square error (RMSE) of this bias sequence:

[0114] ;

[0115] In the formula, This represents the total number of valid sampling points selected from the historical interaction logs. The index number of the sampling point; For the first The target power of the command sent from the cloud at each sampling moment; This represents the actual execution power reported by the terminal at that moment. The value reflects the control accuracy of the vehicle's BMS for power commands. The smaller the value, the higher the control accuracy and the higher the execution accuracy of the vehicle.

[0116] Step 3: Synthesize response fingerprint indicators ( ).

[0117] The root mean square error calculated above is recorded as follows: To implement the accuracy factor The two factors mentioned above are normalized and then weighted and fused:

[0118] ;

[0119] In the formula, and These are the weighting coefficients for the response latency factor and the execution accuracy factor, respectively, and they satisfy... In this preferred embodiment, the relevant weighting coefficient is set as follows: ; In calculation and During normalization, its physical upper limit boundary is set to 60 seconds (maximum allowable latency) and (Maximum permissible error). The final result... It is a scalar value between 0 and 1. The higher the value, the better the vehicle is as a control resource (fast communication, stable response, and high accuracy). Conversely, the lower the value, the worse the vehicle is as a resource (perhaps it is in a basement signal blind spot, or an older model with a sluggish BMS). This value provides a quantitative basis for subsequent group control.

[0120] Step S4: Based on the response fingerprint index, dynamically divide the electric vehicle cluster into a base load adjustment subgroup and a fast compensation subgroup.

[0121] Based on the fingerprint metrics calculated in step S3, this embodiment executes a dynamic clustering strategy. Specifically, it includes the following steps:

[0122] Step 1: Set fingerprint classification thresholds.

[0123] The system dynamically sets a threshold based on the fingerprint distribution of currently online vehicles. (For example, take the median or 0.75).

[0124] Step 2: Divide the base-load regulation subgroup.

[0125] Will Electric vehicles are categorized into this group. These vehicles have stable communication and precise execution, making them suitable for undertaking long-term (e.g., 15-minute intervals) and high-capacity basic peak shaving and valley filling tasks. They form the foundation of power grid dispatch, responsible for handling the low-frequency components in the load curve to ensure the overall stability of the power grid.

[0126] Step 3: Divide the data into Fast-Compensation Subgroups.

[0127] Will Electric vehicles are grouped into this group. It should be noted that while individual vehicles may experience delays or biases in their response, grouping them into this group allows for the mitigation of individual random errors through the aggregation of large-scale clusters and the application of the law of large numbers in statistics. This invention utilizes these vehicles to handle short-cycle (e.g., minute-level or second-level) power fluctuation smoothing tasks. They are responsible for processing high-frequency components in the load curve and are specifically used to repair residuals generated during the execution of the base load subgroup.

[0128] Secondly, this grouping is dynamic. Every certain period (e.g., every hour), the system recalculates fingerprints and reorganizes groups based on the latest logs. For example, if a vehicle leaves a signal blind spot, its fingerprint score improves, and it is immediately upgraded to the baseload group; conversely, it is downgraded to the compensation group. This mechanism ensures that scheduling resources are always in an optimal configuration.

[0129] Step S5: Solve the base charge adjustment subgroup using the particle swarm optimization algorithm to generate a baseline charge-discharge scheduling strategy.

[0130] This step aims to solve a high-dimensional, nonlinear, multi-constraint global optimization problem. This is due to the number of vehicles within the base load adjustment subgroup. Large-scale (typically in the hundreds to thousands of vehicles) and scheduling cycle It contains multiple discrete time periods (e.g., the next 24 hours are divided into 96 15-minute nodes), and the dimension of the solution space is as high as [missing information]. Directly employing traditional mathematical programming methods (such as mixed-integer quadratic programming) leads to an exponential increase in computation time, failing to meet the real-time requirements of online scheduling. Therefore, this embodiment uses a particle swarm optimization (PSO) algorithm improved for industrial control scenarios to solve the problem. The specific implementation steps are as follows:

[0131] Step 1: Particle encoding and population initialization.

[0132] At the start of the algorithm, the system first initializes the first particle population corresponding to the base charge adjustment subgroup in the computational memory. To adapt to the application scenario of this invention, this embodiment introduces a three-dimensional spatiotemporal matrix encoding method.

[0133] Every particle It is a dimension The decision matrix, where This represents the number of time slots within the scheduling period. Elements in the matrix... Representing the The car in The charging and discharging power setting for a given time period (unit: kW). A positive value indicates that active power is absorbed from the grid (charging), and a negative value indicates that active power is injected into the grid (discharging).

[0134] To avoid the algorithm getting stuck in the invalid search space, the initialization process employs a hybrid strategy combining physical constraint guidance and Gaussian random perturbation:

[0135] First, physical constraint-guided initialization: the system initializes based on the current battery state of charge reported by the BMS of each vehicle. ), user-defined offline time ( ) and target power ( The system calculates the rigid average power requirement that satisfies the law of conservation of energy. For example, if a car needs to charge 40 kWh in 4 hours, its average power baseline is 10 kW. The system uses this baseline for all vehicles as the initial position core for the particles.

[0136] Secondly, random perturbation propagation: Gaussian white noise with zero mean and adjustable variance is superimposed on this baseline to generate... One (e.g.) Initial particles. This initialization method ensures that all particles are located in the neighborhood of the physically feasible region when they are generated, which greatly improves the convergence speed of the algorithm and avoids meaningless blind search in the early stages of iteration.

[0137] Step 2: Fitness calculation and individual / global extreme value update.

[0138] Substitute the global scheduling scheme matrix represented by each particle into the multi-objective optimization model constructed in step S2.

[0139] The system calculates the two sub-objective values ​​under this scheme respectively:

[0140] Firstly, grid-side indicators: calculating the variance of the distribution network net load curve during the dispatching cycle. The system sums the particle matrix column-wise to obtain the total power sequence of the cluster, and then superimposes it onto the distribution network's basic load prediction curve to calculate the variance of the composite load. The smaller the variance, the smaller the load fluctuation and the better the peak shaving and valley filling effect.

[0141] Secondly, user-side metrics: Calculate the weighted sum of the battery cycle aging costs and electricity price difference revenue for all participating vehicles. The system iterates through each power element in the matrix, combines the aging coefficient corresponding to the battery type and the time-of-use electricity price table, and calculates the total economic cost.

[0142] The system dynamically adjusts the weighting coefficients based on the current operating status of the power grid (such as whether it is in an emergency peak-shaving state). Calculate the total fitness value .

[0143] In each iteration, the current particle fitness is compared with the particle's historical best fitness. If the current method is better, then update. Simultaneously, the fitness of all particles in the population is scanned to find the global optimal fitness and its corresponding position matrix. ).

[0144] Step 3: Adjustment of dynamic inertia weights and learning factors.

[0145] To balance the algorithm's global search capability in the early stages of iteration (to prevent getting trapped in local optima) with its local exploitation capability in the later stages of iteration (to improve convergence accuracy), this embodiment introduces a nonlinearly dynamically adjusted inertia weight parameter. .

[0146] The specific calculation formula is as follows:

[0147] ;

[0148] in, This represents the current iteration number. The maximum number of iterations is preset (e.g., 200 times). Set it to 0.9. Set it to 0.4. As the iteration progresses, The decay follows a parabolic trend, causing particles to move more dispersedly in the early stages to explore unknown areas, and to converge more concentratedly in the later stages to lock in the optimal solution.

[0149] In addition, learning factors (Individual cognition) and (Social cognition) also changes dynamically over time. Initially... Larger Smaller size encourages independent particle exploration; later stage Decrease Increasing the learning factor guides particles toward the swarm optimum. Specifically, the learning factor employs a linear time-varying strategy: .

[0150] Subsequently, the system updates the particle matrix according to the following formula. Line number Column elements speed With or in position:

[0151]

[0152]

[0153] In the formula, For the first The particle in the first Dimension at the Flight speed at the next iteration; For the first The particle in the first Dimension at the Position coordinates at the next iteration (i.e., power setting value); For particle indexes in the particle population; Dimension index for decision variables (corresponding scheduling period); and They represent the first During the nth iteration, the 1st The particle in the first The dimensional flight speed and position coordinates (i.e., power setting); This is the particle's historical best position; This represents the globally best historical position for the entire population. is an independent random number that is uniformly distributed in the interval [0,1].

[0154] Step 4: Position limiting constraints and physical boundary handling.

[0155] To ensure the generated strategy is absolutely executable in the physical world, this embodiment sets strict position limit constraints in the particle position update process. Each time a particle updates its position according to the velocity formula... Then, the system immediately performs the following physical boundary checks and corrections:

[0156] Power hard constraint check: Check Does it exceed the maximum permissible charging and discharging power range reported by the vehicle's BMS? If it exceeds the limit, it will be forcibly truncated to the boundary value.

[0157] Energy accumulation constraint check: Time-domain integral derivation of battery SOC based on power sequence. If the calculated first... If the State of Charge (SOC) exceeds the battery's physical capacity range at the end of the time period (e.g., less than 5% or greater than 95%), it indicates that the scheduling strategy will lead to over-discharge or over-charge. At this point, the system triggers a backtracking correction mechanism, proportionally attenuating the power command of the particle prior to that time period until the energy trajectory returns to a safe path. It is important to note that because the time step of the baseline strategy generated in step S5 (e.g., 15 minutes) is much larger than the physical inertia time constant, direct prediction would lead to model failure. Therefore, before executing the above formula, the system uses linear interpolation to convert the baseline power curve... Resampling is a time series with the same sampling period as in step S1 (i.e., step size) ).

[0158] Accordingly, in the formula Substitute and , can be obtained Hysteresis offset Calculated as .

[0159] go through After the second iteration, the algorithm outputs the globally optimal particle. This matrix represents the baseline charge-discharge scheduling strategy for the baseload regulation subgroup.

[0160] Step S6: Based on the time response characteristics of the base load adjustment subgroup, predict the power lag residual that may be generated during the execution of the benchmark charge and discharge scheduling strategy.

[0161] In existing technologies, scheduling systems often assume that instructions are executed immediately, ignoring the inherent latency characteristics of the system. However, after an instruction is issued, the actual power output always lags behind the instruction time due to cloud queuing, 4G / 5G network transmission, gateway protocol conversion, BMS internal self-testing, relay mechanical action, and soft-start ramp-up of power electronic devices. This lag is amplified synchronously in large-scale clusters, causing a significant deviation between the actual load curve of the power grid and the optimization target.

[0162] To address this issue, this embodiment constructs a feedforward prediction model based on physical characteristics, and the specific implementation process is as follows:

[0163] Step 1: Obtain the historical average response time.

[0164] The system retrieves the historical average response delay time (i.e., the time calculated in step S3) for each vehicle in the base load adjustment subgroup from the fingerprint analysis module's database. , recorded as The system calculates the weighted average delay time for this subgroup. :

[0165] ;

[0166] In the formula, This represents the total number of electric vehicles in the base load adjustment subgroup. This refers to the vehicle index number within this subgroup; For the first Historical average delay time of vehicles; For the first The weighting factor of the vehicle (taken as its rated power) ). Among them, the weights It is directly proportional to the vehicle's rated power. Specifically, let the first... The rated power of the electric vehicle is Then define the weights. The significance of this weighting strategy is that the delay of high-power vehicles has a greater impact on the total load of the power grid, therefore their delay characteristics should account for a larger proportion in the group average.

[0167] Step 2: Time-domain translation and reconstruction of the power curve.

[0168] The total power curve in the benchmark charge / discharge scheduling strategy generated in step S5 It is considered as a discrete time series. The calculated group delay time is used... The curve is then reconstructed in the time domain.

[0169] To enhance the inertia of the simulated physical system, this embodiment introduces a first-order inertial loop (First-OrderLag) model. A prediction execution curve is then constructed. :

[0170] ;

[0171] In the formula, The model predicts the first Actual power output at any given time; The ideal power sequence for the benchmark strategy; The representative model predicted the first The actual execution power at a given moment (i.e., the previous moment); The benchmark strategy takes lag into account The planned power afterward; The sampling point offset corresponding to the delay time (its calculation formula is...) ,in (This indicates the rounding operation) The coefficients of the discretized first-order inertial element are calculated using the following formula: , The sampling interval is... This is the overall time constant of the system. In this embodiment, The value is set to 12 seconds, calculated by combining the average 4G network communication latency (approximately 2 seconds) within the target area with the typical on-board charger power response ramp-up time (approximately 10 seconds). Initial recursion conditions are set as follows: This means that there is no initial delay. This model not only simulates time delay, but also waveform distortion during power ramp-up.

[0172] Step 3: Calculate the power lag residual.

[0173] The power hysteresis residual is obtained by performing a difference operation between the ideal reference power curve and the predicted execution curve. :

[0174] ;

[0175] This residual value The meaning includes: it represents the gap between the desired ideal control effect and the actual effect expected to be achieved due to physical inertia. Typically, during the rapid increase phase of power command, the residual is positive (deficit); during the rapid decrease phase of power command, the residual is negative (excess).

[0176] Step S7: With the goal of mitigating the power lag residual, the particle swarm optimization algorithm is used to solve the fast compensation subgroup to generate a compensation charge-discharge scheduling strategy.

[0177] This step fills in the aforementioned residuals by invoking a fast-compensation subgroup. While these vehicles may not be as stable as the base-load group in terms of individual fingerprint scores, this invention utilizes them for short-cycle reverse adjustment, leveraging the statistical smoothness of the population using the law of large numbers to offset the randomness of individuals. Specifically, this includes:

[0178] Step 1: Construct the compensation tracking target curve.

[0179] The system first inverts the power lag residual calculated in the previous step, that is... This represents the counterforce power that the compensating subgroup needs to emit.

[0180] Step 2: Initialize the second particle population and iteratively optimize.

[0181] For the fast compensation subgroup, initialize the second particle population. Unlike the first population, the second population has a smaller particle dimension (because the number of vehicles in the compensation group is typically less than that in the baseload group) and a shorter time step (e.g., ...). Even at the second level, to adapt to high-frequency adjustment requirements.

[0182] The scheduling period of the fast compensation subgroup is discretized as follows: Time periods, using subscripts express( Fitness function It has been redefined as minimizing tracking error, i.e.:

[0183] ;

[0184] In the formula, For time-period indexes with fast compensation cycles, To quickly compensate for vehicle indexes in subgroups; To quickly compensate the first subgroup The car in A short-cycle power decision variable; This is the target value of the power lag residual that needs to be offset at this moment; The total number of time periods in the compensation period. To quickly compensate for the total number of electric vehicles contained in the subgroup. The first in this subgroup The car is The power over a given period; this formula aims to minimize the absolute error between the total aggregate power of the fast-compensating subgroup and the target compensation curve.

[0185] The PSO algorithm is also used for iterative solution. During the iteration process, the system will significantly relax the weight of the battery capacity constraint (because the compensation usually only lasts for a few minutes and has a minimal impact on the SOC), while more strictly enforcing the power change rate constraint to prevent the vehicle relay lifespan from being worn down due to frequent and drastic adjustments.

[0186] Step 3: Output the compensation strategy.

[0187] Once the algorithm converges, the optimal solution output is the compensation charging / discharging scheduling strategy. This strategy guides the vehicles in the compensation group to perform rapid charging / discharging actions at specific times.

[0188] Step S8: Merge the baseline charge / discharge scheduling strategy and the compensation charge / discharge scheduling strategy to generate the final coordinated control command and issue it.

[0189] This is the final step in the control loop and the crucial juncture connecting the digital algorithm to the physical power grid. Specifically, it includes:

[0190] Step 1: Strategy stacking and instruction synthesis.

[0191] The system synchronizes and aligns the baseline strategy (long period, low frequency, large capacity) with the compensation strategy (short period, high frequency, small capacity) on the time axis.

[0192] For baseload vehicles, the final directive ; This serves as the baseline charge-discharge scheduling strategy for the baseload regulation subgroup.

[0193] For vehicles in the compensation group, the final instruction is... ; A compensation charging and discharging scheduling strategy for rapidly compensating subgroups.

[0194] At this point, from the perspective of the distribution transformer, the total power output of the electric vehicle cluster... Theoretically, due to the existence of the compensation term, It will very smoothly and closely track the ideal dispatch target of the power grid.

[0195] Step 2: Security constraint verification.

[0196] Before instructions are sent via network protocol, they must undergo a full review by hard logic, independent of the algorithm. The system introduces the following preset security constraints:

[0197] Transformer dynamic capacity constraint verification:

[0198] The system reads the current oil temperature and ambient temperature of the transformer and calculates its real-time dynamic rated capacity. Specifically, the linear heat derating formula is used: ,in The rated capacity is indicated on the nameplate. The oil temperature at the top layer of the transformer (°C) is used in this formula to actively limit capacity to protect insulation life when the oil temperature is too high. The rated capacity is the transformer nameplate value; constant 65 is the top oil temperature alarm threshold (°C), and 0.01 is the thermal derating factor.

[0199] Predicting the total apparent power of the system at the next moment In the formula, and These are the predicted base active load (kW) and base reactive load (kvar) of the distribution network excluding electric vehicles at the next moment, respectively. It is the algebraic sum of the total charge and discharge command power of all electric vehicles (including base load and compensation subgroup) at the current moment.

[0200] judge .

[0201] The 90% threshold is set here to allow for a 10% safety margin, preventing transformer overload tripping due to measurement errors or sudden load changes. Once the calculated result exceeds the threshold, the system triggers the highest-priority peak-shaving circuit breaker mechanism, uniformly reducing the charging power of all vehicles according to the fair reduction principle until the constraints are met. The specific algorithm for the fair reduction principle is as follows: calculate the reduction coefficient. ; The power command for all vehicles in charging state is uniformly revised to ;in, This is the revised power command. The power command before the correction.

[0202] Physical constraint verification of individual devices:

[0203] Double-check the issued documents Whether it is less than the rated power of the pile and the allowable power of the vehicle's BMS.

[0204] Step 3: Instruction issuance and closed-loop feedback.

[0205] After successful verification, the collaborative control module encapsulates the final instruction into a JSON data packet conforming to the OCPP standard and pushes it to each smart charging pile through the MQTT encrypted channel.

[0206] The controller inside the charging pile parses the messages, adjusts the PWM duty cycle, and controls the operation of the on-board charger (OBC), thereby achieving coordinated control in the physical world. New status data will be uploaded in the next sampling cycle, thus forming a closed loop.

[0207] This invention provides a swarm intelligence-based electric vehicle cluster charging and discharging collaborative control system, which serves as the physical foundation and hardware carrier for implementing the aforementioned collaborative control method. In practical industrial applications, this system is typically deployed at the energy management center of a regional smart microgrid or at the edge computing node of a distribution substation. Its aim is to address the impact of large-scale, disorderly access to the distribution network by electric vehicles, while simultaneously exploring the regulation potential of electric vehicles as distributed energy storage units.

[0208] like Figure 2 As shown, the electric vehicle cluster charging and discharging collaborative control system based on swarm intelligence in this embodiment includes a data acquisition module 100, a fingerprint analysis module 200, a dynamic clustering module 300, a benchmark generation module 400, a residual prediction module 500, a compensation generation module 600, and a collaborative control module 700.

[0209] The data acquisition module 100 includes a smart converged terminal (TTU) deployed on the low-voltage side of the distribution transformer and a communication module (e.g., an industrial-grade wireless module supporting 4G / 5G Cat.1) integrated inside each charging pile. The data acquisition module establishes a bidirectional long-term connection with the cloud server via the MQTT IoT communication protocol. The lightweight nature of the MQTT protocol enables the system to maintain high-frequency data acquisition capabilities from a large number of concurrent terminals even in low-bandwidth environments. This module is responsible not only for acquiring electrical quantities (such as voltage, current, and power) but also for deep information interaction with the battery management system (BMS) of electric vehicles via the ISO15118 vehicle-to-charging-pile communication standard to obtain physical state data within the battery. To cope with network jitter, the data acquisition module integrates a local cache queue, which can cache at least 24 hours of historical data in the event of a network outage, and resume transmission after the network is restored, ensuring data integrity.

[0210] The fingerprint analysis module 200 and the dynamic clustering module 300 are physically implemented using high-performance computing clusters on cloud servers or AI accelerator cards (such as GPUs or NPUs) at the edge. These two modules transform heterogeneous, randomly behaving electric vehicles in the physical world into measurable and categorizable standardized adjustment resources in the digital world by running specific feature extraction and clustering algorithms. The core function of the fingerprint analysis module is to establish a digital behavioral profile of the vehicles, quantifying the physical characteristics of each vehicle in terms of response speed and execution accuracy by analyzing historical interaction logs. The dynamic clustering module, based on these quantified indicators, dynamically and logically divides physically dispersed vehicles into different functional groups, achieving refined resource management.

[0211] The benchmark generation module 400, residual prediction module 500, and compensation generation module 600 constitute the core two-layer asynchronous cascaded control engine of this system. This engine typically runs as microservices in Docker containers. The benchmark generation module is responsible for handling large-scale optimization problems with long cycles (e.g., 15 minutes), using the particle swarm optimization (PSO) algorithm to calculate the scheduling strategy of the base load group; the residual prediction module introduces the feedforward control concept, using historical data to establish a time-delay prediction model; and the compensation generation module is responsible for handling deviation correction problems with short cycles (e.g., seconds). This modular design gives the system extremely strong horizontal scalability.

[0212] The collaborative control module 700 is responsible for aligning and superimposing the optimization results at each level in the time domain, and sending the final power setting value to each charging pile through the Open Charging Protocol (OCPP2.0). This module has a built-in hardware-level safety watchdog logic. Once it detects that the sent command violates the grid safety constraints (such as transformer overload), it will trigger the fuse mechanism within milliseconds to forcibly cut off or reduce the charging power, ensuring the absolute safety of the physical system.

[0213] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for coordinated charging and discharging control of electric vehicle clusters based on swarm intelligence, the method comprising the following steps: Collect real-time status data of electric vehicle clusters and real-time load data of power distribution transformers within the target area; Based on the real-time status data and the real-time load data, a multi-objective optimization model is constructed. The method is characterized by further comprising a step of performing a two-level asynchronous cascade control: The historical interaction logs of the electric vehicle cluster are parsed to extract the time response characteristics and power execution characteristics of each electric vehicle, and a response fingerprint index characterizing the reliability of instruction execution is generated accordingly. Based on the response fingerprint index, the electric vehicle cluster is dynamically divided into a base load adjustment subgroup and a rapid compensation subgroup. The base charge adjustment subgroup is solved using the particle swarm optimization algorithm to generate a baseline charge-discharge scheduling strategy; Based on the time response characteristics of the base load adjustment subgroup, predict the power lag residual that may be generated during the execution of the benchmark charge and discharge scheduling strategy; With the goal of mitigating the power lag residual, the particle swarm optimization algorithm is used to solve the fast compensation subgroup to generate a compensation charge-discharge scheduling strategy. The baseline charge-discharge scheduling strategy and the compensation charge-discharge scheduling strategy are combined to generate a final coordinated control command and issue it. The construction of the multi-objective optimization model specifically includes: Establish a sub-target on the distribution network side to calculate the variance of the total load curve of the distribution network within the scheduling cycle; Establish a user-side sub-objective to calculate the algebraic sum of the battery cycle aging cost and the electricity price difference revenue generated by the electric vehicle cluster participating in scheduling; A fitness function is generated by coupling the distribution network-side sub-target and the user-side sub-target using a linear weighting method. The step of parsing the historical interaction logs of the electric vehicle cluster to generate response fingerprint indicators characterizing the reliability of instruction execution specifically includes: Extract the time difference sequence between the cloud command issuance time and the terminal action response time from the historical interaction log; Calculate the mean and standard deviation of the time difference sequence as a response delay factor; Extract the deviation sequence between the target power of the instruction and the actual execution power from the historical interaction log; Calculate the root mean square error of the deviation sequence as an execution accuracy factor; The response latency factor and the execution accuracy factor are weighted and normalized to obtain the response fingerprint index.

2. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, The real-time status data of the electric vehicle cluster within the target area collected specifically includes: The battery state of charge, maximum allowable charging and discharging power, and user-set offline time of each electric vehicle in the electric vehicle cluster are periodically read through the vehicle network communication protocol. The read data is validated to remove bad data that has logical conflicts or abnormal format. The verified data is mapped onto a preset time series grid to form a standardized state matrix.

3. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, The process of solving the base charge adjustment subgroup using the particle swarm optimization algorithm specifically includes: Initialize the first particle population corresponding to the said base charge regulation subgroup; During the iteration process, the inertial weight parameters of the first particle population are dynamically adjusted according to the current iteration number, and a position limiting constraint is introduced when the particle position is updated to prevent the particle position from exceeding the physical power boundary of the electric vehicle cluster.

4. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, The final collaborative control command must meet preset security constraints, which include: The power value of any individual electric vehicle in the electric vehicle cluster when executing the final coordinated control command shall not exceed the rated power of the corresponding charger. The combined load rate of the distribution network transformer does not exceed 90% of the transformer's rated capacity at any given time.

5. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, Based on the response fingerprint index, the electric vehicle cluster is dynamically divided into a base load adjustment subgroup and a rapid compensation subgroup, specifically including: Set fingerprint classification thresholds; Electric vehicles whose response fingerprint index is higher than the fingerprint classification threshold are classified into the base load adjustment subgroup to undertake long-term base load shaving and valley filling tasks. Electric vehicles whose response fingerprint index is lower than or equal to the fingerprint classification threshold are classified into the fast compensation subgroup to undertake the task of smoothing short-cycle power fluctuations.

6. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, The step of predicting the power lag residual that may be generated during the execution of the baseline charge-discharge scheduling strategy based on the time response characteristics of the base load adjustment subgroup specifically includes: Obtain the historical average response delay time of each electric vehicle in the base load adjustment subgroup; The power curve in the baseline charge-discharge scheduling strategy is reconstructed by time-domain shifting using the historical average response delay time to obtain the predicted execution curve. The power hysteresis residual is obtained by calculating the difference between the ideal power curve of the benchmark charge-discharge scheduling strategy and the predicted execution curve.

7. The method for coordinated charging and discharging of electric vehicle clusters based on swarm intelligence according to claim 1, characterized in that, The optimization objective is to mitigate the power lag residual. The particle swarm optimization algorithm is used to solve the fast compensation subgroup, generating a compensation charge-discharge scheduling strategy, specifically including: The power lag residual is inverted and superimposed onto the distribution network basic load prediction curve to form a compensation tracking target curve. Initialize the second particle population corresponding to the fast compensation subgroup; Through iterative optimization, the total power curve generated by the aggregation of the second particle population is made to approximate the compensation tracking target curve, and the converged optimal solution is output as the compensation charging and discharging scheduling strategy.

8. A swarm intelligence-based electric vehicle cluster charging and discharging coordinated control system, used to implement the swarm intelligence-based electric vehicle cluster charging and discharging coordinated control method as described in claim 1, characterized in that, The system includes: The data acquisition module is used to collect real-time status data of electric vehicle clusters and real-time load data of power distribution transformers within the target area. The fingerprint analysis module is used to extract time response features and power execution features, and generate response fingerprint indicators that characterize the reliability of instruction execution. The dynamic clustering module is used to dynamically divide the electric vehicle cluster into a base load adjustment subgroup and a rapid compensation subgroup based on the response fingerprint index. The benchmark generation module is used to solve the base charge adjustment subgroup using the particle swarm optimization algorithm to generate a benchmark charge and discharge scheduling strategy. The residual prediction module is used to predict the power lag residual that may be generated during the execution of the baseline charge-discharge scheduling strategy based on the time response characteristics of the base load adjustment subgroup. The compensation generation module is used to solve the fast compensation subgroup using the particle swarm optimization algorithm with the optimization objective of smoothing out the power lag residual, and generate a compensation charge and discharge scheduling strategy. The collaborative control module is used to merge the baseline charge-discharge scheduling strategy and the compensation charge-discharge scheduling strategy to generate and issue the final collaborative control command.