A Distributed Stochastic Energy Management Framework Based-Fuzzy-PDMM for Smart Grids Considering Wind Park and Energy Storage Systems

Distributed optimization methods have been vastly investigated and approved by the researchers due to their major advantages including high accuracy, secured performance and low time-consuming structure compared to the centralized frameworks. This paper aims to provide a novel method based on fuzzy primal-dual method of multipliers (PDMM) to manage the optimal energy scheduling problem in the smart grids. The proposed method illustrates some unrivaled points of interest which are more preferable than the conventional alternating direction method of multipliers (ADMM) in terms of preciseness and convergence speed. The proposed smart grid is constructed of different components such as generators, wind park and storage devices as two of the most profitable and applicable energy sources in the power grids. In order to model the uncertainty effects, a stochastic method based on fuzzy cloud theory is developed to capture the high-dimension uncertainty in a more realistic way. The units are scheduled to exchange energy in the smart grid in a fully distributed manner when meeting the active/reactive generation and demand balance. Such an energy exchanging process continues until a proper solution would be found through which all the agents in the system are satiated. The simulation results on the IEEE 24-bus test system indicate that the proposed stochastic distributed energy management framework yields an error of less than 0.018% compared to the centralized approach.

Power transaction between agents (ith and jth).
Min/max of Power transaction of smart grid's agents. P k,t , Q k,t Line active/reactive power flows. P g,t , Q g,t Generator active/reactive power. P ch b,t , P dis b,t Charge/discharge power of the battery unit.
Variables of the agents ith and jth. Z Total operation cost.
Voltage changes and voltage of each bus. δ k,t Phase angle difference across transmission line k. λ ij Smart grid dual variables in PDMM method, respectively. γ −1 i,j , γ i,j Primal and dual scalars related to PDMM method.

I. INTRODUCTION
In the last decades, smart energy management concept was developed to manage the rising number of distributed energy resources and high electric consumptions and provide security and flexibility in the system structure [1], [2]. To this end, microgrid (MG) was assumed as an energy aggregator that is utilized to satisfy the electrical loads in power systems and to decrease the power losses related to the distribution network because of the near distance to the end customers [3], [4]. Even though the concept of MG can add much to the power system; secure and optimal energy transaction among the units is the major challenging problem in the modern power grids [5], [6]. Therefore, a proper energy management scheme which can manage MGs (sometimes in the form of networked MGs) is needed to save the optimal energy exchange among the agents [7], [8]. Technically, there are three groups of methods to solve the energy management problem including centralized, distributed and decentralized methods [9], [10]. The summary of each category in the proposed optimization problem is provided in the following.

A. CENTRALIZED
In this method, a central control unit is responsible for collecting complete information about the system operation and considering remarkable considerations for efficient and optimal energy management approaches [11], [12]. While these methods have shown great performance in the long-term, they have faced several challenges to dispatch the power system in a distributed structure [13], [14]. From the communication point of view, a centralized method needs large bandwidths to collect the entire power system information within the central control unit. Furthermore, complicated and different security architectures are needed to support the high reliability and safety of the power system [15], [16]. On the flip side, due to the recent advances in the power system ownership and restructuring of the system topology along with the rising number of distributed energy resources (DER) and energy storages, the traditional management methods have encountered severe challenges which have affected their efficiency, severely [17], [18]. Some of the well-known centralized approaches in the MG's energy management and operation area are introduced in [19], [20].

B. DECENTRALIZED
With the growth of the technology, the DER owners in the modernized power system are not any more interested in sharing their technical data with the primary central unit in order to avoid the leakage of privacy and endangering the protection scheme. Therefore, decentralized approaches as new solutions are introduced to overcome privacy issues as well as the high computational challenges of central calculations by the use of less communication channels and parallel calculations [21]. In these approaches, the power system scheduling problem reaches the global optimum through some local optimization processes. A decentralized approach is represented in [22] that assess the development of the MGs' operation when the power data and real-time electrical prices are exchanged with the electrical grid as a coordinator to satisfy the total demands. Moreover, it is expected that an optimal solution in the decentralized structure would guarantee the power exchange trade-off needed between the MG and the upstream segment [23]. Unfortunately, the lowspeed implementation due to the bi-level characteristics of this method is a big deficiency that can affect the energy management problem. Besides, the security and privacy of the local operators are not preserved against the upstream grid. Some of the most well-known decentralized approaches in the area of MG management can be found in [24], [25].

