A Privacy-Preserving Distributed Optimal Scheduling for Interconnected Microgrids

Abstract: With the development of microgrids (MGs), interconnected operation of multiple MGs is becoming a promising strategy for the smart grid. In this paper, a privacy-preserving distributed optimal scheduling method is proposed for the interconnected microgrids (IMG) with a battery energy storage system (BESS) and renewable energy resources (RESs). The optimal scheduling problem is modeled to minimize the coalitional operation cost of the IMG, including the fuel cost of conventional distributed generators and the life loss cost of BESSs. By using the framework of the alternating direction method of multipliers (ADMM), a distributed optimal scheduling model and an iteration solution algorithm for the IMG is introduced; only the expected exchanging power (EEP) of each MG is required during the iterations. Furthermore, a privacy-preserving strategy for the sharing of the EEP among MGs is designed to work with the mechanism of the distributed algorithm. According to the security analysis, the EEP can be delivered in a cooperative and privacy-preserving way. A case study and numerical results are given in terms of the convergence of the algorithm, the comparison of the costs and the implementation efficiency.


Introduction
Microgrids (MGs) are self-controlled entities, which facilitate the penetration of renewable energy and distributed energy resources (DERs) for economic and reliability purposes.Generally, the MG can be operated in either grid-connected [1] or island mode [2].With the development of MGs, a new typical approach is to consider where several MGs exchange energy with one another even when the MGs are isolated from the utility grid.In other words, there exist energy flows within a group of physically-connected MGs, but not between the MGs and the main grid.One promising application of interconnected MGs (IMG) is for the service restoration in a self-healing distribution system to improve the dynamic performance when islanding occurs and to extend the power supply during the system outages [3,4].Another important application is to ensure the full utilization of renewable energy resources (RESs) and improve the economic benefit and reliability in isolated areas [5].Consequently, the interconnected operation of multi-MGs is becoming a promising strategy for the smart grid.
Considering the type of MGs, the interconnection among autonomous MGs can be realized via an AC [6,7], DC [8] or AC-DC hybrid architecture [9].As a newly-emerging topic of the smart grid, there are still limited research works focused on the related problems of IMGs.The studies can be roughly divided into two categories: (1) coordinated control and (2) energy management.For the coordinated control, the feasibility (benefits) and basic controls of IMGs via AC connections were studied in [6,7].Moreover, in [5,9,10], considering that the AC MGs may be operated at different voltages and frequencies, hybrid AC/DC links and coordinated control schemes were studied for maintaining the autonomy of each MG during interconnections.For the interconnection of DC MGs, several control methods were proposed, such as the control strategy for two DC MGs [11], distributed hierarchical control [12] and distributed two-level tertiary control [13] for a cluster of DC MGs.
Energy management is another category of study for the IMG.To ensure the full utilization of RES and to minimize the operation cost, effective scheduling of the DERs and battery energy storage systems (BESS) [14] is highly necessary.Generally, if all of the MGs could share the information on their respective load data, generation data and parameters and grid parameters, the optimal scheduling could be easily realized based on the traditional centralized optimization [15], such as optimal power flow (OPF).However, for security considerations, it is not desirable for each MG to do so because the shared information could compromise the privacy of each MG.Thus, this is the basic driving force of the distributed optimization of IMG scheduling.For instance, a distributed convex optimization framework was developed for energy trading between islanded MGs [16].The problem consists of several islanded MGs that exchange energy flows by means of an arbitrary topology.In [17], the authors studied the self-organization and decentralized energy management of an MG cluster islanded from the main grid after a disruptive event.
However, even with applying distributed optimization, there are still weak points in these works.First, for privacy preserving, the algorithms require the MGs to share enough data with others during the optimization.For instance, the trading prices and corresponding trading energy should be shared between the neighboring MGs in [16], and the expected power exchange of each MG should be shared with all other MGs in [17].After long-term operation, the generation details and energy consumption patterns of one MG can be gradually inferred by other MGs using data mining [18], which could gradually affect the confidentiality and privacy [19].In the smart grid, data perturbation and aggregation are the two main privacy-preserving approaches that have been applied to avoid the inference of sensitive information from the metering data [20].For privacy preserving, the assumed attacks are mainly based on non-intrusive monitoring of energy usage traces.Typical solutions rely on battery-based load hiding [21,22], on noise injection [23] or on a multi-party computation cryptosystem [24,25].However, in the distributed optimization framework, the shared data are tightly coupled with the local optimization and circulated during the execution of the scheduling horizon.In this regard, the solutions of battery-based hiding and noise injection are difficult to apply.Second, the modeling of BESS is not considered in the optimization of IMG.For the MGs consisting of wind, solar and diesel generations, the BESS is an important component to increase the utilization of RES [26,27].With suitable sizing [26,28] and coordinated control [29], BESS could have great influence on the optimal scheduling of MGs.
To this end, this paper proposes a privacy-preserving distributed optimal scheduling method for energy management of IMG, with the consideration of BESS and RES.The main contributions of the paper are as follows: (1) based on the relationship between charging-discharging features and the battery life cost, the cost model of BESS is formulated as a quadratic polynomial; (2) by using the framework of the alternating direction method of multipliers (ADMM), a distributed optimal scheduling model and iterative algorithm is proposed; (3) based on the multi-party computation cryptosystem, a privacy-preserving strategy to protect the sharing of expected exchanging power (EEP) between MGs is designed to work with the iterative algorithm.

