Optimization Strategy for Shared Energy Storage Operators‑Multiple Microgrids with Hybrid Game‑Theoretic Energy Trading

: To address the issue of low utilization rates, constrained operational modes, and the under‑ utilization of flexible energy storage resources at the end‑user level, this research paper introduces a collaborative operational approach for shared energy storage operators in a multiple microgrids (ESO‑MGs) system. This approach takes into account the relation of electricity generated by MGs and the integration of diverse energy storage resources managed by ESO. A hybrid game‑theoretic energy trading strategy is employed to address the challenges associated with energy trading and revenue distribution in this joint operational mode. Firstly, a multi‑objective master–slave game optimization model is developed with the objective of maximizing the revenue earned by shared energy storage operators while simultaneously minimizing the operational costs of multiple micro‑ grids. Secondly, acknowledging the peer‑to‑peer (P2P) energy sharing dynamics inherent in the multiple microgrid system, a non‑co‑operative game model is formulated. This model seeks to es‑ tablish a multi‑microgrid Nash equilibrium and equitable income allocation. Finally, leveraging the Karush–Kuhn–Tucker (KKT) conditions and drawing upon the principles of strong duality theory, precise dimensionality reduction is executed on the master–slave game model. The non‑co‑operative income is iteratively determined using the alternating direction multiplier algorithm. The empirical findings of this study indicate that the integration of electric vehicle clusters contributes to flexible storage resources for shared energy storage operators. Moreover, the proposed hybrid game opti‑ mization strategy enhances the overall benefits for shared energy storage operators and multiple microgrids, thereby affirming the economic viability and reliability of this innovative strategy.


Introduction
The rapid advancement of emerging energy sectors, notably wind and solar power technologies [1], has elevated the importance of effectively harnessing distributed resources in the context of achieving carbon neutrality.Microgrids have emerged as a promising solution to enhance the efficient utilization of multiple energy sources, balance supply and demand dynamics, optimize energy resource allocation, and satisfy carbon neutrality objectives [2].Extensive studies have shown that the integration of various microgrids operating in the same distribution network area can establish a robust multiple-microgrids system facilitated by peer-to-peer (P2P) energy trading mechanisms [3,4].In instances where one subsystem faces a shortage of dispatchable resources, it can seek support from neighboring subsystems, thereby enhancing the economic viability and dependable operation of interconnected systems [5].
Energy storage, as a burgeoning technology in power systems, plays a pivotal role in ensuring the dependable operation and sustainable growth of the power grid.Nevertheless, the absence of viable commercial models for energy storage has resulted in an underutilization of available energy storage resources [6].In recent years, the concept of the "sharing economy" [7] has given rise to the "shared energy storage" model, which integrates the principles of the sharing economy with large-scale energy storage facilities [8,9].In contrast to conventional energy storage paradigms, the operation mode of shared energy storage (SES) leverages the synergistic effect of centralized energy storage and the complementary characteristics of load patterns, effectively aggregating dormant resources and maximizing their potential across various aspects of energy generation, grid management, load balancing, and energy storage [10].This approach facilitates the provision of cost-effective energy storage services and enhances the profitability of the energy storage business model.Large-scale clusters of electric vehicles (EVs) can be consolidated into a generalized energy storage (GES) system with increased capacity and charging/discharging capabilities, meeting the prerequisites for participation in the electricity market [11].Wu et al. [12] have proposed that EV clusters, characterized by their mobile and flexible load-storage profiles, represents a promising shared energy storage operational strategy.This not only enhances the efficiency of electric vehicle usage but also enhances the dispatchable potential of shared energy storage, alleviating the burden associated with allocating shared energy storage capacity.Considering the limited scale of new energy resources and load profiles in microgrids, relying solely on power interactions between microgrids' yields restricts benefits in terms of enhancing local new energy integration rates and cost reduction.Deng et al. [13] have introduced shared energy storage solutions into multiple microgrids, yielding significant improvements in the local new energy integration rates in these interconnected microgrids.Xi et al. [14] have carried out a comprehensive configuration of shared energy storage systems in community settings, aligning the configurations with the specific requirements of community residents.Simulation results have corroborated the cost reduction achieved through the strategic deployment of shared energy storage in community environments.
When incorporating shared energy storage into multiple-microgrid systems, intricate energy interaction issues arise due to the distinct energy entities of shared storage and multiple microgrids [15,16].These complexities stem from the presence of different energy entities, creating interdependencies that add to the intricacy of the overall energy landscape [17].The exchange of energy inherently involves the exchange of interests [18].As a result, connecting a shared energy storage system to multiple microgrids introduces conflicts of interest between the energy storage operators and multiple microgrids.Conventional dispatch methods struggle to effectively manage the multi-level and multi-agent economic dynamics between shared energy storage and multiple-microgrid systems.Game theory emerges as a valuable tool to explain the operational logic governing such complex systems and incentivize multiple agents to participate actively in market bidding [19].The economic dynamics between shared energy storage and multiple microgrid systems can be characterized through the lenses of co-operative and non-co-operative game theory, offering a nuanced understanding of their interplay in the energy landscape.In characterizing the interplay between shared energy storage and multiple microgrid systems through co-operative game theory, a collaborative alliance emerges where shared energy storage and multiple microgrids engage in a co-operative game.The overarching objective of this alliance is to maximize collective benefits, optimizing energy transactions and profits between the shared energy storage and multiple microgrid systems.In characterizing the dynamics between shared energy storage and multiple-microgrid systems through non-cooperative game theory, each entity strives to maximize its individual benefits.Commonly, shared energy storage takes on a leadership role, while multiple-microgrid systems act as followers.In the context of a leader-follower competition among energy entities, the optimization is centered on enhancing energy transactions and profits between shared energy storage and multiple microgrid systems.Kim et al. [20] undertook an effort to enhance the overall revenue of multiple microgrids and allocate co-operative benefits using co-operative game theory principles.Their findings indicated notable profit improvements for each microgrid compared to independent operation.Guo et al. [21] developed a oneleader-multiple-followers Stackelberg game model, designating the entire microgrid system as the leader and renewable energy, energy storage, and load as followers.This model effectively co-ordinated the generation, grid, load, and storage of the microgrid, resulting in a Stackelberg equilibrium that balanced the interests of multiple parties while ensuring system safety and stability.In a separate study, Xu et al. [22] proposed a Nash bargaining co-ordination optimization scheduling model for shared energy storage in multiple microgrids, employing a dual-layer ADMM algorithm.This model promoted collaborative energy supply, leading to mutually beneficial results for shared energy storage and microgrids, fostering a win-win scenario.Cui et al. [23] addressed energy trading competition among building clusters and devised a microgrid trading strategy based on nonco-operative game theory.This strategy considered the self-interest of each agent in the energy trading process and maximized the benefits for all participating agents.
Despite the valuable insights provided by the aforementioned literature on energy interaction, profit allocation, and shared energy storage involvement in multiple microgrids, there remains certain limitations.Firstly, these studies have not taken into account the integration and effective utilization of shared energy storage resources in the geographical region.Secondly, the formulation of real-time electricity prices for buying and selling electricity by the game leader, based on the real-time electricity transactions of different entities at lower levels, has been overlooked.Therefore, the lower-level microgrid systems struggle to establish effective interactions with shared energy storage, dampening the enthusiasm of microgrid members to engage in electricity trading.In light of these challenges, this paper introduces the concept of shared energy storage operators tasked with co-ordinating and managing shared energy storage facilities and electric vehicle shared energy storage resources in a given region.ESO offer electricity purchase and sale services to MGs and play an active role in guiding the economic operations of MGs by establishing electricity prices for buying and selling electricity.
In summary, this paper introduces a novel hybrid game-based two-tiered optimization strategy tailored for an ESO-MGs system, which is dedicated to examining the shared energy storage operators in the context of multiple microgrids and aims to optimize the real-time electricity pricing set by ESO for MGs, as well as the profit distribution subsequent to energy sharing in MGs.The principal contributions of this study are outlined as follows: (1) A descriptive methodology has been devised to characterize the uncertain distribution of electric vehicle clusters.Utilizing a data-driven method, it expresses the uncertainty range bridging the empirical distribution of EV clusters and their actual distribution.(2) A hybrid game model has been constructed, including the master-slave game dynamics between the shared energy storage operator and the multiple microgrid systems, alongside a non-co-operative game in the MGs themselves.In the master-slave game, the upper-level model seeks to maximize the ESO's revenue, while the lower-level model seeks to minimize the costs incurred by the MGs.The non-co-operative game formulates the problem of profit allocation among MGs as a decomposable Nikaido-Isoda (NI) regularized model, subdivided into three iteratively solvable subproblems.The establishment of overall and local incentive constraints for the MGs ensures optimal profits for each agent and promotes economic harmony in the settlement of the overall system.(3) To facilitate the effective resolution of the model, the lower-level MGs model is transformed into a constraint for the upper-level ESO model, leveraging the derivation of KKT conditions in the master-slave game.Building on strong duality theory, the real-time communication variable comprising electricity prices and power between the upper and lower levels is linearized, thus enabling the rapid and precise solution of the global strategic equilibrium in the multi-level, multi-agent system.