C. DISTRIBUTED
To overcome the deficiencies existing in the last two groups, distributed approaches are introduced to achieve the global optimum by exchanging the minimum information among the neighboring agents, and later employing local calculations within each agent. It is important to know that every agent in this approach shares its data with only those near agents which are joined to it (connected electrically). The ideal arrangement would be further accomplished through a few iterations in this strategy. In [14], [15], two novel hybrid methods are introduced which combine the distributed and centralized approaches but, they still need a central coordinator. A new distributed approach, i.e., a double-phase strategy is developed in [26] that considers energy management framework within MGs with trading cost among neighbors to fulfill the security of each operator. Technically, distributed methods for optimal energy management can be divided into 3 classes including the weighted averaging distributed method, the alternating direction method of multipliers (ADMM) and the primal-dual lagrangian based approach [27], [28].
It should be noted that the type of objective function used within the weighted averaging based approach ought to be quadratic (which is a limitation!) [29]. Also in [30], a new consensus method based on weighted average value of initial states related to each one of the agents is introduced to achieve the consensus among them. Moreover, it needs a coordinator to achieve agreement among the neighboring agents [31]. A method based on the saddle point solution is proposed in [32] which belongs to the second class but it cannot convey to the global solution optimally. Lastly, ADMM in the last class needs limited iterations to achieve the optimal point because of its manageable construction. Unfortunately, ADMM suffers from high sensitivity to the balancing parameters. In this way, the primal-dual method of multipliers (PDMM) is proposed in this paper for smart grids which can be more manageable and also it is not sensitive to the parameters compared to the ADMM method. Table 1 represents a categorization of the optimal solution techniques explained in the research.
It should be noted that compared to [2], there are big differences between the two papers. Reference [2] is addressing the PDMM application in the smart islands (islanded mode of MG operation), but our paper is focusing on the smart grid specifically. Also, reference [2] ignores the power flow equations and considers a simple linear model for the MG (which is acceptable in a small-size scale). But due to the large and complex nature of a smart grid, we have to handle the bus voltage limits and feeder power flow through the power flow. Therefore, a quite linear and efficient power flow is developed in this paper in Eq. (1)- (9). Moreover, reference [2] considers the scenario based method for handling the uncertainty. However, our paper considers a complex and effective method based on fuzzy cloud theory to not only capture the uncertainties of the mean value, but also the uncertainties existing in the second momentum of the PDF, i.e. standard deviation parameter.
This paper intends to propose a proper stochastic distributed framework in order to solve the optimal energy management problem in the smart grids under the uncertainty conditions. In the smart areas, it is presumed that the system can support any load variation rapidly which is not well achieved in a conventional optimization framework. The new distributed optimization approaches are useful tools in the cases that the units are considered to be responsible to supply the electrical loads over a contract procedure. It should be mentioned that the electrical loads would be served in a local area. Furthermore, the proposed distributed optimization method is a time-saving procedure in comparison to the centralized approaches. In order to handle the uncertainties of the renewable energy sources and load demand appropriately, a novel stochastic framework based on the cloud theory of fuzzy is devised here. To summarize, the main contributions and novelties of this paper can be mentioned as follows: • Developing an effective fully distributed energy management framework to for the optimal operation and scheduling of smart grids integrated with dispersed wind park and energy storage units. The proposed problem formulation is quite compatible with any distributed framework to get solved.
• Proposing an effective linear and practical distributed structure based on PDMM for solving the energy management problem in the smart grids. The proposed model incorporates the linear power flow equations in the PDMM based model.
• Proposing a stochastic framework based on fuzzy cloud theory to capture the uncertainty effects due to the renewable sources of wind park and load demands in the problem. The proposed stochastic model can not only model the uncertainty of the mean value, but also it handles the uncertainty existing in the standard deviation value (that is why it is called an entropy-entropy model).
This would give much more information regarding the uncertainty effects and can help to get into more realistic results. The remaining parts of the paper are managed as: Section II explains the centralized framework and section III provides the equivalent mathematical formulation of the proposed distributed method. The proposed fuzzy-based stochastic framework is explained in section IV. The results pertained to the model are represented in section V and all in all, the conclusions of the work are indicated in section VI.