System Model
In this section, we describe the system model for the distributed optimal scheduling of IMG.In the MG, we take RESs, conventional distributed generation, and BESS into consideration.RESs, such as wind turbines (WT) and photovoltaics (PV), are non-dispatchable, and conventional distributed generation such as diesel, is dispatchable.BESS can be regarded as dispatchable resources for discharging and controllable load for charging.

Renewable Energy Resources
A RES unit, such as WT and PV, is not dispatchable, and its output power depends on the availability of the primary sources (i.e., solar irradiance or wind speed).Therefore, forecasting is required in order to consider them in the optimal operation of IMG [30].In the optimization, we can assume that the complex power of an RES over the scheduling horizon is given, and there is no generation cost for RES [31].

Diesel Generation
Diesel generation (DG) is a dispatchable source, which plays the role of a supplement source when there is a shortage of RES power.Diesel fuel is necessary for generation, and the relationship between cost and output power can be expressed as: where c f uel is the unit price of diesel fuel (CYN/L); P gen is the output power of the diesel generation; a g , b g , c g are the coefficients of the fuel demand of the generation to its output power [32].

BESS
The lifetime of the battery will be depleted after a certain number of charging and discharging cycles.The relationship of the BESS' lifetime loss can be described as: where L loss is the life loss percentage of BESS; A c is the effective cumulative capacity in a certain period, kWh.A total is the total effective cumulative capacity of the full life cycles, kWh.According to the manufacturing manual of the lead acid battery, it will deliver 390Q effective kWh over its lifetime with the capacity of Q [33].Furthermore, A c is decided by the battery's state of charge (SOC) and the actual capacity A c , and the relationship is described as: where λ SOC is an effective weight.When the SOC of BESS takes the value from 0.5 to 1.0, we can approximately assume that λ SOC has a linear relation with SOC [33].
where a and b are two coefficients.When BESS' SOC changes from SOC init to SOC end during the operation of discharging, the effective capacity is described as: With the consideration of the relationship between discharging power P and its duration T, SOC end can be further described as: and the equivalent accumulative capacity is Integrating ( 2) and ( 7), the lifetime cost can be described as a function of P: where I is the investment of BESS.

Optimal Scheduling Model of MGs
Given the forecasted power of WT, PV and loads, the MG operator can schedule the dispatchable resources' output power to minimize the total operation cost.Generally, the MG-n's optimal scheduling problem can be formulated as: where x BS ] is composed by the dispatchable sources' output power, in which x DG n and x BS n are DG and BESS's output power, respectively.x in n is the expected exchange power of MG-n.If MG-n imports power from IMG, x in n is positive; otherwise, if MG-n exports power to IMG, x in n is negative.γ(•) is the cost of trading x n in the IMG, which can be charged by the network investor considering the investment of power lines and network losses.d n is the MG-n's total power demand, and P uc n is the total non-dispatchable output power.Considering that the energy efficiency of BESS in charging/discharging is less than 100%, when the BESS' scheduling power is x BS n , the actual charging power should be x BS n • η, whereas the actual discharging power should be x BS n /η.As shown in ( 1) and ( 8), the cost function of DG and BS is convex, which indicates that the cost function h n (x) is convex, as well.
As for the constraints, ( 10) is set to keep the power balance of MG; (11) ensures that the output power of DG is in the range of rated capacity; (12) is used to limit the output power of the BESS, according to the fact that the charging/discharging power should not exceed the maximum power of the bi-directional inverter; (13) sets the maximum and minimum SOC of BESS in operation.

