A Decentralized Optimization Strategy for Distributed Generators Power Allocation in Microgrids Based on Load Demand–Power Generation Equivalent Forecasting

: In order to guarantee the economic and reliable operation of renewable Distributed Generators (DGs) in microgrids, a decentralized optimization strategy for DGs power allocation is proposed in this paper. According to the method, all processes and parameters are designed in a fully distributed way. To achieve decentralization and to maintain the balance between power supply and load demand, a load demand–power generation equivalent forecasting method is proposed to improve the strategy through replacing information of load demand by predicted power output, which removes the load prediction center and load sensor devices. The data of historical power generation, which is used for prediction, has already satisfied the balance constraint between power supply and load demand. Therefore, when the balance between the real power output and the predicted power output is gained, the balance constraint of power supply and load demand is achieved. Meanwhile, the uncertainty and forecasting errors of renewable generation are taken into account in the cost functions to optimize the expense of DG operation comprehensively. Then, the proposed algorithm is expounded in detail and the convergence is proved by eigenvalue perturbation theory. Finally, various cases are simulated to verify the accuracy and effectiveness of the proposed method. In summary, the proposed method are effective tools for DGs economic power allocation and the decentralization of microgrid system.


Introduction
To cope with the serious anthropogenic climate change and to decrease greenhouse gas emissions, more and more renewable energy sources are being applied in the advanced microgrid [1]. Hence, the management of renewable energy sources to guarantee microgrids operating economically and reliably becomes an essential issue, which has drawn great attention from researchers in various areas. Particularly, the question 'to centralize or to decentralize' is a highlight on the control and management of microgrids. The centralized optimization algorithms require global information of the whole system, which deeply depend on the control center. With the rapid increasing number of Distributed Generator (DG) units, the centralized methods are not suitable for a large-scale network, due to significance communications and massive computational overhead. Such disadvantages motivate researches on decentralized optimization methods. Literature [2] discussed and reviewed the state-of-the-art solutions regarding Micro Grid Management System (MGMS) in the primary, secondary, and tertiary levels, and drew a conclusion that the decentralized MGMS framework delivers not only the same control function as the centralized one, but also be with greater scalability, reliability, and resiliency. Meanwhile, the "plug and play" [3] demand of DG drives the tendency toward decentralization as well.
At present, decentralized optimization algorithms mainly depend on consensus or multi-agent systems. Each node/agent in a system only concerns about local decision variables instead of global information, and neighboring nodes/agents communicate with each other to cooperate together for achieving optimization results [4]. For example, a multi-agent system-based hierarchical control method was applied in autonomous microgrids for cooperative frequency control with communication constraints [5]. A state-based consensus method [6] was proposed, which made use of the state information of DGs to calculate the optimized dispatching strategy under a layered architecture. However, such methods still rely on the control center to collect the information and to send to each DG. To fully decentralize the optimization and to remove the control center, [7] proposed a consensus-based approach for economic dispatch problems in a smart grid without any center or leaders. On this basis, [8] proposed a distributed algorithm to solve the resource allocation over dynamic digraphs, which is adaptable to the scenario under the time-varying graph. Noticeably, all of the above methods required the information of total load demand in a microgrid to keep the balance constraint between power supply and load demand in the optimization. Moreover, to consider the impact of load on the cost optimization, [9][10][11] established the utility function of each load. However, the total load demand information was gained through load forecasting [12], which depended on a prediction center. Hence, the center restrains the decentralization faith. In addition, the setting-up of utility function of each load needs distributed loads' information, which requires setting sensors at each load. It is difficult to implement in large-number and distributed load scenarios. Therefore, an effective measure should be carried out to solve the above problem.
Meanwhile, the cost function in the decentralized optimization is always treated as a simple quadratic polynomial function. For example, the consensus iterative algorithm based on bias feedback dynamic adjustment method was proposed in [13] for distributed robust economic dispatch. A method relaxed hybrid consensus Alternating Direction Multiplier Method (ADMM) with coupling constraints was proposed in [14] for distributed convex optimization. They all ignored the uncertainty of renewable DGs influencing on the expense. Since the uncertainty is mainly due to randomness and volatility of wind/photovoltaic power, the optimization of MGMS needs to consider the uncertainty of DGs in the cost function. In [15][16][17], authors analyzed probabilistic forecasting generation of wind turbine (WT) and photovoltaic (PV) power through machine learning during the optimization. However, authors did not analyze the effect of forecasting error on the cost function.
To address the mentioned challenges and to realize the economic and reliable operation of DGs in a microgrid, a decentralized optimization strategy for DGs power allocation basing on load demand-power generation equivalent forecasting is proposed in this paper. The main contributions of this paper are illustrated as follows.

