A Three-Phase Model Predictive Approach for Smooth Line-Switching in Islanded Microgrids

—This paper deals with a new line-switching method that facilitates the network reconfiguration of islanded microgrids. Its distinct features include the ability to handle network asymmetries and the minimization of the line current during the switching action. This is attained by developing a sensitive-based three-phase model predictive method to determine the operating set-points of the distributed generators (DGs) that minimize the current of the candidate line participating in the switching action. These set-points correspond to the positive-sequence powers as well as the negative- and zero-sequence currents of all DGs. Furthermore, the network constraints such as voltage limits and power limits of DGs are always satisfied. Simulations are performed in a balanced 33-bus islanded network as well as in the unbalanced IEEE 8500-node network to evaluate the performance of the proposed method.

Maximum active power of DG that is assumed as slack bus Minimum active power of DG that is assumed as slack bus Maximum reactive power of DG that is assumed as slack bus Minimum reactive power of DG that is assumed as slack bus

I. INTRODUCTION
ETWORK reconfiguration techniques are applied to islanded microgrids (MGs) to improve their operational characteristics in terms of loss minimization [1], [2], voltage profile improvement [3], loadability maximization [4], reliability improvement [5] and other criteria [6]- [9]. The network reconfiguration implies the connection or disconnection of lines to change the topology of the network. However, if the current flowing through the line at the moment of executing the switching action is high, several power quality and reliability problems may occur in addition to the wear and tear cost of the switching devices [11]. This problem N is more severe in islanded microgrids since they are characterized by low levels of inertia [11].
In conventional distribution networks, switches are usually manually controlled and the line-switchings are executed only a few times per day. However, with the evolution of smart grids and the advent of MGs, all manual switches are expected to be replaced by automatic remotely-controlled switches, which may operate even in an hourly basis [10]. The frequent line-switching results in several negative impacts on the network, especially when the current flowing through the switched line is high at the time instant of switching. More specifically, in cases where the switches interrupt a line with a high current, the following negative impacts can appear in the network [11]: -large disturbances caused by the line-switching in low inertia islanded MGs can trigger outages, which can threaten the stability of the system. -voltage transients that occur after the line-switching can cause damages in sensitive loads. Simulation results presented in [11] indicate that overvoltages up to 30% can appear in islanded MGs after a line-switching, which is significantly higher than the maximum overvoltage limit expressed in the IEEE standards [12], [13]. -the wear and tear of the switching devices increases if frequent interruptions of high current occur. Ideally, the current flowing through the switched line should be zero to avoid the afore-mentioned negative impacts. Distributed generators (DGs) provide fast and flexible active and reactive power control and could be utilized to nullify the current of switched lines during the switching action. However, smoothing the line-switchings during the reconfiguration of MGs is currently an unexplored topic. To the best of our knowledge, only one paper exists in the literature so far to deal with this issue. More specifically, the authors in [11] formulate a dynamic mixed-integer nonlinear programming (MINP) problem to find the optimal active and reactive power output of DGs (by regulating the droop curves of DGs in droop controlled islanded microgrids) so that the power flowing through the switched line is minimized. However, in this study, the authors assume a balanced MG which is not realistic since islanded microgrids are generally characterized by unbalanced loading conditions. Furthermore, the computation burden of MINP is too high, which makes the method non-applicable, especially in large networks.
This paper attempts to fill this gap by proposing a threephase model predictive (MP) approach for smoothing the switching of the lines. The proposed method determines the positive-sequence output power as well as the negative-and zero-sequence currents of all DGs so that the magnitude of the currents flowing through each phase and neutral (if exists) of the switched line is minimum. The network constraints such as voltage limits and power limits of DGs are always satisfied. The proposed MP approach has the following distinct characteristics: -High accuracy. The proposed method is characterized by high levels of accuracy since it considers the network unbalances as well as the effect of neutral and grounding in the power flow results. -Reduced implementation complexity. The proposed method combines the proposed model predictive approach with the power flow algorithm, thus facilitating its implementation under real-field conditions. -Reduced computational complexity. The proposed algorithm presents very low computation time since it avoids the usage of optimization algorithms. More specifically, the optimal parameters of DGs are computed by executing only the power flow and the MP algorithm. The implicit Z-Bus power flow algorithm is applied in this paper combining high robustness with low computation time. The proposed MP algorithm is executed after the execution of power flow and it has very low computation time. The computation time is a very important factor in such applications since the proposed algorithm must be executed before the switching action, in real-time, to minimize the switched power. The rest of the paper is structured, as follows: Section II describes shortly the implicit Z-Bus method in multi-grounded distribution networks. Section III describes the proposed MP approach. Section IV includes simulation results in a balanced 33-bus islanded microgrid and the unbalanced IEEE 8500node network. Finally, Section V concludes the paper.