Optimal Scheduling Model of the IMG
In the environment of interconnected operation, all participating MGs are trying to lower their total operation cost by considering the cost efficiency of DERs and scheduling in a cooperative way.For an IMG containing N MGs, its optimization problem can be formulated as [16]: where 1 T is the unit row vector.
It is noted that in (14), all of the participating MGs are assumed to work as a coalition [34], in which they will aim to minimize the global operation cost of the IMG.
In general, there are two methods to solve this optimal scheduling problem: centralized optimization and distributed optimization.In the centralized method, all private information of each MG needs to be collected by the control center (CC), and the optimal scheduling result will be distributed to each MG after optimization, as shown in Figure 1.

ADMM
ADMM was proposed by Gabay in the 1970s and has been widely used in large-scale distributed computing and optimization [35].With the excellent performance in convergence and robustness, the method has drawn great attention in recent years.In the field of power system optimization, ADMM has also been used to solve the distributed optimization problem [36,37].The basic form can be described as: where Functions s and g are all convex.When function s is R n → R ∪ {+∞} and g is R m → R ∪ {+∞}, the algorithm can converge to the optimized solution [35].

Decentralizing the Problem
To decentralize objective Function ( 14), we define the following function according to the standard ADMM form [35]: To make the equation simple, we can express x in as: Combined with (9), Function ( 14) can be further described as: x in − z = 0 (18) where indicates the EEP vector of MGs in IMG.Through variable z, objective function (18) can be solved in a distributed manner.
According to the standard iteration form of ADMM, the problem's iteration process can be described as: where ρ > 0 is a given penalty coefficient; k is the number of iterations; u n is the Lagrange multiplier for the equation constraint of (18).In the process of updating z, all x in n should be collected.To enhance the privacy-preserving ability and simplify the iteration, we can have: and then, ( 16) can be transformed as: For any z, its update in ( 19) is equivalent to: For any constant z, the Lagrange equation of ( 22) can be described as: where µ is the Lagrange multiplier for the constraint in (22).As ( 22) is a convex function, the necessary and sufficient condition is: For any constant z, g(z) is a scalar, and the condition ∇ z L(z, µ) = 0 translates to: After some manipulation, ( 24) and ( 25) collectively imply: where we have used the same overline-notation for x in k+1 and u k : By employing (26) in (22), the z-update introduced in ( 19) can be equivalently formulated as: After being simplified, it is only needed to update z, and the Lagrange multiplier u n can be expressed as: Combining ( 28) and ( 29), replace z k n in the updating process of x n , and then, the simplified distributed iteration form is: According to (21), the result of update z would be: The final form of the distributed iteration can be described as: From ( 32), we can know that only the average EEP in IMG is required in the optimization, and the Lagrange multiplier's updating can be calculated within each MG.
As shown in Figure 2, by using the distributed optimization, each MG solves its own optimal scheduling and can finally reach the global optimal solution by informing its EEP to other MGs during the iterations.Furthermore, the dual residual can be used as the stopping criteria for the iteration convergence.
When the residual satisfies the following conditions, it is considered to achieve convergence, and the iteration is stopped.
in which ε is the convergence error.The calculation process of the distribution optimal scheduling is described in Algorithm 1.
Algorithm 1 Distributed scheduling algorithm end while 10: end procedure

Privacy-Preserving Strategy
As shown in (27) and Algorithm 1, each MG should share its own EEP.After that, the average EEP will be calculated and sent back to all of the participating MGs.Considering the privacy, each MG should share its own EEP, but does not want to show it to the other MGs.By coincidence, as the Paillier cryptosystem has the features of homomorphic addition, indistinguishability and self-blinding, it is feasible to transfer the addition of plaintext EEPs to the multiplication of ciphertext EEPs, which makes it quite suitable for privacy preserving in the sharing of EEPs [38].

