V2G-microgrid cooperative scheduling system and method based on improved particle swarm optimization

By constructing a hybrid energy storage system and improving the particle swarm optimization algorithm, and combining electric vehicles and stationary energy storage, we have achieved efficient, dynamic power allocation and multi-objective optimization of microgrids. This has solved the problems of response speed and flexibility of microgrid energy storage systems and improved the stability and economy of the system.

CN121584693APending Publication Date: 2026-02-27CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511759580.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing microgrid energy storage systems suffer from slow response speed and insufficient flexibility, making it difficult to adapt to power fluctuations in renewable energy. V2G scheduling methods fail to fully utilize electric vehicle resources, have a single optimization objective, high computational complexity, lack dynamic coupling mechanisms, and do not consider user response behavior.

Method used

A hybrid energy storage system is constructed, employing an improved particle swarm optimization algorithm for dynamic hierarchical optimization. This system combines electric vehicles and stationary energy storage, with real-time data acquisition and status monitoring, multi-objective coordinated optimization, dynamic power allocation, and the introduction of a user response game model and blockchain verification mechanism to form a closed-loop control.

Benefits of technology

It significantly improves the frequency regulation response speed and energy storage resource utilization of microgrids, reduces operating costs, extends battery life, improves system stability and economy, and achieves efficient renewable energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121584693A_ABST
    Figure CN121584693A_ABST
Patent Text Reader

Abstract

The invention discloses a V2G-microgrid cooperative scheduling system and method based on an improved particle swarm algorithm, and belongs to the technical field of intelligent microgrid and electric vehicle energy management. In order to solve the problems of slow response of fixed energy storage, low utilization rate of V2G mobile energy storage, uncontrollable battery loss and the like, a V2G electric vehicle and a fixed storage battery are constructed into a hybrid energy storage system, and an improved particle swarm optimization algorithm is adopted for optimization. According to the method, the frequency modulation precision, the operation economy and the battery life are synchronously optimized in a fitness function through a double-layer architecture of optimizing the total power through an upper layer and dynamically distributing instructions through a lower layer. Finally, the V2G cluster responds to high-frequency power fluctuation in a millisecond level, and a basic load is supported in a fixed energy storage minute level, so that advantage complementation is formed. According to the invention, the frequency modulation response speed and the renewable energy consumption capability of the system are effectively improved, the operation cost is reduced, and the service life of the battery is prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent micro-grid and electric vehicle energy management, and particularly relates to a V2G-micro-grid collaborative scheduling system and method based on an improved particle swarm algorithm. BACKGROUND

[0002] With the acceleration of global energy transformation and the continuous improvement of renewable energy penetration, intelligent micro-grid, as a key technology for integrating distributed energy, is facing the problems of intensified power fluctuation and increasingly prominent system stability. In the existing micro-grid energy storage system, fixed batteries are mainly relied on for energy storage and regulation. Although such energy storage systems have the characteristics of large capacity and high stability, they have slow response speed and insufficient flexibility, which makes it difficult to adapt to the rapid regulation demand of high-frequency components in wind power and photovoltaic power fluctuation. At the same time, the expansion cost of fixed energy storage systems is high, and the long-term deep charge and discharge state of the battery will significantly accelerate its capacity decay, increasing the life cycle cost of the system.

[0003] On the other hand, the popularization of electric vehicles provides a material basis for their participation in grid interaction as distributed mobile energy storage resources. Through V2G (Vehicle-to-Grid) technology, electric vehicle batteries can feedback power to the grid in a controlled state, thereby participating in grid frequency regulation and peak shaving. However, the existing V2G scheduling methods have obvious defects: first, most studies use static scheduling models, which fail to fully consider the characteristics of dynamic access and random off-grid of electric vehicles, resulting in low utilization rate of available capacity of V2G clusters; second, the optimization goal is too single, most studies only focus on the optimization of system operation economy, ignoring the collaborative optimization of battery life loss and grid frequency regulation accuracy and other key goals; finally, in terms of control architecture, centralized scheduling algorithms are difficult to adapt to the real-time and distributed response demand of large-scale V2G clusters, have high computational complexity and poor scalability.

[0004] At the algorithm level, the traditional particle swarm algorithm has inherent defects such as premature convergence and insufficient global search capability when applied to complex multi-objective optimization problems such as micro-grid. Although some existing improvement schemes have improved the convergence speed, they have not effectively solved the dynamic coupling problem between power distribution and battery state of health (SOH, State of Health). At the same time, the existing methods lack a differentiated response mechanism design for high-frequency and low-frequency components of power fluctuations, and fail to fully utilize the complementary advantages of fast response speed of V2G mobile energy storage and good stability of fixed energy storage. In addition, the uncertainty of user response behavior on the impact of scheduling effect is generally not considered in the model.

[0005] The above technical bottlenecks, including the mismatch between the fixed energy storage response speed and the renewable energy fluctuation frequency band, the low utilization rate of V2G mobile energy storage resources and the uncontrollable battery loss, the existing optimization algorithm cannot consider the multi-objective coordination of frequency regulation accuracy, economy and equipment life, etc., seriously restrict the practical application performance and economy of the V2G-microgrid collaborative system. Therefore, there is an urgent need for a new collaborative scheduling system and method that can comprehensively solve the above problems. SUMMARY

[0006] The technical problem to be solved by the present application is: In order to overcome the above technical problems, the present application provides a V2G-microgrid collaborative scheduling system and method based on an improved particle swarm algorithm, which is suitable for the optimization scheduling of hybrid energy storage resources in a microgrid system containing a high proportion of renewable energy.

[0007] The technical solution adopted by the present application to solve its technical problems is: a V2G-microgrid collaborative scheduling method based on an improved particle swarm algorithm, comprising the following steps: Step one, build a hybrid energy storage system: connect the V2G electric vehicle battery as a mobile energy storage unit with the fixed battery to form a hybrid energy storage system; Step two, real-time data acquisition and state detection: real-time acquisition of microgrid load demand, renewable energy generation data, electric vehicle cluster state and fixed energy storage capacity and state of health SOH; the electric vehicle cluster state includes SOC (State Of Charge, state of charge) state, available charging and discharging time window and geographic location information.