Shared Energy Storage Operator-Multiple-Microgrids System Operation Mode
The principal stakeholders engaged in the collaborative operation of the shared energy storage operators-multiple-microgrids system (ESO-MGs) consist of the integrated energy storage operator.This entity combines scalable electric vehicle storage resources and shared energy storage stations.Furthermore, it interfaces with the multiple-microgrid system, in conjunction with the higher-level grid.

Service Model of the Shared Energy Storage Operator
Figure 1 provides a visual representation of the orchestration and management of shared energy storage in the region by the shared energy storage operator.The ESO is also tasked with overseeing the energy storage assets associated with electric vehicle clusters.While ensuring the complete fulfillment of electric vehicle charging requirements, the ESO seeks to cultivate the adaptable characteristics of its load storage resources.This, in turn, enhances the efficiency of energy storage asset utilization in the region, while concurrently offering electricity trading services to the multiple-microgrid system.The revenue streams for the shared energy storage operator are primarily derived from four sources: (1) the price differential between the settlement of energy storage and retrieval transactions between microgrid users and the ESO; (2) the levies levied by the ESO for provisioning electricity trading services to users, along with the fees remitted by users for grid connectivity; (3) the variance in pricing during the settlement of electricity procurement and sales transactions by the ESO with the grid; and (4) the charges imposed by the ESO for the provision of charging services to the EV clusters.
ensures optimal profits for each agent and promotes economic harmony in the se ment of the overall system.
(3) To facilitate the effective resolution of the model, the lower-level MGs model is tr formed into a constraint for the upper-level ESO model, leveraging the derivatio KKT conditions in the master-slave game.Building on strong duality theory, the time communication variable comprising electricity prices and power between upper and lower levels is linearized, thus enabling the rapid and precise solutio the global strategic equilibrium in the multi-level, multi-agent system.

Shared Energy Storage Operator-Multiple-Microgrids System Operation Mode
The principal stakeholders engaged in the collaborative operation of the shared ergy storage operators-multiple-microgrids system (ESO-MGs) consist of the integr energy storage operator.This entity combines scalable electric vehicle storage resou and shared energy storage stations.Furthermore, it interfaces with the multiple-micro system, in conjunction with the higher-level grid.

Service Model of the Shared Energy Storage Operator
Figure 1 provides a visual representation of the orchestration and managemen shared energy storage in the region by the shared energy storage operator.The ES also tasked with overseeing the energy storage assets associated with electric vehicle c ters.While ensuring the complete fulfillment of electric vehicle charging requirem the ESO seeks to cultivate the adaptable characteristics of its load storage resources.T in turn, enhances the efficiency of energy storage asset utilization in the region, while currently offering electricity trading services to the multiple-microgrid system.The r nue streams for the shared energy storage operator are primarily derived from sources: (1) the price differential between the settlement of energy storage and retri transactions between microgrid users and the ESO; (2) the levies levied by the ESO provisioning electricity trading services to users, along with the fees remitted by user grid connectivity; (3) the variance in pricing during the settlement of electricity proc ment and sales transactions by the ESO with the grid; and (4) the charges imposed by ESO for the provision of charging services to the EV clusters.