Basic Theory of the Paillier Cryptosystem
The Paillier cryptosystem is widely used in a distributed environment and can protect users' privacy in the collaboration process [39].The basic schema of Paillier includes three parts, which are described as follows [38].

Key Generation
Select two prime numbers p and q, and calculate N k = pq and λ k : where lcm means the operation of calculating the lowest common multiple.We denote Euler's totient function φ(n) taken on N k , i.e., φ(N k ) = (p − 1)(q − 1) in the present case.Recall that |Z * is needed and should satisfy: where L(x) = (x − 1)/N k and gcd is the operation of calculating the greatest common divisor.The Paillier public key and private key are < N k , g k > and λ k .

Encryption
Assume that m c ∈ Z N is plaintext, w ∈ Z N is a random number and E(•) is the encryption operation.
k is ciphertext and D(•) is the decryption operation with the private key λ k .
To secure the Paillier cryptosystem's privacy, parameter N k and g k should be big enough.∀m c1 , m c2 , w 1 , w 2 ∈ Z N , the formula holds: which indicates that the result of the multiple operation of two ciphertexts is equal to the encryption result of the sum of two plaintexts, and this is Paillier's homomorphic addition characterization.
As can be seen, the plaintext should be an integer in the process of encryption, but the information exchanged might be decimals in actual applications.To make this cryptosystem useful, a constant multiple is used to amplify the plaintext.

Protocol of EEP Sharing
Firstly, an authority entity for the IMG is required, which is denoted as AU.The public key and private key of the AU are denoted as < N AU , g AU > and λ AU .The public key < N AU , g AU > is known to every MG participating in the IMG, and the private key λ AU is only known by the AU itself.
Secondly, the sharing for the EEP of every MG is implemented in a series manner.The route of information delivery must be fixed and known to every MG for each iteration.
As we know, x in n is the private data of MG n, and its ciphertext encrypted by the public key of AU can be denoted as E(x in n ), which is transmitted from MG n to n + 1.After each step, AU is the last receiver of the ciphertext and uses its private key to decrypt and broadcast the data to all of the MGs.The detailed information exchange procedure is listed as follows (see Figure 3).Step 1: Every MG optimizes its own EEP x in n , encrypts the plaintext by using AU's public key and gets the ciphertext E(x in n ).
Step 2: MG 1 transmits E(x in 1 ) to MG 2, and then MG 2 should calculate as: After calculation, E(x in 1 + x in 2 ) is transferred to the next MG and does the same operation until the last MG.
Step 3: The last MG N sends the cipher data to AU, and AU has the private key to perform the decryption process.Finally, the average EEP for distributed optimization is broadcast to all MGs.

Security Analysis of the Protocol
We use the semi-honest security model to analyze the protocol [40].This model assumes that the involved parties, in our case MG 1 to MG N and the AU, perform the protocol steps properly, but are also allowed to store the messages from previous steps in an attempt to deduce more information than they are entitled to.Based on the semi-honest model, we can enumerate three different attach scenarios: (1) all of the MGs are trustful, but the AU is untrustful; (2) some of the MGs are untrustful and collusive, but the AU is trustful; (3) some of the MGs are untrustful and collusive, and the AU is also untrustful.

•
For the first scenario, the sensitive data of each MG x in n are encrypted and delivered on a fixed path.The AU can receive the ciphertext of summing EEP E(∑ N n=1 x n ).Although the plaintext can be decrypted as ∑ N n=1 x n , the actual data of arbitrary MGs cannot be deduced.

•
For the second scenario, as the EEP of each MG is encrypted by the public key of AU E(x in n ), even if there are a number of collusive MGs, the plaintext of any MGs cannot be obtained without the private key of AU.

•
For the third scenario, we assume that there are N c collusive MGs.(a) When N c = N − 1, that is only one non-collusive MG exists (denoted as MG-a), then, the MG-a is the target of the collusive MGs.In this case, if all of the collusive MGs can share their own plaintexts with the AU or set their EEPs to zero, the AU can get the privacy data of MG-a.Otherwise, the privacy of MG-a still can be guaranteed.However, this condition is difficult to achieve, since it would also affect the privacy of the collusive MGs or make it easy to be detected by MG-a.(b) When N c < N − 1, that is the number of non-collusive MGs is not less than two.Similar to the condition of N c = N − 1, the untrustful AU can only get the sum of EEPs from the non-collusive MGs (e.g.∑ N−N c n=1 x n ) even with the worst conditions.Therefore, the privacy-preserving protocol can guarantee the privacy of every MG under the check of the semi-honest model.