[0008] Step three, improved particle swarm algorithm optimization: adopt a dynamic hierarchical optimization framework, the upper layer optimizes the total power demand based on the supply and demand balance of the microgrid, and the lower layer generates specific charging and discharging instructions according to the dynamic access state of the electric vehicle and the battery health state, realizing the collaborative optimization of the global and local; Step four, multi-objective coordinated optimization: in the fitness function design, simultaneously consider the three core objectives of grid frequency regulation accuracy (minimize frequency deviation integral), operation economy (reduce comprehensive power cost) and battery life loss (embed SOH penalty term and user response game model), carry out multi-objective optimization, and realize the improvement of system comprehensive performance; Step five, dynamic power distribution: according to the optimization result, control the V2G cluster to preferentially respond to high-frequency power fluctuation (millisecond-level response), and the fixed energy storage undertakes basic load regulation (minute-level response), fully giving play to the complementary advantages of V2G mobile energy storage and fixed energy storage; Step six, scheduling instruction execution and feedback: output the optimized charging and discharging instructions to the execution equipment, such as V2G charging piles and fixed energy storage converters, and monitor the key indicators of the system in real time, feed back the monitoring data to the algorithm module to realize closed-loop dynamic adjustment, and ensure the continuous optimization of the system. The key indicators include system frequency regulation response speed, operation cost and battery attenuation, etc.

[0009] In the step two, Real-time acquisition of load demand data through smart meters deployed at the microgrid grid connection point, synchronous access to meteorological stations and photovoltaic / wind turbine SCADA (Supervisory Control and Data Acquisition) systems to obtain renewable energy power generation and prediction curves; For electric vehicle clusters, collect SOC state, available charging and discharging time window and geographic location information of each vehicle through vehicle-mounted BMS (Battery Management System) and GPS (Global Positioning System) modules, and upload them to the cloud aggregation platform through 4G / 5G network; Through the built-in battery management system of the fixed energy storage system, the SOH parameters including capacity attenuation rate, cycle number and internal resistance are continuously monitored. All data in step two are transmitted to the central data platform through standardized communication protocols, and after data cleaning, time alignment and normalization processing, an optimized scheduling input matrix with time stamp is formed. The sampling interval of load demand data and power generation data is 1 second, the SOH parameter of energy storage state data is 5 seconds, and the SOC state, available charging and discharging time window and geographic location information of electric vehicle cluster data is 15 seconds. The system uses edge computing nodes for local preprocessing and returns through fiber ring network to ensure that the real-time and reliability of data meet the requirements of dynamic optimization scheduling.

[0010] SOC state data as a direct constraint and optimization variable for charging and discharging power allocation, ensures that the charging and discharging instructions are executed within the physical energy limit of electric vehicles; SOH parameter data is embedded in the multi-objective fitness function to quantify battery wear cost and guide the algorithm to actively extend the battery life while pursuing economy; Geographic location information is used to evaluate communication delay to realize timing compensation of charging and discharging instructions and to divide regional virtual clusters to reduce scheduling complexity, thereby ensuring millisecond-level cooperative response speed of V2G cluster and system scalability; The available charging / discharging time window is the time range within which electric vehicles can be called upon by the microgrid in V2G scheduling. It is a key bridge for achieving efficient coordination between vehicles and the grid, and is mainly used in the following three aspects: First, as a core constraint, it ensures that all charging / discharging commands are strictly limited to the vehicle access period, and uses the available charging / discharging time window as a hard time constraint, limiting the power command variable to be valid only within the vehicle's available time window; Second, it is used to formulate strategies, combining SOC to determine the urgency and feasible power of charging / discharging. The charging / discharging strategy considers both time window data and SOC status data to determine the upper limit of dispatchable power and charging / discharging priority weight for each vehicle; Third, it is used for cluster aggregation, stitching together dispersed vehicles into a continuous virtual power plant on the timeline to support the load balancing of the microgrid and the consumption of renewable energy. In the cluster aggregation algorithm, the available time windows of all vehicles are superimposed and merged to generate the total adjustable capacity curve driving the scheduling of virtual power plants.

[0011] In step three, the dynamic hierarchical optimization framework specifically refers to: The upper-level model aims to achieve supply and demand balance in the microgrid, establishing a total power demand optimization model with the objective function of minimizing system operating costs; where the objective function is... Constraints include power balance and grid transmission capacity limitations F represents the total operating cost of the system, which is the objective function of the optimization model and represents the total cost within the scheduling cycle; T represents the total number of time periods in the scheduling cycle; m represents the m-th vehicle in the cluster; N represents the total number of electric vehicles participating in V2G scheduling; t is the time period index, indicating that the current time period is t. It is a function of the grid purchase cost, representing the power purchased from the grid in time period t. The fees to be paid; It represents the active power purchased from the power grid during time period t; It is the electric vehicle charging and discharging cost function, representing the charging and discharging operations performed on the electric vehicle cluster during time period t. The resulting costs; It represents the total charging and discharging power of the electric vehicle cluster during time period t. The lower-level model targets dynamically accessed electric vehicle clusters. Based on real-time detected SOC and SOH parameters, it utilizes the schedulable power limit and priority weights determined jointly by the time window and SOC from step two as optimization constraints. It employs adaptive inertia weights and dynamic learning factors to adjust the particle velocity update formula and generate charging and discharging commands. Among these, the SOC parameters... SOH parameters Adaptive inertia weights Dynamic learning factor , Particle velocity update formula , generate charge-discharge instructions by double-layer iteration optimization , finally realize the collaborative optimization of micro-grid power distribution and electric vehicle battery management. Among them, is the charging efficiency; is the charging power of the mth vehicle at the t period; is the discharging power; is the discharging power of the mth vehicle at the t period; is the time length of each scheduling period; is the current actual maximum capacity of the mth vehicle battery; is the initial nominal capacity of the mth vehicle battery; is the initial maximum inertia weight, encouraging global search; is the final minimum inertia weight, encouraging local fine search; is the maximum number of iterations of the algorithm; is the initial value of the dynamic learning factor c1; is the initial value of the dynamic learning factor c2; is the decay coefficient, controlling the change speed; r1, r2 are random numbers in the range of [0, 1], increasing the randomness of search; is the inertia weight; is the component of the historical optimal position searched by particle i itself in the jth dimension; is the component of the global historical optimal position searched by the whole population in the jth dimension; is the updated speed of particle i in the jth dimension; is the current speed of particle i in the jth dimension; is the current position of particle i in the jth dimension. The core of the adaptive mechanism is that the key parameters of the algorithm are no longer fixed values, but dynamically change with iterations, thereby balancing the global exploration and local exploitation capabilities of the algorithm; wherein the inertia weight is linearly decreased from the initial maximum value to the minimum value, in the early stage of iteration, the larger weight makes the particle maintain a higher inertia, which is conducive to exploring in the global range and avoiding falling into local optimum too early; in the later stage of iteration, the smaller weight makes the particle inertia decrease, which is conducive to fine search around the optimal solution and improve the accuracy of convergence. In the dynamic learning factor, C1 controls the compensation of the particle moving to its own historical optimal position, which is exponentially decayed from the initial value; in the early stage of iteration, individual independent cognition is emphasized, and exploration is encouraged; with the progress of iteration, the influence of individual cognition is gradually weakened. C2 controls the step size of the particle moving to the historical optimal position of the group, which is exponentially increased from 0 to close to the initial value; in the early stage of iteration, the social influence is weakened to avoid premature convergence; with the progress of iteration, the social cognition is gradually strengthened to make the particle approach the global optimal solution. The process of double-layer iteration optimization starts with upper-layer optimization: the upper-layer model takes minimizing the total running cost of the system as the goal, calculates the total charging and discharging power instruction expected to be obtained from the entire electric vehicle cluster in the future several time periods, and issues it to the lower-layer model. After receiving the instruction, the lower-layer model starts its improved adaptive particle swarm optimization algorithm, and decomposes and optimizes the total power instruction into specific and feasible charging and discharging power plans for each electric vehicle, considering the real-time state of charge SOC, state of health SOH and user constraints; then, the lower layer aggregates all these individual plans into an actual executable cluster charging and discharging plan, which is fed back to the upper layer. The upper-layer model re-calculates the power purchase strategy of the power grid and evaluates the new total system cost based on the feedback plan, and then judges whether the solution has converged. If not, a new round of iteration is started based on the new information, and the updated total power instruction is issued again; if it has converged, the iteration is terminated, and the final economic and feasible collaborative scheduling instruction is output.