Microgrid Architecture
From Figure 2, the internal infrastructure of the microgrid comprises renewable energy generation systems (RGs), hydrogen energy systems (HES) (operating in a combined heat and power mode), gas boilers (GB), and electric heating (EH).Predicated on the inter-nal resource allocation, the microgrid optimizes the operational outputs of these devices and manage electricity transactions between microgrids.This optimization is executed with the overarching aim of meeting the demand-supply equilibrium of both electricity and heat loads.The procurement of natural gas, a necessary component for the operation of gas boilers, is conducted through the gas system operator (GSO).

Microgrid Architecture
From Figure 2, the internal infrastructure of the microgrid comprises renewable energy generation systems (RGs), hydrogen energy systems (HES) (operating in a combined heat and power mode), gas boilers (GB), and electric heating (EH).Predicated on the internal resource allocation, the microgrid optimizes the operational outputs of these devices and manage electricity transactions between microgrids.This optimization is executed with the overarching aim of meeting the demand-supply equilibrium of both electricity and heat loads.The procurement of natural gas, a necessary component for the operation of gas boilers, is conducted through the gas system operator (GSO).
The energy trading framework of ESO-MGs is illustrated in Figure 3.  Figure 3 explains the dynamics in the MG system.In situations where there is an excess of electricity, it can be disseminated to other microgrids with electricity requirements through localized transactions.In cases where local consumption does not suffice The energy trading framework of ESO-MGs is illustrated in Figure 3.

Microgrid Architecture
From Figure 2, the internal infrastructure of the microgrid comprises renewable energy generation systems (RGs), hydrogen energy systems (HES) (operating in a combined heat and power mode), gas boilers (GB), and electric heating (EH).Predicated on the internal resource allocation, the microgrid optimizes the operational outputs of these devices and manage electricity transactions between microgrids.This optimization is executed with the overarching aim of meeting the demand-supply equilibrium of both electricity and heat loads.The procurement of natural gas, a necessary component for the operation of gas boilers, is conducted through the gas system operator (GSO).
The energy trading framework of ESO-MGs is illustrated in Figure 3.  Figure 3 explains the dynamics in the MG system.In situations where there is an excess of electricity, it can be disseminated to other microgrids with electricity requirements through localized transactions.In cases where local consumption does not suffice Figure 3 explains the dynamics in the MG system.In situations where there is an excess of electricity, it can be disseminated to other microgrids with electricity requirements through localized transactions.In cases where local consumption does not suffice to absorb this surplus, the excess electricity can be sold to the ESO.Conversely, when a microgrid experiences a deficit in electricity supply, it has the option to acquire electricity from fellow MG system members, and any remaining shortfall can be procured from the ESO.It is essential to note that, due to technical prerequisites and policy constraints that inhibit microgrid users from feeding electricity back into the grid, microgrids are limited to purchasing electricity from the grid or selling surplus electricity directly to the ESO or even discarding it.In its capacity as the custodian of shared energy storage resources and the energy provider to lower-level MGs, the ESO possesses the capability to sell surplus electricity to the external grid and acquire electricity from external sources during shortages.Additionally, the ESO establishes the pricing framework for electricity procurement and distribution with the objective of optimizing its own revenue.

