Game Theory-Based Bidding Strategy in the Three-Level Optimal Operation of an Aggregated Microgrid in an Oligopoly Market

This paper proposes a new framework for the optimal operation of a microgrid aggregator (MGA) that participates in an oligopoly electricity market. This aggregator obtains an optimal bidding (power and price) strategy for a multigrid (MG) system, i.e., a community MG. Consequently, the granted quantity, i.e., power in the electricity market, is deployed to optimally schedule the MG’s resources to meet demand. As such, as per three-level optimization, the independent system operator (ISO) clears the market with the goal of maximizing the social welfare in the first stage and determining the hourly market price as well as players’ credited power. In the second-level optimization process, the players select the optimal coefficient supply function equilibrium according to the power granted from the market. In third-level optimization, an optimal scheduling for MGs’ resources and demand would be obtained according to the won power in the market to maximize the aggregator profit. In addition, a price-taker MGA is simulated for comparison with the price–maker MGA to highlight the advantage of the proposed technique. Furthermore, a bidding strategy based on game theory is proposed to obtain the optimal price and power of the oligopoly market players and maximize all players’ profits. Finally, a test system including three generators is created to evaluate the performance of the devised bidding strategy. The results show that the proposed bidding strategy can optimally calculate the focal point of the Nash equilibrium (NE) in the oligopoly electricity market.

some of the main challenges that are added to a MG's concept for the optimal operation management of MGs step by step.
MGs are a part of distribution systems that involve distribution generation (DG), load and storage devices. The benefits of using MGs include increased reliability, decreased compensation voltage, increased power quality and decreased environmental pollutants through green energy generators [7], [8], [9]. MGs can participate in the electricity market and provide benefits for their owners. MGs can also jointly create a coalition and submit significant power to the market for competition against large retailers. In this paper, an aggregator combines several MGs as community MGs and participates in oligopoly electricity market algorithms.