[0012] In step four, the fitness function is a composite fitness function, and its expression is: wherein, is a weight coefficient; represents the frequency deviation; is the depth of discharge DOD (Depth of Discharge); is the weight coefficient of the sub-item; is the maximum safe discharge depth allowed by the battery.

[0013] In the multi-objective coordination optimization process, a non-cooperative game model is introduced for user response behavior wherein, is the user benefit function, a cost function including battery wear; is the total charge-discharge power of the mth vehicle battery; the multi-objective problem is optimized by NSGA-II algorithm with elitist strategy, and the optimal solution set is selected by fast non-dominated sorting and crowding distance calculation, finally the Pareto frontier solution meeting the frequency regulation requirement, optimal economy and minimum battery wear is generated, and the fuzzy membership function The compromise optimal scheme is selected to realize the dynamic balance of microgrid frequency regulation and economic operation. Among them, represents the specific function value of a certain specific solution on the Pareto frontier on the kth objective function; represents the worst value of the kth objective function in the entire Pareto frontier solution set; represents the best value of the kth objective function in the entire Pareto frontier solution set.

[0014] In step five, the specific process of dynamic power distribution is: The total power demand is decomposed into high-frequency component and low-frequency component ; wherein, represents the specific frequency value of the nth frequency component; represents the total power demand of the microgrid at time t; is the calculated high-frequency component; is the weight factor; The V2G cluster responds to the high-frequency component through the improved virtual synchronous machine control algorithm, and the power instruction is adjusted in real time by the dynamic allocation coefficient ; wherein, represents the minimum SOC safety lower limit allowed to prevent battery overdischarge; represents the maximum SOC safety upper limit allowed to prevent battery overcharge; The fixed energy storage system adopts model predictive control (MPC) to handle the low-frequency component, and solves the optimization problem at each scheduling period, the constraint conditions include and ; wherein, is the operating cost coefficient; is the absolute value of the net power exchanged between the entire fixed energy storage system and the grid; represents that the power of the fixed energy storage must always be maintained between 20%-90% (to ensure safe operation); is the rated power; and a cross-time scale coupling factor is designed, when the system frequency deviation exceeds the threshold value, the V2G response weight is automatically enhanced.

[0015] In the dynamic power distribution process, a blockchain-based response capability verification mechanism is introduced, and the available power of each V2G unit is checked in real time through a smart contract.

[0016] The application provides a V2G-microgrid collaborative scheduling system based on an improved particle swarm algorithm, which is used to realize the method provided by the application. The hybrid energy storage system is composed of a V2G electric vehicle battery pack and a fixed battery; The data acquisition layer is used to acquire the load, renewable energy generation, electric vehicle cluster state and fixed energy storage SOH state data of the microgrid in real time. The central controller is internally configured with a processing unit configured to perform the following operations: Run the improved dynamic hierarchical particle swarm algorithm, and perform global optimization in the upper layer and dynamic distribution in the lower layer based on the data of the data acquisition layer; Perform multi-objective coordinated optimization, and the optimization objectives include frequency regulation accuracy, operation economy and battery life; Generate dynamic power distribution instructions; The instruction execution and feedback layer includes V2G charging piles and fixed energy storage converters, which are used to execute the charge and discharge instructions issued by the central controller, and feed back the system operation state data to the central controller to form a closed-loop control.

[0017] The data acquisition layer includes edge computing nodes for local preprocessing of collected data and returning the data to the central controller through a fiber ring network.

[0018] The system also includes a digital twin module for building a virtual microgrid simulation environment, evaluating the robustness of the algorithm by comparing the simulation results with the theoretical expectations, and triggering automatic adjustment of the control parameters when the deviation exceeds the threshold.

[0019] The core innovation of the application is that a complete set of technical systems systematically solve the complex problems in V2G-microgrid scheduling. Data perception, intelligent decision-making and precise execution are closely coupled; upper global optimization and lower dynamic distribution interact bidirectionally; frequency regulation, economy and life are balanced; mobile energy storage and fixed energy storage complement each other. These links depend on and enhance each other, and together form an intelligent scheduling system that can adapt, optimize and develop sustainably, and finally realize the comprehensive performance leap that cannot be achieved by single technology improvement. Compared with the prior art, the V2G-microgrid collaborative scheduling system and method based on the improved particle swarm algorithm provided by the application have at least the following beneficial effects: 1. In terms of system architecture and overall performance: This invention innovatively integrates V2G electric vehicle batteries as mobile energy storage units with stationary batteries to construct a hybrid energy storage system. Through coordinated scheduling, the equivalent energy storage capacity of the microgrid is significantly expanded. This architecture not only overcomes the inherent defects of slow response speed and insufficient flexibility of single stationary energy storage, but also effectively solves the problem of low resource utilization of distributed V2G mobile energy storage. Ultimately, the overall frequency regulation response speed of the system is greatly improved, the operating cost is significantly reduced, and the pressure of optimizing the flexibility and economy of the microgrid under the high proportion of renewable energy access is alleviated.

