1 Introduction

The design of distribution systems is mesh-like in shape, they operate in a radial configuration. This is because several distribution networks’ operation and control, such as voltage protection and control, are based on the premise regarding the radial shape of the distribution systems. Hence, in these networks, voltage drop and line losses are higher than transmission networks. A variety of methods could be used to minimize distribution system’s losses. In most of these methods, it is essential to install and commission new equipment. Besides imposing a financial burden on companies, this extra equipment may provoke novel network faults that may to the disruption of the customer service. In the distribution systems, there are several switches for feeding nodes from various paths, among which distribution feeder reconfiguration (DFR) is an operation process in the distribution systems that looks for the radial topological configuration of the best feeder through the management of the “Open” or “Close” modes of switches and tie-switches to optimize different objective functions while all operational and technical limits are satisfied [1]. In some studies, DFR has been adopted for the optimization of different objective functions such as power loss reduction, reliability indices enhancement, voltage stability improvement and operational cost reduction in the distribution network. In [2], the DFR approach was presented to minimize the operational cost, power loss and energy not supplied (ENS). In [3], the DFR technique was presented to diminish power loss, cost of operation and boost trans,ient stability. In [4], the DFR approach was utilized to improve voltage stability index (VSI) and reduce power loss. In [5], the DFR method was utilized to decrease power loss and distribution system’s reliability indices.

Over the past decade, several methods that rely on mathematical optimization concepts have been utilized for the optimization of the DFR problem, including integer programming (IP) [6] and distance measurement (DM) [7] methods. Given the non-continuous and convex nature of the optimization problem, mathematical optimization methods are not appropriate to address these problems due to their shortcomings. One of techniques used over the past decade is evolutionary algorithms (EAs). Given their flexibility, these algorithms can resolve optimization problems irrespective of their features and complexities. These characteristics have promoted the adoption of optimization algorithms to address DFR and several other optimization problems. The literature review of past shows that diverse EAs have been employed to find a solution to different types of DFR problem. Alonso et al. used the method of artificial immune systems (AIS) and graph theory in order to solve the multi-objective DFR (MODFR) problem to diminish power loss and boost network reliability [8]. In [9], a runner-root algorithm was presented to solve the MODFR problem as a way of decreasing the power loss, load balancing, and switching numbers. In [10], a firefly algorithm was suggested in order to solve the MODFR problem in the unbalanced network to decrease the network loss and voltage deviation of nodes.

Recently, a significant part of the studies has been devoted to the effects of distributed generations (DGs), energy storage systems (ESSs) and electric vehicles (EVs) on distribution power system operation, the extensive use of renewable sources of energy in power distribution systems has given rise to several issues in operation and management of power systems to be challenged, the distribution power systems with a variety of renewable energy sources are more affected by uncertainty than before of adding renewable sources, a limited part of the research has looked into the uncertainty effect of distributed generation sources in solving the DFR problem. In [11], an improved shuffled leaping frog algorithm (ISFLA) was suggested to solve the DFR and DGs placement problem to decrease the power loss, voltage deviation, and switching number. In [12], a grey wolf optimizer (GWO) was proposed to solve the DFR problem integrated with EVs in order to reduce the active loss. Fathi et al.[13] proposed a novel method that could solve DFR problem by considering uncertainties related to demand consumption and DGs power generation as a way of reducing the power loss. Kavousi et al. [14] presented a stochastic DFR and optimal coordination of EVs to grid by accounting for the impact of wind power uncertainty. [15] proposed a decimal coded quantum particle swarm optimization (PSO) to in order to resolve the DFR problem considering DGs for the minimization of power loss. Kavousi et al. [16] presented a self-adaptive evolutionary swarm algorithm that is reliant on social spider optimization (SSO) algorithm for solving the stochastic DFR problem to optimally coordinate plug-in electric vehicles operation. Mohammad-Reza Kaveh et al. [17] presented a spiral dynamic algorithm based on bacterial foraging as a way of solving the DFR problem and DGs placement to reduce power loss and improve the voltage profile. [18] presented a hybrid big bang-big crunch (HBB-BC) for DGs placement and solving of the DFR problem in a distribution grid to decrease the power loss, operational cost and maximize the VSI. [19] presented an EA based on the algorithm of uniform voltage distribution (UVD) and constructive reconfiguration in order to solve DG sizing and DFR problem as a way of decreasing the power loss. Larimi et al. [20] suggested a risk-based distribution network configuration with a penalty /reward scheme by accounting for uncertainty of generation and load to diminish the power loss and enhance the reliability.

The literature on the DFR problem has been unsuccessful in accounting for daily load variations and finding a solution for DFR over a predefined time interval. Because pattern variations over the studied period constitute a major distinction of dynamic and static reconfiguration methods in real systems, electricity price and loads are constantly changing and dynamic distribution feeder reconfiguration (DDFR) is vital to guarantee the safety and security of an optimized network. In [21, 22], a dynamic model that relies on two heuristic algorithms was presented for stochastic feeder reconfiguration to decrease the energy loss, switching number and operational cost. [23] introduced a hybrid method, which combines PSO and SFLA in order to solve DFR and capacitor allocation problem by accounting for DGs to reduce operational cost and power loss. In [24], a shuffled leaping frog algorithm (SFLA) was presented to find solution for the DDFR by accounting for DGs and ESSs uncertainty as a way of decreasing ENS and boosting VSI. In [25], load variations are predicted in one or multiple constant load steps during the study, and in each step, a solution is found for the DFR problem statically. According to this approach, the validity of the obtained optimal solution cannot be guaranteed for the optimization DDFR problem. In [26], a novel model was suggested to solve the DDFR problem by accounting for switching number restriction to diminish the operational cost. These constraints decrease the number of switching operations in different stages of reconfiguration, and the optimum solution might not be achieved during the study period. In [27], a new hybrid algorithm, which combines IPSO and GWO was presented to find a solution for the DDFR problem with DGs to reduce the ENS, operational cost and power loss. Shariatkhah et al. [28] introduced a new hybrid algorithm that combined dynamic planning (DP) and harmony search (HS) method to find a solution for the DFR problem as a way of reducing the loss and enhance the network reliability. In [29], a genetic algorithm (GA) was presented to identify the optimal time intervals for DDFR to diminish power loss in the network. In [23, 24, 27], a solution was found for the DDFR problem by accounting for time-dependent loads and constant electricity prices. One major drawback of these studies is considering fixed electricity price at all-time intervals, which may fail to provide an optimal solution for objective functions like operational cost. In [28, 29], the ultimate topology of a network is heavily dependent on the initial network topology.

