Optimal Operational Scheduling of Reconﬁgurable Microgrids in Presence of Renewable Energy Sources

: Passive distribution networks are being converted into active ones by incorporating distributed means of energy generation, consumption, and storage, and the formation of so-called microgrids (MGs). As the next generation of MGs, reconﬁgurable microgrids (RMGs) are still in early phase studies, and require further research. RMGs facilitate the integration of distributed generators (DGs) into distribution systems and enable a reconﬁgurable network topology by the help of remote-controlled switches (RCSs). This paper proposes a day-ahead operational scheduling framework for RMGs by simultaneously making an optimal reconﬁguration plan and dispatching controllable distributed generation units (DGUs) considering power loss minimization as an objective. A hybrid approach combining conventional particle swarm optimization (PSO) and selective PSO (SPSO) methods (PSO&SPSO) is suggested for solving this combinatorial, non-linear, and NP-hard complex optimization problem. PSO-based methods are primarily considered here for our optimization problem, since they are e ﬃ cient for power system optimization problems, easy to code, have a faster convergence rate, and have a substructure that is suitable for parallel calculation rather than other optimization methods. In order to evaluate the suggested method’s performance, it is applied to an IEEE 33-bus radial distribution system that is considered as an RMG. One-hour resolution of the simultaneous network reconﬁguration (NR) and the optimal dispatch (OD) of distributed DGs are carried out prior to this main study in order to validate the e ﬀ ectiveness and superiority of the proposed approach by comparing relevant recent studies in the literature.


Introduction
Distributed generations (DGs) and local loads can be considered as self-sustainable entities operating as a subsystem of the distribution system by way of the increased penetration of distributed energy resources (DERs) into distribution grids [1]. This subsystem is called a microgrid (MG), which is an aggregation of different types of local loads (controllable or fixed loads), a variety of DERs, and storage devices that can be operated in grid-connected as well as islanded modes [2,3]. Even though the current MGs are technically static, they are about to transform into dynamic systems called reconfigurable MGs (RMGs) thanks to the addition of reconfiguration capability to the MGs via smart switches [4]. Higher levels of cost-effectiveness, efficiency, reliability, and power quality can be indicated as advantages of RMGs for customers even though challenges remain. Primary goals can be achieved by controlling and changing MG topology via the use of remote-controlled switches (RCSs) to control and change the MG topology, which can be represented as the primary objective of using RMGs [5].
s.t. h i (x) = 0 ; i = 1, . . . , p In this paper, the optimization problem is a minimization problem with its equality and inequality constraints given in the following sections.

Objective Function
The NR techniques and OD of DG units that eventually decide the direction of power flow in a MG have a significant impact on power loss reduction and voltage profile improvement for the whole system. Hence, minimizing the sum of active power losses in all branches as given in the following equation [16] is the primary goal of our specific problem:

Operational Cost Calculation
The total operational cost is comprised of the purchasing power cost from the main grid (Cost RMG ) and production cost of DGs (Cost DG ).

Cost of Purchasing Power from the Main Grid
The RMG has to purchase power from the upstream grid when DGs are not able to meet total energy demand. The total active power purchase for this case is calculated as follows [13]: Energies 2019, 12, 1858 4 of 17

The Operation Cost of Dispatchable DG Units
DG production cost on a daily basis, which consists of the fuel cost, is calculated by the following mathematical relation [21]:

Constraints
Some of the equality and inequality constraints of the RMG have to be considered during the simultaneous application of reconfiguration and the OD of DGs in an RMG. The constraints considered for this study are given as follows [13,31].

Power Balance Constraint
The power balance constraint always must be met through the following equation:

Inequality Constraints
• Maximum and minimum generation constraint: There is a constraint for the maximum and minimum active power generation of dispatchable units, which can be stated as indicated below: P min DGi (t) ≤ P DGi (t) ≤ P max DGi (t) (10) • Bus voltage limits: (11) It is required that the bus voltage values, V i , should range between minimum and maximum values after reconfiguration. In this study, these limits are set to V min = 0.90 p.u. and V max = 1.10 p.u., respectively.
• Branch current limits: The amount of the flowing current I i at the i th branch should not be greater than its maximum thermal value I i max .
• DG capacity constraint: The renewable energy policies in some of the countries have a great impact on DG penetration rates. For our study, the total injected active power from the renewable DGs is assumed to vary between 10-60% of the total active power load in the distribution network as in [31], namely:

Radiality Constraints
Throughout the NR process, all possible MG configurations should be in radial condition. Furthermore, there must not be any loops, and all loads must be connected to the main power supply in the MG's topological structure. That can be expressed by the following formula [31]: (14) 3. Proposed Optimization Method

Overview of PSO and SPSO
PSO is a population-based metaheuristic optimization algorithm introduced by Kennedy and Eberhart in 1995. Although PSO was first developed for continuous and non-linear optimization problems, it was then enhanced to solve a variety of optimization problems in the fields of engineering and science. In these areas, PSO is preferred primarily with regard to faster convergence rate, accuracy, parallel calculation, and simple application in comparison with other optimization methods. In this part, the mathematical structure of the basic and selective PSO is explained in detail [26,27,32].
The PSO method is created according to the study of the behavior of clustered social animals such as the school of fish and a flock of birds. There is a population of n particles in D-dimensional space with each particle representing a possible solution for PSO which are defined by two parameters as position (p i ) and velocity (v i ), and are initially chosen randomly. They are updated in each iteration based on their own experience and experience from other 'particles' in the group p best and g best . The following model is taken as the basis for updating the parameters: v k+1 iD = ω × v k iD + c 1 × rand × p best−i − p k i + c 2 × rand × g best−i − p k i (15) p k+1 i = p k i × v k+1 i (16) ω is the inertia weight and is calculated by the following formula: (17) The velocities are confined in the range of [0,1] by way of applying sigmoid transformation on the velocity parameters in binary PSO, thereby ensuring that the particle position values are either 0 or 1: A minor change has been proposed by Khalil and Gorpinich to binary PSO, SPSO by keeping the search in the selected search space. The search space in SPSO at each D dimension S D = [S D1 , S D2 , . . . , S DN ] is comprised of a set of DN positions, with DN representing the number of selected positions in dimension D. As in the basic PSO, a fitness function is described; in SPSO, it maps at each D dimension from DN positions of the selective space S D , which leads to alter the position of each particle from being in real-valued space to be a point in the selective space, thereby changing the sigmoid transformation as per (20): The dimension of the reconfiguration problem is indicated by the number of tie switches in the MG states. Some loops are present in the network when all tie switches are closed, with the number of loops equal to the number of switches. The search space in a certain dimension is comprised of all branches in the loop that defines that dimension. The branches out of any loop are not considered in the optimization algorithm. If there is a common branch that belongs to more than one loop, it should be placed just in one loop in the dimension. SPSO can be applied for determining the optimum configuration as soon as the dimensions and search space for each dimension are determined.

Proposed Method
In this work, the discussed framework is NR in parallel with the OD of DGs aiming at minimize real power losses with some constraints on the MG. From the most basic point of view to the overall problem, the PSO algorithm is chosen due to its improved potential in solving discrete, non-linear, and complex optimization problems. The motivation of integrating PSO and SPSO algorithms is to combine the advantages of both PSO approaches [27,33,34].
In particular, OD is a non-linear optimization problem with many equality and inequality constraints that states the optimal power output of DGs to meet the forecasted electrical loads from an economic perspective. Conventional optimization methods may not be efficient for these types of problems because of local optimum solution convergence, while metaheuristic optimization techniques, especially PSO, have achieved amazing success by solving such type of OD problems in the last decades.
MG reconfiguration constitutes the combinational part of the whole optimization problem. Distribution system planners work with a large number of switches for ensuring that the proper regulation of power and radial configuration is attained for each load. It is possible to maintain radiality by setting the sectionalizing switches (normally closed) and the tie switches (normally open). Various switch combinations can be obtained using an accurate switching operation plan. This combinatorial nature of the constrained optimization problem can be easily dealt with by embedding selective operators into the standard PSO.
The optimization problem becomes more complex when the time sequence variation in load, power market price, and output power of DGs are taken into consideration. The problem with the majority of the metaheuristic methods is the high computation time for larger systems, which may hinder real-time operation. Therefore, PSO is preferred to overcome the complexity of the optimization problem due to its faster convergence rate, accuracy, parallel calculation, and easy application.
It is very important how MG parameters are associated with optimization parameters for the simultaneous MG reconfiguration and ED problem. The OD for the DG units is carried out by the basic PSO using the proposed PSO&SPSO method, while the switch positions are determined by the SPSO method simultaneously at every iteration. The dimension of search space is equal to the number of diesel DGs, while it is equal to the tie switch numbers in the MG. In the next section, the PSO&SPSO procedure is presented for the test MG system and given the case results.