[0020] 2. At the level of synergy between optimization algorithm and core objectives: The dynamic hierarchical particle swarm optimization framework adopted in this invention effectively solves the problems of premature convergence and insufficient search capability of traditional optimization algorithms through the synergy between upper-level global optimization (microgrid supply and demand balance) and lower-level dynamic allocation (based on EV real-time status). More importantly, by simultaneously optimizing three core objectives in the fitness function—grid frequency regulation accuracy (minimizing frequency deviation integral), operational economy (reducing overall electricity costs), and battery life loss (embedding SOH penalty term)—it achieves multi-objective synergistic optimization that was previously impossible with single-objective optimization models. This significantly extends the service life of electric vehicles and stationary batteries while ensuring system stability and economy.

[0021] 3. In terms of power allocation and response speed: The dynamic power allocation strategy proposed in this invention decomposes the total power demand into high-frequency and low-frequency components, which are respectively handled by V2G clusters (millisecond-level response) and stationary energy storage (minute-level response), fully leveraging the complementary advantages of the two types of energy storage. Specifically, the V2G clusters prioritize responding to high-frequency power fluctuations through an improved virtual synchronous machine control algorithm, while stationary energy storage uses model predictive control (MPC) to support the base load. This differentiated multi-timescale response mechanism enables the system to accurately and efficiently smooth fluctuations in renewable energy, particularly suppressing the impact of its high-frequency components on the power grid.

[0022] 4. Regarding model accuracy and user incentives: This invention introduces a user response game model into the optimization model, taking into account the benefits of user participation in V2G scheduling and battery wear costs. This makes the generated scheduling instructions more consistent with actual user behavior, improving the model's practicality and the executability of the scheduling strategy. Simultaneously, a blockchain-based response capability verification mechanism verifies the available power of each V2G unit in real time through smart contracts, ensuring the fairness, impartiality, and transparency of scheduling instruction allocation, thereby effectively incentivizing widespread user participation.

[0023] 5. At the level of system robustness and long-term stability: the application can evaluate the robustness of the algorithm in real time and automatically adjust the control parameters when performance deviation is detected through the closed-loop control architecture of "instruction-execution-monitoring-feedback" and the construction of a virtual micro-grid simulation environment using digital twin technology. This mechanism ensures that the system can adapt to changing operating environments, realizes continuous adaptive optimization, and guarantees the long-term stable and reliable operation of the system. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a flowchart of the V2G-microgrid collaborative scheduling system and method based on the improved particle swarm algorithm provided by the embodiment of the application.

[0025] Figure 2 is a two-dimensional Pareto frontier graph showing the trade-off relationship between frequency deviation and battery loss in the embodiment of the application.

[0026] Figure 3 is a graph showing the distribution of the first variable in the Pareto solution in the embodiment of the application.

[0027] Figure 4 is a target function trade-off relationship graph for quantifying the coupling mechanism between different optimization objectives in the embodiment of the application.

[0028] Figure 5 is a power change curve graph of the fixed energy storage in the embodiment of the application.

[0029] Figure 6 is a power change curve graph of the V2G cluster in the embodiment of the application.

[0030] Figure 7 is a schematic diagram of decoupling high-frequency / low-frequency components by power superposition in the embodiment of the application.

[0031] Figure 8 is a schematic diagram showing that the overall root mean square error (RMSE) of the system is reduced to a lower level in the embodiment of the application. DETAILED DESCRIPTION

[0032] The application will now be further described in detail in conjunction with the accompanying drawings. It should be emphasized that the following description is merely exemplary and is not intended to limit the scope of the application and its applications.

[0033] The embodiment provides a V2G-microgrid collaborative scheduling system and method based on an improved particle swarm algorithm, and the overall flowchart is as shown in Figure 1 The specific steps include the following steps: Step 1: Hybrid energy storage system construction The batteries of 50 V2G-capable electric vehicles are used as mobile energy storage units, and a set of stationary battery packs are used to build a hybrid energy storage system. The V2G battery packs provide distributed and flexible mobile energy storage resources, and the stationary battery packs provide stable base load support. Both are connected to the microgrid central controller through a wireless local area network and a fiber ring network to ensure real-time and reliable communication.

[0034] Step two: real-time data acquisition and state detection An intelligent electric meter is deployed at the microgrid grid-connected point to collect load demand data in real time with a sampling interval of 1 second. A meteorological station and a photovoltaic / wind turbine SCADA system are synchronously connected to obtain renewable energy power generation and prediction curves. For the electric vehicle cluster, the SOC state, available charging and discharging time window, and geographic location information of each vehicle are collected by the on-board BMS and GPS module at a period of 15 seconds, and are uploaded to the cloud aggregation platform through the 4G / 5G network. The fixed energy storage system continuously monitors its SOH parameters such as capacity attenuation rate, cycle number, and internal resistance through the built-in battery management system at an interval of 5 seconds. All data are transmitted to the central data platform through standardized communication protocols, and after data cleaning, time alignment, and normalization, a time-stamped optimization scheduling input matrix is formed. The system uses edge computing nodes for local preprocessing, and the data are returned through a fiber ring network to ensure that the real-time and reliability of the data meet the requirements of dynamic optimization scheduling. The edge computing nodes included in the data acquisition layer are embedded computing devices deployed in the near field of terminal equipment, such as V2G charging piles, distributed energy, and load monitoring units. The core function of the edge computing nodes is to perform local preprocessing, i.e., to clean the raw power data (including but not limited to voltage, current, power, and battery state of charge SOC) collected at the bottom layer to eliminate outliers and noise, to implement time series aggregation to reduce data granularity, and to complete specific edge analysis such as local power sum calculation and device state diagnosis, so as to convert massive and high-frequency raw data into high-quality and low-redundancy structured information. Subsequently, the preprocessed efficient data stream is returned to the central controller through a high-reliability fiber ring network. The role of this architecture is to significantly reduce the computational and communication load of the central controller, reduce the network transmission bandwidth demand, improve the reliability and real-time performance of the system data source, and provide accurate and timely data basis for the upper-layer central controller to perform complex optimization scheduling such as the improved particle swarm algorithm, thereby ensuring the efficiency and stability of global coordinated scheduling.

[0035] The processing and application of the available charging and discharging time window data include the following steps: First, the available charging and discharging time window is used as a hard time constraint to limit the power instruction variable to be valid only within the available time window of the vehicle. Subsequently, the charging and discharging strategy considers both the time window data and the SOC state data to determine the upper limit of the schedulable power and the priority weight of each vehicle; Finally, in the cluster aggregation algorithm, the available time windows of all vehicles are superimposed and fused to generate a total schedulable capacity curve that drives the scheduling of the virtual power plant.