B. LITERATURE REVIEW
In prior research activities, various methods have been suggested for MGs to participate in the electricity market. Some studies investigate the different aspects of MG participation in the electricity market mechanism. These methods cover system load and competitors' capacity. In [10], a control configuration in a hybrid AC/DC MG with hybrid energy storage system (HESS) units was presented to control the power, voltage, and stability of the grid. By dividing the utility grid into downstream (including PV, converter, and battery) and upstream (including various three-phase and singlephase loads, distributed generators and HESS units) grids and applying the droop control structure and synchronization of injected power of HESS and SOC, power, voltage and grid stability were controlled effectively in different modes. This article does not use the power market. In [11], an efficient three-phase energy management system (EMS), consisting of day-ahead unit commitment, hour-ahead unit commitment and scheduling during real-time operation, is presented for two connected MGs. Its main aim is daily operational cost minimization while satisfying various technical constraints using advanced optimization techniques. In addition, the efficient day-ahead unit commitment, the 1st phase of the EMS, is based on two stages for optimal scheduling of the energy generated from each source through the following day (24 h). In [12], the authors present the optimal protection coordination (OPC) strategy in the MG that is operated in both grid-connected and islanded modes in the presence of inverter-based DGs and an energy storage system (ESS). Hence, the minimization of the total operating time of dual setting overcurrent relays (DSORs) in primary and backup protection modes is modeled as an objective function. This is of course subject to the problem constraints, such as the limitation of the time dial setting (TDS) and pickup current setting, the sizing limit of fault current limiters (FCLs), and the coordination time interval inequality. In this model, the short circuit current that flows from each relay in the different fault locations is obtained based on the symmetrical fault calculation and optimal operation of the MG considering all its operation modes. In [13], a dynamic optimal scheduling management method is introduced for an isolated and gridconnected MG. Energy resources such as solar, wind turbine, microturbine (MT) and storage systems exist. Additionally, there is a massive possibility of forecast error for renewable resource output. In [14], an MG is taken as a virtual power producer (VPP). The goal is to obtain a management approach for the optimal operation of generation units with controllable loads using a mixed integer linear programming method. The protection constraints, fuel cost, and control problems are handled as the problem's constraints. In [15], an energy management method for an MG system is derived, including renewable resources, diesel generators, storage systems and inelastic and controllable loads. This MG participates in a pool-based electricity market and maximizes its own profit while scheduling resources according to the optimal power obtained from the optimization process. This method works according to the bilevel optimization approach. The optimal hourly power is first submitted to the day-ahead market following the forecast data. The optimal scheduling of the resources is determined by a scenario-based stochastic programming technique. In [16], an optimal scheduling problem is proposed for an MG participating in the day-ahead market. In this context, a multiobjective function including the maximization of MGs' profit and minimization of the operation costs is formulated, and an optimal bidding strategy is conducted according to the buildings' thermal dynamics statuses. These building thermal dynamics are used to compensate for the system frequency fluctuations. In [17], an optimal bidding strategy is developed for an MG that participates in both day-ahead and real-time markets. This bidding strategy involves stochastic parameters such as the output power of the renewable energy resources, fluctuations in load and prices of the day-ahead and real-time markets. In this research, a stochastic/robust optimization approach is deployed to handle uncertainties and minimize the operation costs by a mixed-integer linear programming method.
Many research activities are initiated to enable several MGs to participate in the electricity market. This method increases the amount of power offered to the independent system operator (ISO) and can compete against great competitors. In a community MG, an MG is selected as the master accepting responsibility for offering price and capacity to the market operator. The MG management system is also used to schedule the MGs' resources and loads. In [18], a bidding strategy was proposed for several MGs that are managed by master MGs and connected to the main network. This bidding strategy corresponds to a bilevel optimization procedure. In the first step, an optimal power is determined for each MG, while the optimal electricity traded between the insufficient and surplus MGs is attained in the second step.
Many researchers suggested that the MGA participates in the electricity market instead of the independent MG. In this method, an aggregator is considered to consolidate several MGs and offer price and capacity to the independent system operator (ISO) as well as scheduling MGs' energy resources and demands. In [19], a bidding strategy is proposed for an MGA that participates in the real-time market. At the upper real-time market level, bidding is optimized by a risk-constrained mean variance model to reduce the effects of the uncertainty resource. In the lower market level, an event-driven mechanism is proposed to reach the cleared quantity of the upper market. In [20], several MGAs participate in a joint energy and reserve market. A multiobjective function in which payment costs are minimized and voltage stability is maximized is implemented. A bidding strategy is proposed for MGAs in which capacity is submitted to the day-ahead market. In this optimization, both MCP and LMP methods are used to settle payment costs. In [21], a new model is proposed in which MGs sell their surplus power to the utility. In this regard, there is a two-stage market structure in which aggregators buy power from the MGs in the first stage. In the second stage, aggregators resell power to the utility. This optimization problem is solved via game theory and an existing NE, which depends on the cost function of the MGs. In [22], an aggregator is considered to combine several MGs and submit price and capacity to the market. Thus, MGs schedule sources and demand according to the power that has won in the market. Two strategies, i.e., marginal and nonmarginal, are proposed. In the nonmarginal strategy, the lowest price is offered in the market and the maximal profit is obtained by offer capacity. In the marginal strategy, the maximal profit is obtained by offering price and capacity. In [23], a comprehensive framework is proposed for power exchanges (PXs) in Indian market power. Furthermore, a method to determine the market clear price considering single-and double-side bidding strategies for N bid areas is deployed. In this work, an optimization algorithm is suggested in which an aggregator aggregates several MGs and maximizes their profit.
The market used in this paper is an oligopoly market. In an oligopoly market, all or some of the players are price-maker players (PMPs), which affects the market price. In [24], the offering strategy is proposed for a wind power producer (WPP) that participates in both the day-ahead market and balancing oligopoly market as a PMP. In this reference, a framework, i.e., intraday demand response exchange (IDRX), is proposed that creates the opportunity for demand offer bidding in the market and act as an economic enterprise. In this paper, a PT MGA is simulated in a pool-based market to make comparisons via a PT aggregator. In [25], an optimal bidding strategy is proposed for a producer in a pool-based market and self-scheduling to maximize profits. In [26], a PT bidding strategy is suggested for a thermal unit in a two-stage market in the balancing stage according to payas-bid. In [27], a PT bidding strategy is proposed for a storage system in ancillary services for frequency regulation. Different combinations of DGs for utilizing AC, DC, and hybrid MGs in a multiobjective problem are proposed in [28]. The authors of this article focused on the existing uncertainties, which include solar radiation, wind speed, temperature, and consumer load. In this article, scenario generation is utilized to manage the environment of uncertainty. Buying and selling energy with the upstream network and demand response (DR) planning are undoubtedly among the topics affecting the MG structure that have not been examined in this article. In [29], an expert energy management system is presented to address the difficulty given by the unpredictability of wind power. The EEMS consists of modules for probabilistic wind power forecasting, multiobjective optimization, and energy storage systems (ESSs). The problem is proposed to be solved by a two-stage optimization procedure, with the first step devoted to calculating the power generation dispatch on a Pareto surface, where generation cost and pollutant emissions are two objectives. In the second level, fuzzy set theory is utilized to identify the best compromise solution. The authors concentrated on optimal operation management; however, power exchanged with the substation and DSM, two crucial concepts in optimal operation management and uncertainty management in MGs, were overlooked. Real-time price arbitrage utilizing a Q-learning algorithm is proposed in [30] to optimize the operation of MG storage units. In addition, a double-Q learning method is developed to enhance the precision of arbitrage strategies. However, the real-time market mechanism is considered, but the DSM concept is not modeled to increase storage device income. In [31], a bidding strategy for DR in an electrical market based on game theory is proposed. In this study, the network operator acquires DR services via the DR aggregator. Noncooperative game theory is used to model the competition between DR aggregators. To manage pricing uncertainty in decision-making processes, robust optimization (RO) is utilized. In [32], bi-level mathematical programming is proposed for the optimal operation of a DR aggregator in a wholesale electricity market. The aggregator, which is a strategic player in the real-time market, tries to maximize the portfolio that is composed of some contracts for curtailing and shifting the loads. In [33], a model of competition among DR aggregators is offered to sell the energy stored in aggregated household batteries in an environmental market and trade with other players through electricity market activities. A networked Stackelberg game is used to mimic the competitiveness among market participants. The optimal bidding strategy and Nash equilibrium (NE) are established via game analysis. In [34], the output power of wind turbines and solar PV, the charging/discharging process of battery energy storage, and the real-time pricing of DR programs are managed in an electricity market environment by a distributed energy resource aggregator. A stochastic bidding strategy management is proposed inside a framework for robust optimization. However, according to the authors, the randomness of customer response can reduce the benefits of aggregators and increase the risk of the decision-making process. In [35], a market-based mechanism for increasing DR in the dayahead wholesale energy market is proposed. In this regard, an incentive compensation method is proposed to encourage the participation of DR aggregators in the market. The NE is determined using a game theory model. The dynamic pricing mechanism is defined in [36] as a viable technique for addressing the imbalance between power supply and demand in an electrical market environment. Consequently, an approach based on game theory and the noncooperative Stackelberg model is developed to manage load variations in the electricity system and consumer dissatisfaction. Two utility functions are modeled to meet the power supply and demand objectives. According to [37], DR is a challenging decision-making process since multiple entities must interact. Therefore, the game theory method is appealing due to its capacity to handle complicated decision-making issues. In this regard, a DR method based on Stackelberg game theory is proposed for optimal load control in a real-time pricing environment.
C. MOTIVATION Table 1 shows a review of different papers on the optimal operation management of MGs and the implementation of electricity markets. Deploying the renewable energy resources, ESSs, MTs, and DSM methods, in addition to modeling the single MG or handling some MGs by an MGA are considered as the operation indices. Additionally, the price-maker or price-taker methodologies, implementing game theory methods in addition to different concepts of the electricity market, are considered indices of the market section of the target table. Indeed, considering more indices in the MG's operation can increase model accuracy, while MGA can increase the MG's profitability. On the other hand, the price-maker strategy may lead to increasing profit, as the player can affect the market clearing price.
The lack of a complete formulation motivated us to investigate the optimal operation management of MGs from a complete perspective.
In contrast to [12], [38], [39], a more realistic condition from an economic perspective is achieved by modeling the electricity market in the proposed formulation. Compatibility with the [40] DSM should be considered an effective tool in MG operation. The MGA can participate in the electricity market as a price-taker player (PTP) [15], [16], [17] or PMP [22]. In most cases, renewable energy sources are neglected for simplicity [20], [21], while all energy sources are considered aggregated sources. However, the model is more compatible with realistic conditions if renewable energy sources are considered [17], [18], [19]. Different types of market mechanisms can be joined with MGs' operations, such as exchange [23], pool markets [16], [22], or wholesale energy markets [33].
In some papers, such as [21], [22], [23], [24], [25], and [26], the optimal operation condition is determined without the game theory method, while this method is an effective method for finding the NE point in the optimal operation condition [41]. Some papers neglect the optimal operation indices for simplicity [23], and others do not consider the MG's operation formulation to focus on other concepts [24], [25], [26]. In [28], [29], and [30], the optimal operation management of an MG is modeled without DR and the electricity market. In [41], the characteristics of the real-time market are added to MG's operation model. In [31], [32], [33], [34], [35], and [36], the DR concept in the electricity market is formulated to increase the adoption to reality of MGs' operating conditions. In [37], the DR method is joined to a real-time pricing strategy under general conditions.
As is evident, many articles focus on different aspects of the optimal operation of the MGs while ignoring other aspects. Under this condition, an appropriate formulation is required to cover the target problem while accounting for renewable energy resources, storage devices, DSM, modeling using game theory to solve problems in the electricity market environment, the effects of price-maker and pricetaker players on the profit obtained by various players, and MGAs. This motivates us to present a comprehensive model of the abovementioned problem. In this regard, a three-level optimization problem is proposed. The first and the second steps of optimization problems are to exchange their information to converge to the optimal point. Indeed, the market is cleared in the first level, while social welfare is considered the objective function. In the second level, each player, based on bids of other competitors and its benefit from the first level, updates its bids to maximize its profit. When the first and the second level of optimization problems converge, the MGA tries to schedule the DSM strategy and other resources to maximize its profit (minimize its cost). Furthermore, some practical constraints in each step are satisfied. Based on these explanations, the main contributions of this paper are listed as follows.