•
All processes and parameters of the proposed decentralized optimization strategy are designed in a fully distributed way, which do not need any center or leader to assign global variables or parameters. Each DG only needs to communicate with its neighbors under sparse communication to reach the optimal results. • A load demand-power generation equivalent forecasting method is proposed to improve the decentralized optimization strategy, which replaces the load prediction center and the load sensor devices. The balance constraint only needs information of predicted power output instead of load demand. The historical power generation data, which is used for prediction, has already satisfied the balance constraint of power supply and load demand. When the sum of real power output equals to the sum of predicted output, the balance between power supply and load demand is achieved.

•
The uncertainty of renewable generation is considered in the cost modeling process to optimize the expense comprehensively. A penalty term is introduced into the cost model for adjustment of the expense cost by the fluctuation of renewable energy sources and the forecasting error.
The remainder of this paper is outlined as follows. Section 2 introduces the DGs power allocation problem formulation and mathematical model. In section 3, the decentralized optimization algorithm is presented and proved to be convergent. In Section 4, the accuracy and characteristic of the proposed method are verified through simulations, and compared with a centralized method. Then, the daily optimization results are analyzed to verify the effectiveness of the strategy. Finally, findings are concluded in Section 5.

Load Demand-Power Generation Equivalent Forecasting Based Distributed Generators (DGs) Power Allocation Strategy Formulation
The structure of DGs power allocation strategy, including construction, optimization objective, and algorithm, are shown in Figure 1.
1. As mentioned in Section 1, the centralized optimization algorithms deeply depend on the control center, which requires collecting global information from the whole network. With the rapid increasing number of DG units, those approaches are not suitable for a large-scale network, due to significance communications and massive computational overhead. On the contrary, decentralized optimization algorithms mainly rely on consensus or multi-agent systems, which merely need sparse communication with neighbor DGs to achieve information interaction and cooperation [18]. Therefore, the decentralized mode is more suitable to implement the optimization.  2. The optimization problem is aiming at the minimum cost of the outputs of DGs. When the total outputs of DGs is determined, a 'Power Allocation Strategy' need to be studied to obtain the output of each DG unit. Thereby, we can get the accurate dispatching plan of each DG unit. The Power Allocation Strategy consists of the optimization objective and the optimization algorithm. 3. A load demand-power generation equivalent forecasting method is proposed in the optimization algorithm, which only needs the information of predicted power output instead of load demand. The historical power generation data, which is used for prediction, has already satisfied the balance constraint of power supply and load demand. Therefore, when the balance between the real power output and the predicted output is gained, the equation constraint of power supply and load demand is satisfied. Thereby, the load demand information could be substituted by the predicted power generation in a local way. 4. Due to the uncertainty and fluctuation of the renewable energy sources, the prediction error is considered when gaining the predicted value for fitting a feasibility interval, and the real values of the predicted day are added to the training data to update the training process for a rolling optimization. Before establishing the model of optimization, the prediction method needs to be analyzed to support the optimization strategy.