II.
MATHEMATICAL FORMULATION OF IMPLICIT Z-BUS POWER FLOW ALGORITHM Fig. 1. Equivalent circuit of a microgrid consisting of a DG with balanced voltage (it is assumed as slack node) and two load nodes. The loads are connected between the phases and the multi-grounded neutral conductor.
The full configuration of an unbalanced MG is presented in Fig. 1. The introduction of network unbalances as well as the detailed modeling of the neutral conductor and the grounding system increases the power flow calculation accuracy of the 4wire multi-grounded islanded MGs, as demonstrated in [15] and [16]. The slack node of Fig. 1 corresponds to a DG with voltage balancing capability (generates balanced phase-toneutral voltage). Contrary to the use of a slack bus with fixed voltage in conventional power flow algorithms, the voltage of the slack bus is adjusted in our application to mitigate the overvoltages (or undervoltages) of the network. More details regarding the slack bus are presented in the next sections.
Let us define the current and voltage vectors of node i as follows: where and denote the load current and voltage (in complex form) of node i at phase r = {a, b, c} and conductor y = {a, b, c, n, g}, respectively, as shown in Fig. 1.
For a network with m nodes, the current vectors can be expressed as a function of the voltage vectors as follows: where coresponds to the slack node. In (3), each non-diagonal element of the admittance matrix, e.g., Yij for i≠j, is defined by (4), which includes the self-and mutual admittances of each line sector between the nodes i and j. The diagonal elements of (3) are defined as: Subsequently, for the power flow solution, we remove the first five rows of (3) that correspond to the slack node, and (5) is obtained.
Then, by transferring all the voltage variables of the lefthand side of (5) to the right-hand side, (6) is derived, where and are the modified current and admittance matrices.
As a last step, we define the final matrices ′ and . The first one consists of the first five columns of , while the second one consists of the remaining columns so that = [ ′ ]. Eq. (7) is then derived from (6) by subtracting the product ′ from both equation sides.
Using (7), we finally derive (8), which is iteratively solved until a certain preset tolerance is reached. In (8), k denotes the iteration number, and the vector contains the voltages of all nodes except the slack.
The vector represents the voltage of slack node and it is balanced. In our algrithm, the magnitude of the slack node will be varied based on the power flow results so that the voltage contraints of all nodes of the network are satisfied, as it will be explained in the next sections.

A) Description of the Model Predictive Method
Let us assume that we have a three-phase 4-wire network with m buses that hosts a d number of DGs. Let us further assume that the buses k and p need to be connected through a three-phase 4-wire line. To achieve a smooth switching action, the current through the new line at the time instant of the connection should be as low as possible, or equivalently, the voltage difference between the buses k and p should be minimum. Therefore, the objective of the MP method is to equalize the voltage of buses k and p.
The variation of the real and imaginary components of the voltage of buses k and p are given in (9) as a function of the variation of the positive-sequence powers as well as the real and imaginary components of negative-and zero-sequence currents of DGs.
where the sensitivity matrix is provided at the end of the paper. In Eq. (11) is easily obtained from (9) by removing the last six rows from the first six rows of Sens matrix.
is the modified Sens matrix and it has dimension 6x6d, where d is the number of DGs.
The objective function that needs to be minimized is given by (12).  (11), using the following procedure.
We define four small steps e.g., dp, dq, − , 0 for the active power, reactive power, negative-and zero-sequence currents, respectively. The value of each step is empirically selected. In our simulations, we selected them as a small fraction (around 5%) of the maximum powers or currents of DGs. After the convergence of the power flow, we search for the action that implies the lowest cost in (12), considering only one action (+dp or +dq or + − or + 0 or -dp or -dq or -− or − 0 ) from only one DG at each time. For instance, let us assume that the action +dp of the positive-sequence active power of DG d (namely + = + in eq. (11)) leads to the lowest value of Cost function in (12). Then we increase + by + and the power flow is executed again. This process is repeated until the phase and neutral currents of the switched line are minimized. Based on our experience, ideally the steps +dp, +dq, + − , + 0 , -dp, -dq, -− , -0 should be multiplied by the parameter rand, where rand is a uniformly distributed random number between [0, 1]. In this way, the proposed MP approach is not stuck in contracting actions e.g., +dp →-dp→+dp→-dp from the same DG.