D. CONTRIBUTION
Based on the above explanations, the main contributions of this paper are as follows: I) To compensate for the limitations of previous works to provide a comprehensive model of MG operation, a three-level model is presented such that each level is capable of providing a detailed model. The optimal operation management of an MG needs the determination of the power exchange with the upstream network so that the power output of the existing generation units, ESS, and DSM may be managed accordingly. Through the electricity market, the exchange of power with the upstream network is also determined to maximize the players' profits. The ISO must clear the market at the lowest possible price. There are three levels of optimization, and each level can account for a different set of details. II) To improve the benefit of MGs from energy exchange, rather than modeling a single MG, a group of MGs are considered, and an MGA is responsible for operation. In this situation, the MGA can influence the market price like a large generation and behave as a PMP in the market. An oligopoly is an appropriate market model for this mode, as some or all players can participate as PMPs. III) In an oligopoly market, the game theory method is used to obtain the optimal bidding strategy of each player. Each game includes laws and methods for finding NE in the existing equilibrium process. In this paper, a new method is proposed that obtains focal NE in an oligopoly market. In this method, the profit values of players are considered the objective function, while the optimal offered price and capacity to market are defined as the decision variables. Throughout the oligopoly market interaction, the market is initially cleared with initial values of α and β. After clearing the market price and each player's power generation and based on the proposed strategies for the game theory method, α and β are modified to maximize the MGAs' profit and returned to the market process. Few interactions result in the NE point being achieved. This number of iterations is significantly smaller than the number of optimization iterations required to solve this problem with evolutionary algorithms. The remainder of this paper is as follows: the three-level optimization methodology is presented in section II, and the problem formulation, including the objective functions and the constraints in each level, is investigated in section III. Section IV is devoted to the results of implementing the proposed methodologies on the case study. Finally, some relevant conclusions are explained in section IV.