Basic Data
As shown in Figure 4, an IMG composed of three MGs is used to test the proposed distributed scheduling method.The parameters of DERs and BESS are listed in Tables 1 and 2, respectively.In the case study, 15 min is set as the length of a time slot.That is, there are 96 time slots in a day.The optimization is solved in a distributed manner by using the short-term forecasted power of PVs, WTs and loads, and only the encrypted information of the EEP should be delivered during the process of optimization.The net load curves of the MGs and the total net load curve of the IMG are shown in Figure 5. Apparently, these MGs have different net load profiles.The IMG has negative net load in Time Slots 1-17, 33-61 and 91-96.In these time slots, BESSs need to store the excess renewable energy.While in other time slots, BESSs or DGs should discharge or generate power to satisfy the load demand, considering their operation costs.

Result and Analysis of the Distributed Optimal Scheduling
The convergence of the distributed algorithm in each time slot is shown in Figure 6.The algorithm can achieve convergence in 40-50 iterations for almost every time slot, which indicates that the ADMM has good performance on solving this problem.Moreover, to analyze the evolution of the internal variables of three MGs, the 26th time slot in the scheduling horizon is chosen as an example, as shown in Figure 7.During the iteration process, the results show that each MG has decided its own scheduling scheme with the interaction of the shared EEP values, and all of the MGs finally approach the global optima without any changes for their solutions.The output power curves of all of the controllable DERs are shown in Figure 8, and the curves of power exchanged via the connecting tie lines are shown in Figure 9.In Time Slots 1-17, 33-61 and 91-96, the total power of PVs and WTs is much higher than the load demand, so the BESSs are working in charging mode to store the surplus RES energy (the values are negative in Figure 8).
When the PVs and WTs cannot satisfy the load demand, the BESSs and DGs are scheduled to discharge or generate power and, thus, secure the IMG's operation.The output power of each controllable energy resource is decided by the cost characteristics.In Figure 8, we can find out that the energy of BESSs is utilized as first priority when there is a shortage of RES (i.e., Time Slots 15-25 and 61-71).After that, the DGs are scheduled to generate the remaining shortages (i.e., Time Slots 25-35 and 71-91).Furthermore, Figure 9 shows the curves of the decided exchanging power of different tie lines in the IMG.Combined with Figures 5, 8 and 9, the results show that the distributed optimal scheduling is reasonable for the operation of the IMG.

Comparison with the Centralized Optimization
The operation costs of the IMG are respectively obtained by using the centralized optimization and the distributed optimization, shown in Figure 10 and Table 3.The results show that the distributed optimal scheduling method is approximately the same as the centralized optimization; there are only minor errors in several time slots, which are mainly because of the rounding errors in the calculation.

Comparison of Operation Cost between the Isolated Mode and Interconnected Mode
Assuming that all of the MGs can be operated in the isolated or interconnected mode, the operation cost of both modes are given in Table 4.In the isolated operation mode, the results show that there is discarded RES energy in MG1 and MG3.Due to the low load requirements and limited BESS in these two MGs, the RES energy cannot be fully utilized.Finally, the discarded energy has a great influence on the operation cost of MGs.As for the comparison, in the interconnected mode, the results show that the MGs are highly complementary in RES energy consumption, which has significantly decreased the overall cost of IMG.

Operation Cost Analysis for the Different Configured Capacities of BESS
Assuming that the BESS capacity has been changed from 0.7-1.2-times the original capacity in Table 1, the sensitivity analysis of the overall operation costs with different capacities of the BESS in MGs is shown in Figure 11.The results show that the cost change tendency can be categorized as two stages.First, from 0.7-0.9, the operation cost of IMG is reduced in this stage.This is mainly due to the discarded power of RESs having been decreased with the increasing of the BESS capacity, which eventually saves the cost of DGs.Second, from 0.9-1.2, the operation cost of IMG is increased with the increasing of the BESS capacity.Considering that no more discarded RES power can be saved, the overall cost of IMG has been increased with the investment of BESS.

