Economic Mixed-Integer Model for Coordinating Large-Scale Energy Storage Power Plant with Demand Response Management Options in Smart Grid Energy Management

The use of energy storage power plants (ESPP) seems necessary to create flexibility in the operation of smart grids and increase economic benefits. The power storage power plants connect directly to the smart distribution substation (DS), saving energy costs and increasing energy efficiency. Also, demand response (DR) program management has improved the performance of smart grids by shifting loads. In this regard, the main challenge is the optimal coordination between these two problems by considering control challenges such as limiting the number of charge/discharge times and the number of hours of DR implementation using a linear model that can be solved with powerful commercial solvers. In this paper, we proposed an economic mixed-integer linear programming (MILP) model for optimal coordination of DR and large-scale ESPP considering the practical limitations of charge/discharge times and DR action times with optimal management of distributed generation (DG) resources, which provides more realistic results due to the constraints in operating times in both DR and ESPP. To validate and analyze the proposed model, a standard 33-bus distribution network with a standard Vanadium redox battery power plant and a large 874-bus system with three Vanadium redox battery power plants are considered. Various scenarios have been considered to demonstrate the constraints imposed on the demand side management program and battery charge and discharge, the results of which show that these constraints have a significant impact on the objective function of the problem. Also, by comparing the proposed method with other methods, it was found that the proposed method is more efficient in improving the objective function and limiting options.

The purchasing the price of energy from the transmission network at low, medium and high fee time periods, respectively. The investment cost of the energy storage plant. The number of deferring years. Cut current peak load by energy storage system Load demand increases each year. , The inflation and discount rate, respectively.
, Fixed and variable operating and maintenance specific costs of the energy storage plant, respectively, The energy storage plant efficiency Energy storage plant capacity The percentage of shiftable load The amount of shiftable demand at the time t.
, The active load in the nth node of the smart grid at time t. The binary variable corresponding to the demand response program at time t.
The number of hours of the authorized demand response program. 3 The maximum of substation load. Upper limit of real power flow on line ij. , , , The lower and upper bound of the active power of dgs at node n in the distribution grid, respectively.

Variables:
The profit of the energy trading of the energy storage management. The profit from reducing transmission access cost. The profit from deferring facility investment through energy storage management. The investment cost of energy storage plant. The operation and maintenance cost of the energy storage plant. Index of hours. n Index of nodes.

Mathematical notations:
∑ Summation sign. max Maximization. ∈ Element of. ≤ Less than or equal to. ∀ For all.