II. CENTRALIZED BASED PROBLEM FORMULATION
To provide a clear view of the current problem formulation, it is necessary to first describe the centralized framework. Hence, this section is dedicated to the centralized definition of energy management in the smart grids. To this end, the objective functions as well as the constraints are defined explicitly. As previously mentioned, the smart grid includes different generators, wind generation units, storage systems and demand loads. Fig. 1 properly differentiate distributed framework from centralized, and decentralized structures. The centralized structure indicates a unique central node where the other nodes are connected to and controlled by it. In decentralized framework, the proposed unique central node is turned into different central points where each one has its own local nodes. In comparison with the centralized method, the decentralized approach is formed by only connecting these decentralized nodes. In the distributed framework, the centralized node does no longer remain and the nodes are capable of connecting to their neighbors.

A. PROBLEM DESCRIPTION
In this section, the centralized framework of the problem is provided and discussed in details. The total power generation comprises of generators, storage units and wind generation units which are expected to supply the hourly load demand of the system. In this paper, a linearized power flow technique is utilized to make the problem more approachable, simple and obtain proper optimal solutions. Nevertheless, it is clear that the basic conventional nonlinear power flow equations can be used without any problem (but then we will need to a nonlinear solver). The basic equations of the power flow are nonlinear where they have been linearized using a technique stated in reference [33]. The proposed method is also widely investigated and deployed in reference [19]. It is clearly mentioned in [33] that the linearized power flow analysis is precise through a comparison which is made by the nonlinear approach. It is also stated that the linear power flow can bring a simple, fast and effective global solution compared to the nonlinear analysis. In this regard, the lines 'power flow equations can be considered in the following.
The active and reactive power of lines' equations are provided in equations (1)-(2). Considering the nonlinearity of these two equations, they need to be turned into linear equations using by (3)-(5). By doing so, such linearization technique yields equations (6)- (7) and simplified as (8)-(9). The objective function and the constraints related to the smart grid are shown as follows: The cost objective function is shown in (10) which consists of four different terms including the operation cost of the generators, start-up and shot-down of the generators and benefits of the batteries' and WTs' operation. Constraints (11) and (12) define the active and reactive power limits for the generators. Constraints related to the ramp-up and down of generators are indicated in (13)- (14). Equation (15) and (16) delineate the reactive/active power balances within the network. Equations (17)-(18) define the thermal limit on the active and reactive power flowing through the lines. Constraint (19) and (20) (26) shows the hourly energy level of the batteries [18]. The time slot t is assumed to be 1 since the analysis is performed for each hour of the time horizon. Finally, the power output related to WT can be defined by equation (28) [1].

III. PROPOSED DISTRIBUTED FRAMEWORK
In this section, the concept, definition and formulation of the proposed distributed model are explained in details. Technically, distributed methods are robust and have low time-consuming processes which necessitate less number of communication links compared to the centralized ones [26]. In this paper, PDMM approach as a new and well-approved distributed method is utilized to solve the energy management problem in the smart grids. Prior to providing the formulation of the proposed model, the definition of PDMM method is somehow the bottom line which should be represented firstly.