[0036] Step three: improvement of the particle swarm optimization algorithm In the initialization process of the improved particle swarm optimization algorithm, a dynamic hierarchical optimization framework is first constructed.

[0037] The upper model takes the microgrid supply-demand balance as the target and establishes a total power demand optimization model, with the objective function being to minimize the system operation cost The constraint conditions include power balance and grid transmission capacity limitation ; F represents the total system operation cost; T represents the total number of time periods in the scheduling period; m represents the mth vehicle in the cluster, N represents the total number of electric vehicles participating in V2G scheduling, for example, N can be 50; t is the time period index, indicating that the current is in the tth period; is the grid purchase cost function, representing the cost paid for purchasing power from the grid in period t ; is the active power purchased from the grid in period t; is the electric vehicle charging and discharging cost function, representing the cost generated by charging and discharging the electric vehicle cluster in period t ; is the total charging and discharging power of the electric vehicle cluster in period t.

[0038] The lower model is aimed at the dynamically accessed electric vehicle cluster, based on the real-time detected SOC and SOH parameters, while using the schedulable power upper limit and priority weight decided by the time window and SOC from step two as optimization constraints, adopting an adaptive inertia weight ; a dynamic learning factor , ; and adjusting the particle velocity update formula . Through double-layer iterative optimization, charging and discharging instructions are generated that take into account both global economy and battery life , finally realizing the collaborative optimization of microgrid power distribution and electric vehicle battery management. Among them, is the charging efficiency; is the charging power of the mth vehicle in period t; is the discharging power; is the discharging power of the mth vehicle in period t; is the time length of each scheduling period; is the current actual maximum capacity of the mth vehicle battery; is the initial nominal capacity of the mth vehicle battery; is the initial maximum inertia weight, encouraging global search; is the final minimum inertia weight, encouraging local fine search; is the maximum number of iterations of the algorithm; is the initial value of the dynamic learning factor c1; is the initial value of the dynamic learning factor c2; is the damping coefficient, controlling the speed of change; r1, r2 are random numbers within the range [0, 1], increasing the randomness of search; is the inertia weight; is the component of the historical optimal position searched by particle i itself in the jth dimension; is the component of the global historical optimal position searched by the entire population in the jth dimension; is the updated speed of particle i in the jth dimension; is the current speed of particle i in the jth dimension; is the current position of particle i in the jth dimension.

[0039] Here, m represents the vehicle index, and i represents the particle index; Optimization model definition: the charge and discharge power instruction of each vehicle in each period within the scheduling period .

[0040] Objective function: minimize the weighted sum of power deviation squares of all vehicles within the scheduling period to achieve accurate power allocation considering priority: .

[0041] Realization of charge and discharge priority weight: weight Here, as the core weighting coefficient, the higher the value of the vehicle, the greater the penalty cost of its power deviation in the objective function, so the optimization algorithm will preferentially adjust the power of other vehicles to meet the expected power of high-priority vehicles as much as possible , thereby achieving intelligent power allocation.

[0042] Adjustable upper limit constraint of schedulable power: , Here, as a hard boundary, directly limits the value range of the decision variable . Ensure that the generated power instruction does not exceed the actual physical capacity of the vehicle at the current time. Through iterative optimization by the particle swarm algorithm, when the maximum number of iterations is Or after meeting the convergence condition, the global historical optimal position is the optimal solution. Decoding the position vector, we can get a set of positions that meet all the constraints and follow the priority weight Optimal allocation of power charging and discharging instruction set , issued to each vehicle's execution unit.

[0043] Step four: multi-objective coordination optimization In the process of multi-objective coordination optimization, a composite fitness function is constructed, which contains the microgrid frequency modulation accuracy, operation economy and battery life loss Where, is the weight coefficient; represents the frequency deviation; is the state of health of the battery; is the depth of discharge DOD, which represents the percentage of the total capacity of the battery discharged in one charging and discharging cycle; is the weight coefficient of the sub-item; is the maximum safe discharge depth allowed by the battery. For user response behavior, a non-cooperative game model is introduced , where is the user's benefit function, is the cost function containing battery loss; is the total charging and discharging power of the mth vehicle battery.

[0044] Specifically, the benefit function is: , where, is the price of electricity purchased by the grid from the user; is the charging and discharging power of user m; is the time interval of single dispatch. The cost function is: , where, is the complete replacement cost of the battery; is the cycle life of the battery at a certain depth of discharge DOD; is the total capacity of the battery; is the effective energy throughput of the battery in a single cycle; Taking the absolute value indicates that both charging and discharging behavior will cause battery loss.

[0045] The above decision mechanism is as follows: each user aims to maximize its own utility , and makes independent decisions. In an iterative process, all users will continuously adjust their discharge strategies. For any user, assuming that the strategies of other users remain unchanged, calculate and select the net benefit The maximum discharge power. The system reaches Nash equilibrium when all users find that they cannot get higher payoff by unilateral change of strategy under the current strategy of others. At this time, the final total charging and discharging power of each user is their stable decision. If the total charging and discharging power is not zero, it means that they have rationally chosen to respond to the dispatch after weighing the economic return and battery loss.

[0046] Subsequently, the above multi-objective problem is optimized by the NSGA-II algorithm with an elitist strategy, and the fast non-dominated sorting and crowding distance calculation are used to select the optimal solution set, and finally the Pareto frontier solution that meets the frequency regulation requirements, is optimal in economy and is minimal in battery loss is generated. Among them, the fast non-dominated sorting divides all candidate schemes into layers; specifically, it finds all those preferred schemes that are not worse than others in any objective and at least better in one objective, and lists them as the first echelon (Pareto optimal frontier), then excludes the schemes dominated by the first echelon schemes, and selects new preferred schemes from the remaining schemes as the second echelon, and so on, so as to clearly divide the advantages and disadvantages of all schemes. The crowding distance calculation measures the density of each scheme and its neighbors within the same level; by calculating the sum of the distances of each scheme in each objective function and its left and right adjacent schemes, the crowding degree of the region where the scheme is located is evaluated, and the greater the distance value, the more unique the scheme and the sparser the location, so as to better ensure that the final selected scheme set not only has high quality, but also has a wide distribution and good diversity in the entire solution space.