I. INTRODUCTION
With the development of technology in smart grids, it is possible to effectively develop demand response management programs to increase energy efficiency alongside energy resources and energy storage systems. One of the main benefits of a demand response management program is the reduction of network peak load. Economically, demand response management, along with other intelligent technologies such as distributed generation resources and energy storage systems, will increase network efficiency and reduce energy purchase costs [1]. Independent system operators (ISO) can use the flexibility of demand response management programs to maintain reliability cost-effectively [2]. Utilizing demandside flexibility through aggregators is a new move that distribution system operators are interested in, leading to power balance in the primary substation or voltage regulation in the secondary substations [3]. In this paper, the demand side management program is used to increase productivity in smart grids and reduce economic costs This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. Large-scale energy storage systems are a reliable solution to increase the flexibility of smart grids. Energy storage systems with optimal charging and discharging of electrical power can reduce peak grid load, increase profits, and reduce costs associated with purchasing energy and investing in new equipment. Large-scale energy storage systems make it possible to increase the flexibility of sustainable grids compared to conventional grids and to have a more flexible network with distributed generation (DG) resources [4].
In reference [4], the authors have used battery storage to reduce investment and operation costs, as well as to reduce load shedding. In [5], a multi-objective function is proposed to reduce power fluctuations, reduce network frequency fluctuations as well as definitively reduce the power of renewable resources in the framework of energy management by large-scale battery storage. In [6], different types of battery storage are introduced, and then the batteries used in California electricity transmission, distribution, and subscriber networks are presented. In [7] the authors have used energy storage to regulate the frequency of smart grids, energy arbitrage, peak reduction, reduction of power fluctuations of renewable energy sources (RES), which is not possible without energy storage. In [8] the authors presented an improved gray wolf optimization algorithm to solve the optimal scheduling problem for battery energy storage systems (BESS), taking into account the mass integration of renewable energy resources, such as solar and wind energies in active distribution networks. Reference [9] proposes a data-based approach to virtual power plant resource planning, in which the amount of battery energy storage and customer choice of demand response are synergistically optimized to maximize the profitability of virtual power plants in the electricity market. Reference [10] examines the effect of energy storage systems' performance on voltage stability and quality of local power systems. Reference [11] introduces the application of large-scale energy storage technology and the role of battery energy storage support for global energy interconnection. Reference [12] provides a method for optimizing the lowest cost of production assets while explicitly meeting the reliability constraints of microgrids capable of actively managing demand. The battery management model considers the kinetic limitations in the battery performance and indicates the field dispatch to adjust the discharge depth. A new approach to optimize charge/discharge scheduling of battery energy storage systems in advanced microgrids is proposed based on the power-based router power-sharing structure in the reference [13]. In [14] the authors proposed a robust mixed-integer model for optimal scheduling of integrated energy storage with devices which can replace conventional normally open points in distribution grids.
In [15], the voltage stability index and the expected energy not supplied of the distribution networks are investigated in the distribution network's dynamic balanced and unbalanced configuration, including renewable energy sources and electrical energy storage systems. In Reference [16], a flexible DC power distribution network, based on compatibility algorithm theory discusses the advantages and disadvantages of centralized control and distributed battery control. In [17], the authors invest in coordinated transmission and storage systems under the uncertainty of a central planner. This aims to achieve efficient expansion of transmission and storage that minimizes investment costs while achieving effective efficiency of a power system with high penetration of renewable energy. Reference [18] presents a theoretical model of non-cooperative competition that collects demand-response competition to sell energy stored in storage devices. Reference [19] presents a method for data mining plug-in electric vehicles based on the factor analysis method for energy storage and DG scheduling in the active distribution network. In the study [20], the authors proposed allocating hybrid energy storage capacity for the active distribution network according to the demand side response to reduce losses. In the reference [21], an extensive study has been conducted on the optimal allocation and control of energy storage systems. In [22] proposes a predictive model-based ramp minimization in an active distribution network using energy storage systems. A flexible distributed demand response program integrated with electricity storage systems for residential consumers is presented in [23] to maximize their comfort level. About [24], a novel flexible energy building concept, based on smart control, high-density latent heat storage, and smart grids, is proposed to predict the best operational strategy according to the environmental conditions, economic rates, and expected occupancy patterns. The main purpose of reference [25] is to investigate the long-term effects of the proposed demand-side program and its impact on annual peak load forecasting important for strategic network planning. Reference [26] provides an overview of electrical energy storage technologies, materials, systems, challenges, and prospects for large-scale network storage. Reference [27] proposed an optimal demand response control for a residential photovoltaic (PV) storage system using rulebased energy pricing constraints to minimize system energy costs. Reference [28] discusses the effect of battery energy storage systems on the stability of distribution networks with high penetration levels of inverter-based distributed generation. In [29], coordinated voltage control is proposed for the active distribution network concerning the effect of energy storage using the adaptive particle swarm optimization algorithm. In [30] presents a model for evaluating the impact of energy storage costs on economic performance in a distribution substation. Reference [31] provides an evolutionary algorithm to solve the energy management problem of a large-scale energy storage system in a distribution substation. Reference [32] presents the effect of aggregating commercial batteries on reducing the peak load of a local distribution substation. Reference [33] uses a large-scale vanadium redox flow battery to reduce the peak load of smart grids and frequency control.
For easy understanding, the differences of this article with similar papers are presented in the form of a taxonomy table. The table 1 shows a comparison between similar papers and this paper in the literature review.
This paper P P P P P P