Test System Features
In this study, the standard IEEE 33-bus test system, a balanced and radial distribution network with a voltage level of 12.66 kV and 100 MVA base apparent power, is handled as an RMG. The voltage at the reference bus (PCC), as well as the upper and the lower limits of voltage for other buses are 1.0 p.u, 1.1 p.u., and 0.9 p.u., respectively. There is a total of 32 sectionalizing switches (S1-S32) and five tie-switches (S33-S37) in the system, which are indicated by solid and dotted lines in Figure 1, respectively. Regarding RMG operational scheduling, it is considered that a wind turbine (WT) is integrated into bus number 6 on the RMG [36]. The estimated power output of the WT as given in Table 2, including the electricity demand and power price values for a 24-h time period for that scheduling framework of RMG are the same as those in [25].  Figure 2 has been presented in the form of a graph in order to see the daily load distribution comparable with power pricing. Furthermore, the main assumptions made in the test cases in [21] have been taken into account for this study. Tie Line S18 S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S25 S22 S19 The total real and reactive power demand of the test system is 3715 kW and 2300 kVAr, respectively. The load data and line data can be found in [35]. Three diesel DGs with 4 MW total real power capacity operated at a unity power factor are installed in different buses, as stated in Table 1. Regarding RMG operational scheduling, it is considered that a wind turbine (WT) is integrated into bus number 6 on the RMG [36]. The estimated power output of the WT as given in Table 2, including the electricity demand and power price values for a 24-h time period for that scheduling framework of RMG are the same as those in [25].  Figure 2 has been presented in the form of a graph in order to see the daily load distribution comparable with power pricing. Furthermore, the main assumptions made in the test cases in [21] have been taken into account for this study.

PSO&SPSO Procedure for the Optimization Problem
In the proposed PSO&SPSO algorithm, the particles are comprised of two decision variables sets, namely possible switch configurations (SD), and the DG power output values (PDG), as shown in (24): x = S1, S2, … , Sk, PDG − 1, PDG − 2, … , PDG − n (21) Here, k is the tie switches number, and n represents the total DG number. The switch positions in this approach are determined by the SPSO algorithm, while the OD of the diesel DG units is done with the basic PSO algorithm at each iteration. Both algorithms have a common objective function for minimizing the active power loss of the whole system. Table 3 shows the parameters used in PSO&SPSO. Table 3. The parameters used in the combined particle swarm optimization and selective PSO (PSO&SPSO) algorithm.

The Common Parameters of the Combined PSO&SPSO Algorithm Value
Swarm population (n) 50 Maximum iteration number 200 wmax 0.9 wmin 0.4 Accelaration coefficients (c1, c2) 2 Figure 1 shows the test RMG system with all the specified sectionalizing switches and tie switches. The dimension of the SPSO algorithm is equal to the number of loops that are formed by closing all the tie switches in the RMG. Each dimension corresponds to a search space consisting of all the branches of the loop indicated with that dimension. Regarding our particular optimization problem, there are five loops in this RMG test system once the tie switches (S33, S34, S35, S36, S37) are closed. Therefore, the dimension is equal to five, and the search space in the SPSO algorithm is also represented by this dimension as five. Table 4 shows the loops comprised of the respective branches (switches) on the RMG test system, which also represents each search space. In this case, the connection to the feeder must be maintained continuously, and the switches that are common in the loops should appear only in one loop at a time. The switches of the test system that are not in any loop do not belong to any of the search spaces and thus are not taken into consideration in the

PSO&SPSO Procedure for the Optimization Problem
In the proposed PSO&SPSO algorithm, the particles are comprised of two decision variables sets, namely possible switch configurations (SD), and the DG power output values (PDG), as shown in (24): Here, k is the tie switches number, and n represents the total DG number. The switch positions in this approach are determined by the SPSO algorithm, while the OD of the diesel DG units is done with the basic PSO algorithm at each iteration. Both algorithms have a common objective function for minimizing the active power loss of the whole system. Table 3 shows the parameters used in PSO&SPSO. Table 3. The parameters used in the combined particle swarm optimization and selective PSO (PSO&SPSO) algorithm.