II. THREE-LEVEL OPTIMIZATION FRAMEWORK
This section presents the input-output variables to each level of the proposed framework for the three-level game theorybased optimal bidding strategy method in addition to the optimal operation of the aggregated MG in an oligopoly market considering the DSM problem. Fig. 1 shows an overview of the proposed problem. The first and second levels of the optimization problem exchange their variables to converge to an optimal point. The MGA and some other competitors are the market participants. The structure of the proposed three-level optimization is presented in Fig. 2. In the first optimization level, the offered price and power of the MGA and other competitors are imported to the first level of the optimization problem. As a consequence, the market is cleared by considering the social welfare objective and some other practical constraints. Then, the won players and corresponding powers and hourly market price are exported to the second level of the optimization problem. In the second level, the optimization process is solved to maximize the MGA's profit and the profit of other competitors through a game theory model. Here, the price and power offered by the MGA and other competitors are updated, and this information is sent to the first-level problem. This process is continued until the value to market offered by the MGA and other competitors is constant. Here, the exchange power between the MGA and market is cleared, and the third-level optimization problem can be solved to maximize the profit of the MGA by defining the optimal dispatch of resources, batteries and load shifting in the target MG. In the following, first, the optimization problem in the third level is formulated, and then, the first and second optimization levels are formulated as conjunction problems.

A. OPERATION MODEL
This study presents an operating model based on threelevel optimization, which is explained in this section. In this concept, an aggregator represents several MGs, including PVs, wind turbines, batteries and MTs, that participate in the oligopoly power market. First, the aggregator offers the surplus capacity of the MGs to the market. The ISO then clears the market and announces the won power of each player and the hourly market price. The players update their offer's power and pricing before representing it to the market. This procedure continues until NE is reached. Finally, the aggregator schedules the resources and MG's demand based on the market price and the capacity they have won. Fig. 2 illustrates the operation of this model.