[0047] As shown in Figure 2 , it intuitively shows the trade-off relationship between the 70 optimal solutions in the frequency deviation (f1) and the battery loss (f2) two objectives, and the solution set range covers f1∈[0, 0.8] and f2∈[0, 1.5], presenting a typical nonlinear compromise curve, indicating that when the frequency deviation is optimized to below 0.3, the battery loss will rise sharply. Finally, the compromise optimal scheme is selected by the fuzzy membership function , wherein, represents the specific function value of a certain specific solution on the Pareto frontier in the kth objective function; represents the worst value of the kth objective function in the entire Pareto frontier solution set; represents the best value of the kth objective function in the entire Pareto frontier solution set. For example, the solution near f1≈0.4 and f2≈0.7 is selected to achieve the dynamic balance of microgrid frequency regulation and economic operation. Figure 3 and Figure 4This study further revealed the distribution patterns of key control parameters and the nonlinear trade-off between them and the objective function. Figure 3 The first-dimensional variable distribution plot reveals the distribution pattern of key control parameters in the Pareto solution set, such as the V2G power allocation coefficient. Most solutions are concentrated in the range of 0.2 to 0.6, but there are a few extreme solutions. This reflects the algorithm's parameter selection preference when balancing frequency regulation requirements and battery protection. Finally, Figure 4 The objective function trade-off diagram, labeled with parameters such as α and ε, further quantifies the coupling mechanism between different optimization objectives. For example, when the frequency deviation f1 decreases to 0.4, the growth slope of battery loss f2 increases significantly, which is related to... Figure 2 Inflection point region and Figure 3 The formation of a dense parameter region of 0.4 to 0.6 mutually verifies that the optimal operating point in practical engineering should be selected near this inflection point, which can ensure both frequency modulation accuracy (f1≈0.4) and control the battery degradation rate (f2≈0.7). The dynamic hierarchical particle swarm optimization algorithm proposed in this invention can effectively explore the multi-objective solution space. Its generated Pareto front has both wide distribution and engineering rationality, especially through… Figure 3 The concentrated distribution characteristics of the first dimension variable and Figure 4 The nonlinear relationship of the objective function verifies the necessity of the SOH penalty term and user game model design in the patent.

[0048] Step 5: Dynamic Power Allocation Strategy During the implementation of the dynamic power allocation strategy, based on the Pareto optimal solution set obtained in step four, a multi-timescale response mechanism is first established to decompose the total power demand into high-frequency components. and low frequency components .in, This represents the specific frequency value of the nth frequency component; This represents the total power demand of the microgrid at time t; The high-frequency components obtained from the calculation; The weighting factor is used. The V2G cluster achieves millisecond-level response through an improved virtual synchronizer control algorithm, and its power commands are dynamically allocated by coefficients. Real-time adjustments ensure that all vehicles participate in frequency regulation fairly based on their battery status. Among these adjustments, This indicates the minimum permissible state of charge (SOC) safety limit to prevent over-discharge of the battery. This indicates the maximum permissible SOC safety limit to prevent battery overcharging. The improved virtual synchronous machine (VSG) control algorithm is an improvement on the classic VSG control framework. The classic VSG simulates the rotor motion equations of a synchronous generator, giving the converter inertial support and damping. The improvement of this algorithm lies in its downlink power allocation strategy: it does not treat the V2G cluster as a single entity, but rather uses given dynamic allocation coefficients... The total power instruction calculated by the VSG is dynamically and optimally allocated according to the real-time state (SOC and SOH) of each single body. Therefore, the algorithm is a double-layer control strategy: the upper layer is the VSG, which is responsible for the interaction with the external power grid; the lower layer is the dynamic allocation, which is responsible for the internal autonomous management.

[0049] The fixed energy storage system uses model predictive control (MPC) to handle low-frequency components, and in each scheduling period Solve the optimization problem The constraint conditions include and . Among them, is the operation cost coefficient; is the absolute value of the net power exchanged between the entire fixed energy storage system and the power grid; indicates that the power of the fixed energy storage must always be maintained between 20%-90% to ensure safe operation; is the rated power. To achieve coordinated control of the two types of energy storage, a cross-time scale coupling factor is designed, which automatically enhances the V2G response weight when the system frequency deviation exceeds 0.2Hz. At the same time, a response capability verification mechanism based on blockchain is introduced, which uses smart contracts to verify the available power of each V2G unit in real time , where : the maximum physical power of the on-board charging and discharging equipment of the mth vehicle; : the rated capacity of the battery of the mth vehicle. Finally, a hybrid energy storage power allocation scheme that takes into account both dynamic response speed and equipment life is formed. The response capability verification mechanism based on blockchain solves the key trust problem in V2G collaborative scheduling by using the characteristics of decentralized trust, data tamper resistance, and automatic execution of programs. It ensures that the data used by the scheduling center is authentic and reliable, making the scheduling decisions based on the improved particle swarm algorithm more effective and stable, ultimately improving the operational efficiency and reliability of the entire microgrid system. The execution process of the response capability verification mechanism based on blockchain forms a closed loop from data chaining to automatic scheduling: first, each V2G unit uploads its available power and other data as a trusted transaction to the blockchain after digital signature; then, the smart contract automatically triggers and executes the verification logic to check the authenticity and reasonableness of the data, and permanently records the verification results on the distributed ledger; the microgrid scheduling center then uses the improved particle swarm algorithm to develop an optimized scheduling strategy based on these on-chain trusted verification results, and finally automatically and reliably issues power allocation instructions to each verified V2G unit through the smart contract for execution, thus completing the entire dynamic power collaborative scheduling. The execution effect of the strategy is verified by comparing the fixed energy storage power Figure 5 and the V2G aggregated power Figure 6 ,Figure 5 The stationary energy storage power diagram exhibits a regular bidirectional fluctuation: -200kW to +200kW. Its charging and discharging behavior closely matches the net load change trend, primarily undertaking the task of low-frequency, high-power baseload regulation, smoothing out renewable energy fluctuations on a minute-level time scale. Figure 6 The V2G aggregated power graph shows higher frequency and more intense power fluctuations: from -500kW to +100kW. Through the dynamic response strategy formed by upper-layer PSO optimization and lower-layer NSGA-II allocation, the electric vehicle cluster prioritizes the absorption of high-frequency power components, such as instantaneous fluctuations in photovoltaic output and sudden load changes. Its reverse discharge power (negative value) is significantly greater than that of stationary energy storage, fully demonstrating the rapid response advantage of mobile energy storage. Figure 5 and Figure 6 The comparison verified the effectiveness of the hierarchical control strategy proposed in this invention, which uses stationary energy storage to dominate low-frequency regulation and V2G to cope with high-frequency fluctuations. The power variation of the stationary energy storage is relatively smooth, while the rapid fluctuation of the aggregated power of the V2G reflects the dynamic distribution coefficient of the 50 electric vehicles. Cluster flexibility under regulation, both through The power superposition ultimately achieved Figure 7 Effective decoupling of mid-to-high frequency / low frequency components reduces the overall system RMSE to a minimum. Figure 8 At the lower level shown, this complementary cooperation mode not only plays a stable supporting role for stationary energy storage, but also makes full use of the rapid adjustment capability of V2G resources.