Generation Output Prediction Interval Model
Since the short-term generation prediction of microgrid is a prediction of time series, Long Short-Term Memory Network (LSTM) is more suitable for generation prediction and is used for the prediction of DGs power output in this section. Take the short-term prediction neural network model of PV generation as an example. The impact factors of Photovoltaic (PV) generation, which are treated as input vectors, contain the historical power, light intensity, temperature, and humidity, as well as the temperature and humidity of the predicted day. Meanwhile, the final output of the prediction model is the predicted power of PV, with only one type of data. The neural network model is presented in Figure 2.   where † , i t x  is represent the prediction output value. The input of model from P1 to P6 are historical power, light intensity, temperature, humidity and the temperature, humidity of the predicted day, respectively.
According to the above model, PV generation can be predicted. The prediction models for wind turbines, fuel turbines, and hydro turbines are built in a similar way. Some parameters for prediction of a typical region are shown in Figure 3. Figure 3a shows the annual historical temperature in the data collecting area. The annual output power of PV and WT are shown in Figure 3b, c (The data used is one sampling point per hour). It can be seen that the tested region is abundant with renewable energy resources and is suitable for the application of a microgrid system.   The predicted output of WT and PV on a typical day is obtained as shown in Figure 4a, b. We can clearly see that there exists error between the predicted value and the real value. Due to the high randomness and volatility of WT and PV output, the accuracy of prediction plays a vital role in the optimization process [19]. Thus, we take the forecasting error into consideration for a comprehensive optimization. As the fluctuation of WT is stronger, we chose 1500 data of the aimed device to test, which are shown in Figure 4c. We chose the predicted value † , i t x  as a reference value. As the existence of prediction error, the predicted value may not be the same as the real one. By comparing the error between the prediction value and the real one, it can be found that the error obeys a distribution law. According to the data distribution and the model in [17], we can assume that the error obeys a Gaussian distribution, which is defined as the mismatch between the real value and the predicted Then, the probability density function can be modeled as follows. Based on the probability density function, we can get the corresponding confidence interval When the prediction error is considered, the predicted output turns to be as follows.
where, ,  The error between the real value and the predicted value (1500 data) is presented in Figure 5a. From the analysis, the error distribution of WT obeys a Gaussian distribution and is treated as a p. u. value in Figure 5b. When the prediction error is considered, the output of WT becomes a possible range in Figure 5c.

Optimization Objective
In this section, the optimization objective is set as the minimum of the total operating cost. Thereby, the cost function is formulated as (3), which mainly includes fuel turbines (Fes), wind turbines (WTs), photovoltaic sets (PVs), and hydropower turbines (HTs).
where, F is the cost of generation, which mainly contains the cost of real outputs of DG units; N are the number of each DGs, respectively.

Cost Functions and Constraints of DGs
In order to achieve the optimization objective in 2.2.1, the cost function of each DG is established as (4)- (7). Each DG is supposed to operate within the equation constraint of its own capacity and to keep the balance between load demand and power supply in the system.
The cost function of PV is defined as follows. where, Remark 1. Due to the randomness and volatility of the WT and PV generation, the accuracy of the prediction results has a great impact on the optimization objective. Therefore, a penalty term is introduced into the model for adjustment. Specifically, the smaller deviation between the real value and the predicted value is, the smaller impact the penalty term gains. For example, when , Since the mismatch between the predicted value and the real value could be positive or negative, both two possible scenarios have an effect on the expense. Therefore, is used to represent the error effect, which is easy to calculate as well.
The cost function of Fe is expressed as follows.
where, The cost function of HT is expressed as follows.

HT H T H T H T H T H T
where, In order to simplify the solution process, the above cost function is commonly selected as a quadratic polynomial function, which can be obtained by data fitting. Meanwhile, the following supply-demand balance equation constraint and capacity inequality constraints should be satisfied during optimization. The formula is identified as follows. 3 3 1  2  4  1  2  4 , , , where , respectively. Remark 2. In this paper, the balance constraint equality only needs information of predicted power output instead of load demand. The historical power generation data, which is used for prediction, has already contained the balance constraint of power generation supply and load demand. Therefore, when the balance between the real power output and the predicted output is gained, the equation constraint of power supply and load demand is satisfied. Considering the prediction error, the upper and lower boundaries of the equation are calculated to provide a probability interval for the optimization results.
In addition, the cost function should meet the following inequality constraints as well.
PV capacity constraint:

Optimization Solution
According to the optimal objective (3) and equality constraint (8), the Lagrangian function can be obtained as follows.
where L is the Lagrangian function and i λ is the Lagrangian multiplier of each DG. 3  1  2  4 , , ,

Let
Then, the optimal conditions are provided by: According to (11), we can get the functional relationship between the optimal output , i t x and the Lagrangian multiplier i λ that , , Therefore, the Lagrangian multiplier i λ can be treated as the consensus variable, which communicates between each DG. Moreover, when ignoring the inequality constraints, there is a linear function relationship between i λ and , i t x , which can be represented as When each DG is operating in the optimal consistent condition i λ * , the optimal power output , i t x * can be obtained [20]. When considering the inequality constraints, the optimal conditions are written as follows.
where * means the optimal condition;

The Decentralized Optimization Method Analysis
In this section, the decentralized optimization method is proposed to deal with the problem formulated in section 2. The method is presented without capacity constraints firstly, and generalized to the situation with constraints. Then, the proof of convergence and the flow of the proposed algorithm are explained in this section. Before elaborating details of the proposed method, some preliminary knowledge is presented briefly.

Graph Theory
Considering a microgrid with N DGs, a digraph ( , , ) A ζ ν ε = is used to model the network topology of the system based on the communication infrastructure [21]. The digraph consists of a nonempty finite nodes set Based on the definition of communication matrices, it is clear to gain that i, j W is a row stochastic matrix and i, j U is a column stochastic matrix. Note that the convergence will not be affected by the communication weights selection process when the above stochastic characteristics are satisfied [20].
ρ ⋅ represents the spectral radius of the matrix.

Assumptions and Lemmas
The proposed method should be subjected to the following assumption and lemmas, for convergence. Assumption 1. The digraph ( , , ) A ζ ν ε = is strongly connected.
When the digraph is strongly connected, every node in the digraph is reachable from others. Then, it can make sure that the global accessibility of the information which requires communication.

Consensus-Based Optimization Algorithm
Definition: where ( 1) i k + λ is the consensus variables of the communication between each DG; ( 1) i x k + is the output of DG; ( 1) i y k + is the mismatch between the total predicted output and the total real output, which is used as a feedback to adjust the iteration dynamically.
= , D is defined as the total value of the predicted output in section 2. The estimation method enables the algorithm to get rid of a leader and the initialized value can be any fixed admissible values Π and Π ′ , without impact on the convergence.

Proof of Convergence
To analyze the convergence, rewrite (16) as the following matrix form: x , and i y .
According to Lemma 1, it can be verified that: 1 ( 1) 1 ( ) 1 ( ( 1) ( )) 1 ( ) 1 ( 1) 1 ( ) Therefore, 1 ( ( 1) ( 1)) 1 ( ( ) ( )) T T y k x k y k x k + + + = + , which means that the sum of the mismatch and the real output keep constant with the predicted value. Then, replace all x with λ. (19) turns to be: where, It is easy to know that the eigenvalues of Γ is the union of W and U . According to lemma 1, 1 1 T w = and 1 =1 T μ . Γ has two eigenvalues which can be defined as 1 2 = =1 ϖ ϖ . According to eigenvalue perturbation theory [22], two following matrices are constructed. where, Then, we can gain that MV I = . The variation of 1 2 , ϖ ϖ can be quantified by the eigenvalues of M V Ω , and We can get the conclusion