III. PROBLEM FORMULATION
In this section, the proposed three-level optimization problem is defined.

A. OBJECTIVE FUNCTION
The main objective of this paper is to maximize MGA profit. which is defined as the MGA revenue from selling power in the market minus the MG's operation costs. This profit is formulated as follows: The first part of this formula represents the mismatch power cost between the won power in the market and the available power for selling to it, i.e., p insufficient h is insufficient power between the won power in the electricity market and the available power.

B. CONSTRAINTS
The proposed problem with constraints includes the following: -Available power from the MGA In constraint (3), p A h is the maximum power available from the MGA in timeslot h. Indeed, this parameter shows the total power that can be produced by the MGA in timeslot h.
-Total demand of the MGA In constraint (4) p offer h,MGA is the power offered to the market through the MGA.
-Mismatch power for selling to the market p insufficint h is the difference in power between the power won by the MGA in the market and the available power to deliver to it.
-Maximum charge/discharge powers and charge/ discharge status -Energy available from batteries E h,b is the available energy in battery b in timeslot h,E h−1,b is the available energy in battery b in timeslot h-1, and h is the time interval for the charging/discharging process.

C. MARKET MODEL AND OPTIMAL BIDDING STRATEGY
In this paper, an oligopoly market is modeled, and it is assumed that all the participants cooperate as PMPs, which means they have the ability to affect the market price. Based on the definition, PMPs can forecast the information of their competitors and then offer an optimal price and capacity to the power market [22].
Here, a supply function equilibrium (SFE) is used to offer the price and power of each user to the power market [23]. This model is formulated as follows: where λ offer h,k and p offer h,k are the offered price and the power of player k in timeslot h, N p is the number of players, and α k and β k are the SFE coefficients of player k.
A three-level optimization model is deployed to achieve an optimal bidding strategy for the MGA that results in scheduling the MG's resources and demand. In the first step, the market is cleared by the ISO, and the hourly price of power and the won players are defined. In this step, a social welfare objective function based on (20) is maximized as follows [24]: where S is social welfare, α v and β v are the coefficient vectors of SFE and P is the bidding power vector.
Equation (21) indicates how to determine the market price. d system h is the total system demand in timeslot h, and µ win h,k is a binary variable that indicates the winning or losing status of player k in timeslot h. Player k is the winner in timeslot h, i.e., µ win h,k = 1, and the loser in timeslot h, i.e., µ win h,k = 0. λ min h,k , λ max h,k p min h,k and p max h,k are the limits of the offered price and power of player k in timeslot h. Fig. 3 represents how the market price is determined considering (21).
The process of optimally bidding the price and power in an oligopoly market by the MGA is the subject of the second optimization level [42]. Indeed, objective (24) is optimized while constraints (25)-(26) are satisfied.
P win h,k defines the power won by player k in timeslot h. Constraints (25) and (26) are the range of the SFE of player k.
By definition, NE is actually an agreement between all players, so the goal of all players is met as much as possible There are many methods of achieving NE (NE) in a problem using a game theory model [42]. Since implementing an oligopoly market needs to satisfy NE, an effective game theory-based method is proposed to handle the NE equations. Multiobjective evolutionary algorithms with many iterations may find NE. Note that multiobjective evolutionary methods are also used to satisfy the NE in a problem [43], but they suffer from a large number of iterations to reach a suitable solution, while the number of objective functions is the number of players.
Basically, a game method contains some rules that all the players are aware of. Additionally, the game method may have several NEs, while the result with the highest probability is called the focal NE [43]. Despite the evolutionary methods in which the NE strategy is selected randomly, in the game theory-based method, selecting the strategy is a smart process.
Indeed, the game theory method determines the offered power and price for each PMP in an acceptable range while the NE constraint is satisfied and the profit of each player is maximized. The target acceptable range for each player is defined as follows: MC h,k is the marginal cost of player k in timeslot h. Based on the proposed method, NE is satisfied by implementing the following steps: 1. In the first step, the players submit their maximum price and capacity (α max , β max ). Then, the ISO can clear the market and determine the won power of each player.

2.
In the second step, the following sub-steps should be followed.

A:
If the MGA's profit is positive and won power is equal to offered power, the offered price and power are the same as the offers in the previous iteration (α iter+1 = α iter , β iter+1 = β iter ), where 'iter' is the number of iterations.

B:
If the MGA's profit is positive and the offered price is equal to the market price, this player is a marginal player and can offer the maximum price and maximum power (α_(iter+1) = α_(max), β_(iter+1 ) = β_max).