B) Derivation of Sensitivity Parameters
In this sub-section, the elements of Sens matrix (see (10) at the end of the paper) are derived. More specifically, the sensitivity of the real and imaginary voltage components of bus q={k, p} from the control variables of DG z={1, … , d} (e.g., + , + , , Firstly, it is necessary to define the impedance matrix of the network ( ), as shown in (13).
where the element of is denoted in (14). In fact, is equal to 1. Derivation of , + and , + for phase r A perturbation of the positive-sequence active power of DG z equal to dp will cause a perturbation of the three phase currents of DG z, as follows: [̇̇] = [ where + * is the complex conjugate of the positive-sequence voltage of bus z.
The perturbed currents of (15), will cause a perturbation of the real and imaginary components of voltage of bus q, as explained in (16) The sensitivity parameters are calculated by dividing (16) and (17) with dp.

Derivation of
, + and , + for phase r A perturbation of the positive-sequence reactive power of DG z equal to dq will cause a perturbation of the three phase currents of DG z, as follows: The perturbed currents of (18), will cause a perturbation at the real and imaginary components of bus q, as explained in for phase r A perturbation of the real component of negative-sequence current of DG z equal to − will cause a perturbation of the three phase currents of DG z, as follows: The perturbed currents of (21), will cause a perturbation at the real and imaginary components of bus q, as follows: A perturbation of the imaginary component of negativesequence current of DG z equal to − will cause a perturbation of the three phase currents of DG z, as follows: The perturbed currents of (24), will cause a perturbation at the real and imaginary components of bus q, as follows: A perturbation of the real component of zero-sequence current of DG z equal to 0 will cause a perturbation of the three phase currents of DG z, as follows: The perturbed currents of (27), will cause a perturbation at the real and imaginary components of bus q, as follows: The sensitivity parameters are calculated by dividing (28) and (29) with di0. A perturbation of the imaginary component of zerosequence current of DG z equal to 0 will cause a perturbation of the three phase currents of DG z, as follows: The perturbed currents of (30), will cause a perturbation at the real and imaginary components of bus q, as follows: The sensitivity parameters are calculated by dividing (31) and (32) with di0.

C) Control Constraints
The actions described in the previous sub-sections should be constrained based on the maximum active and reactive power of DGs as well as the voltage limits of the buses. For instance, assuming that DG z has reached its maximum active power limit, the action +dp for this DG is not a possible action. All constraints of the proposed MP approach are described below: Eq. (33) prevents the DG z from exceeding its active power limit ( ). is the output power of DG z calculated in the last iteration of power flow (refer to section III.D).
Eq. (34) prevents the active power of slack bus (it is reminded that the slack bus corresponds to a DG with balance phase-to-neutral voltage) from falling below its minimum power (usually 0). More specifically, if the power of DG z increases by dp, inevitably the slack power will be reduced almost by dp. Since the slack bus of the power flow corresponds to a DG, the lower power limit of this DG ( ) should not be exceeded.
Finally, (35) ensures that a rise of positive-sequence active power of DG z by +dp, will not cause a deviation between maximum and minimum voltage of the network higher than − , where and are the maximum and minimum allowable voltages e.g., 1.1• and 0.9• , respectively [17], where is the nominal voltage of the network. Ιf (35) is satisfied, then by adjusting suitably the voltage of slack bus (see eq. (47)), all the voltages will remain between and . It is pointed out that the vector ℎ− in (35) expresses all phase-to-neutral voltages of the network (m is the number of buses) calculated at the last power flow iteration, as follows: The matrix , is given in (37), using the elements of matrix of (13).
Constraint 2: +dq action for + of DG z by + − will not increase the deviation between maximum and minimum phase-to-neutral voltages beyond a limit. It is similar to (35) of constraint 1.
It is clarified that in this study, for simplicity, active and reactive power limits for the negative and zero-sequence currents were not considered due to the very low negative-and zero-sequence powers compared with the positive-sequence ones. Therefore, the active and reactive power limits of DGs are determined only by the positive sequence components. by + 0 will not increase the deviation between maximum and minimum phase-to-neutral voltages beyond a limit. The main difference of constraint 5 against constraints 3 and 4 is that the zerosequence current returns through the neutral conductor, and therefore, the voltage of the neutral is varied, as well. The matrices , , , are given by (44)

D) Steps of the Proposed Approach
The proposed algorithm is executed in the following steps: Step 1: Define the step values of control variables (dp, dq, − , 0 ). Small values of dp, dq, − , 0 lead to increased accuracy of the final solution but the convergence speed is sacrificed. Moreover, the negative-and zero-sequence currents of all DGs are initially set to zero. The positivesequence powers are arbitrarily set with initial values so that the power limits of all DGs (and the slack bus) are satisfied.
Step 2: The power flow is executed.
Step 3: Based on the power flow results, we update the Sens matrix of (10). Subsequently, we construct the matrix of (11).
Step 4: The proposed MP method is executed. More specifically, based on the power flow result of step 2, we search for the best action (±rand•dp, ±rand•dq, ±rand• − , ±rand• 0 ) between the DGs so that the cost function of (12) is minimized and the constraints of Section III-C are satisfied. Ideally, the step values of control variables are multiplied by a uniformly distributed random number between [0, 1] to prevent the MP algorithm from sticking to contracting actions from the same DG e.g +dp→-dp→+dp.
Step 5: Update the power or current of one DG based on the optimal result of the previous step.
Step 6: Update the slack voltage by , as follows: where , max( ℎ− ) , min ( ℎ− ) is the nominal, maximum and minimum phase-to-neutral voltage of the network, respectively. In this way, the phase-to-neutral voltages of all buses are always inside their limits provided that the constraints (35), (40)-(43), (46) are fulfilled.
Step 7: Go to Step 2 until the magnitudes of the three-phase and neutral current of the switched line cannot be further reduced.