Generalization to Constrained Condition
When considering the inequality constraints, the algorithm (16) turns to the following form.
where the relationship between ( 1) i k + λ and ( 1) i x k + is treated as (13). The initial value can be set to any admissible value as well. Initialization: updates and converges to the same value. As the total power generation is a monotone increasing function of the incremental cost, the total amount of generation will increase as well. Therefore, the feedback item will reduce the mismatch. In this process, some DGs may reach its maximum capacity. Then, the DG output holds saturation after it gets saturated or after a sufficiently long time. Therefore, the communication weights of saturated DG is equivalent to 0 i l = , and those unsaturated DGs will still participate in feedback adjustment until ( ) 0, i y k k → →∞ achieves convergence of the algorithm.

Solution Algorithm Flow
According to the discussion above, the algorithm flow is generated as shown in Figure 6. The specific steps are as follows. Firstly, based on the multi-type data, the LSTM method is used to predict the generation of DGs locally.
Step 1. Collect historical generation data, regional meteorological information of the tested regional microgrid, including the historical power, light intensity, wind speed, temperature, and humidity. The sampling period is chosen as one hour a time, which collected a total of 24 points per day.
Step 2. Preprocess the collected data to form the training data set, which replaces outliers through the adjacent daily interpolation.
Step 3. Train the LSTM neural network model annually with training data set to ensure the LSTM neural network is retrained every year.
Step 4. Collect the information of the predicted day, including the light intensity, wind speed, temperature, and humidity of the predicted day. Use the trained LSTM and the information of the predicted day to predict the local generation of the DG in the regional micro grid including WT, PV, Fe, and HT. The prediction error is considered when gaining the predicted value for fitting a feasibility interval as illustrated in (2), and the real values of the predicted day are added to the training data to update the training process for a rolling optimization.
Secondly, combined with the results of power generation prediction, the decentralization optimization model is established. Moreover, the optimization model does not depend on the load information, which only needs the predicted the output. Therefore, local operations can be implemented without a control center.
Step 5. According to the solution of optimization method proposed in (12), define the consensus variable.
Step 6. Initialization-set the initial value of the optimization variable within the valid range.
Step 7. Enter the iterative calculation process. Define the communication weights required for the iteration according to the definition described in (14).
Step 8. According to the iteration strategy (22) update the optimal variables.
Step 9. Determine whether the result is within the constraint or not. If the result is beyond the limit, modify the variables under its constraints and go back to step 5; otherwise, go to the next step.
Step 10. Criticize whether the iteration is end or not. If the mismatch meets the convergence condition, stop the iteration and print the output; otherwise, continue to iterate until convergence.

Verification of the Convergence
In this case, the convergence of the proposed method (22) is tested. As the time-scale is an hour, we chose an hour of a day randomly to operate the simulation. The simulation results-the optimal consensus variable i λ , mismatch yi, DGs output power xi, and the sum of xi are presented in Figure 7.
When the total predicted output D = 440 kW, the optimal solution is approximately Obviously, all consensus variables (Lagrange multipliers) converge to the optimal value through the proposed algorithm. As shown in Figure 8a, they rise monotonously non-decreasing until the upper boundary (Note that λ represents the incremental cost which is affected by the coefficient in the cost function). Figure 8b shows values of the feedback (mismatch) y of all DGs convergent to zero which proves that the mismatch is decayed with iteration. Figure 8c indicates the optimal power output. As shown in Figure 8d, the sum of the outputs of all DGs keep in balance with the total predicted value which meets the supply and demand constraints.

Verification of the Accuracy
To verify the accuracy of the proposed method, we chose the results of two single times to compare with the results achieved through the centralized method (quadratic programming). To gain a clearer observation, the values are presented in Table 2. It can be seen that the result of the proposed method is very close to the centralized method. Meanwhile, the sum of DGs output equals to total prediction, which satisfies the balance condition proposed in section 2. Thus, the optimization maintains the balance between power supply and load demand.