A. PDMM METHOD
Fundamentally, PDMM is a graph-based approach that has shown superior advantages in comparison to the ADMM method in terms of the convergence time and preciseness [28]. This subsection intends to provide the basic formulations and concept of the PDMM approach, through which the mathematical modeling of the PDMM-based energy management of this work can be comprehended later. Let us assume a graph with i number of dispersed nodes. Giving a crystal clear perspective; suppose the hypothetical graph illustrated in Fig. 2 as an example. Based on what is mentioned previously, the number of nodes can be indicated by i = 1, 2 . . . 7 as the proper set of nodes related to this graph.
To define the PDMM method, one needs to first characterize its graph mathematically. To begin with, let us assume x i indicates the variables and f i (x i ) signifies the node functions of the proposed graph. Basically, the PDMM method seeks to reduce the convex function i∈v f i (x i ). Suppose each node points out one agent in the graph and each agent is connected to its nearby agent (s). As an instance, take two adjacent agents x i and x j which are connected through a path, capable of being defined by the edge function A ij x i +A ji x j = c ij . From a holistic viewpoint, the following optimization problem can be attributed to the above explanations [31]. On this occasion, the aforementioned agents x i and x j are defined through the vectors − → x i and − → x j , respectively. The PDMM method takes ( − → x i , − → λ i ) as the state of the nodes. The whole process is about updating the state of the nodes considering its neighboring agents. Such iterative process continues repetitively until finding an equilibrium point through which all the agents are satiated. The following table summarizes the whole PDMM algorithm process [34].
The above process denotes the new states of the nodes − − →  the converging process stops when the dual variable meets λ k+1 ij − λ k ij < ε. A proper consensus value stops the process and satisfies all the agents of the system and provides some credit to each agent [35], [36].

B. SMART GRID DISTRIBUTED FRAMEWORK BASED ON PDMM
In the previous parts, the centralized formulations as well as the definition of the PDMM approach are now uncovered. This part describes the PDMM based energy transaction within the smart grid as follows: As mentioned earlier, the proposed smart grid comprises of different generators, wind units, battery storage systems and load demands. The nodes of the system (buses) are assumed to be the agents of the proposed smart grid. It is expected that the units in the system serve as negative loads of the system based on a proper energy management scheme. As can be seen from the above formulations, equation (30) shows the power balance in the smart grid which is not an option but an obligation in the solution process. In this equation, P eg i,t is the power injection or consumption in the system agents. The variable P eg ij,t indicates the power transaction between a pair of nodes of the system which are connected to each other. The variables P Bat i,t and P WT i,t signify the amount of power generated by the battery storage and wind generation units and PD i,t shows the total demand of the smart grid. By using the equations (31)- (35), the PDMM algorithm can be applied to the proposed smart grid to find the optimal energy transactions between the agents of the system for the next 24-hour daily horizon. All problem variables pertaining to the agents of the smart grid are represented by constraint (33). Constraint (34) imposes the structure of the network wherein the agents are located. Constraint (35) defines limits the amount of power transaction of each agent within the upper and lower bounds. All in all, these formulations will lead to obtaining power produced by each agent and power transaction between the agents of the system based on the PDMM approach.

IV. FUZZY STOCHASTIC FRAMEWORK
In order to handle the uncertainty effects due to the forecast error in the output power of the wind park and local load demand of the agents, this article proposes a fuzzy stochastic framework based on cloud theory. By capturing the uncertainty of the second moment in the probability density function (PDF) of the uncertain parameter, the proposed fuzzy-based method can model higher uncertainty in a more realistic framework. It is worth mentioning that the probability distribution function is defined based on normal distribution function. Nevertheless, it should be noted that the concept of PDF is replaced by the idea of fuzzy clouds, which might not obey any of the known PDFs. To this end, we need to first create a fuzzy cloud for each uncertain parameter. Each drop shows a specific error in the uncertain parameter with a specific probability. Fig. 3 shows a typical PDF for the fuzzy cloud theory. In such a model, the uncertainty of the mean value Ex is captured through the En (called standard deviation) and the uncertainty of the En is handled by the He (called the hyper parameter). The unique feature of this model is the existence of hyper parameter He which helps to increase the uncertainty modeling capability one degree higher compared to the Monte Carlo [37], [38].
The nonlinear mapping C L is from the input domain u to the output domain C L (x) is simulated as below: It is clear that the C L (x) represents the fuzzy membership value and is determined according to the Ex, En and He parameters. In a normal fuzzy cloud model, over 99.7% VOLUME 9, 2021 of the uncertainty can be captured within [Ex − 3En, Ex + 3En] [37].
In the first step, a fuzzy cloud needs to be prepared for any uncertain parameter. To this end, a forward procedure is used to create every drop (x i , u i ) in the fuzzy cloud as below: Step 1: Create a random value En i following the normal PDF with average value En and hyper parameter He.
Step 2: Create a random value x i obeying a normal behavior with the average Ex and the hyper parameter En i .
Step 3: evaluate the probability of a drop u i as below: Step 4: So far, one cloud drop with features (x i , u i ) is created. By repeating steps 1 to 4, the required number of drops N d is produced.
In a backward procedure, the cloud model of the output parameter (the cost function in this paper) can be attained. After calculating the objective function value for each (y i , u i ); i = 1, 2, . . . , N d ; the output features of the cloud model are evaluated as below: Therefore, it can be deduced that the fuzzy cloud model gives more information on the output cost function value. This can help much in understanding the stochastic behavior of the problem. Figure 4 illustrates the performance of the proposed fuzzy-cloud based PDMM approach.