C:
If the profit is negative and the offered price in the previous iteration is greater than the minimum offer, the offered price and power in the next iteration are set to the minimum price and power (α iter+1 = α min , β iter+1 = β min ).

D:
If the profit is negative and the offered price in the previous iteration is the minimum offer, the offered price and power in the next iteration are set to the maximum price and power (α iter+1 = α max , β iter+1 = β max ), respectively. The game theory method is implemented in each hour to calculate the hourly bid. In this regard, corresponding to each hour, an iterative loop is executed, and based on the profit of each player and the won power in the market mechanism, a strategy is selected from four proposed strategies. As each iteration shows, the problem is switched between the first and second optimization levels. This process is repeated until the offered powers and costs of all players in two consecutive iterations are constant. These values are named the NE point since none of the players change their bids (i.e., offered cost and power to market).
If the NE is satisfied, the process is stopped, and the offered power and price for each player are exported; otherwise, return to step 1. Fig. 4 shows the flowchart of the proposed PMP bidding strategy for every player for each time slot.

D. PRICE-TAKER MGA
To compare with the PM (price-maker) model, a PT (pricetaker) model for the MGA is presented in this section. In this model, the players cannot affect the market price, so the ISO determines the market price and won power considering an objective function and constraint. Here, the three-level optimization problem is changed to bilevel problems. In the first level, the market is cleared by the ISO to minimize the market clearing price, which is formulated as follows: In the second level, resources and demands are scheduled based on the objective function and constraints presented in (1) and (3)-(18), respectively.

IV. RESULTS AND DISCUSSION
In this section, the results of implementing the proposed method are presented to clarify how different aspects of the three-level optimization methodology can affect the MG operation condition. Some assumptions are made in the proposed formulations, which are listed as follows: -In the oligopoly market model, all participants can estimate the information of their competitors using statistical methods derived from their own records. Therefore, their historical information must be accessible.
-To simplify the process of solving the problem, it is assumed that renewable energy sources produce energy at no cost. -MGA's competitors are all diesel generators. -In the suggested system, the MGA is merely a regulated unit, with no benefits in any of its MGs. -If, for any reason, the MGA is unable to provide a portion of the power it offers, the ISO is able to obtain it at the market price. The MGA charges this fee.

A. INPUT DATA REQUIREMENTS
In this paper, an aggregator handles several MGs to create a large-scale network to participate in an oligopoly market. The target large-scale MG includes 180 wind turbines, 50 MTs, 50 solar arrays and 40 vanadium redox batteries with maximum capacities of 18, 12, 5 and 4 MW. The initial energy of the battery units is assumed to be zero. Information about battery units and MTs is given in [22]. The MG's load and resources are scheduled by the MGA for a 24-hour time horizon. The forecasted information of competitors is given in [22], and the shifting information and cost of customer load transfer are given in Table 2. The costs of renewable power deviation and forecast power profile of solar units and wind turbines, as well as the aggregated MG's demand and system demand, are given in [22].

B. RESULTS
The results of different investigated scenarios are as follows:

1) COMPARING PMP AND PTP STRATEGIES
In this section, the results of implementing the PM MGA methodology in an oligopoly market are investigated and presented in Table 3, while the MGA's profit is set to $75146.56.
To make a suitable comparison, the results of the PT MGA participating in a pool-based market are presented in Table 4. In this case, the aggregator profit is equal to $70624. 26. Participating in the MGA as a PMP can increase profit. Since the PMP should supply a considerable amount of load, a single MG cannot participate in this condition. Instead, several MGs can affect the market clearing price as a significant participation. By analyzing the results of Tables 3 and 4, some points are identified: 1) Since the PMPs submit their offers based on forecasted information of other competitors, P insufficint is zero in all timeslots, and there is no imbalance between submit capacity and market available power. However, in PT methodology, in some hours, i.e., 2, 4, 8, 14, 15, 16, 19, 21, 22, 23 and 24, there is an imbalance between submit capacity and market available power. 2) As seen in the achieved results, the cleared market prices are equal in both the PM and PT methodologies. However, the power won by the MGA in the PM condition is smaller than that in the other conditions. Since the MTs produced expensive power between different sources in MGs, the additional won power in the PT methodology results in a decrease in the MGA profit. 3) By comparing the results, the PMT has a smaller percentage of load shift utilization than the PTP. However, the load shift profit in PMT mode is greater than that in PTP mode. Since the PMP is able to predict the market information of its competitors, it selects the proportion of load shift and its hours to maximize profit. In PTP mode, however, it decides the percentage of load shift and hours based on its costs because it is unaware of its competitors' circumstances. In conclusion, despite the higher proportion of load shift in the PTP than in the PMT, less profit is generated. 4) Each battery has a predetermined efficiency coefficient [44], which indicates that some energy is lost during battery charging and some amount is lost during battery discharge. Therefore, when battery usage increases, so does the operator's loss cost. According to the results, 3 MW of battery discharge is utilized in PMP mode, while 5.6 MW is used in PTP mode. Since the PMP can estimate competitor and market information, it uses more renewable resources and fewer batteries to sell electricity, especially during peak hours. However, the PTP optimizes based on MG generation costs and lacks market information. As a result, it may charge the battery during peak hours, increasing its operating costs and decreasing its profit compared to the PMP mode.