In this study, in the presence of solar PV units, DGs and ES systems, the multi-objective DDFR problem is formulated and developed in the distribution grid. Also, the effects of uncertainty resources and demand response program (DRP) is accounted for to accurately evaluate the DDFR problem and enhance the distribution system performance. The time of use (TOU) mechanism of DRP is utilized to evaluate consumer attitudes to various energy prices in a day. Indeed, by setting varying tariffs for daily energy use, consumers can be stimulated to amend their consumption patterns to accomplish optimal economic performance. The DDFR problem’s objective functions are to reduce energy loss, operational cost, and energy not supplied (ENS) index. with advancements in technology and automation, smart grids have infiltrated in diverse aspects of modern life, so that any interruption in the electricity consumption of subscribers would be costly. Therefore, reliability enhancement is a major contribution of this paper, which is quantified using the ENS index. The DFR is an intrinsically complicated and non-differentiated optimization problem and its extension to several intervals makes it even more complicated. Hence, appropriate proper technique to solve the proposed problem is of utmost importance. To this end, a robust and powerful algorithm, (IPSO) is presented to address the proposed DDFR problem’s complexities. The PSO algorithm is broadly used in studies on power system optimization due to its simple execution. This algorithm has several shortcomings like premature converge or entrapment into local optima in certain cases. Accordingly, a novel initiative is attached to the IPSO algorithm in order to enhance its population diversity and search-ability. Since the problem addressed here is a multi-objective problem, a tool is required for the optimization of all objectives. Thus, in this study, a Pareto optimization approach has been adopted to present a series of optimal solutions. Additionally, an external repository is considered to store Pareto solutions in the search process. On top of that, the fuzzy decision-making technique is adopted to detect the optimum tradeoff.

Accordingly, the distinguishing features of this study in solving the DDFR problem are as follows:

  • The multi-objective DDFR problem is modelled by accounting for the ENS, operational cost and energy loss as objective functions.

  • Investigating the impacts of DGs, ESSs and solar photovoltaic (PV) units on various objective functions.

  • Investigating the uncertainties of electricity market price (EMP) as well as power generation of solar PV units to solve the DDFR optimization problem.

  • Investigating the impact of DRP on various objective functions based on TOU service.

  • Presenting an evolutionary and powerful algorithm, IPSO for solving the multi-objective DDFR.

This study is organized as follows. Section 2 and 3 elaborate on uncertainty characterization, problem formulation such as objective functions and constraints and TOU modeling. In Sect. 4, a multi-objective optimization problem and meta-heuristic algorithms are introduced. Sections 5 and 6 presents the simulation results and conclusion, respectively.

2 Uncertainty characterization

Uncertainty is an adherent attribute of most phenomena. From a theoretical perspective, uncertainty is used as a way of modeling predicted errors in the future or measured values. As a result, most engineering issues are investigated in a stochastic environment that is characterized by uncertainty. The DDFR problem considered in this study investigates the impact of uncertainty sources such as electricity market price (EMP) and solar photovoltaic units power generation. The uncertainty modeling of solar PV units power generation.

The solar irradiance is characterized by a beta distribution function [30] hourly based on beta distribution function and historical data, as follows:

$$ f_{b} \left( s \right) = \left\{ {\begin{array}{*{20}l} {\frac{{\Gamma \left( {\alpha + \beta } \right)}}{{\Gamma \left( \alpha \right)~ \cdot \Gamma\left( \beta \right)}} \cdot s^{{\alpha - 1}} \cdot \left( {1 - s} \right)^{{\beta - 1}} } & {~0 \le s \le 1~~~\alpha, \beta \ge 0} \\ 0 & {otherwise} \\ \end{array} } \right. $$
(1)

where, \(f_{b} \left( s \right)\) is the beta distribution function, \(\alpha\) and \(\beta\) are obtained from solar irradiance’s historical data. The constant hourly beta PDFs are divided into different intervals:

$$ \rho_{i} = \mathop \int \limits_{{s_{i} }}^{{s_{i + 1} }} f_{b} \left( s \right)ds_{i} $$
(2)

where \(s_{i + 1}\) and \(s_{i}\) are ending and starting points of \(i{th}\) interval, respectively.

  • EMP in the uncertainty modeling

EMP is calculated hourly using a log-normal distribution function [24].

$$ f_{p} \left( {E^{pr}, \, \mu, \, \sigma } \right) = \frac{1}{{E^{pr} \sigma \sqrt {2\pi } }}{\text{exp}}\left( { - \frac{{(lnE^{pr} - \mu )^{2} }}{{2\sigma^{2} }}} \right) $$
(3)

where \(\mu\) is the mean value and \(\sigma\) is standard deviation; \({E}^{pr}\) denotes a parameter of probability distribution function. In power systems, one of the uncertainty modeling approaches is scenario generation [31]. Like the Monte Carlo, this method generates random numbers equivalent to the number of uncertainty parameters and the probability of each uncertainty source associated and error value are computed by the roulette wheel relative to each random number generated [31]. For the generation of the first scenario, all errors of each uncertainty source are aggregated, and the entire scenario’s probability is obtained by multiplying probabilities linked to uncertain parameters. The burden of random programming based on scenario generation is reliant on the number of scenarios; therefore, the suitable method for decreasing the number of scenarios is significant. Hence, the backward reduction technic [31] is used to reduce the number of the scenarios based on eliminate the duplicate scenarios.

3 Problem formulation

To implement the proposed DDFR problem, it is essential to have some decision variables, three objective functions coupled with multiple limitations. In the following section, the objective functions and their constraints are discussed in detail.

3.1 Objective functions

Three objective functions are energy loss, ENS and operational cost, which are defined in this study.

3.1.1 Energy loss

We can formulate the distribution network’s energy loss [23] at all-time intervals as described below:

$$ f_{1} \left( X \right) = \mathop \sum \limits_{t = 1}^{24} \mathop \sum \limits_{i = 1}^{{N_{brch} }} R_{i} \left| {I_{i}^{t} } \right|^{2} $$
(4)
$$ X = \left[ {X_{Tie}\, X_{SW}\, X_{{P_{Dg} }}\, X_{{P_{ES} }} } \right] $$
(5)
$$ X_{Tie} = \left[ {Tie_{1}^{t}, Tie_{2}^{t} \ldots .Tie_{{N_{tie} }}^{t} } \right] $$
(6)
$$ X_{SW} = \left[ {SW_{1}^{t}, SW_{2}^{t} \ldots .SW_{{N_{tie} }}^{t} } \right] $$
(7)
$$ X_{{P_{Dg} }} = \left[ {P_{Dg1}^{t}, P_{Dg2}^{t} \ldots .P_{{Dg_{{N_{Dg} }} }}^{t} } \right] $$
(8)
$$ X_{{P_{ES} }} = \left[ {P_{ESS1}^{t}, P_{ESS2}^{t} \ldots .P_{{ESS_{{N_{ESS} }} }}^{t} } \right] $$
(9)

where \({R}_{i}\) is the resistance and \({I}_{i}^{t}\) is the \({i}{th}\) branch current at \({t}{th}\) time interval and \({N}_{brch}\) indicates the number of branches. Also, \({Tie}_{i}^{t}\) denotes the status of \({i}{th}\) tie switch at \({t}{th}\) time interval, \({SW}_{i}^{T}\) is the sectionalizing switch number creating a loop with \({Tie}_{i}^{t}\) and X indicates the vector of control variables. \({N}_{tie}\) is the number of tie switches and \({N}_{SW}\) indicates the number of switches. \( P_{ESSu}^{t}\) is the active charge/discharge power for \({u}{th}\) energy storage system at \({t}{th}\) time interval. Lastly, \({N}_{ESS}\) is the number of energy storage system.

3.1.2 Energy not supplied (ENS)

A major reliability indicator, ENS shows the total energy load that is not distributed in outage [32]. ENS formulation at each node is as follows:

$$ ENS_{i} = P_{i} \mathop \sum \limits_{i,j \in k, i \ne j} \left( {U_{i,j} + U_{i,j}^{{\prime}} } \right) $$
(10)
$$ U_{i,j} = B_{i,j} \times t_{i,j} $$
(11)
$$ U_{i,j}^{{\prime}} = B_{i,j} \times t_{i,j}^{{\prime}} $$
(12)

where \( k = \left\{ {0,1. \ldots. n - 1} \right\}\) is the distribution network’s set of nodes, \( U_{i,j}\) is the unavailability of services pertained to the reparation time in branches linked to node i and \( U_{i,j}^{^{\prime}}\) is service unavailability pertained to the time of restoration for branches linked to node i. Also, \( B_{i,j}\) is the failure rate of the branch between node \( i,j\) (fail/year), \( t_{i,j}\) and \( t_{i,j}^{^{\prime}}\) denote the average reparation and restoration time of the branch between node \( i,j\) (h/fail). \( d_{i,j}\) is the length of the line (km). The following formula can be used to calculate ENS of the entire distribution network

$$ f_{2} \left( x \right) = \mathop \sum \limits_{i = 2}^{{N_{Bus} }} ENS_{i} $$
(13)

3.1.3 Operational cost

The operational cost [2] is an objective function of this study, which can be formulated as follows:

$$ \begin{aligned} f_{3} \left( X \right) & = \mathop \sum \limits_{t = 1}^{24} \left( {\mathop \sum \limits_{i = 1}^{{N_{dg} }} Price_{DG,i}^{t} P_{DG,i}^{t} + \mathop \sum \limits_{s = 1}^{{N_{sub} }} Price_{Sub,s}^{t} P_{Sub,s}^{t} } \right. \\ & \quad+ \left. {\mathop \sum \limits_{k = 1}^{{N_{sw} }} Price_{Sw,k} \left| {SW_{k}^{t} - SW_{k}^{t - 1} } \right|} \right) \\ \end{aligned} $$
(14)

In the objective function presented in (14), the first term is concerned with electricity expenses produced by DGs. The second term is the expenses of electricity purchase from sub-stations and the third term is switching costs. Moreover, \( Price_{DG,i}^{t}\) is the price of \(i{th}\) DG and \( Price_{Sub,s}^{t}\) is the price of \(s{th}\) sub-station at \(t{th}\) time interval. \(N_{dg}\) is the number of DG, \(N_{sw}\) is the number of switches and \( Price_{Sw,k}^{t}\) is the switching cost at the \(t{th}\) time interval. The novel and original modes of \(k{th}\) switch at \(t{th}\) time interval and \(t - 1{th}\) time interval are represented by \(SW_{k}^{t}\) and \(SW_{k}^{t - 1}\), respectively.

3.2 Constraints and limitations

This section proposes all equality/inequality constraints for the DDFR problem that must be satisfied. Some equality constraints are described in 3.2.1 and 3.2.2 and several inequality constraints are presented in 3.2.3–3.2.8.

3.2.1 The distribution network’s radial structure

The radial structure of the network can be expressed according to (15):

$$ N_{brach} = N_{bus} - N_{sub} $$
(15)

where \(N_{bus}\) is the number of buses and \(N_{sub}\) is the number of sub-stations. \(N_{brach}\) is the number of branches.

3.2.2 Distribution power flow equations

Power balance can be expressed by (16):

$$ S_{i,t} = \mathop \sum \limits_{j = 1}^{{N_{Bus} }} V_{i,h} V_{j,h} Y_{ij} \angle \left( {\theta_{ij} - \delta_{i,t} + \delta_{j,t} } \right), i = 2, 3, \ldots, N_{bus} $$
(16)

where \( S_{i,t}\) is the net injected power by \(i{th}\) bus at the \(t{th}\) time interval. \( V_{i,h}\) and \( {\updelta }_{i,h}\) indicate voltage magnitude and angle at \(i{th}\) bus at the \(t{th}\) time interval, \(Y_{ij}\) is the admittance magnitude and \(\theta_{ij}\) is the angle between \(i{th}\) and \(j{th}\) buses.

3.2.3 Bus voltage limit

$${V}_{min}\le {V}_{i}^{t}\le {V}_{max}$$
(17)

where \(V_{max}\) and \(V_{min}\) indicate the maximum and minimum allowable voltage of \(i{th}\) bus and \(V_{i}^{t}\) is the magnitude of voltage in \(i{th}\) bus at the \(t{th}\) time interval.

3.2.4 Feeder limits

$$ \left| {I_{fdr,i}^{t} } \right| \le I_{fdr,i}^{Max} \quad i = 1,2, \ldots, N_{fder} $$
(18)

where \( I_{fdr,i}^{t}\) c is the current amplitude at the \(t{th}\) time interval and \( I_{fdr,i}^{Max}\) is the maximum acceptable current of the \(i{th}\) feeder. \(N_{fdr}\) indicates the number of feeders.

3.2.5 Transformers limits

$$ \left| {I_{trans,i}^{t} } \right| \le I_{trans,i}^{Max} \quad i = 1,2, \ldots, N_{trans} $$
(19)

where \( I_{trns,i}^{t}\) is the amplitude of current at the \(t{th}\) time interval and \( I_{trnsi}^{Max}\) is the maximum acceptable current of the \(i{th}\) transformer. \({\text{N}}_{trans}\) is the number of transformers.

3.2.6 Distributed generation unit’s constraints

$$ P_{Dg}^{min} \le P_{Dg,i}^{t} \le P_{Dg}^{max} $$
(20)

where \(P_{Dg}^{min}\) and \(P_{Dg}^{max}\) indicate the minimum and maximum accepted active power values of the \(i{th}\) DG at the \(t{th}\) time interval.

3.2.7 Energy storage systems constraints

There are some restrictions followed by energy storage units during the period of this problem [33], which include:

$$ \begin{aligned} E_{k}^{t} & = E_{k}^{t - 1} + \sigma_{ch,k} P_{ch,k}^{t} \times \Delta t - \frac{1}{{\sigma_{dis,k} }} P_{dis,k}^{t} \times \Delta t \\ \Delta t & = 1\;hour,\;k = 1,2 \ldots N_{ESS} ,t = 1,2, \ldots, 24 \\ \end{aligned} $$
(21)
$$ E_{k}^{min} \le E_{k}^{t} \le E_{k}^{max} $$
(22)
$$ P_{ch,k}^{t} \le P_{ch,k}^{max} $$
(23)
$$ P_{dis,k}^{t} \le P_{dis,k}^{max} $$
(24)

where \(E_{k}^{t}\) is the energy reserved in the \(k{th}\) energy storage unit at \(t^{{{\text{th}}}}\) time interval. \( P_{ch,k}^{t}\) is the allowed charge rate and \( P_{dis,k}^{t}\) is the allowed discharge rate of \(k{th}\) energy storage unit at \(t{th}\) time interval. Similarly, \( \sigma_{ch,k}\) /\( \sigma_{dis,k}\) indicates the efficiency of \(k{th}\) energy storage unit in charge/ discharge during. \( P_{ch,k}^{max}\)/\( P_{dis,k}^{max}\) indicates the maximum charging/discharging rate of \(k{th}\) energy storage unit at the \(t{th}\) time interval, respectively. \(E_{k}^{max}\) / \(E_{k}^{min}\) is the maximum/minimum energy reserved in the \(k{th}\) energy storage unit, respectively.

3.3 Time of use modeling

Demand response refers to a series of proceedings executed to alter the patterns of energy use to improve network reliability and inhibit price rise, particularly during peak network loads. The DRP participants are customers who are in charge of modifying their energy consumption patterns to minimize their costs, and as a reward, their energy cost falls. In general, DRP can be split into two sections: price-based programs and motivational programs [34, 35]. In the former, programs such as Critical Peak Pricing (CPP), Time of Use (TOU) rate, and Real-Time Pricing (RTP) are used by dynamic pricing rates. The latter is further divided into classical and market-based programs. Here, the TOU rate of (DRP) has been used to change the consumer consumption patterns to enhance system performance. The mathematical modeling of TOU ‌mechanism has been presented in (25)–(27). Based on this mechanism, the overall changed energy cannot surpass a fixed value (presuming 15% of the base demand). Besides, there must be a balance between the overall power rise and drop over a specific period [36].

$$ P_{t,i}^{MDF} = P_{t,i}^{TOU} + P_{t,i}^{INI} $$
(25)
$$ \left| {P_{t,i}^{TOU} } \right| \le TOU ^{max} \times P_{t,i}^{INI} $$
(26)
$$ \mathop \sum \limits_{t = 1}^{T} P_{t,i}^{TOU} = 0 $$
(27)

where \( P_{t,i}^{MDF}\) is the current modified demand for \(i{th}\) feeder at the \(t{th}\) time interval after applying the TOU mechanism. \( P_{t,i}^{TOU}\) and \( P_{t,i}^{INI}\) are the rise/drop rate of load in TOU mechanism and initial demand of \(i{th}\) feeder at the \(t{th}\) time interval without TOU mechanism, respectively. \(TOU{ }^{max}\) is the maximum rise/drop rate of load in the TOU mechanism.

4 Proposed optimization approach

Contrary to mathematical methods, EAs are not dependent on initial conditions. Thus, it is necessary to consider the continuity of, integral operators, objective functions and derivatives. This section briefly describes the multi-objective strategy and improved particle swarm optimization (IPSO) algorithm.

4.1 Multi-objective optimization strategy

From a mathematical perspective, we can define a multi-objective optimization problem in the presence of inequality and equality constraints as follows:

$$ Min\, f_{i} \left( X \right) = \left[ {f_{1} \left( X \right), f_{2} \left( X \right), \ldots f_{n} \left( X \right)} \right]^{T} $$
$$ g_{i} \left( X \right) \le 0,\;h_{j} \left( x \right) = 0 $$
(28)

where \({f}_{i}(X)\) is the \({i}{th}\) the objective function, also \({h}_{j}(X)\) is equal constraint and \({g}_{i}(X)\) is unequal constraint. In the multi-objective optimization, the Pareto-optimal solution idea takes the place of the optimal solution idea [37, 38]. The solution \({X}_{1}\) is dominated by \({X}_{2}\) when the two conditions are satisfied:

$$ \forall i \in \left\{ {1,2, \ldots, N_{obj} } \right\}, \quad f_{i} \left( {X_{1} } \right) \le f_{i} \left( {X_{2} } \right) $$
(29)
$$ \exists j \in \left\{ {1,2, \ldots, N_{obj} } \right\}, \quad f_{j} \left( {X_{1} } \right) < f_{j} \left( {X_{2} } \right) $$
(30)

An external memory known as the repository is used to save detected Pareto-solutions in the optimization process. An increase in the number of Pareto-solutions may slow down the optimization algorithm. Therefore, a fuzzy clustering method is employed to avoid the high computational burden [39]. Accordingly, each objective function’s fuzzy membership function is as follows:

$$ \varphi_{{f_{i} }} \left( X \right) = \left\{ {\begin{array}{*{20}c} 1 & {} & { f_{i} \left( X \right) \le f_{i}^{min} } \\ 0 & {} & {f_{i} \left( X \right) \ge f_{i}^{max} } \\ {\frac{{f_{i}^{max} - f_{i} \left( X \right)}}{{f_{i}^{max} - f_{i}^{min} }}} & {} & { f_{i}^{min} \le f_{i} \left( X \right) \le f_{i}^{max} } \\ \end{array} } \right. $$
(31)

where the fuzzy set of the \({i}{th}\) objective function \({f}_{i}(x)\) is shown by \({\mu }_{i}\) and \({f}_{i}^{max}\) and \({f}_{i}^{min}\) are the objective function’s upper and lower bounds, respectively. Based on (32), the non-dominated solutions are sorted in the repository to identify the optimal compromise solution.

$$ \tau_{j} = \frac{{\mathop \sum \nolimits_{i = 1}^{n} \beta_{i} \times \varphi_{{f_{i} }} \left( {X_{j} } \right)}}{{\mathop \sum \nolimits_{j = 1}^{m} \mathop \sum \nolimits_{i = 1}^{n} \beta_{i} \times \varphi_{{f_{i} }} \left( {X_{j} } \right)}} $$
(32)

where \(m\) is the number of non-dominant solutions and \(n\) is the number of objective functions; \({\beta }_{\mathrm{i}}\) is the weight factor of \({i}{th}\) objective function.

4.2 Improved particle swarm optimization

The PSO algorithm is an evolutionary method first used by Eberhart and Kennedy to solve various optimization problems [40]. In this algorithm, which is modeled based on the herd life of fish and birds, each particle represents a potential solution for the optimization problem where the optimum location is identified by particles based on prior experiences and the optimal particle in the entire population. The velocity and position of particles in each repetition are obtained from (33) to (34):

$$ V_{i}^{k + 1} = W \times V_{i}^{k} + c_{1} \times r_{1} \times \left( {pb_{i}^{k} - x_{i}^{k} } \right) + c_{2} \times r_{2} \times \left( {gb^{k} - x_{i}^{k} } \right) $$
(33)
$$ X_{i}^{k + 1} = X_{i}^{k} + V_{i}^{k + 1} $$
(34)

where \(X_{i}^{k}\) is the position, and \(V_{i}^{k}\) is the velocity of \(i{th}\) particle at \(k{th}\) iteration; \({\text{c}}_{1}\) and \({\text{c}}_{2}\) are two positive constants, \({\text{r}}_{1}\) and \({\text{r}}_{2}\) denote a random number between 0 and 1, \(pb_{i}^{k}\) and \(gb^{k}\) are the optimum personal fitness of \(i{th}\) particle and the best value among all optimal personal fitness at \(k{th}\) iteration. Also, \(W\) denotes the inertia weight, which often falls from 1 to 0 linearly following to (35):

$$ W = W_{max} - \frac{{W_{max} - W_{min} }}{{iter_{max} }} \times iter $$
(35)

\(iter\) and \({iter}_{max}\) are current and maximum iteration number. The maximum and minimum boundaries of inertia weight are indicated by \(Wmax\) and \(Wmin\), respectively [41, 42].

In this section, a variety of mutation strategies are introduced to reinforce the IPSO algorithm’s ability to preclude premature local convergence by deterring over-correspondence of particle population to each other. The mutation operator could be implemented by randomly change particles. The IPSO algorithm’s mutation is intended to maintain and offer diversity. When there is no mutation, it is possible for the particle evaluation to be slowed down or even stopped. In the following section, mutant particles could be determined:

$$ X_{mut}^{1} = X_{rand\,1} + \varphi \times \left( {X^{Gb} - X_{rand\,2} } \right) + \varphi \times \left( { X_{rand\,3} - X_{rand 4} } \right) $$
(36)
$$ X_{mut}^{2} = X^{Gb} + \varphi \times \left( { X_{rand\,1} - X_{rand\,2} } \right) $$
(37)
$$ X_{mut}^{3} = X_{rand\,1} + rand \times \left( {X_{rand2}^{Pb} - X_{rand\,2} } \right) + r \times \left( {X^{Gb} - X_{rand\,2} } \right) $$
(38)

where \({X}_{rand 1}\ne { X}_{rand 2}\ne { X}_{rand 3}\ne { X}_{rand 4}\) are mutant particles randomly selected from the population, and \(\varphi \) is the mutation constant equivalent to 2 [43], \(rand\) is a random number between 0 and 1. Afterwards, three mutant particles are randomly selected in each iteration (\({X}_{mut}^{1}\),\({X}_{mut}^{2}\) and \({X}_{mut}^{3}\)). If the generation cost of mutation particles is lower than the selected particles, the selected particles are substituted by mutant particles in the next iteration. Otherwise, the chosen particles may remain in the upcoming iteration. Figures 1 and 2 show the flowchart and pseudo code of the IPSO algorithm.

Fig. 1
figure 1

Flowchart of IPSO algorithm

Fig. 2
figure 2

The pseudo code of IPSO algorithm

5 Simulation results

In this section, first the validation of the proposed method in optimizing a sample objective function is performed and after providing the parameters of optimization methods and test network specifications, the proposed method is used to solve the problem of dynamic feeder reconfiguration in the absence and presence of DG units, ESSs and demand response program.

5.1 Evaluation of the IPSO to optimize the benchmark function

The standard objective function for optimization is used to validate the IPSO and PSO methods. This section shows the ability of the IPSO algorithm to minimize the Lévi function (a complex function with several local Optima) with two decision variables. It is noteworthy that the iteration number and the population size of IPSO and PSO algorithms are considered 30 and 10 to optimize the Lévi function. The simulation is done in MATLAB R2016b environment using a core-i7 processor laptop with 2.4 GHz clock frequency and 8.0 GB of RAM. The formulation of this function is as follows:

$$ f\left( {x,y} \right) = sin^{2} 3\pi x + \left( {x - 1} \right)^{2} \left( {1 + sin^{2} 3\pi y} \right) + \left( {y - 1} \right)^{2} \left( {1 + sin^{2} 2\pi y} \right) $$
(39)

The 3-D surface of Lévi function with two decision variables is shown in Fig. 3. It should be noted that both decision variables and are bounded in [– 4, + 4]. The results of the proposed IPSO and PSO algorithms for solving the Lévi function in two-dimensional spaces are shown in the following Figs. 4 and 5, respectively. It is clear that from Fig. 5b, after the final iteration, all particles are focused on a global optimum. While in Fig. 4b, there are solutions that are away from the global optimal even in the final replication. The results demonstrate high exploitation and exploration capability of the proposed IPSO algorithm and also the supremacy of the IPSO algorithm compared to the PSO method.

Fig. 3
figure 3

T 3-D surface of Lévi function

Fig. 4
figure 4

Results of PSO algorithm for optimizing the Lévi function

Fig. 5
figure 5

Results of IPSO algorithm for optimizing the Lévi function

5.2 Solving the DDFR problem using the proposed method

The presented IPSO algorithm’s performance in solving the DDFR problem is assessed on the 95-node test system [44] as depicted in Fig. 6. The test system consists of 5 DGs (diesel generators) on nodes # 6, # 10, # 25, # 34 and # 45. All DGs have a capacity of 1000 kW, the test system includes three solar PV units of 3000 kW and their relevant ESSs which are located on nodes # 41, # 88 and # 85. The cost of DGs is 0.042 $/kWh and the cost of switching is 0.041 $/kWh. The MATLAB code is developed for the IPSO concerning the objective functions and constraints. The TOU mechanism is executed in 12 nodes of test network containing #4, #5, #6, # 8, #30, #33, # 46, #47, #73, # 81, # 86 and # 91 nodes. The idea of using TOU is to cut the operational cost and enhance the performance of system by shifting the electrical loads from peak to off-peak times. The average hourly load profile and average electricity price for a 24-h time interval are shown in Figs. 7 and 8. 50 scenarios are applied to simulate the uncertainty parameters in solving the DDFR in the stochastic environment. To demonstrate the IPSO algorithm’s higher power and performance, a comparison with other EAs including the Grande explosion method (GEM), shuffled frog leaping algorithm (SFLA), particle swarm optimization (PSO) and imperialist competitive algorithm (ICA) is drawn. The parameters of the optimization algorithms are depicted in Table 1. The initial values of energy loss, operational cost, and ENS before the DDFR are 31,869.54 kWh, $140,651.91, and 345.56 kWh/year, respectively. In the next section, the simulation findings are proposed in two cases to determine the impacts of DGs, ESSs, solar PV units and DRP in the deterministic and stochastic frameworks. All simulations of this study are done in Matlab software (ver. 2016a) on a core-i7 CPU laptop with a frequency of 2.4 GHz and 8 GB of RAM.

Fig. 6
figure 6

Single-line diagram of the 95-node test system

Fig. 7
figure 7

Average hourly load in the test network

Fig. 8
figure 8

Average hourly electricity market price

Table 1 Parameters of the proposed algorithms

5.2.1 DDFR problem without DGs, ESSs and solar PV units (Case 1)

In this case, the DDFR problem is solved irrespective of the effects of ESSs, DGs, and solar PV units in a 95-node test system. Moreover, the effect of TOU mechanism as one of the DRP programs is considered in the evaluation of objective functions. Table 2 shows the best results derived from the presented IPSO algorithm for all objective functions. To compare the outcomes of the single-objective optimization introduced in the presented algorithm and other algorithms, the results of operational cost and ENS optimization acquired by various algorithms are displayed in Tables 3 and 4. As shown in Tables 3 and 4, the presented IPSO algorithm is capable of identifying the optimal solution compared to the GEM, SFLA, PSO and ICA algorithms. The obtained optimum scheme of switches for the operational cost optimization in 24-h intervals is depicted in Table 5.

Table 2 Best results derived from the IPSO algorithm for various objective functions
Table 3 Findings of IPSO and other algorithms for operational cost optimization for 30 Trials
Table 4 Findings of IPSO and other algorithms for ENS optimization for 30 Trials
Table 5 List of open switches derived from the IPSO for the optimization of operational cost

Table 2 displays that ENS, operational cost and energy loss derived from the IPSO algorithm have dropped by approximately 17%, 7%, and 6% in comparison to their initial values prior to the DDFR. Figure 9 shows the operational cost optimization’s convergence curve by GEM, ICA, SFLA, and IPSO algorithms. According to Fig. 9, the presented IPSO algorithm converges on an optimal solution before SFLA, GEM and ICA algorithms. To demonstrate the effect of DRP on the evaluation of objective functions, the results of various objective function optimizations obtained from IPSO and other algorithms in the absence or presence of TOU mechanism are outlined in Table 6. According to Table 6, it is clear that applying TOU program in solving the DDFR problem reduces ENS, operational cost and energy loss. For example, objective function’s values calculated from the IPSO algorithm before considering the TOU mechanism are 305.45 kWh/year, 30,129.45 kWh and $133,851.15, respectively. These values are reduced to 294.31 kWh/year, 29,889.23 kWh and $133,611.15, respectively, taking into account the TOU program.

Fig. 9
figure 9

Convergence plot of operational cost optimization by different algorithms

Table 6 Findings of IPSO and other algorithms for different objectives without and with applying TOU

5.2.2 DDFR problem with DGs, ESSs and solar PV units (Case 2)

In this section, the DDFR problem is solved by considering ESSs, DGs, and solar PV units as single and multi-objective optimization problems. The goal of this section is to underscore the impacts of DGs, ESSs and solar PV units on various objectives, as well as the uncertainties of EMP and power generation of solar PV units are accounted for in the objective functions’ evaluation. Table 7 highlights the optimal results derived from the IPSO algorithm presented for each objective function, Moreover, to show the power of the presented IPSO algorithm, the results of the ENS and operational cost optimization obtained from various algorithms are shown in Tables 8 and 9. According to Tables 8 and 9, IPSO can achieve an optimal solution compared to other algorithms including ICA, PSO, SFLA and GEM.

Table 7 Best results derived from the IPSO algorithm for various objective functions
Table 8 Findings of IPSO and other algorithms for ENS optimization in 30 Trial
Table 9 Findings of IPSO and other algorithms for operational cost optimization for 30 Trials

The optimal values derived from the IPSO algorithm for ENS, operational cost and energy loss objective functions in the deterministic framework regardless of the uncertainty resources are 271.23 kWh/year, $133,623.25 and 28,521.41 kWh, respectively. Further, the standard deviation values derived from the presented IPSO algorithm for ENS, operational cost and energy loss are 3.65 kWh/year, $42.75 and 36.61 kWh, respectively. The comparison of these results with the stochastic framework findings exhibits the effect of uncertainty resources on increasing the objective functions’ optimal values. This surge seems to place the network farther from the optimal operating point, but the novel solution would be the system’s desired operating point.

By looking at the outcomes of case 2 and case 1, it becomes obvious that DGs, ESSs and solar PV units, decreases ENS and energy loss values. For instance, the ENS and energy loss values derived from the proposed IPSO algorithm in case 1 are 294.31 kWh/year and 29,889.23 kWh, respectively. In case 2, these values reached 276.51 kWh/year and 28,563.31 kWh, respectively, which indicates a 5% drop. Also, ENS, operational cost and energy loss calculated from the IPSO algorithm in case 2 dropped by about 20%, 9% and 5.5% in comparison to their initial values prior to the DDFR.

In the following section, the effect of DRP along with DGs, ESSs, solar PV units, capacitor units are also considered simultaneously on the evaluation of objective functions. For this purpose, four 100 kVAr capacitors are installed on nodes # 10, # 20, # 34 and # 70. Table 10 shows the results of the single objective optimization of all objective functions derived from various algorithms including GEM, ICA, SFLA, PSO and IPSO for solving the DDFR problem.

Table 10 Results of IPSO and other algorithms for different objective functions optimization

As shown in Table 10, ENS, operational cost and energy loss derived from the IPSO algorithm in the presence of DRP along with DGs, capacitors, solar PV units and ESS declined by approximately 31%, 12% and 6% in comparison to their baseline values prior to the DDFR.

To satisfy diverse objective functions, it is needed to solve the multi-objective DDFR problem for this case. Figures 10, 11 and 12 display all 2D and 3D Pareto-optimal solutions related to the multi-objective DDFR problem with ESSs, DGs, capacitors, and solar PV units. Table 11 and Fig. 13 show the obtained optimum scheme of switches and optimal capacity of capacitors for three-objective optimization in the 24-h. The optimal schemes of ESSs and the optimal scheduling of DGs’ output in the 24 h are shown in Figs. 14 and 15.

Fig. 10
figure 10

Pareto-front for optimizing ENS and energy loss

Fig. 11
figure 11

Pareto-front for optimizing operational cost and energy loss

Fig. 12
figure 12

Pareto-front for optimizing ENS, operational cost and energy loss

Table 11 List of open switches derived from the IPSO for three-objective DDFR problem
Fig. 13
figure 13

Reactive power of capacitors derived from by the IPSO algorithm for three-objective DDFR problem

Fig. 14
figure 14

Active power of ESSs during charging / discharging derived from the IPSO algorithm for three-objective DDFR problem

Fig. 15
figure 15

Active power of DGs derived from the IPSO algorithm for three-objective DDFR problem

It is worth mentioning that in each time interval, the radial limitation is satisfied. As shown in Figs. 13, 14 and 15, it is clear that the DGs has the highest and lowest active power generation at nodes #25 and #10 from 4 to 8 pm. Similarly, the highest and the lowest reactive power generation from 4 to 8 pm belong to capacitors at nodes #20 and #34. Furthermore, the maximum discharge and charge of all ESSs belong to 11 am-3 pm and 4 pm-8 pm, respectively.

As shown in Figs. 10, 11 and 12, the best value achieved for objective functions in the Pareto-fronts closely resembles the optimal value, while the optimization of each objective function is performed separately. Based on Fig. 10, the minimum ENS value and energy loss are 267.85 kWh/year and 28,582.356 kWh, respectively. For ENS and energy loss, the optimal values for the best-compromise solution are 274.35 kWh/year and 28,868.65 kWh, respectively. Figure 11 shows that the minimum operational cost and energy loss are 28,430 kWh and $133,659.23, respectively. Also, the optimal values of operational cost and energy loss for the best-compromise solution are 28,542.50 kWh and $133,743.43, respectively. The difference between objective function values in the best-compromise solution and the optimal values is less than 2%, indicating the efficacy of the presented IPSO algorithm in finding the best solution to the problems of multi-objective optimization.

Figures 14, 15 exhibit the impact of ESSs, DGs, capacitors, and solar PV units as along with DRP on the profiles of voltage in the distribution test system at 4 pm. In this study, the five scenarios are defined and investigated their impacts on the distribution test system’s voltage profile.

According to the initial condition of distribution networks, scenario 1 is defined, scenarios 2 is defined based on simultaneous presence of capacitors and DRP and scenario 3 based on the single presence of capacitors. Also, scenarios 4 is defined based on the simultaneous presence of ESSs, DGs, solar PV units, and DRP and scenario 5 based on the simultaneous presence of ESSs, DGs and solar PV units. According to Figs. 16 and 17, it is possible to improve voltage profile by using the above-mentioned devices and the impact of DRP. The improvement of voltage profile is more salient in Fig. 17 than in Fig. 16, indicating that the simultaneous presence of DGs, ESSs, solar PV units and DRP has a huge impact on enhancing the voltage profile compared to the simultaneous presence of DRP and capacitors in finding solution to the DDFR problem.

Fig. 16
figure 16

Voltage profile of 95-node test system at 4 pm

Fig. 17
figure 17

Voltage profile of 95-node test system at 4 pm

6 Conclusion

Increasing high penetrations of distributed generation (DG) units in distribution networks as well as electricity price and demand volatility create challenges for distribution system operators. This paper presents, a dynamic distribution feeder reconfiguration (DDFR) based on time-variable load and electricity market price by taking into account the DGs, energy storage systems (ESSs) and solar photovoltaic (PV) units in the smart distribution network to improve the distribution network reliability besides minimizing operational cost. Besides, the impacts of uncertainty resources and time of use (TOU) mechanism of demand response program (DRP) are considered in solving the DDFR optimization problem. Furthermore, the energy not supplied (ENS) index, operational cost and energy loss as separate objective functions are considered to have an optimal operation in a reliable environment. Also, constraints include preservation of the network radial topology, limits of buses voltage, transformer capacity and lines current.

An improved particle swarm optimization (IPSO) based on novel mutation is introduced to find a solution to the DDFR problem in single and multi-objective frameworks and the presented approach is tested on the 95-node test system. Then, a comparison is drawn between the findings of the IPSO algorithm and other heuristic methods such as GEM, SFLA, PSO and ICA. Based on the simulation results, the results obtained by the IPSO algorithm are superior to other evolutionary methods. In other words, The IPSO algorithm presented in this study has a favorable performance in finding a solution to the DDFR problem in single and multi-objective optimization frameworks irrespective of their complexity and scale.

According to the optimization results, the DDFR reduces energy loss and ENS. For instance, the values of these objective functions obtained by the IPSO algorithm are reduced by approximately 6% and 17% compared to objective functions values before the DDFR. Moreover, considering DGs, PV units and ESSs in solving the DDFR problem has had a significant impact on reducing ENS and operational cost. For instance, the values of these objective functions obtained by the IPSO algorithm are dropped by about 20% and 9% in comparison to their initial values prior to the DDFR. By incorporating the DRP impact along with capacitor, DGs, PV units and ESSs in solving DDFR problem, ENS, operational cost and energy loss derived from the IPSO algorithm are declined by approximately 31%, 12% and 6% in comparison to their baseline values prior to the DDFR. In addition, the voltage profile is also significantly improved under the optimal reconfiguration of distribution feeders considering DGs, PV units, capacitors, ESSs, and DRP effect.

Some suggestions for future studies of this research are as follows:

  • Stochastic optimal distribution feeder reconfiguration with the sporadic nature of distributed generation units and electrical vehicles according to the optimal location of charging stations.

  • Protection constraints, reconfiguration the feeder topology in the distribution network may challenge the distribution network protection system and cause changes in the status of the protection relays.