[0050] Step Six: Execution and Feedback of Scheduling Instructions In the scheduling instruction execution and feedback phase, the optimized charge and discharge instructions are first processed via the OPC UA protocol. Commands are sent to each V2G charging station and energy storage PCS (power conversion system), with the transmission delay controlled within [specific parameters]. . This represents the total number of currently active and schedulable V2G vehicles. A multi-level status monitoring system is employed during execution, with real-time power obtained at the equipment level through IEC 61850 sampling. , and temperature Parameters such as these are used to calculate the instantaneous frequency modulation response speed at the system level. and comprehensive cost indicators An adaptive compensation mechanism is established to address execution deviations; when a power error is detected... At that time, dynamic correction based on the Luenberger observer is triggered. , where state variables , The system state estimated by the observer; Total target power at time t is represented. All detection data is stored through a time series database InfluxDB, and the The weight coefficients of the algorithm module are updated once At the same time, a virtual microgrid simulation environment is constructed using digital twin technology, and the root mean square error between the simulation results under different scenarios and the theoretical expectations is compared to evaluate the robustness of the algorithm, and when the RMSE is greater than a predetermined threshold, the control parameters are automatically adjusted, forming a complete "instruction-simulation-evaluation-optimization" theoretical closed-loop verification system to ensure continuous optimization of the system. The simulation model of the digital twin module is based on the MATLAB / Simulink platform. The digital twin module communicates with the real-time database through a standardized API interface to obtain real-time operating data of the physical microgrid system. The module uses these data to drive a high-fidelity simulation model, reproduces the dynamic behavior of the system in a virtual environment, and performs forward-looking simulation. The key performance indicators of the simulation output are compared quantitatively with the preset theoretical expected values, and the robustness of the improved particle swarm algorithm is evaluated. When the performance deviation exceeds the established threshold, the module automatically triggers the parameter optimization algorithm, adjusts the control parameter set online, and feeds back the optimization results to the central controller, realizing autonomous calibration of algorithm parameters and closed-loop optimization of system operating state.

[0051] The present application aims at the problems of insufficient flexibility of fixed batteries, limited response speed in existing microgrid energy storage systems, and low utilization rate of distributed mobile energy storage resources. It innovatively proposes to use V2G electric vehicle batteries as mobile energy storage units to form a hybrid energy storage system with fixed batteries, and to realize collaborative optimization and scheduling through an improved dynamic hierarchical particle swarm algorithm. The algorithm uses a two-layer structure of global optimization in the upper layer and dynamic allocation in the lower layer. The upper layer optimizes the total power demand based on microgrid supply and demand balance, and the lower layer dynamically allocates charge and discharge instructions for V2G clusters and fixed energy storage according to the real-time access state and battery health state of electric vehicles, where V2G prioritizes responding to high-frequency power fluctuations, and fixed energy storage supports basic load. A multi-objective optimization model is introduced to simultaneously optimize grid frequency regulation accuracy, operating economy, and battery life loss, and a battery health state penalty term and user response game model are embedded in the fitness function. The present application significantly expands the microgrid energy storage capacity through the dynamic access of V2G mobile energy storage, effectively improves the system frequency response speed, reduces the operating cost, and prolongs the battery life, and alleviates the optimization pressure of flexibility and economy of microgrid energy storage under high proportion of renewable energy access.

[0052] With the above ideal embodiments according to the present application as the inspiration, through the above description, relevant staff can make various changes and modifications without deviating from the technical idea of the present application. The technical scope of the present application is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims

1. A V2G-microgrid cooperative scheduling method based on an improved particle swarm optimization algorithm, characterized in that, Includes the following steps: Step 1: Construct a hybrid energy storage system: Use V2G electric vehicle batteries as mobile energy storage units and connect them with stationary batteries to form a hybrid energy storage system; Step 2, Real-time Data Acquisition and Status Monitoring: Real-time acquisition of microgrid load demand, renewable energy generation data, electric vehicle cluster status, and fixed energy storage capacity and state of health (SOH); Step 3, Improve the particle swarm optimization algorithm: Adopt a dynamic hierarchical optimization framework. The upper layer optimizes the total power demand based on the supply and demand balance of the microgrid, and the lower layer generates specific charging and discharging instructions based on the dynamic access status of electric vehicles and the health status of batteries. Step 4, Multi-objective Coordinated Optimization: In the fitness function design, three core objectives—grid frequency regulation accuracy, operational economy, and battery life loss—are considered simultaneously to perform multi-objective optimization; Step 5, Dynamic Power Allocation: Based on the optimization results, control the V2G cluster to prioritize responding to high-frequency power fluctuations, and fixed energy storage to undertake the adjustment of the base load; Step 6, Execution and Feedback of Scheduling Instructions: The optimized charging and discharging instructions are output to the execution device, and key system indicators are monitored in real time. The monitoring data is fed back to the algorithm module to achieve closed-loop dynamic adjustment.

2. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 1, characterized in that: In step two By collecting load demand data in real time through smart meters deployed at the microgrid grid connection points, and simultaneously connecting to the weather station and photovoltaic / wind turbine SCADA system, renewable energy power generation and forecast curves are obtained. For electric vehicle clusters, the SOC status, available charging and discharging time windows, and geographical location information of each vehicle are collected through onboard BMS and GPS modules; The SOH parameters, including capacity decay rate, cycle count, and internal resistance, are monitored by the battery management system built into the stationary energy storage system. State of Charge (SOC) data serves as a direct constraint and optimization variable for charging and discharging power allocation, ensuring that charging and discharging commands are executed within the physical energy limits of the electric vehicle. SOH parameter data is embedded into a multi-objective fitness function to quantify battery loss cost; Geographic location information is used to assess communication latency to achieve timing compensation for charge and discharge commands and to divide regions into virtual clusters to reduce scheduling complexity; The processing and application of the available charge / discharge time window data includes the following steps: First, the available charging and discharging time window is used as a hard time constraint, limiting the power command variable to be valid only within the vehicle's available time window; Subsequently, the charging and discharging strategy takes into account both time window data and SOC status data to determine the upper limit of schedulable power and charging and discharging priority weights for each vehicle. Ultimately, in the cluster aggregation algorithm, the available time windows of all vehicles are superimposed and merged to generate the total adjustable capacity curve that drives the virtual power plant scheduling.

3. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 2, characterized in that: In step three, the dynamic hierarchical optimization framework specifically refers to: The upper-level model aims to achieve supply and demand balance in the microgrid, establishing a total power demand optimization model with the objective function of minimizing system operating costs; where the objective function is... Constraints include power balance and grid transmission capacity limitations F represents the total system operating cost; T represents the total number of scheduling periods; m represents the m-th vehicle in the cluster; N represents the total number of electric vehicles participating in V2G scheduling; t is the time period index, indicating that the current time period is t. It is a function of the grid purchase cost, representing the power purchased from the grid in time period t. The fees to be paid; It represents the active power purchased from the power grid during time period t; It is the electric vehicle charging and discharging cost function, representing the charging and discharging operations performed on the electric vehicle cluster during time period t. The resulting costs; It represents the total charging and discharging power of the electric vehicle cluster during time period t. The lower-level model targets dynamically accessed electric vehicle clusters. Based on real-time detected SOC and SOH parameters, it utilizes the schedulable power limit and priority weights determined jointly by the time window and SOC from step two as optimization constraints. It employs adaptive inertia weights and dynamic learning factors to adjust the particle velocity update formula and generate charging and discharging commands. Among these, the SOC parameters... SOH parameters Adaptive inertia weights Dynamic learning factor , Particle velocity update formula Charge and discharge commands are generated through two-level iterative optimization. ;in, For charging efficiency; Let m be the charging power of vehicle m during time period t; This refers to the discharge power. Let be the discharge power of the m-th vehicle during time period t; The duration of each scheduling period; Let be the current actual maximum capacity of the battery of the m-th vehicle; Let m be the initial nominal capacity of the battery of the m-th vehicle; This is the initial maximum inertia weight; This represents the final minimum inertia weight; This represents the maximum number of iterations for the algorithm. This is the initial value for the dynamic learning factor c1; This is the initial value for the dynamic learning factor c2; r1 and r2 are the attenuation coefficients; Random numbers within a certain range; Inertial weight; Let be the component of the j-th dimension of the historical best position searched by particle i itself; The j-th dimension component of the globally best historical position found for the entire population; Let be the velocity of particle i after updating in the j-th dimension; Let i be the current velocity of particle i in the j-th dimension; Let be the current position of particle i in the j-th dimension.

4. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 3, characterized in that: In step four, the fitness function is a composite fitness function, and its expression is: in, These are the weighting coefficients; Indicates frequency deviation; Depth of Discharge (DOD); This is the weighting coefficient for that sub-item; This represents the maximum safe depth of discharge allowed for the battery.

5. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 4, characterized in that: In the multi-objective coordination optimization process, a non-cooperative game model is introduced to address user response behavior. ,in For user revenue function, The cost function includes battery degradation; This represents the total charging and discharging power of the battery in the m-th vehicle. The multi-objective problem is optimized using the NSGA-II algorithm with an elitist strategy. Fast non-dominated sorting and crowding distance calculation are employed to select the optimal solution set, ultimately generating the Pareto front solution. This solution is then analyzed using fuzzy membership functions. Select the optimal compromise solution; among which, This represents the specific function value of a particular solution on the Pareto front, expressed as the k-th objective function. This represents the worst value of the k-th objective function in the entire Pareto front solution set; This represents the optimal value of the k-th objective function in the entire Pareto front solution set.

6. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 5, characterized in that: In step five, the specific process of dynamic power allocation is as follows: Decompose the total power demand into high-frequency components. and low frequency components ;in, This represents the specific frequency value of the nth frequency component; This represents the total power demand of the microgrid at time t; The high-frequency components obtained from the calculation; As a weighting factor; V2G clusters respond to high-frequency components through an improved virtual synchronous machine control algorithm, and their power commands are dynamically allocated by coefficients. Real-time adjustment; among which, Indicates the minimum permissible State of Charge (SOC) safety limit; Indicates the maximum allowed SOC security limit; Stationary energy storage systems employ Model Predictive Control (MPC) to handle low-frequency components, solving the optimization problem in each scheduling cycle. The constraints include and ;in, This is the operating cost coefficient; This represents the absolute value of the net power exchanged between the entire stationary energy storage system and the power grid. This means that the capacity of stationary energy storage must always be maintained between 20% and 90%. Rated power; And design cross-timescale coupling factors When the system frequency deviation The V2G response weight is automatically increased when the threshold is exceeded.

7. The V2G-microgrid cooperative scheduling method based on the improved particle swarm optimization algorithm as described in claim 1, characterized in that: During the dynamic power allocation process, a blockchain-based response capability verification mechanism is introduced to verify the available power of each V2G unit in real time through smart contracts.

8. A V2G-microgrid cooperative scheduling system based on an improved particle swarm optimization algorithm, used to implement the method as described in any one of claims 1-7, characterized in that, The system includes: The hybrid energy storage system consists of a V2G electric vehicle battery pack and a stationary battery. The data acquisition layer is used to collect real-time data on microgrid load, renewable energy generation, electric vehicle cluster status, and stationary energy storage SOH status. The central controller has an internal processing unit configured to perform the following operations: An improved dynamic hierarchical particle swarm optimization algorithm is run to perform upper-layer global optimization and lower-layer dynamic allocation based on the data from the data acquisition layer. Perform multi-objective coordinated optimization, with optimization objectives including frequency modulation accuracy, operating economy, and battery life; Generate dynamic power allocation instructions; The command execution and feedback layer, including V2G charging piles and fixed energy storage converters, is used to execute the charging and discharging commands issued by the central controller and to feed back the system operating status data to the central controller, forming a closed-loop control.

9. The V2G-microgrid cooperative scheduling system based on the improved particle swarm optimization algorithm as described in claim 8, characterized in that: The data acquisition layer includes edge computing nodes, which are used to preprocess the acquired data locally and transmit it back to the central controller via a fiber optic ring network.

10. The V2G-microgrid cooperative scheduling system based on the improved particle swarm optimization algorithm as described in claim 8, characterized in that: The system also includes a digital twin module for building a virtual microgrid simulation environment. It evaluates the robustness of the algorithm by comparing the simulation results with theoretical expectations and triggers automatic adjustment of control parameters when the deviation exceeds a threshold.