IV. SIMULATION RESULTS
The performance of the proposed MP approach is investigated using a balanced 33-bus as well as the unbalanced IEEE 8500-node network.

A) 33-bus Balanced Network
Firstly, a comparison of the proposed MP approach against the mixed-integer nonlinear programming (MINP) approach of [11] is attempted in this sub-section using the 33-bus network shown in Fig. 11 of [11]. Eight switching actions are executed in a sequence, as follows: 1) closing line 35, 2) opening line 10, 3) closing line 34, 4) opening line 12, 5) closing line 36, 6) opening line 30, 7) closing line 37, 8) opening line 22. Details about the network are provided in [11]. The DG limits are shown in Table I. The voltage limits were considered ±5% of the nominal voltage. Fig. 2 depicts the per unit value of the switched power of the eight switching actions using the proposed MP method, the MINP approach of [11] and the case where no minimization of the switched power is realized. In the last case, the DGs operate in droop control achieving a proportional load sharing. It is clarified that the switching actions are executed in a row, as shown in Fig. 2, and therefore, the structure of the network is successively changed after each switching action. As shown the results of the proposed MP method are almost identical with the MINP method of [11]. Both methods achieve a significant power reduction in all switching actions compared to the case "without minimization". The slack voltage and power of DG 1, the power of the switched line, and the powers of DG 2 and 3 are depicted in Table II. In Table II, the powers of DGs that have reached their limits are depicted with bold.