2) LOAD SHIFT ANALYSIS
As presented in the previous section, the load shifting strategy is an important tool in the optimal operation management  of MGs in the third level of the optimization process. Here, some sensitivity analyses are deployed to investigate how the MGA profit and the charging/discharging power of batteries can be affected by the load shifting mechanism. In this paper, Fig. 5 shows the MGA's profit versus load shifting value in percent. This is an upward chart and shows that the MGA's profit increases by increasing the load shift percent. Indeed, increasing the value of the load shift results in reducing the aggregator demand in peak hours; thus, the aggregator can submit more power to the market in these hours, which leads to increasing profit. Fig. 6 shows the maximum battery charging power versus load shifting value as a percentage. The charging process occurs in off-peak hours. Additionally, by increasing the load shifting value, the peak loads are shifted to these hours, so this curve has a descending slope. The load shifting value can affect the optimal battery capacity in a typical MG. Fig. 7 shows the discharging power of batteries in aggregated MGs, which has an ascending slope, confirming the effects of load shifting on battery charging/discharging power. Overall, increasing the load shifting value can increase the MGA profit, while this benefit is limited by the battery charging process in off-peak hours. Fig. 8 presents the power won by the MGA in the electricity market versus the load shifting value as a percentage. Increasing the load shifting value can enhance the MG load flexibility, so the MGA can gain more profit from selling power to the market.
A comparison between the three different methods of DR is presented in Fig. 9. The load shifting method has a better condition than the other methods.

3) PROPOSED BIDDING STRATEGY RESULTS
The following are the outcomes of the proposed PMP bidding strategy based on Table 5: 1. At all hours, the MGA's price is lower than that of its competitors. Due to the MGA's utilization of renewable resources, its operating costs will be lower than those of other participants, resulting in reduced pricing. These results demonstrate the precise adaptation of the proposed method for calculating margin profits of the MGA. 2. When a player's bid matches the market price, it offers its highest bid. Because this player is in a condition where any price proposed will be identical to the market price, negotiation is unlikely (i.e., marginal player), according to 2.B.
If the MGA wants to improve the probability of becoming the marginal player, the coefficient of 1.2 in Eq. (28) should be increased. 3. If the profit associated with the power won by a player is less than the cost of generating power (negative profit), this player will offer the greatest price to prevent this negative profit, according to 2.D. This procedure is depicted on the left side of the flowchart in Fig. 4.

4) THREE-GENERATOR PROBLEM
To investigate the proposed bidding strategy method in an oligopoly market and validate the achieved results, a bilevel optimization method is deployed on a three-generator problem that participates as a PMP in the market mechanism.
The generator information is given in Table 6, while the system load is shown in Fig. 10. A comparison study is performed by deploying the proposed particle swarm optimization (PSO) and cheetah optimizer (CO) method [45], i.e., powerful evolutionary methods, on (21) as the objective function of the first-level optimization problem  considering (22)-(24) as the problem constraints and (25), (26) and (27) as the objective function and constraints of the second-level optimization problem. The achieved results of the proposed bidding strategy and PSO and CO algorithms are shown in Tables 7 and 8, respectively. The results show the following: 1. The players won equal powers in both methods. In offpeak hours, since G3 cannot win any power, it offers the maximum price, which leads to an increase in the market price. In the case of deploying PSO, in offpeak hours, G3 offers the minimum price, resulting in a decrease in the market price. As seen, G3 won   all the power but in different market prices, which confirms that the proposed bidding strategy method can achieve more profit than the PSO method from the market participants' point of view. Table 9 represents the generator profit in both methods. Table 10 shows the profit of G3 in timeslots 11 and 21 deploying the proposed bidding strategy and the PSO method. In both time slots, the proposed bidding strategy makes more profit in fewer iterations than the PSO algorithm. 2. The proposed game theory-based method may have several NEs. However, the focal NE that is chosen by players is the point with the highest probability.
The results show that the evolutionary methods may become trapped in local optima before reaching the foal NE point, while this point is achieved by easily deploying the proposed method. 3. The findings of this problem indicate that the proposed method yields a higher market price than the PSO  algorithm over the majority of hours, especially during peak hours. During peak hours, the capacity won by each player is more than that during nonpeak hours, which is consistent with both the recommended bidding strategy and the PSO algorithm. Since the profit of the players is proportional to the product of the market    price multiplied by their winning power, increasing the market price in the suggested bidding strategy results in a greater profit for the players than the PSO algorithm. 4. However, the results of CO and the suggested technique are comparable, although the proposed method can obtain the best solution in a small number of iterations, whereas evolutionary algorithms require a larger number of iterations.