The Effect of Feedback Gain
The gain of the effect is the parameter that we need to manipulate, which plays an important role in the convergence speed and the performance. If the gain is not selected properly, the convergence will not be guaranteed. Thus, we chose four gains to test the performance, i.e. η = 0.001, 0.005, 0.01, and 0.05. The results are shown in Figure 9.  , the operation loses stability. However, in this paper, the gain η needs to have small parameters, which limits the convergence speed. In the future, a wilder parameter selection method and more relaxed convergent conditions will be studied.

Analysis of Daily Optimization Result on Hourly Time-scale
According to the data of the selected typical regions, the predicted output of DG can be obtained by the method proposed in 2.3, which can be used as the input data of the power balance constraint conditions during the decentralization optimization. To analysis the distribution of the prediction error, 1500 data of the aimed device were chosen to test, which is shown in Figure 10a. We chose the predicted value as a reference value. By comparing the prediction value and the real one, we can obtain the error. Then, through fitting the data and observe the performance in Figure 10b, it can be found that the error obeys a Gaussian distribution and the error is less that 3.5 percent. When considering the prediction error, the possibility of the prediction values is illustrated in Table 3. Considering the error of prediction, the predicted values become a range rather than a level. In this area, before 6 a.m., the PV does not work. Thus, the results are illustrated from 4 a.m. to 12 p.m. Figure 11. The predicted output of DGs.
To analyze the characteristic of the simulation curves, the largest possibility values in the ranges were chosen as an example. The predicted outputs of DGs in a typical day are illustrated in Figure  11. Figure 12 presents the proportion of each DG among the total power generation. Basing on the predicted outputs of each DG, the optimal power output can be gained by redistribution through the method proposed in 3.2. The results are shown in Figure 13 and Figure 14. As shown in Figure 13, when the prediction error is considered, the optimization results are turned to be a range of interval estimation, which is used to provide advice for day-ahead scheduling policies. Through the bar chart in Figure 14, the sum of the outputs of each DG is consistent with the total predicted values, which is equivalent to the whole load demand. It can be clearly seen that there is strong uncertainty and volatility of the outputs of renewable energy generation. By contrast, hydro power and fuel turbine generation are more stable, which can be used for supporting the stability of a microgrid system. Therefore, when there is an increase in the proportion of renewable energy such as wind power, maintaining the system stable is one of highlights in current research. Meanwhile, the results are compared in Table 4 to gain a clearer observation.  The simple time is an hour. The data presented is from 4~12 h of one day. Total is the total of optimal output. D is the total of predicted output. The value is taken as the largest possibility value.
In addition, it can be seen from the tendency of lines LD that the sum of the predicted value is consistent with the load demand. Specifically, the peak periods are from 6 a.m. to 12 p.m. and from 5 p.m. to 9 p.m. with larger load demand and power generation. The valley period is from 10 p.m. to 6 a.m. (the next day) and from 1 p.m. to 5 p.m. with smaller load demand and power generation. Meanwhile, to gain clearer observation, the values are presented in Table 4. We can see that the renewable generators WT and PV take the maximum use and the hydro power and the fuel turbines generation to adjust the mismatch flexibly aiming at the optimal objective-the minimum operation cost.

Conclusions
In this paper, a decentralized optimal operation method for DGs power allocation based on the equivalent forecasting is proposed. Firstly, a local generation prediction method was introduced into the decentralized optimization strategy to replace the load prediction center or the load sensor device. Based on the multi-type data, LSTM was used to predict the local power generation of each DG. Secondly, the uncertainty and prediction error of renewable generation was taken into account during the cost modeling process to optimize the expense comprehensively. Moreover, the system optimization model was improved based on the predicted power generation results, without load information, so that all process and parameters were designed in a fully distributed way. Then, the algorithm designing procedure was presented and the convergence was proved by eigenvalue perturbation theory. Finally, various cases are simulated and the effectiveness of the proposed method is verified.
However, during the research, there remains some questions requiring further study in the future.
1. More types of equipment, such as energy storage devices and electric vehicles, are supposed to be considered during the operation optimization of a microgrid.