A. Motivation and Contribution
As can be seen in Table 1, most references have shortcomings, which have been addressed in this paper. For instance, references [6] and [14] have not considered operational constraints on the number of charge/discharge times in the storage problem and the number of hours allowed in the demand response program. References [8,13,16,19] have considered limiting the number of charge/discharge times to increase the life of storage devices, but the modeling effect of this limitation is not shown in the results. Reference [20] has not considered the effect of limiting the number of hours allowed to a demandside management program. Reference [9] has considered the number of hours allowed for the demand response program, but the number of times the battery is charged and discharged has not been presented, as well as grid modeling. Also, the effect of limiting the number of times the demand response program is allowed is not shown in the results.
In this paper, an energy management model is presented by placing a large-scale energy storage system in the distribution substation and considering the problem of demand-side management with distributed generation sources. And the effect of limitations such as the number of times the battery is charged and discharged and the number of hours allowed by the demand response program is well illustrated in the results to provide more realistic results.
This paper aims to increase the efficiency of distribution networks using integrated energy storage power plant management and demand response using a mixed-integer linear programming model. In this study, we presented a large-scale 874-bus distribution network with a 33-bus network to demonstrate the effect of the proposed model on each system. The main contributions of this paper are as follows: 1. Provide a new mixed integer linear model for coordinating energy storage power plant management with demand response by considering management options to control the number of charge and discharge times and control the number of hours allowed to the demand response program. 2. Considering the distribution grid to more accurately model the problem and the impact of resources in the distribution grid on the optimal management of the storage power plant in the distribution substation. 3. From a case study point of view, modeling a large 874-bus distribution system to demonstrate the performance of the proposed model. The paper's organization is as follows: After provisioning of the introduction in section I, the proposed mathematical model is provided in section II. Section III is devoted to the numerical case study. Finally, section IV concludes the paper.

II. MATHEMATICAL MODEL
In this section, we present the proposed model. The objective function is presented as: The objective function (1) consists of six terms, including three benefits and three costs, where ! "#$ is the profit of the energy trading of the energy storage management, ! !(&)# is the profit from reducing transmission access cost, and %./ is the profit from deferring facility investment through energy storage management. Where "#0 is the investment cost of the energy storage plant, and *$ is the operation and maintenance cost of the energy storage plant, and = 6 45 45 7 ! is the annualized factor. %&' and $*)!+ are the number of working days and months of the energy storage power plant in a year, respectively. is the number of operation hours of energy storage power plant in a day and finally, and are inflation and discount rate, respectively.
Equations (1a) -(1e) to represent the terms used in Equation (1), including the profit of energy trading, the profit from transmission access cost reduction, the benefit from deferring facility investment, the energy storage power plants investment cost and the operation and maintenance cost of the energy storage power plants.
where ! 0( is price of energy at time t, ! 8+ and ! %/# are charge and discharge power of the energy storage power plant, respectively.
where 9 , $ and + are the purchasing the price of energy from the transmission network at low, medium and high fee time periods, respectively.
where /)@ is the investment cost of the energy storage plant and Δ is the number of deferring years. The deferring year Δ obtained by Δ = . where is the cut current peak load by the energy storage system and is the load demand increase each year.
"#0 = 0 ( $&J ) + < ( $&J ) (1d) where 0 and < are the peak and energy-specific costs of the energy storage power plant, respectively. $&J and $&J are the peak power and maximum energy capacity of the energy storage power plant, respectively.
where $. and $@ are fixed and variable operating and maintenance specific costs of the energy storage plant, respectively, and &))>&9 is the annual discharge energy of the energy storage plant.
The constraints considered in the proposed model, which include energy storage plants and demand response program constraints, are given in Equations (2) to (12). The state of energy of the energy storage plant at different hours is as follows: where ! is the energy level of the energy storage plant and is the energy storage plant efficiency. Constraints (3) and (4) indicate the limitation of charge and discharge power of the energy storage plant, respectively.
where is energy storage plant capacity and the binary variable ! indicates the charging/discharging operating mode of the energy storage plant. Equation (5) demonstrates the limitation of energy for each of the energy storage power plants at hour t. 0 ≤ ! ≤ ∀ ∈ (5) Equations (6) and (7) show the allowable number of the charging and discharging operations within their limits 8+ and %/# .
where 8+ and %/# are the numbers of allowed charging/discharging of the energy storage plant, respectively.
The equation (8) shows shiftable demands at the time of t. The constraint (9) represents the limits of the substation demand changes at the time of t in the demand response program. Equation (10) assures which is the sum of shifting demands obtained from the demand response program is equal to the sum of the initial demands.
where λ ! is the amount of shiftable demand at the time t and is the percentage of the shiftable load. !,) 2 is the demand real power of the substation in each distribution smart grid at node n and the time t, and ! (" is the new demand changed at the time t in the demand response program. ! is the binary variable corresponding to the demand response program at time t. Using (11), the demand response program is able to limit the number of hours the authorized demand response program. In this equation, the parameter is equal to the number of hours of the authorized demand response program.
where is the number of allowable demand response hours. Equation (12) imposes another constraint for cutting the peak load. X ! is the maximum substation load.
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. To model the smart grid in each distribution substation, we follow Equations (13) to (15). Equation (13) shows that the active load of each distribution substation is the difference between the active demands in each node of the smart grid from the distributed generation (DG) in each node and the send and receive active power flow of each node.
In the above relation, ( !,) 2 ) is equal to the active load in the nth node of the smart grid at time t. ( !,) 23 ) is equal to the real power of DGs in the nth node of the smart grid at time t. ( !,/K ) and ( !,K/ ) are equal to real power flow on line ij and ji, respectively. In (14) the capacity limit of each distribution grid line is shown. /K $&J is equal to the upper limit of real power flow on line ij.
In (15) In Equation 16, is the objective function of the problem, which must be linear and is a decision variable and must be an integer. Equations 17 to 19 show the constraints of equality and inequality of the problem. By converting the proposed model to the standard form (16) to (19), the problem can be easily solved with commercial solvers.