Leader Model of ESO
The shared energy storage operator is composed of shared energy storage and electric vehicle cluster.By orchestrating and managing these two types of energy resources, the shared energy storage operator delivers electric power services to multiple microgrids.
(1) Objective Function The revenue of the shared energy storage operator consists of revenue from purchasing/selling electricity to/from the external power grid, revenue from purchasing/selling electricity to/from multiple microgrids, income from collecting grid usage fees from multiple microgrids, and income from charging fees from the electric vehicle cluster.The shared energy storage operator aims to maximize the sum of these revenues as the objective function.
The upper limits for energy transmission capacities, including ESO to power grid, ESO to MGs, and MG to MG, are outlined in Appendix A, Table A1.The upper and lower limits for the electricity purchase and sale prices from multiple microgrids to the ESO are illustrated in Appendix A, Figure A1.The purchasing and selling electricity prices from ESO to the power grid are illustrated in Appendix A, Figure A2.
In the equation, E ess , E m , and E serve represent the revenue from electricity purchase and sale to the grid, the revenue from participating in electricity trading with MGs, and the revenue from grid connection fees charged to MGs.E c represents the fees paid by the electric vehicle clusters to the operator for charging services.U db , U ds , γ buy,i , and γ sell,i represent the purchase and sale prices of electricity between the ESO and the grid, as well as the purchase and sale prices of electricity between the ESO and MG i .P buy (t), P sell (t), P m,b,i (t), and P m,s,i (t) represent the purchase and sale power between the ESO and the grid at time t, as well as the purchase and sale power between MG i and the energy storage operator.ω serve represents the coefficient fees remitted by users for grid connectivity with ESO.P GES ch (t) and P GES dis (t) represent the charging and discharging power of the energy storage device aggregated by the EV cluster at time t.u represents the utility coefficient of electric vehicles.
(2) Constraints for SES The shared energy storage is a crucial component of the shared energy storage operator.The energy capacity constraints and charge-discharge constraints for the shared energy storage are expressed by the following equation: In the equation, η SOC min and η SOC max denote the charging and discharging depths of energy storage; η ess ch and η ess dis denote the charging and discharging efficiency of energy storage.Additionally, P ess ch,max and P ess dis,max signify the maximum power capacity for charging and discharging, while P ess ch (t) and P ess dis (t) represent the charging and discharging power of energy storage at time t.Moreover, E ess F , E ess (t), ω ess ch , and ω ess dis represent the capacity of energy storage, the capacity of energy storage at time t, and the binary parameters for charging and discharging of energy storage.
(3) Uncertainty Set for EV Cluster Due to the limited size of the EV cluster sample, potential discrepancies may arise between the empirical EV cluster distribution and its actual counterpart [17].Therefore, a data-driven approach becomes essential to depict this uncertainty.The uncertainty set between the empirical and actual EV cluster distributions is detailed below.A comprehensive description of the electric vehicle cluster modeling can be found in Appendix B, Equations (A1) and (A2).
In the equation, Ψ represents the uncertainty set.ρ denotes the vector consisting of uncertain variable distributions, i.e., representing the proportion of each type of electric vehicle.
ρ 0 depicts the initial empirical distribution of uncertain variables, i.e., ρ 0 = ρ n,0 , ∀n ∈ N EV * , representing the frequency of each type of electric vehicle in historical data.θ 1 and θ ∞ indicate the matrix boundaries of the uncertainty set.
According to Zhao et al. and Ding et al. [24,25], {ρ 0 } satisfies the following confidence level: Pr{||ρ In the equation, P max represents the maximum value for electricity purchase and sale, P m,b,i (t) and P m,s,i (t) represent the electricity purchased and sold by MG i from ESO at time t, and ξ i denotes the binary parameter that restricts simultaneous electricity purchase and sale by the Energy Storage Operator (ESO).
(5) Constraints for ESO-Power Grid Interconnection Power In the equation, P grid,max represents the maximum value for electricity purchase and sale by ESO from/to the power grid.µ buy and µ sell represent the binary parameters restricting simultaneous electricity purchase and sale by ESO.
(6) Constraints for MGs Electricity Purchase and Sale Prices In the equation, γ sell,i,min and γ sell,i,max represent the upper and lower limits of the electricity sale price from MG i to ESO and γ buy,i,min and γ buy,i,max denote the upper and lower limits of the electricity purchase price from MG i to ESO. γ buy,ave,min and γ sell,ave,min depict the minimum average value of the electricity purchase and sale prices from MG to ESO; γ buy,ave,max and γ sell,ave,max indicate the maximum average value of the electricity purchase and sale prices from MGs to ESO. (7) Power Balance Constraints In the equation, P GES ch (t) and P GES dis (t) represent total charging and discharging power of EV cluster at time t.

Follower Optimization Model for Multiple Microgrid
The specific modeling of internal devices in the multiple microgrid is shown in Appendix C, Equations (A3)-(A7).
(1) Objective Function MGs aim to minimize operating costs as the objective function.
In the equation, C run , C tran , C gas , and C serve represent the operation and maintenance costs of MGs, the electricity interaction costs, the gas purchase costs, and the grid connection fees paid to the energy storage operator (ESO).ω w , ω pv , ω fue , ω ele , ω eh , and ω GB denote the operation coefficients of wind turbines, photovoltaic power plants, fuel cells, electrolyzers, electric heating, and gas boilers, respectively.c GB depicts the cost of purchasing gas according to unit volume.
(2) Constraints Demand Response in MGs: Heat Balance Constraint: In the equation, n ex represents the heat conversion coefficient of the heat and power cogeneration system with hydrogen storage.
Power Constraint for MG-MG Interconnection Lines: In the equation, I = {i 1 , i 2 , i 3 } represents the set of MGs.P t i,i 2 represents the electric power transmitted from MG i to MG i2 at time t.P max i,i 2 denotes the maximum electric power transmitted from MG i to MG i2 at time t.µ t i,i 2 and µ t i 2 ,i depict binary variables.

Profit Allocation Model for Multi-Microgrid Based on Non-Co-Operative Game
The procedure for modeling electricity interaction costs and profit settlement in a multi-microgrid environment based on a non-co-operative game unfolds as follows.Firstly, the determination of the upper limit of individual rationality (ideal electricity interaction cost) for each participant in the non-co-operative game model is executed, leading to the formulation of the game's strategy set.Secondly, both local and global incentive constraints are imposed upon the non-co-operative game.Finally, leveraging the obtained variable relationships from the modeling phase, the expression for profit settlement among microgrids is derived.In the calculation of electricity interaction costs, it is necessary to establish the upper limit of individual rationality for each microgrid in the non-co-operative game model, sig-nifying the ideal electricity interaction cost settlement.The modeling process for this ideal cost settlement proceeds as follows: Utilizing the electricity interaction volumes between sub-areas acquired during the initial phase, the determination of the worst-case interaction price range (λmin, λmax) becomes essential, ensuring that every sub-area can achieve profitability through electricity exchange, even when procuring electricity at the highest possible price and selling it at the lowest price in this defined price range.The specific solution process is outlined in the following equation: In the equation, λ max and λ min represent the upper and lower limits of electricity prices, respectively.Similarly, e t i , C 0 i , and C share i denote the electricity interaction volume of MG i at time t, the cost associated with independent operation, and the cost associated with participating in electricity interaction.
When an MG procures electricity from other MGs at the lowest available price and sells its own electricity at the highest available price, the resulting cost of settled electricity interaction can be regarded as the ideal electricity interaction cost.This ideal cost serves as the upper boundary for individual rationality in the non-co-operative game involving MGs.
In the equation, C ref i represents the ideal electricity interaction cost for MG i when engaging in electricity interaction.
(2) Construction of Strategy Set for Non-Co-operative Game To encourage MGs to approach the ideal electricity interaction cost as closely as possible, γ ∈ R N is introduced to assess the willingness of the MG to reduce costs.

Local and Global Incentive Constraints for Non-Co-Operative Game Model
The resolution of electricity interaction costs among MGs must adhere to the subsequent incentive constraints: (1) Local incentive constraint: the cost incurred by participating in electricity interaction for an MG must be lower than the cost of operating independently, thus indicating that the MG can derive benefits from participating in interconnection.
(2) Global incentive constraint: in order to ensure fairness in the settlement of electricity interaction costs among MGs and to prevent detrimental competition aimed at cost reduction among MGs, the total cost of electricity interaction involving three MGs must be constrained to zero.
In the equation, π i represents the electricity interaction cost of MG i .

Profit Settlement for MG
The difference between the cost C 0 i of MG i in independent operation and the cost π i + C share i of MG i in interconnected operation can be regarded as the profit of MG i , as shown in the equation below.
In the equation, Pro i represents the profit of MG i .

Mixed-Game Bi-Level Optimization Model Solution
The process for finding a solution to the shared energy storage operator-multimicrogrid master-slave-non-co-operative mixed game is depicted in Figure 4.

Update descion
Variables: ( )  From Figure 4, the dynamic between ESO and the MGs system is characterized as a master-slave game.The ESO, in the role of the master, aims to maximize revenue, whereas the MGs, serving as followers, strive to minimize overall operational costs.Operational states are exchanged between ESO and MGs.Considering that the master-slave game presents a dual-objective optimization challenge, the KKT conditions are employed for a more efficient resolution, converting the dual-level optimization into a single-level problem.Additionally, the application of the strong duality principle helps remove the communication variable product in the dual-level model, thus leading to a solution that meets the requirements of this dual-level optimization issue.The profit distribution in the MGs system follows a non-co-operative game framework.Firstly, the upper boundary of competition and the set of optimization strategies for the non-co-operative game are estab- From Figure 4, the dynamic between ESO and the MGs system is characterized as a master-slave game.The ESO, in the role of the master, aims to maximize revenue, whereas the MGs, serving as followers, strive to minimize overall operational costs.Operational states are exchanged between ESO and MGs.Considering that the master-slave game presents a dual-objective optimization challenge, the KKT conditions are employed for a more efficient resolution, converting the dual-level optimization into a single-level problem.Additionally, the application of the strong duality principle helps remove the communication variable product in the dual-level model, thus leading to a solution that meets the requirements of this dual-level optimization issue.The profit distribution in the MGs system follows a non-co-operative game framework.Firstly, the upper boundary of competition and the set of optimization strategies for the non-co-operative game are established, rooted in the results of electricity sharing from the master-slave game.Secondly, global and local incentive constraints are implemented to manage the competition in the non-cooperative game.Finally, an NI regularization function is devised, transforming the profit distribution issue of the MGs' non-co-operative game into a solvable mathematical model.This model is then progressively resolved using the ADMM algorithm.

Solving the Master-Slave Game Model Based on KKT Conditions and Strong Duality Theory
The master-slave game optimization problem is transmuted into a single-layer mixedinteger linear programing problem through the precise application of KKT conditions and the incorporation of the strong duality theory.The specific constraints introduced for this purpose are depicted in Equations ( 20) and (21).The formulation of the augmented Lagrangian function is detailed in Appendix D, Equation (A8).
(1) Partial derivative constraints In the equation, λ 1 − λ 15 represents the Lagrange multiplier introduced to address the equality constraint.
(2) Complementary slackness condition constraints In the equation, u 1 − u 23 represents the Lagrange multiplier introduced to address the inequality constraint.Due to the nonlinear nature of Equation ( 21), the big-M method is employed to introduce Boolean variables and transform the complementary relaxation condition into a cutting plane constraint.The specific linearization process is shown in Appendix E, Equations (A9) and (A10).
(3) Elimination of bilinear term products using strong duality theory Considering that the lower-level follower model lacks Boolean variables and constitutes a convex function, it adheres to the strong duality principle.This principle asserts that the optimal solution of the lower-level primal problem coincides with the optimal solution of the dual problem.Therefore, in alignment with the strong duality theory, the bilinear term products of electricity price and power in the objective function are substituted with linearized expressions employing dual variables.The detailed linearization method is depicted in Equations ( 22) and (23).
Deriving from the constraints of partial derivatives and cutting planes, the following results are obtained: Substituting Equation ( 22) into Equation ( 8), the linearized expression with the coupling of master-slave game communication variable products is: Substituting Equation ( 23) into Equation ( 1), the final objective function of the masterslave game is as follows: (u 24,i (t)γ sell,max (t) − u 23,i (t)γ sell,min (t) − (u 21,i (t)γ buy,min (t) − u 22,i (t)γ buy,max (t)))

Solving the Non-Co-Operative Game Model Using the ADMM Algorithm
The strategy space of the non-co-operative game comprises two decision variables π and γ, between which there are connecting constraints, Equation (16).Thus, the non-cooperative game is modeled as a regularized NI function.In this model, the iterative process for the two decision variables is divided, and the ADMM algorithm is applied to resolve the non-co-operative game model.The precise steps of this solution method are as follows: (1) Construct the regularized NI function: (2) Update the decision variable π i (k + 1): : According to the aforementioned procedure, the issue is addressed through iteration.Should the convergence criterion in Equation (29) be met, the solution process concludes.In contrast, if the criterion in Equation ( 29) is not fulfilled, the procedure reverts to step 2 for subsequent iteration.This continues until either the convergence criterion is met or the maximum convergence limit is attained.

Case Study Analysis
This article utilizes wind power generation and load data from three adjacent microgrids in a specific area in Xinjiang, China.The count of electric vehicle (EV) clusters amounts to 500.MATLAB 2020 serves as the experimental platform, with the Gurobi solver used for computation.In the non-co-operative game, the ADMM algorithm's upper limit for iterations is 20, with penalty factors and convergence precision established at 2 × 10 −3 and 1 × 10 −10 , respectively.The EVs charging and discharging coefficients and battery capacities are listed in Appendix E, Table A2.The SES charging and discharging coefficients and battery capacities are listed in Appendix E, Table A2.The duration of stay for EVs are listed in Appendix F, Table A3, while the internal equipment parameters of the MGs are available in Appendix F, Table A4.

Scheme Comparison
To verify the effectiveness of the proposed operational optimization strategy in enhancing the economic benefits of energy storage operation (ESO) and reducing MGs' costs, the following scenarios are introduced: Scenario 1: solely considering electricity sharing among MGs without ESO involvement.
Scenario 2: solely focusing on the master-slave game between ESO and MGs, disregarding electricity trading among lower-level MGs.
Scenario 3: incorporating the mixed game involving ESO and MGs and the electricity trading among lower-level MGs.
Specific comparison results regarding benefits and costs are presented in Tables 1  and 2.
Table 1 reveals that, in Scenario 1, the total cost of MGs is CNY 6093.8218lower than that in Scenario 2. Scenario 3, enabled by sufficient energy supply, allows MG to achieve local consumption through peer-to-peer electricity trading, reducing the total cost of MGs by CNY 6673.4779compared to Scenario 2. Scenario 3, integration of ESO, lowers the total cost of MGs by CNY 579.6561 compared to Scenario 1.These results suggest that, on the basis of power sharing in MGs, ESO offering power purchase and sale services to MGs enhances the overall economic and reliable operation.In Scenario 3 compared to Scenario 2, ESO revenue increases by CNY 422.7511, demonstrating that ESO's mixed-game pricing strategy effectively formulates an electricity pricing scheme, maximizing ESO's revenue while minimizing MGs' costs, thus improving co-ordination between ESO and MGs.
To verify the superiority of the proposed non-co-operative game strategy concerning income distribution among lower-level MGs, various validation scenarios are formulated.
Scenario A: allocating MGs' income based on the Nash bargaining solution.Scenario B: allocating MGs' income based on the proposed non-co-operative game.From Table 2, it can be seen that, following the implementation of electricity sharing among MGs, income levels for MGs exhibit varying degrees of improvement.In the income distribution scheme based on the non-co-operative game, MG1 ′ s income registers an increase of CNY 469.2311,MG2 ′ s by CNY 260.0482, and MG3 ′ s by CNY 5944.1985, when contrasted with the co-operative game Nash bargaining solution.This non-co-operative game-based income distribution, as proposed in this study, not only reflects fairness and equity but also aligns more closely with the maximization of individual income.

Shared Energy Storage Operation Analysis
The charging, discharging power, and capacity variations of the shared energy storage are shown in Figure 5.
From Figure 5, it is evident that the SES attains its maximum charging and discharging power at 06:00 and 17:00, respectively.Energy storage levels reach their upper limit at 06:00 and the lower limit at 01:00, 14:00, and 20:00.During other time intervals, the SES effectively maintains the system's energy balance through interactions with other devices in the joint operation system.From Figure 5, it is evident that the SES attains its maximum charging and discharging power at 06:00 and 17:00, respectively.Energy storage levels reach their upper limit at 06:00 and the lower limit at 01:00, 14:00, and 20:00.During other time intervals, the SES effectively maintains the system's energy balance through interactions with other devices in the joint operation system.

Charging and Discharging of Three EV Clusters
The charging and discharging power of the three EV clusters regulated by ESO are shown in Figure 6.From Figure 6, it can be observed that, under the management of ESO, the three types of EV clusters exhibit organized charging and discharging throughout the day.The first type charges at 09:00 and from 15:00 to 17:00, discharging at 10:00-11:00 and 14:00.The second type charges at 08:00-09:00 and 15:00-16:00, discharging at 10:00-11:00 and 14:00.The third type charges at 9:00 and from 15:00 to 17:00, discharging at 11:00-14:00.This

Charging and Discharging of Three EV Clusters
The charging and discharging power of the three EV clusters regulated by ESO are shown in Figure 6.From Figure 5, it is evident that the SES attains its maximum charging and discharging power at 06:00 and 17:00, respectively.Energy storage levels reach their upper limit at 06:00 and the lower limit at 01:00, 14:00, and 20:00.During other time intervals, the SES effectively maintains the system's energy balance through interactions with other devices in the joint operation system.

Charging and Discharging of Three EV Clusters
The charging and discharging power of the three EV clusters regulated by ESO are shown in Figure 6.From Figure 6, it can be observed that, under the management of ESO, the three types of EV clusters exhibit organized charging and discharging throughout the day.The first type charges at 09:00 and from 15:00 to 17:00, discharging at 10:00-11:00 and 14:00.The second type charges at 08:00-09:00 and 15:00-16:00, discharging at 10:00-11:00 and 14:00.The third type charges at 9:00 and from 15:00 to 17:00, discharging at 11:00-14:00.This From Figure 6, it can be observed that, under the management of ESO, the three types of EV clusters exhibit organized charging and discharging throughout the day.The first type charges at 09:00 and from 15:00 to 17:00, discharging at 10:00-11:00 and 14:00.The second type charges at 08:00-09:00 and 15:00-16:00, discharging at 10:00-11:00 and 14:00.The third type charges at 9:00 and from 15:00 to 17:00, discharging at 11:00-14:00.This demonstrates the flexibility of EV clusters in providing load and energy storage resources to ESO.When SES resources are insufficient, EVs release energy to support ESO's power supply services while still satisfying charging needs of customers during their EV stationary periods.The empirical distribution of EVs is shown in Appendix E, Figure A3.

Electricity Price Determination Analysis
The purchase and sale electricity prices set by ESO for MGs are shown in Figure 7.
to ESO.When SES resources are insufficient, EVs release energy to support ESO's power supply services while still satisfying charging needs of customers during their EV stationary periods.The empirical distribution of EVs is shown in Appendix E, Figure A3.

Electricity Price Determination Analysis
The purchase and sale electricity prices set by ESO for MGs are shown in Figure 7. From Figure 7, it can be observed that MG2 has the lowest price of electricity purchased, because it purchases relatively more electricity from ESO, while MG1 and MG3, which purchase almost no electricity, have slightly higher prices.This observation highlights ESO ability to establish a rational electricity price distribution strategy based on real-time electricity procurement data from lower-level MGs, thereby optimizing ESO revenue without imposing undue electricity expenses on MGs.The rationale and determinants influencing electricity sale pricing strategies among MGs align with electricity purchase pricing strategies.

MGs Electricity Trading Analysis
The electricity trading among MGs is shown in Figure 8. From Figure 8, it becomes apparent that electricity sharing primarily occurs in the MG community during two timeframes: 01:00-07:00 and 18:00-24:00.During these intervals, MG1 finds itself procuring surplus electricity from MG2 and MG3 due to a constrained supply of load.Conversely, during the 08:00-17:00 window, MG3 encounters a temporary deficit in internal energy generation, leading to its acquisition of electricity from MG1 and MG2 to balance its energy demands.This observation highlights the role of resource-based electricity sharing among MGs in promoting local energy consumption.Therefore, this practice curtails the need for extensive electricity exchanges between MGs and the central grid, resulting in a more stabilized grid power profile.From Figure 7, it can be observed that MG2 has the lowest price of electricity purchased, because it purchases relatively more electricity from ESO, while MG1 and MG3, which purchase almost no electricity, have slightly higher prices.This observation highlights ESO ability to establish a rational electricity price distribution strategy based on realtime electricity procurement data from lower-level MGs, thereby optimizing ESO revenue without imposing undue electricity expenses on MGs.The rationale and determinants influencing electricity sale pricing strategies among MGs align with electricity purchase pricing strategies.

MGs Electricity Trading Analysis
The electricity trading among MGs is shown in Figure 8.

Internal Operation Analysis of MGs
This section employs MG2 as a case study to dissect the dynamics of energy supply and demand balance.From Figure 8, it becomes apparent that electricity sharing primarily occurs in the MG community during two timeframes: 01:00-07:00 and 18:00-24:00.During these intervals, MG1 finds itself procuring surplus electricity from MG2 and MG3 due to a constrained supply of load.Conversely, during the 08:00-17:00 window, MG3 encounters a temporary deficit in internal energy generation, leading to its acquisition of electricity from MG1 and MG2 to balance its energy demands.This observation highlights the role of resource-based electricity sharing among MGs in promoting local energy consumption.Therefore, this practice curtails the need for extensive electricity exchanges between MGs and the central grid, resulting in a more stabilized grid power profile.

Internal Operation Analysis of MGs
This section employs MG2 as a case study to dissect the dynamics of energy supply and demand balance.

Internal Operation Analysis of MGs
This section employs MG2 as a case study to dissect the dynamics of energy supply and demand balance.From Figure 9, it is evident that MG2 exhibits the lowest electricity consumption during the timeframe spanning from 01:00 to 09:00.Therefore, MG1 refrains from procuring electricity from ESO, opting instead for an internal electricity equilibrium through collaborative electricity sharing.During the peak hours of electricity demand, namely, from 10:00 to 14:00 and 18:00 to 20:00, MG2 elects to acquire electricity from the ESO and facilitate electricity distribution amongst the various MGs to establish interconnectivity.During this interval, the ESO establishes a lower electricity pricing structure for MG2, thus minimizing its operational expenditure.Between 08:00 and 09:00, MG2 engages in the From Figure 9, it is evident that MG2 exhibits the lowest electricity consumption during the timeframe spanning from 01:00 to 09:00.Therefore, MG1 refrains from procuring electricity from ESO, opting instead for an internal electricity equilibrium through collaborative electricity sharing.During the peak hours of electricity demand, namely, from 10:00 to 14:00 and 18:00 to 20:00, MG2 elects to acquire electricity from the ESO and facilitate electricity distribution amongst the various MGs to establish interconnectivity.During this interval, the ESO establishes a lower electricity pricing structure for MG2, thus minimizing its operational expenditure.Between 08:00 and 09:00, MG2 engages in the resale of electricity acquired from other MGs to the ESO, thereby capitalizing on arbitrage opportunities while simultaneously satisfying its energy requisites.This serves as a compelling illustration of MG2 ′ s adeptness in optimizing energy utilization efficiency and realizing economic advantages in the complex framework of multi-level and multi-subject energy interactions.
From Figure 10, it becomes apparent that the hydrogen energy storage (HES), electric heater (EH), and gas boiler (GB) collaborate harmoniously to maintain dynamic equilibrium in terms of heat energy in MG2 during the dispatch cycle.Notably, GB and EH bear substantial responsibility in offering heating services, whereas EHS combined heat and power provision supplies heat during the windows of 10:00-11:00 and 13:00, alleviating the heating burden on other devices in MG2.Simultaneously, between 15:00 and 23:00, coinciding with the period of greater heat demand, the DR mechanism temporarily modifies user heating patterns, resulting in a reduction in heat load.This, in turn, facilitates the equilibrium of heat supply and demand, thereby ensuring the steadfast operation of MG2.
power provision supplies heat during the windows of 10:00-11:00 and 13:00, alleviating the heating burden on other devices in MG2.Simultaneously, between 15:00 and 23:00, coinciding with the period of greater heat demand, the DR mechanism temporarily modifies user heating patterns, resulting in a reduction in heat load.This, in turn, facilitates the equilibrium of heat supply and demand, thereby ensuring the steadfast operation of MG2.

Conclusions
This article delves into the collaborative operational framework of ESO-MGs, proposing a novel hybrid strategy for optimizing gaming in the context of ESO-MGs.It conducts an extensive analysis of the co-operative operational dynamics of ESO and MGs across various tiers and entities.Through an in-depth analysis of energy exchange and profit allocation between ESO and MGs, the efficacy and economic advantages of the suggested approach are duly substantiated.The ensuing observations can be drawn from the empirical analysis: (1) ESO, employing co-ordinated control of EVs and SES, delivers power procurement and sales services to MGs.The hybrid game optimization strategy proposed herein fosters systematic co-ordination, the determination of electricity prices, and equitable profit sharing across multiple hierarchical levels and entities.Therefore, it results in the minimization of ESO expenditures, generating a profit of CNY 5544.4282, while MGs incur costs amounting to CNY 25,806.8069.(2) The inclusion of ESO in the MG environment, alongside comprehensive optimization through the hybrid gaming mechanism, fosters an increased electricity relationship among MGs, thereby enhancing operational flexibility and bolstering system

Conclusions
This article delves into the collaborative operational framework of ESO-MGs, proposing a novel hybrid strategy for optimizing gaming in the context of ESO-MGs.It conducts an extensive analysis of the co-operative operational dynamics of ESO and MGs across various tiers and entities.Through an in-depth analysis of energy exchange and profit allocation between ESO and MGs, the efficacy and economic advantages of the suggested approach are duly substantiated.The ensuing observations can be drawn from the empirical analysis: (1) ESO, employing co-ordinated control of EVs and SES, delivers power procurement and sales services to MGs.The hybrid game optimization strategy proposed herein fosters systematic co-ordination, the determination of electricity prices, and equitable profit sharing across multiple hierarchical levels and entities.In the equation, P ele,i (t) and H ele,i (t) represent the power consumption and heat generation of the electrolyzer inside MG i during water electrolysis at time t.G HHV denotes the high heating value of hydrogen in kJ/mol.n H 2 ,i (t) and η ele,i (t) depict the hydrogen production rate and efficiency of the electrolyzer at time t, respectively.
(2) Proton Exchange Membrane Fuel Cell Energy Conversion Model In the equation, P fc,i (t) and H fc,i (t) represent the power generation and heat generation of the fuel cell inside MG i at time t, respectively.m H 2 ,i (t) and η fc,i (t) denote the hydrogen consumption rate and efficiency of the fuel cell inside MG i at time t, respectively.
(3) Hydrogen Storage Tank Model In the equation, E H 2 i,0 represents the initial hydrogen mass stored in the hydrogen storage tank of MG i .E H 2 min and E H 2 max denote the upper and lower limits of hydrogen mass in the storage tank, respectively.E H 2 i (t) and E H 2 i (t − 1) depict the hydrogen mass in the storage tank of MGi at time t and t − 1, respectively.k1 symbolizes the hydrogen mass conversion coefficient for production/consumption.T 0 and P 0 express the temperature and pressure at 0 degrees Celsius, respectively.ρ H 2 illustrates the density of hydrogen (kg/Nm 3 ).
(4) Electric Heating Device Model In the equation, P eh,i (t) and H eh,i (t) represent the power consumption and heat generation of the electric heating device inside MG i .P eh,max denotes the upper limit of electric heating power.η eh depicts the energy conversion efficiency of the electric heating device.
(5) Gas Boiler Model In the equation, M GB,i (t) and H GB,i (t) represent the gas consumption volume and heat generation power of the gas boiler inside MGi at time t, respectively.H GB,max denotes the maximum heating power of the gas boiler.η GB depicts the operating efficiency of the gas boiler.L NG indicates the high heating value of gas.

Appendix D
The augmented Lagrangian function formulated for reducing the dimensions in the master-slave game is presented in the subsequent equation.
In this equation, M is defined as a sufficiently large constant, while v1-v24 are binary variables introduced to facilitate the linearization process.

3. 2 . 1 .
Upper Limit of Individual Rationality and Construction of Strategy Set for Non-Co-Operative Game Participants (1) Upper Limit of Individual Rationality for Non-Co-operative Game Participants

Figure 4 .
Figure 4. Solution strategy of the two-layer game between generalized shared energy storage service provider and MGs.

Figure 4 .
Figure 4. Solution strategy of the two-layer game between generalized shared energy storage service provider and MGs.

Figure 5 .
Figure 5. Charge, discharge, and energy storage capacity of SES.

Figure 6 .
Figure 6.Participation of EVs in shared energy storage.

Figure 5 .
Figure 5. Charge, discharge, and energy storage capacity of SES.

Figure 5 .
Figure 5. Charge, discharge, and energy storage capacity of SES.

Figure 6 .
Figure 6.Participation of EVs in shared energy storage.

Figure 6 .
Figure 6.Participation of EVs in shared energy storage.

Figure 7 .
Figure 7. Electricity purchase price set by GESO to MGs.

Figure 7 .
Figure 7. Electricity purchase price set by GESO to MGs.
Figure 9 presents the results of electricity and heat optimization efforts undertaken in MG2.The results of electricity and heat optimization efforts undertaken in MG1 and MG3 are shown in Appendix F Figure A4 and Appendix G Figure A5.The internal energy balance within the ESO is shown in Appendix G, Figure A6.

Figure 9
presents the results of electricity and heat optimization efforts undertaken in MG2.The results of electricity and heat optimization efforts undertaken in MG1 and MG3 are shown in Appendices F and G Figure A5.The internal energy balance within the ESO is shown in Appendix G, Figure A6.

Figure 9
presents the results of electricity and heat optimization efforts undertaken in MG2.The results of electricity and heat optimization efforts undertaken in MG1 and MG3 are shown in Appendix F Figure A4 and Appendix G Figure A5.The internal energy balance within the ESO is shown in Appendix G, Figure A6.

Figure A3 .
Figure A3.The empirical distribution of EVs.
t) = P e,load,i (t) − P e,cut,i (t) + P e,tran,i (t) 0 ≤ P e,cut,i (t) ≤ λ e,cut P e,load,i (t) −λ e,tran P e,load,i (t) ≤ P e,tran,i (t) ≤ λ e,tran P e,load,i (t) P h,load,i (t) − P h,cut,i (t) + P h,tran,i (t)0 ≤ P h,cut,i (t) ≤ λ h,cut P h,load,i (t) −λ h,tran P h,load,i (t) ≤ P h,tran,i (t) ≤ λ h,tran P h,load,i (t)In the equation, P e,i (t) and P h,i (t) represent the electric load and heat load of MG i after demand response at time t.P e,cut,i (t) and P e,tran,i (t) denote the reducible electric load and transferrable electric load of MG i at time t.P h,cut,i (t) and P h,tran,i (t) depict the reducible heat load and transferrable heat load of MG i at time t.λ e,cut and λ h,cut indicate the proportion of reducible electric load and reducible heat load.λ e,tran and λ h,tran symbolize the proportion of transferrable electric load and transferrable heat load.