B) IEEE 8500-Node Network
The topology of the unbalanced IEEE 8500 node network is shown in Fig. 3. It is a 4-wire multi-grounded MV network with a phase-to-neutral nominal voltage 7.2 kV and total loading 10.7 MW and 2.7 MVar [18]. Data about the loads and lines are provided in [18]. The neutral is assumed to be grounded every 100 buses with a grounding resistance 10 Ohm. The network is considered islanded, supplied by 5 DGs, as shown in Fig. 3. Data about the DGs are given in Table III. The network is assumed reconfigurable with 8 switching actions, as referred in Table IV. The efficiency of the proposed MP approach in the aforementioned switching actions is compared against the case, where no minimization of the line current is performed. In the last case DGs operate in droop control with a proportional power sharing. The magnitudes of the phase currents of the switched line for both cases are depicted in Table IV. As shown, the proposed MP approach achieves a significant current reduction in all phases, thus preventing the negative impacts of the line switching.
The magnitudes of the three phase and neutral currents throughout the iterative execution of the proposed MP method are illustrated in Fig. 4 for the switching action "Opening isolation switch 3" of Table IV. The horizontal axis depicts the number of MP executions. The current is almost nullified after around 70 MP executions. As explained in section III, each MP corresponds to one power flow execution, namely to around 10 power flow iterations. Therefore, the proposed approach requires in total around 700 power flow iterations (70 •10).
The optimal positive-sequence active and reactive power of DGs in order to smooth the line-switching action "Opening isolation switch 3" are shown in Figs. 5 and 6, respectively. As shown, the power limits of Table III are always satisfied  throughout the execution of the proposed MP approach The magnitudes of the optimal negative-and zero-sequence currents of DGs are depicted in Figs. 7 and 8, respectively. As shown, DGs inject a significant amount of negative-and zerosequence current to compensate the unbalance loading of the network. In contrast to MINP method of [11], in which the authors assumed a balanced network optimizing only the positive-sequence components of DGs, the proposed MP approach is able to optimize also the negative and zerosequence components.
Finally, the phase-to-neutral voltage of DG 1 (it is considered the slack bus in the power flow and has always balanced phase-to-neutral voltage) along with the maximum and minimum phase-to-neutral voltage of the network are depicted in Fig. 9. As shown, the deviation between maximum and minimum voltage remains always below 1440 V (±10% of 7200 V), which is the bandwidth imposed by the voltage constraints (35), (40)-(43), (46). The slack voltage is updated after each power flow execution according to (47), to maintain all phase-to-neutral voltages of the network between 0.9•7200 V and 1.1•7200 V.  . 2 Power of the switched line for the 8 examined switching actions of the 33-bus network, using the proposed MP approach, the MINP of [11] and the case where no minimization of the switched power is realized.

C) Computation time of the proposed MP approach
The computation time of the proposed MP approach is compared in Fig. 10 against the MINP method of [11], for the 8 switching actions (see Table II) of the balanced 33-Bus network. All simulations were executed in a PC with a 64-bit Intel Core i7, 3.4GHz CPU and 16GB RAM. As shown, the proposed MP approach is faster in all examined switching actions.
When applied in the unbalanced 8500-node network, the proposed MP approach needs 300 to 700 power flow iterations to converge, depending on the switching action. Since the execution time of each iteration is around 0.2 seconds, the total execution time of the proposed approach ranges from 60 to 140 seconds. Due to the large size of the network and the precise three-phase (5-wire a-b-c-n-g) representation of the proposed MP approach, we believe that this time is reasonable making the proposed approach an important tool for smoothing the switching actions of unbalanced islanded MGs.
Finally, it is clarified that the MINP method of [11] is not applicable in unbalanced MGs, and thus, a comparison against the proposed method is not possible in the unbalanced 8500node MG.

V. CONCLUSION
Network reconfiguration is an effective strategy applied in islanded MGs to optimize their performance. This paper proposes a sensitivity-based three-phase model predictive method to mitigate the negative impacts of the line-switchings in unbalanced low voltage and medium voltage islanded networks. The proposed model predictive method outputs the optimal positive-sequence powers as well as the negative-and zero-sequence currents of all DGs so that the current flowing through the three-phases and neutral of the switched line is minimum. Simulations were executed in a balanced islanded 33-bus as well as in the unbalanced IEEE 8500-node networks to validate the performance of the method.