The Common Parameters of the Combined PSO&SPSO Algorithm Value
Swarm population (n) 50 Maximum iteration number 200 w max 0.9 w min 0.4 Accelaration coefficients (c1, c2) 2 Figure 1 shows the test RMG system with all the specified sectionalizing switches and tie switches. The dimension of the SPSO algorithm is equal to the number of loops that are formed by closing all the tie switches in the RMG. Each dimension corresponds to a search space consisting of all the branches of the loop indicated with that dimension. Regarding our particular optimization problem, there are five loops in this RMG test system once the tie switches (S33, S34, S35, S36, S37) are closed. Therefore, the dimension is equal to five, and the search space in the SPSO algorithm is also represented by this dimension as five. Table 4 shows the loops comprised of the respective branches (switches) on the RMG test system, which also represents each search space. In this case, the connection to the feeder Energies 2019, 12, 1858 9 of 17 must be maintained continuously, and the switches that are common in the loops should appear only in one loop at a time. The switches of the test system that are not in any loop do not belong to any of the search spaces and thus are not taken into consideration in the optimization algorithm [27]. Once the switches are selected and the connection conditions are met, it should be investigated whether the test system is radial or not. The optimal solution can be assigned once radiality condition is obtained. Table 4. The loops of the RMG test system in the SPSO algorithm.

PSO&SPSO Procedure for the Optimization Problem
Here, RMG operational scheduling study is treated as a continuation of two parts. First of all, the effectiveness and validity of the suggested method are tested on the 33-bus IEEE radial test system with three diesel DGs of 4-MW maximum real power capacity for a one-hour period. The proposed method is performed on the RMG test system with integrated WT for a 24-h time period after having an effective hourly solution, as presented in Table 5. The implementation details are given in the following sections. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows: •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows: which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base case while the minimum voltage level throughout the network is improved. However, it has been put forth in another relevant study in the literature [16], [4] that the rate of reduction in active power loss by the EP method is slightly higher, whereas the rate of improvement on the voltage level in this study has not been emphasized.
The OD of the DG units is performed in the fourth case study first by using the basic PSO algorithm and after that, the network is reconfigured by applying the SPSO algorithm on the MG test system. The best active power loss reduction is obtained at a rate of 77.71% in comparison with all previous studies. Furthermore, the minimum voltage level on the system is very close to the nominal value (around 0.99 p.u.). The total capacity of dispatched DG units is around 2.6 MW, and the total operating cost is calculated as 393.97 Euro. It can be seen from the table that better results are obtained for active power loss minimization and voltage level improvement in comparison with those of other studies in the literature.
Finally, the network reconfiguration and the optimal OD of the DG units are applied simultaneously to the MG test system. Whereas the generation capacity of DG units is around 2 MW (50%) in total in this study, the total operating cost is reduced to 306.52 Euros. The rate of active power loss reduction is much better compared to the aforementioned case studies and the studies surveyed in the literature so far by approximately 80%, as can be seen in Table 5. The obtained minimum voltage level is closest to the unit value (1 p.u.) among the relevant studies in the literature, and the voltage profile improvement can be seen in Figure 3. Also, the convergence profile of PSO&SPSO in this case is shown in Figure 4.
operating cost is calculated as 393.97 Euro. It can be seen from the table that better results are obtained for active power loss minimization and voltage level improvement in comparison with those of other studies in the literature.
Finally, the network reconfiguration and the optimal OD of the DG units are applied simultaneously to the MG test system. Whereas the generation capacity of DG units is around 2 MW (50%) in total in this study, the total operating cost is reduced to 306.52 Euros. The rate of active power loss reduction is much better compared to the aforementioned case studies and the studies surveyed in the literature so far by approximately 80%, as can be seen in Table 5. The obtained minimum voltage level is closest to the unit value (1 p.u.) among the relevant studies in the literature, and the voltage profile improvement can be seen in Figure 3. Also, the convergence profile of PSO&SPSO in this case is shown in Figure 4.  •

Day-ahead scheduling in the presence of renewable resources
Five different cases have been studied in this section with the results given in Table 6. An initial IEEE 33-bus test system is used in cases I and II, while the same test system is considered as an RMG with three diesel DGs by 2-MW maximum real power capacity, which was already installed at the for active power loss minimization and voltage level improvement in comparison with those of other studies in the literature.
Finally, the network reconfiguration and the optimal OD of the DG units are applied simultaneously to the MG test system. Whereas the generation capacity of DG units is around 2 MW (50%) in total in this study, the total operating cost is reduced to 306.52 Euros. The rate of active power loss reduction is much better compared to the aforementioned case studies and the studies surveyed in the literature so far by approximately 80%, as can be seen in Table 5. The obtained minimum voltage level is closest to the unit value (1 p.u.) among the relevant studies in the literature, and the voltage profile improvement can be seen in Figure 3. Also, the convergence profile of PSO&SPSO in this case is shown in Figure 4.  •