III. NUMERICAL EXAMPLE
This section presents case studies to validate the proposed model, and the results are analyzed in different cases. The type of energy storage plant is the vanadium redox battery (VRB) is taken from [30] which is installed on the substation of the 33 and 874-bus distribution systems, load and price data have been obtained from the reference [30]- [35].
In the 33-bus network, there is a distribution substation on bus 1. This network consists of 33 buses and 32 branches, also 3 distributed generation units are located in buses 6, 14, and 32. The maximum actual power generation capacity in each of these distributed generation sources is considered 1000 kW.
In the large 874-bus distribution system, there is a distribution substation on bus 1. This network consists of 874 buses and 873 branches, also 7 distributed generation units are located in buses 50, 130, 350, 440, 580, 650, and 790. The maximum actual power generation capacity in each of these distributed generation sources is considered 1000 kW. The proposed mathematical model (1)-(15) is solved by Gurobi 9.2.0 solver, and also the computer system used to run the proposed model is the Intel Core i7 with 16 GB of RAM. The cases considered for the analysis of the proposed model are as follows: Case A.
There is no limit on the number of discharges and charges and no limit on the demand response hours. Case B.
Considering the limit of charging and discharging times without limiting the demand response hours. Case C. Considering the limit of demand response hours and without considering the number of charges and discharge times. Case D. Considering the limit on the number of charge and discharge times and a limit on the number of demand response hours. Case E.
Without considering the demand response program and no limit on the number of discharges and charges. Case F.
Without considering the demand response program and the limit on the number of discharges and charges. Case G.
Considering a maximum power of 50 kW for DGs in the distribution network.
In this study, the inflation and discount rates are equal to 1.5% and 9%, respectively. The cut current peak load and the load demand increase each year equal 10% and 1.5%, respectively. Table 2 shows the parameters considered for the VRB type energy storage power plant. The percentage of shiftable load is equal to 3%. Table 2 shows the vanadium redox battery (VRB) parameters, which have been used as an energy storage power plant. As can be seen, the efficiency of this type of storage is considered to be equal to 70%. In this paper, the investment cost of an energy storage power plant is considered at US$300,000, according to the ref [30]. According to Table 3, in 33-bus network, the objective function of the proposed model or net benefit of case A is US$16861. In the case of A, there is no limit on the number of times the energy storage plant charged/discharged and the number of demand response hours; as can be seen, the most benefit belongs to this case. In this case, the peak charge and discharge of the energy storage plant are equal to 6069 and 11891 kW, respectively. In the case of B, the number of times the battery is discharged is equal to 4 times (4 hours out of 24 hours); there are also no restrictions on the demand response program. In this case, the net benefit of this case is equal to US$9638. It can be seen how much the limitation of the number of times the energy storage plant is discharged greatly affects the objective function of this problem. The peak charge and discharge of the energy storage plant are equal to 6069 and 8724 kW, respectively. In the case of C, the maximum number of hours allowed to the demand response has been considered 10 hours. Also, there is no limit to the number of times the energy storage plant charged/discharged in this case. In this case, the net benefit is equal to US$16448, and the peak of discharge is equal to 11070 kW. In the case of D, the number of allowed demand response hours is equal to 10 hours, and the number of times the energy storage plant is discharged has been considered 4 hours. According to Table 3, the net benefit of this case is equal to US$9432, and the discharge peak of the energy storage plant is equal to 6504 kW. It can be seen that by imposing more restrictions on the problem, the energy storage plant discharge peak is also reduced. In the case of E, demand response management is eliminated. There is also no limit to the number of times the energy storage plant can be discharged. As can be seen from Table  3, the net profit of this case is equal to US$15647. This shows that the net profit has decreased by about 7% compared to case A. Therefore, it can be concluded that demand response management has a significant effect on increasing the net profit of the problem. This is while only 3% of the load is allowed to participate in the demand response program. In this case, the discharge and charge peak of the energy storage plant is equal to 11108 kW and 5739 kW, respectively. In the case of F, in addition to eliminating the demand response management, the number of times the battery is charged has been considered 4 hours. According to Table 3, the net profit, in this case, is less than all available cases. The net profit is equal to US$ 8807 and the discharge and charge peak of the energy storage plant are equal to 5418 kW and 5739 kW, respectively. In the case of G, two important points can be observed. First, the reduction of the capacity of distributed generation resources has led to a decrease in the profit of the objective function, and second, the change in the power balance of the distribution network has led to a change in the objective function, which shows the impact of distribution network modeling. In this case, the three distributed generation units in the distribution network can produce a maximum of 50 kW of power. The net profit, in this case, is equal to US$ 16224 and the discharge and charge peak of the energy storage plant are equal to 10961 kW and 5889 kW, respectively.  According to Table 4, in 874-bus network, the objective function of the proposed model of case A is US$556078. In the case of A, there is no limit on the number of times the energy storage plant charged/discharged and the number of demand response hours. In this case, the peak charge and discharge of the energy storage plants are equal to 56.2, 76.5, 80 and 56.2, 100, 97.8 kW, respectively. In the case of B, the number of times the battery is discharged is equal to 4 times (4 hours out of 24 hours); there are also no restrictions on the demand response program. In this case, the net benefit of this case is equal to US$555602. It can be seen how much the limitation of the number of times the energy storage plant is discharged greatly affects the objective function of this problem. In the case of C, the maximum number of hours allowed to the demand response has been considered 10 hours. Also, there is no limit to the number of times the energy storage plant charged/discharged in this case. In this case, the net benefit is equal to US$550346. In the case of D, the number of allowed demand response hours is equal to 10 hours, and the number of times the energy storage plant is discharged has been considered 4 hours. According to Table 4, the net benefit of this case is equal to US$549969. In the case of E, demand response management is eliminated. There is also no limit to the number of times the energy storage plant can be discharged. As can be seen from Table 4, the net profit of this case is equal to US$542844. Hence, it can be concluded that demand response management has a significant effect on increasing the net profit of the problem. In the case of F, in addition to eliminating the demand response management, the number of times the battery is charged has been considered 4 hours. According to Table 4, the net profit, in this case, is less than all available cases. The net profit is equal to US$541494. In the case of G, two important points similar to the 33-bus system can be observed. First, the reduction of the capacity of distributed generation resources has led to a decrease in the profit of the objective function, and second, the change in the power balance of the distribution network has led to a change in the objective function, which shows the impact of distribution network modeling. In this case, the seven distributed generation units in the 874-bus distribution network can produce a maximum of 50 kW of power. The net profit, in this case, is equal to US$545988.  Figure (2) shows each case's energy storage plant charge and discharge status in 33-bus system. In this figure, the negative area is related to charging, and the positive area is related to energy storage plant discharge. It can be seen that the energy storage plant is charged at the time when the substation load is low, and the energy price is low (23 to 9 o'clock), and the battery is discharged during the peak hours and when the energy price is high. The energy storage plant charge and discharge status are different in each case. This figure proves that the proposed model works well to solve the energy storage plant management problem. Figure (3) shows the energy storage plant's energy status in different cases. According to this figure, it is clear that during nonpeak hours the energy storage plant is charged, and the energy level is higher. The energy storage plant is discharged during peak hours, and the energy level is reduced. Figure (4) shows a comparison between the generated power of each of the distributed generation units in the distribution network in the first and last case. It can be seen that by limiting the maximum output power of distributed generation sources in Case G, these sources have been forced to produce power for more hours.  In general, Tables (3) and (4) show the importance of modeled constraints in coordinating the two problems of demand response management and charge and discharge management of storage power plants in the two networks of 33 and 874-bus. It turned out that the combination of these two problems could increase net profit, and also the effect of applying various constraints on the problem of optimal energy storage plant charge and discharge management and demand response management in the objective function of the problem was shown.
In this section, the sensitivity analysis results for demand response management are also considered, and the results are analyzed. As mentioned in the previous results, the amount of shiftable load per hour was considered 3% of the load per the same hour. Still, in this section, to further analyze the performance of the demand response management, the values of 5, 7, 10, and 15% have also been examined.  As shown in Table 5, net profit increases as the number of shiftable loads in the demand response program increases in the 33-bus system. Respectively most of the profit belongs to 15% of the shiftable load, and the lowest belongs to 3% of the shiftable load. For example, taking into account the amount of 15% to change the load ( = 0.15), the net profit will be equal to US$ 21551. As with the 33-bus network, Table 6 shows the results of the effect of the percentage of different load changes in the demand response management program on the 874-bus network. It is observed that with increasing the percentage of allowable load changes, the profit also increases.   (7) and (8) also show the changed substation loads per hour after applying each load change value in the 33 and 874-bus network, respectively.
Finally, Tables (3) and (4) showed the impact and performance of the proposed model on the revenue from the operation of a battery unit along with the demand response program. In other words, it was shown that the change in the number of charge and discharge times, the problem of demand response, and also the change in the number of hours allowed for the demand response program will affect the profitability of the network. On the other hand, according to the mixed-integer linear model presented and its solution with a powerful Gurobi commercial solver, optimal results can be guaranteed.
To show the superiority of the proposed model and method, the results obtained from the operation of a battery unit are compared with other similar papers, shown in Table (7). Here are proposed method (MILP) is compared with other methods such as (GALP [31]), (LP [32]) and (NLP [33]). As can be seen from Table (IV), the profit to the network in the proposed method is about 32% higher than the genetic algorithm linear program (GALP) method, about 3% higher than the linear programming (LP) method, and 1% higher than the non-linear programming (NLP) method. This indicates the superiority of the method proposed in this paper. In the results section, by presenting different cases and systems, the efficiency of the proposed model was clearly shown, and the superiority of the proposed method over other existing methods was also examined. Finally, it can be said that the proposed method and model for managing an energy storage power plants battery unit with a demand response program is very efficient.

V. CONCLUSION
This paper presents a mathematical approach to managing energy in the substation with an energy storage plant by considering management options in the problem. For this purpose, a mixed-integer linear programming (MILP) model has been presented to control the number of charge and discharge times and the number of hours of demand response management performance. The proposed model has several advantages, including sufficient flexibility to include the number of authorized demand response measures, the number of authorized charges and discharges. In addition, the MILP model, despite solving well-developed optimization packages, provides the optimal solution. To confirm the effective energy storage power plant in coordinating with the demand response program of the proposed model, two numerical studies with seven different cases has been investigated. The results show that the coordination of the performance of the energy storage plant with the demand response leads to a greater overall benefit for the smart distribution grid operator compared to the scenario in which only the energy storage plant is considered. In the end, sensitivity analysis was performed for the demand response management program. It was found that by increasing the number of loads that can be changed in the demand response program, the net profit can be significantly increased.