Analysis for the Impact of Forecasting Errors
In the optimal scheduling, the solutions are obtained based on the short-term forecasting of RES power and load.In fact, the forecasting errors may cause unbalance between the generations and loads.Thus, in the interconnected operation, we assume that all of the MGs are working in the fixed power control of interconnection tie-lines.In this regard, all of the forecasting errors of load and RES could result in the autonomous power regulation of BESS or diesel generators in each MG, to keep the power balance and possible cost deviations by the MG itself.The detail of this control model can be found in [15].Moreover, to analyze the influence of operation cost caused by the uncertain forecasting errors, we assume that the forecasting errors are randomly located in [−10%, 10%] [30].By using the control model [15], the final operation cost with balance regulations is shown in Table 5.The results show that the forecasting errors have very limited influence on the total cost of IMG, in which the costs of MG1and MG3 are reduced and the cost of MG3 is increased.It is apparent that the forecasting errors have the largest impact on the cost of MG1.Considering that MG1 has the largest capacity of RES, this is reasonable in the operation.

Efficiency Analysis of the Privacy-Preserving Protocol
As the privacy-preserving strategy is implemented as a series procedure in a wide area distributed environment, it is important to test the time requirement to finish the whole process of the distributed optimization.Therefore, we construct an experimental platform consisting of several computers and 3G communication networks.After complete implementation of one day's 96 time slot optimization, the execution time for each procedure is listed in Table 6, including the objection function solution, encryption, communication and decryption.As shown in Figure 6, almost all of the scheduling of every time slot can be converged in around 50 iterations.Combined with the privacy-preserving protocol and the results of Table 6, the time requirement for one scheduling time slot can be finished in around 10 min.The result means that the minimum length of one time slot for the scheduling should be more than 10 min.Therefore, the method is suitable for the IMG's optimal scheduling problem of day ahead, hour ahead and even 15 min ahead.

Conclusions
A privacy-preserving distributed scheduling method for IMG with battery storage and renewable energy resources is proposed.According to the case study and experiment results, the method has almost the same optimization result with the centralized optimization, and the privacy of each MG can also be guaranteed.The processes of the iteration algorithm and privacy-preserving have delayed the implementation time of optimal scheduling, but still can be accepted for the condition with the minimum time slot longer than 10 min, which is suitable for the optimal scheduling problem of IMG.
The proposed method can be extended in several ways.Firstly, one interesting problem is the involvement of flexible loads (i.e., shiftable appliances, controllable heating, ventilation and air conditioning loads, etc.).In this scenario, the MG operator can choose to adjust the load, the generation of DGs or trade with other MGs, with the comprehensive consideration of the generation cost, trading price, load characteristic and demand response cost.Secondly, another interesting problem is the time horizon of optimization.In energy management that includes multiple time periods, the intertemporal constraint for remaining energy of BESS should be further considered.This constraint may have an influence on the distributed model, which needs further study.Finally, as the participating MGs are assumed to work as a coalition, the basic principle for forming a coalition and the related re-distribution strategy of cooperative benefits by using the IMG still need further research.

Figure 2 .
Figure 2. Distributed optimal scheduling of the IMG.

Figure 3 .
Figure 3. Information transmission process of the privacy-preserving strategy.

Figure 5 .
Figure 5. Net power curves of the MGs.

Figure 6 .
Figure 6.Convergence of the distributed optimization algorithm.

Figure 7 .
Figure 7. Evolution of the internal variables for the 26th time slot.

Figure 8 .
Figure 8. Scheduling results of the controllable DERs using the distributed optimization.

Figure 10 .
Figure 10.Errors between the operation cost of centralized optimization and distributed optimization.

Figure 11 .
Figure 11.Sensitivity analysis for the different capacities of BESS.

Table 1 .
Parameters of the distributed energy resources (DERs).WT, wind turbine.

Table 2 .
Parameters of the battery energy storage systems (BESSs).

Table 3 .
Comparison of the operation cost by using the centralized and distributed optimization.

Table 4 .
Cost and discarded renewable energy resources (RES) energy in isolated and interconnected operation.

Table 5 .
Operation cost of the MGs considering the forecasting errors.

Table 6 .
Execution time of the experiment.