Table 1 .
The benefits of ESO and the costs of MGs under the three scenarios.
Therefore, it results in the minimization of ESO expenditures, generating a profit of CNY 5544.4282, while MGs incur costs amounting to CNY 25,806.8069.(2)The inclusion of ESO in the MG environment, alongside comprehensive optimization through the hybrid gaming mechanism, fosters an increased electricity relationship among MGs, thereby enhancing operational flexibility and bolstering system stability.Moreover, this optimization leads to a reduction in the operational expenses of MGs.(3) At the lower echelons of MG systems, profit distribution, grounded in non-cooperative game theory, accentuates individual propensity towards reaping benefits, thereby increasing the enthusiasm of MGs to partake in electricity sharing, albeit to a certain extent.(4) Through the implementation of precise dimension reduction and linearization methods in the joint operational model of ESO-MGs, leveraging KKT conditions and the principles of strong duality theory, experimental results affirm the favorable solvability characteristics of the derived model.
and Z.Y. performed the data analyses and wrote the manuscript; and J.C., Z.C. and X.F.helped perform the analysis with constructive discussions.All authors have read and agreed to the published version of the manuscript.

Parameter Name Values and Units Device Parameter Name Values and Units
s : 6.4 kWh EV 1,max s : 30.4 kWh Type II EV clustersFigure A3.The empirical distribution of EVs.