5) COMPARISON STUDY BETWEEN DIFFERENT METHODS
A comparison study between the proposed method and models 2, 3 and 4 from [22] is presented in Table 10. The selected models from [22] deployed a pool market in a bilevel optimization problem, while implementing the oligopoly market beside these models increases the number of decision variables. The results of Table 11 confirm that the proposed three-level optimization problem leads to more profit than the models presented in [22].

V. CONCLUSION
This paper proposes a three-level optimization problem to make the MGA ready to participate in an oligopoly market. In this paper, several MGs are aggregated to be controlled by a single MGA to submit the aggregated offer to market on their behalf. In the first level of optimization, the market is cleared by the ISO, and the power exchanged with each competitor is determined. In the second level of the optimization problem, the offered price and power capacity of all participants are determined. Obviously, the optimization problems of the first and second levels exchange their information to reach a compromise solution as an NE point. A game theory-based method is used to determine the optimal bidding strategies between different competitors in the second level of the optimization problem. To increase the MG's flexibility, a load shifting strategy is deployed in the MG.
In the third level, the optimal operation problem of the aggregate is implemented using a GWO method. To investigate different aspects of the proposed problem, different case studies are presented. Table 12 shows a summary of the players, strategies and payoff function as three important concepts in game theory in the proposed method. The achieved results completely define the effects of the load shifting level and its coordination with the battery exchange power. Furthermore, the results of the study comparing the PM and PT strategies are analyzed thoroughly.
To make a comparison between the game theory and evolutionary methods, a three-generator case study is modeled, and the achieved results are compared with the PSO and CO methods to validate the effectiveness of the proposed method for finding the focal NE point.
Modeling the MGs in island mode in addition to the other practical constraints, including the power flow limits, contingencies, frequency constraints and voltage limits, are the main topics of future studies. Furthermore, the reserve and ancillary service markets can be added to the proposed method, while the other markets, such as peer to peer, can also be investigated. Since the uncertainty parameters have a significant effect on the performance of MGs and their participation in the electricity market, calculating the uncertainty and developing a robust method are crucial topics for future research. Additionally, deploying a powerful evolutionary method can merge the first and second levels of the optimization problem. Adding some new constraints can merge the second and third levels of optimization problems, which are the main topics for future works. MOTAHAREH POURBEHZADI (Member, IEEE) received the Ph.D. degree from the Shiraz University of Technology, in 2021. She is currently pursuing the second Ph.D. degree in big data analytics with the Muma College of Business, University of South Florida. She has also been a Researcher and a Data Scientist at the University of South Florida, since 2019. Her main research interests include optimization, machine learning, security and privacy of big data systems, and healthcare analytics. She is among the top-10 reviewers of the ISTE journal. She serves as a Reviewer for the IEEE TRANSACTIONS ON IAS.

CO
GITI JAVIDI (Member, IEEE) received the B.S. degree from the University of Central Oklahoma, Edmond, OK, USA, and the M.S. and Ph.D. degrees from the University of South Florida. She is currently working as a Faculty Member at the University of South Florida. She has a long list of publications and research grants, including projects with NASA, NSF, MSIP, and industry partners. Her main research interests include human-computer interactions, data visualization, and STEM education. She has been involved in teaching computer science and researching in that area for the past 16 years.
EHSAN SHEYBANI (Senior Member, IEEE) received the B.S. degree in electrical engineering from the University of Florida, the M.S. degree in electrical engineering from Florida State University, and the Ph.D. degree in electrical engineering from the University of South Florida. He is currently working as a Faculty Member at the University of South Florida. He has been involved in teaching, practicing, researching, and consulting applications of DSP in technology, system analysis, and data science for the past 20 years. He has a long list of publications and research grants, including projects with NASA, NSF, NIH, DoD, DEd, and industry partners. His main research interests include communication, signal processing, and data analysis.