V. SIMULATION RESULTS
In this section, the performance of the proposed model is examined, comprehensively. The model is tested on an IEEE 24-bus test system [39]. The test system modification has been commonly pursued in previous studies [40]. The capacity of each one of the storage systems are 100 kW and are able to be charged and discharged to almost 90% of their capacities [41]. Table 3 shows the bus data of the IEEE 24-bus test system. Also the wind power and load profiles are depicted in Fig. 5. The proposed system is broken down into 3 different agents [42]. It is worth mentioning that the energy transaction is managed in a fully distributed manner; hence, deducing that the agents in the system are equipped with the required communication apparatuses [43]. Simulations are carried out on a 3.4-GHz windows-based PC with 32 Gbytes of RAM. Inspired by the literature [44], it is assumed that WTs are  operated based on the forecasted values of wind speed [45]. This work considers the next 24 hours, which means a daily time horizon. Different analyses are considered to approve the performance of the model from different angles. In this regard, the PDMM method is executed on the aforementioned test system. Two different case studies are considered in order to have a precise assessment over the results which are represented as follows: Case I: performance assessment of the PDMM approach. Case II: analyzing the studies model in both deterministic and stochastic frameworks based on fuzzy-PDMM method.
A. CASE I: PERFORMANCE ASSESSMENT OF THE PDMM APPROACH Fig. 6 indicates the amount of energy exchanging between buses 8 and 9. It is evident that the process reaches a consensus value after almost 50 iterations. This reveals that the agents are satiated which is preceded by negotiating over the energy they needed. As can be seen, no energy is needed to be exchanged between buses 8 and 9 in this particular case. To provide a crystal clear analysis, the power transactions between buses 9 and 12 are also depicted in Fig. 7. It is worth mentioning that the energy flow is from bus number 12 to 9 (positive values). Obviously, the power transaction value stemmed at nearly 400 kW. Since then, it is decreased steadily, and after 50 th iteration, it experienced a period of stabilization. Such a period illustrates an agreement between the parties and it shows that almost 200 kW power is exchanged from the bus 12 to 9 at t = 7. Fig. 8 represents the primal residual norm of the consensus points at t = 7 calculated by the PDMM approach. It indicates that both parties (buses 9 and 12) are acquiescent of having a proper accidence (reached zero value) through which both sides receive some credits. The calculated primal residual norm of the consensus points in the power transaction process between buses 24 and 3 is also shown in Fig. 9 at t = 8.
As mentioned previously, both the parties (buses 24 and 3) have reached a consensus value (converged to zero value as shown in Fig. 8) over the transacted energy needed to flow through the connecting line. One can conclude that both of the two adjacent nodes in the system have reached their consensus values and agreed over a particular amount of energy to be transacted through the lines connecting them. In order to validate and analysis the performance of the proposed PDMM approach, it is necessary   to compare the PDMM method with ADMM as one of the most common and effective distributed methods. Hence, Fig. 10 is provided, which compares the mean squared error of these two methods. As can be seen, the PDMM method has converged to zero error within 20 iterations, while the ADMM method has took 100 iterations to reach zero mean squared error. As it can be seen here, the ADMM shows a linear convergence. The scientific explanation for such a linear convergence roots in the linear nature of the problem (refer to section II, Part A, equations (1)- (28)). It is shown in the recent researches [46] that ADMM should exhibit linear convergence when facing the particular case of a quadratic program or a linear problem. In a standard form, the ADMM is modeled as a matrix recurrence and will settle on the correct set of active constraints, wherein the convergence is linear, VOLUME 9, 2021  depending on the absolute value of second largest eigenvalue of the matrix recurrence.
For the sake of evaluating the convergence speed of the PDMM method, Fig. 11 is provided to show how convergence speed varies with variation of γ −1 ij and γ ij which indicate primal and dual scalars, respectively. As can be seen, as the difference between their values gets higher, the convergence speed of the algorithm will be declined. While, the more they get closer, the higher convergence speed will be achieved.