Day-ahead scheduling in the presence of renewable resources
Five different cases have been studied in this section with the results given in Table 6. An initial IEEE 33-bus test system is used in cases I and II, while the same test system is considered as an RMG with three diesel DGs by 2-MW maximum real power capacity, which was already installed at the •

Day-ahead scheduling in the presence of renewable resources
Five different cases have been studied in this section with the results given in Table 6. An initial IEEE 33-bus test system is used in cases I and II, while the same test system is considered as an RMG with three diesel DGs by 2-MW maximum real power capacity, which was already installed at the same buses as in the previous cases of a benchmarking study, and a WT that was already installed at the bus 6 is used in other cases. In all the optimization case studies here, the proposed single-objective problem is optimized at every time sequence by considering hourly load demand and non-dispatchable DG unit (WT) output power profiles. The cases that are performed for a 24-hr period are briefly as follows: •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows: which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO Case I: For this case, AC power flow analysis is executed for the initial IEEE 33-bus test system without any distributed DG units. •

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is Case II: Reconfiguration of the MG test system which is the same as in case I is performed by using the SPSO algorithm in this case.
with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case III: Unlike case 2, NR is performed here by using the SPSO algorithm for a distributed DGs (diesel DGs and WT) integrated MG test system to monitor the effects of the integration of diesel DGs and WT, which has intermittent characteristic into the system during the day.

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case IV: Optimal dispatching study for dispatchable DGs on the MG test system, which is the same as in case III, is realized by using the basic PSO algorithm to monitor the effects of the DGs in the system during the day.

Benchmarking against existing methods
Five different cases have been performed in this section in order to show the applicability and effectiveness of the proposed approach in comparison with similar related studies in the literature with the results given in Table 5. The initial IEEE 33-bus test system is utilized in cases I and II, while the same test system but considered as an MG with the addition of three diesel DGs with 4-MW maximum real power capacity placed, as shown in [7], is used in the remaining cases. The studied cases are expressed as follows:   Case I: In this case, the AC power flow algorithm (Newton's method) by using Matpower 4.1, which is an open-source simulation tool for Matlab, is utilized on the initial MG test system where the DGs are not integrated into the system yet.  Case II: Unlike case I, the distributed diesel DG units are integrated into the MG test system in case II. The diesel DGs are placed as in [7] at buses 14, 18, and 32, since the same IEEE 33-bus test system has been used; also, the optimal placement of DGs has already been studied in the scope of that reference paper. After all these arrangements on the system, the OD of the three diesel DGs is mainly performed here in this case by using the basic PSO algorithm.  Case III: NR is utilized to the basic MG test system which is the same as in case I by using the SPSO algorithm.  Case IV: Here, NR is applied by using the SPSO technique just after optimally dispatching the DG units on the MG test system, which is the same as in case II by using the basic PSO technique.  Case V: Simultaneous application of NR and OD of the DG units on the MG test system; the same as in case II is performed by using the joint approach of the basic PSO and the SPSO algorithms.
Total power losses, minimum voltage, and total operational costs have been calculated in case I by applying the power flow algorithm on the initial MG test system. The numerical values obtained here are just the results of load flow for the basic test system and are used as a means of comparison with other case studies.
DG units are optimally dispatched in the second case by way of a basic PSO algorithm without performing network reconfiguration. As a result of this study, it is realized that the active power loss is reduced by 76.63% in addition to improving the voltage level (as can be seen, the minimum voltage level throughout the network is 0.9941 p.u.). It should be noted that the results acquired via the basic PSO method in the present study are better in terms of reduction in active power loss value and voltage level improvement in comparison with the results obtained using other methods in the literature.
The NR is applied via the SPSO algorithm to the basic test system without DG units in case III. Considering the active power loss assessment, a decrease of 33.34% is observed compared to the base Case V: The NR and OD are studied separately in case 3 and case 4, respectively, and after analyzing their effects on the MG test system, these two studies are performed simultaneously in this case by using the joint approach of basic PSO and SPSO algorithms. In the first case, the basic power flow algorithm is run for the MG test system without any DG units. The total daily real power loss is about 3.4 MW, while the total demand is 73.6 MW, as tabulated in Table 6. The loss value is very high, and is almost 5% of the total demand. The minimum voltage level on the MG is 0.9108 p.u., which is very close to the lower limit. The cost of the purchasing power from the main grid is calculated for that case, and it is about 4688.26 Euros.
NR is studied for the MG without any DG units in the second case, and the total daily real power loss here is about 2.7 MW. However, the total losses are approximately 55% by adding distributed DG units at the pre-installed buses, as seen in the third case study and calculated from Table 6. Furthermore, as it is expected by adding DGs, the voltage level is improved within the scope of the NR study. Hence, the minimum voltage level rises up to 0.9689 p.u. while it is 0.90 with just the NR study. The cost of the purchasing power from the main grid is 4633.38 Euro, while it is 1072.124 Euro with added DGs into the MG system in Case III. However, there is also the operation cost of dispatchable units consisting of the generation cost, which is about 4608.6 Euros for case III.
Regarding case IV, the OD on the RMG decreases the total loss value to 2.4 MW as calculated from Table 7, and it is less than the NR study without any DGs on the system in case II, but it is much more than the obtained total loss value in case III, which is about 1.5 MW. The latest invention combines both techniques of DG dispatching and NR together for further improving the system performance, and they perform simultaneously, as indicated in case V. It is an indication that both variables (switches and dispatch of DG) are set at the same time, while both techniques run separately during the period of the common functioning. As a result of the compromise solution approach, the total daily power loss value decreases to 1.18 MW from Table 7, taking the lowest value among all the case studies. Here, in this case, the lowest voltage level is measured as 0.9690, and that value is quite good (near to unity). Thus, the proposed solution ensures the most significant benefits for the whole power system by giving more global optimal results, as seen in case V.

Conclusions
The purpose of this study was to present an optimal operation scheduling framework for RMGs by way of a combined approach comprised of PSO and SPSO algorithms. In this respect, the NR and OD of the DGs in the RMG were studied simultaneously. Although the methods and application approaches to the distribution NR problem differ in most studies in the literature, the same main objective function (i.e., minimizing the active power loss) as in other studies was used here. The study was primarily performed for one-hour resolution, and the results were compared with the recent related studies in literature. According to the results of the benchmarking, while the maximum active power loss reduction rate was obtained in [37] by approximately 70% compared to the other references in Table 5, our study approximately achieved an active power loss reduction rate of up to 80%. The result of this study put forth the efficiency of the joint approach of PSO and SPSO algorithms for the simultaneous solution of NR and OD of the DGs in the RMG, which motivated us to go further with the operational scheduling framework of RMGs in the presence of renewable energy sources. To this end, five different cases were studied. A total daily power loss reduction of 0.7 MW was observed when the first basic system in case I was reconfigured in case II; however, at least two of the switches' position changes were required, as was indicated in the simulations. As soon as the distributed DGs including WT were integrated into the basic test system in case III, the total daily active power loss in the previous case was reduced by more than half with a noticeable improvement in the hourly voltage levels ranging between 0.95-1 p.u. When the OD of diesel DGs was applied to the basic system in case IV where the distributed DGs were integrated instead of NR in case III, the total active power loss was 2.4 MW, which is 1.5 times greater than that of the third case. However, the voltage levels at each hour were greater than 0.99 p.u. in this case. Finally, in case V, the target study, the application of simultaneous NR and the OD of diesel DGs' study for the operational scheduling of the test RMG system was carried out, and the daily active power loss value, which was 2.7 MW in the first case, was reduced to 1.18 MW. Here, the voltage levels were around 0.97 p.u. throughout a 24-hr time period. It is noteworthy that the switching was done approximately every two hours with only one switch position changing. Although the number of switching was not taken into consideration in this paper, this situation could result in additional cost in practice. It could also be observed from the case studies performed for the operational scheduling framework of RMGs that although both techniques (i.e., the OD of the DGs and NR) may help improve the operation of the system, the simultaneous application of these techniques during the analysis could make great improvements; namely the voltage profile improvement and the reduced energy production cost in the entire system. Furthermore, the proposed joint approach of the PSO and SPSO methods demonstrated superior performance in power loss reduction in comparison with the other methods in the literature. Funding: This research received no external funding.  coefficients of acceleration p best-i best local position in the ith dimension g best-i best overall position in the ith dimension ω inertia weight ω max initial weight value ω min final weight value D dimension of SPSO DN number of selected positions in dimension D S D selective search space at each dimension D v min minimum velocity of each particle v max maximum velocity of each particle