B. CASE II: ANALYZING THE STUDIES MODEL IN BOTH DETERMINISTIC AND STOCHASTIC FRAMEWORKS BASED ON FUZZY-PDMM METHOD
Considering the locations of the batteries on buses 3, 7 and 17 and wind generation units on buses 4, 6 and 19 (see Fig. 12), Fig. 13 indicates the charging/discharging power of the batteries. According to Fig. 12, the batteries are more tended to be discharged at times t = 12 − 17, during which the energy price is high. Fig. 14 illustrates the output power of the wind generation units which directly depends on the wind speed. The powers of the generators are also shown in Table 4. From these data it can be said that the generated power of unit 6 is dropped to 12 kW after t = 8 which is due to the intensive increase of wind units' power generation. The same definition is valid for generator number 10 which is  plunged to 22 kW between times t = 9 − 13. It is worth mentioning that the wind generation and storage units are the most effective locally. On the flip side, it is expected that the wind generation and storage units can not affect the whole network comprehensively, but only part of the system, specifically the neighboring areas of the proposed units. In this regard, to provide a better prospective, the most and least affected generators by the presence of wind generation and storage units are provided in Table 4. As can be seen, the generators P6 and P10 are the most affected and P4, P8 and P1 are the least affected ones.
Running the proposed PDMM approach alongside the centralized framework is a good assessment to evaluate the well-being performance of the proposed PDMM based method. A proper method is the one that leads to a global solution with the least deviation compared to the    In order to make a more clear comparison between the PDMM and the ADMM, Table 5 provides the comparison of these methods. According to these results, the proposed PDMM method could get to lower operation cost when keeping the convergence iteration as low as 34. On the other hand, the ADMM method has converged to higher cost function over 98 iterations. Based on the mean absolute error (MAE), the proposed PDMM based method shows lower MAE which reveals a higher robustness and more fitting power mismatch. It means that the PDMM method could optimize the augmented objective function more optimally by minimizing the power mismatch between the agents. The results advocate the high precision and robustness of the PDMM compared to ADMM. Finally, the proposed fuzzy cloud model of the cost function is plotted in Fig. 15. According to this figure, although the Monte Caro is showing almost the same mean value as the fuzzy method, but the proposed method still gives much more information regarding the uncertainty using the fuzzy drops. As can be seen from this figure, the uncertainty effects are appeared by skewness on the right arm of the cloud model. This means that increasing the uncertainty can increase the expected cost function value. Moreover, it can be seen that the proposed fuzzy cloud model can provide more information about the uncertainty effects compared to the conventional stochastic models such as Monte Carlo.

VI. CONCLUSION
This paper fundamentally focuses on and proposes a proper distributed-based energy management structure in the smart grid based on PDMM optimization algorithm. The smart VOLUME 9, 2021 grid consists of generators, wind park, storage systems and demand loads to provide a more effective model. The nodes of the system are assumed to be the agents and the proposed energy sources try to transact over the hourly energy they need to inject or consume. It is shown that the proposed PDMM method is capable of solving the distributed model properly with high accuracy and leads to the complete technical and economical satisfaction of the units and loads. The performance evaluation of the PDMM method was carried out by comparing the mean squared error of the PDMM method with ADMM approach. It was seen that the PDMM took quite fewer iterations to reach zero mean squared error. Also, it was seen that the optimal selection of both the primal and dual scalars could improve the convergence speed of the PDMM. Comparing the proposed PDMM energy management approach with the centralized one reveals that the distributed framework could find the optimization model solution nearly equal to the centralized based solution. This also proves that in the distributed based approach, all the units are well operated and contributed to the system operation as effective as the centralized approach. Moreover, the proposed fuzzy stochastic framework could capture the uncertainty effects in a higher dimension. The authors would investigate the power flow problem in the proposed distributed framework in the future works.