1 Introduction

The exponential rise in energy demand, the need to reduce greenhouse gas emissions by generating pollution-free power, and the need to reduce losses due to long-distance transmission have led to the rapid development of microgrids. Microgrids equipped with dispatchable and non-dispatchable generation sources, distributed energy storage devices, controllable loads, and digital devices interconnected through advanced communication infrastructure have transformed the traditional, passive distribution network into an active, intelligent distribution network. The significant advantage of microgrids is their ability to collaborate with the main grid or operate independently while ensuring reliable power supply even in remote areas [1,2,3,4].

During grid-connected operation, if any major disturbance occurs in the main grid, microgrids must be islanded intentionally to prevent cascaded outages and improve reliability by supplying locally connected loads. When a microgrid is operated in collaboration with the main grid, it provides ancillary services only. On the other hand, in the islanded mode of operation, it needs to maintain supply–demand balance by itself, and the primary challenge is to incorporate an efficient algorithm for the optimal scheduling of loads [4, 5]. In addition, during long-term islanded operation, the uncertain nature of RES may cause power interruption to essential loads. To address this issue, the concept of hybrid microgrid system (HMGS) has been introduced in the literature.

HMGS enables the integration of dispatchable and non-dispatchable energy sources along with Battery Energy Storage Systems (BESS) and loads in one place. Non-dispatchable sources such as solar PV, wind turbines are prioritized during their availability. Dispatchable sources such as diesel generator (DG), microturbine (MT) are operated during the insufficiency or non-availability of non-dispatchable sources. BESS is considered quasi-stochastic as it depends upon the percentage of SOC [6, 7]. With the optimal deployment of DERs, HMGS enhances reliability, reduces emissions, improves power quality, lowers the cost of energy supply, and facilitates long-term islanding operation [8]. Incorporating an effective energy scheduling strategy makes it possible to get more benefits from HMGS. Therefore, developing an efficient algorithm for optimal scheduling has become a significant research task for the optimal operation of HMGS under islanded conditions.

Many optimal scheduling models in islanded and grid-connected microgrids have been extensively discussed in the literature to determine optimal schedule of generation sources [1, 7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24], optimal schedule of loads [25,26,27,28,29,30] along with charging/discharging schedule of BESS. The role of BESS in multi-period power generation scheduling is discussed in [7] to minimize the total cost of generation, including the cost of charging and discharging BESS. The authors in [9] have proposed a model for microgrid optimal scheduling with multi-period islanding constraints. The objective of the scheduling problem is to minimize microgrid operating cost, which includes the cost of internal generation and the cost of energy import from the main grid.

The formulation of an optimal power flow problem in a hybrid power system is described in [11, 12], comprising conventional generation sources, wind & solar plants, and battery under uncertain conditions. Deterministic and probabilistic real-time optimal power flow models are solved with and without considering uncertainties in solar PV, wind, and load demands. In [14], a day-ahead optimal scheduling problem is described for a microgrid with multiple DERs. An interval-based optimization model is developed to deal with prediction uncertainties of RES and loads. A hierarchical energy scheduling framework is presented in [16] to achieve optimal microgrid operation. To deal with the uncertainty of RES, the battery is considered for hour-ahead scheduling, and the battery & ultra-capacitor are considered for real-time scheduling. The hour-ahead scheduling model is solved using a decomposition-based method, and a control strategy is developed in real-time scheduling to accommodate imbalanced power due to load & RES uncertainty while extending battery life.

In [18], a privacy-preserving optimal scheduling model has been proposed in integrated microgrids, ensuring the lowest possible data sharing among microgrids. The primary objective of scheduling is to maximize system reliability and minimize operating costs. A two-level optimization scheme has been proposed in [23] for optimal coordination of multiple microgrids in a smart distribution network in two scheduling modes. The upper level optimizes the operation of the distribution network, and at the lower level, the economic dispatch of each microgrid is calculated. A two-stage optimization method for the scheduling of responsive loads in a distribution system has been proposed in [25]. In the first stage, loads are scheduled to minimize electricity cost of customers, and a multi-objective optimization is implemented to improve economic benefit of DSO and network’s reliability in the second stage.

In [26], an energy scheduling strategy has been proposed within islanded microgrids, ensuring energy supply to consumers with the highest priority in an earlier order. The scheduling problem is modeled as a goal programming problem to minimize positive and negative deviation variables. A priority load control algorithm has been proposed to achieve optimal energy management that provides energy supply to emergency and critical loads in a stand-alone PV system with battery storage [28]. An equivalent aggregated model has been developed in [29] to convert large number of flexible loads in to a few equivalent models based on identical parameters. Scheduling is done for these flexible loads to achieve peak shifting and valley filling with small equivalent deviations. For the dynamic distribution feeder reconfiguration (DDFR) problem in the distribution network, a multi-objective optimization model has been presented in [31,32,33] taking distributed generation, photovoltaic units, and energy storage units into consideration. The objective functions that guarantee network security and reliability are regarded by the authors to be Voltage Stability Index (VSI), and energy not supplied. In [32, 33], the proposed DDFR problem, which also incorporates a demand response program, is solved by considering energy loss, VSI, and operational cost as objective functions. The literature review is briefly summarized in Table 1.

Table 1 Comparison of proposed work with existing literature

From the above literature review, it can be observed that the authors have implemented either the optimal generation scheduling or load scheduling with or without considering battery storage, with the objectives of minimizing the total cost of generation [7, 11,12,13, 16, 21, 22]; maximizing system reliability [18, 25]; maximizing customer benefit [25]; minimizing overall operating cost [8, 9, 14, 18, 19, 23]; and minimizing network losses [17, 22]. In the optimal load scheduling algorithms, the significance of loads in the day-to-day life is not considered, and in few scheduling algorithms with load priorities, the weights of loads are randomly assigned. The scheduling algorithms are implemented without considering the network interconnection of DERs and loads, network constraints, security limits, and inter-temporal operating conditions. Furthermore, less attention has been paid to the security of the distribution network.

To fill these research gaps, in this paper, a multi-period optimal scheduling (MPOS) framework is proposed in an islanded smart distribution network with prioritized loads and DERs, implemented on the modified IEEE 34 bus system for 24 time periods. Six DERs and 14 loads are considered in the distribution network, connected at different buses. The MPOS problem is formulated as a multi-objective optimization problem with four objective functions subjected to constraints and security limits, over multiple time periods. The significant contributions of this article are enumerated as follows:

  1. 1.

    The overall scheduling framework is modeled in to four different operating cases depending upon the maximum load demand on the network and the available generation.

  2. 2.

    The optimal generation schedule of DERs is determined in cases 1, 2, & 3, and goal programming model is presented to determine the optimal schedule of loads in case 4. Loads are categorized in to priority levels, and analytic hierarchy process (AHP) is used to determine the weights of loads within priority levels. Optimal charging/discharging schedule of battery bank (BB) is determined over the complete scheduling horizon.

  3. 3.

    Alongside power loss, total cost of generation, and total load curtailment, the voltage stability index (VSI) is also considered as one of the objective functions to ensure the security of the distribution network. The scheduling problem is solved using Non-Dominated Sorting Genetic Algorithm-II (NSGA-II), and the accuracy of results is compared by solving the proposed scheduling problem using Pyomo software.

  4. 4.

    The most practical method of charging and discharging the BB is well described considering BB as a load when there is surplus power from RES, and as a source when there is power deficit, considering network losses.

  5. 5.

    The need of prioritizing loads in an islanded distribution network during limited generation periods is described by comparing the MPOS framework with the result obtained from scheduling framework without considering priorities.

The remaining part of this paper is organized as follows:

The network model is described, and goal programming and AHP are briefed in Sect. 2. The problem formulation is presented in Sect. 3. The proposed multi-period optimal scheduling framework is described in Sect. 4. In Sect. 5, results are presented and discussed. A comparison of MPOS framework with the scheduling framework without considering priorities is presented in Sect. 6. Finally, Sect. 7 concludes the paper.

2 Network model, goal programming, and AHP

2.1 Network model

The architecture of an Energy Management System (EMS) in an islanded smart distribution network is shown in Fig. 1. It consists of Microgrid Energy Management Centre (MGEMC), Local Agents (LA), and Smart Meters (SM) deployed at the producer and consumer premises, interconnected together via wired or wireless communication. Internally, MGEMC consists of Microgrid Operators (MO) and advanced computational & storage devices. SMs are connected to MGEMC via LAs. SMs are used to measure the energy supplied by the producer and consumed by the consumer. They are also used to communicate the energy consumption details, producer & consumer details, details of generation sources and loads with LA, and receive instructions from LA. LA sends collected smart meter data to MGEMC and locally manages producers and consumers following the instructions and guidelines received from MGEMC. The MO present in MGEMC calculates the required parameters and prepares the input data for scheduling based on the information received from LAs. MO also solves the MPOS problem using the advanced computational infrastructure available with MGEMC.

Fig. 1
figure 1

Architecture of EMS in an islanded smart distribution network

2.2 Goal programming

Goal programming (GP) problems are a specialized class of linear programming problems that include multiple objectives to be optimized sequentially [34,35,36]. These objectives or goals have different levels of importance, which need to be optimized in some hierarchical order. Hence, goals are categorized into priority levels depending upon their level of importance, and these priority levels are ranked to determine the order in which they are optimized.

The general form of goal programming problem is given as:

$$ {\text{Minimize }}\mathop \sum \limits_{l = 1}^{np} K_{l} \left[ {\mathop \sum \limits_{j = 1}^{nd} W_{lj} *\left( {\mu_{j} + \rho_{j} } \right)} \right] $$
(1)

Subject to

$$ \mathop \sum \limits_{i = 1}^{N} x_{ij} + \mu_{j} - \rho_{j} = X_{j} \quad \forall j \in \left[ {1,nd} \right] $$
(2a)
$$ x_{ij} ,\mu_{j} ,\rho_{j} \ge 0\quad \forall j \in \left[ {1,nd} \right] $$
(2b)

Equation (1) represents the objective function of GP problem to be minimized while satisfying the goal constraints, given in Eq. (2a). In (1), np is the number of priority levels and \({K}_{l}\) is the lth priority level. A goal with higher priority is considered to have more importance than a goal with lower priority. In other words, the goal with lower priority is optimized only after optimizing the goal with higher priority. Accordingly, the priority levels are ranked in the descending order of their priority. If K1, K2, K3,…Knp are the priority levels, K1 has the highest priority, and Knp has the lowest priority such that K1 > K2 > K3… > Knp.

In goal programming, all the problem constraints serve as the goals to be achieved sequentially. In equation (\(2a\)), \(nd\) is the number of design variables, \({X}_{j}\) is the target value assigned to jth design variable or goal, to be achieved while solving the problem, and μj & ρj are the under-achievement and over-achievement variables introduced to determine the level of attainment of the target value. A positive value of μj indicates that the actual value of the goal attained is less than the target value, and the positive value of ρj indicates that the actual value of the goal attained is greater than the target value. To determine the order of precedence of goals within the priority level, weights are assigned to the under-achievement and over-achievement variables of goals. Wlj, the weight assigned to jth design variable in the lth priority level, is assigned such that Wl1 > Wl2 > …. > 0. The most important part of goal programming is priority ranking of goals and setting of weights. Priority ranking includes categorizing goals into priority levels and arranging them in the descending order of their importance or necessity. Priority ranking and setting of weights need careful analysis of explicit information available for each goal, and it is also required to consider the responses of decision makers to build the model for achieving an exact or a compromising solution.

2.3 Analytic hierarchy process

The need to consider multiple alternatives increases the complexity of decision-making problems. Each alternative is characterized by attributes on which decision-making depends, and subjective nature of these attributes further increases the complexity of decision-making process [37]. To deal with these complex decision-making problems, multi-criteria decision-making (MCDM) techniques have been introduced, and AHP is one of the most popular MCDM techniques that can model problems combining qualitative and quantitative attributes [38]. AHP is useful in determining the priorities of alternatives by assigning weights depending upon the performance score of each alternative with respect to each attribute and attribute weights. The performance score is obtained from the performance matrix D, and attribute weights are calculated using pair-wise comparison matrix A in which each element represents the relative importance of one attribute over the other. Matrix A is a reciprocal matrix, that is, \({a}_{ij}=\frac{1}{{a}_{ji}}\) for \(i\ne j\), and \({a}_{ij}=1\) for \(i=j\). The elements in matrix A are obtained by quantifying the verbal description into a standard scale of 1–9 [37].

AHP is implemented in four steps. In the first step, the problem is decomposed in to a hierarchy of goal, attributes, and alternatives. In the second step, attribute weights are calculated by taking the row-wise average of normalized pair-wise comparison matrix. In the third step, consistency check is done to determine the reliability of attribute weights. In the fourth step, weights to be assigned to alternatives are obtained by multiplying the performance matrix D and column vector of attribute weights. For consistency check, consistency index \({\text{CI}} = (\lambda_{{{\text{max}}}} - v)/( v - 1)\) and consistency ratio (CR) are calculated; \({\lambda }_{\mathrm{max}}\) is the maximum eigen value of matrix A and \(v\) is the number of attributes. The CR is the ratio of CI of a specific matrix to the CI of randomly generated matrix whose value should be below 0.1 and definitely below 0.2 for the matrix A to be sufficiently consistent [37].

In this paper, AHP is used to determine the weights to be assigned to the loads in the same priority level for optimal load scheduling during limited generation. The attributes such as carbon emissions, harmonic content, possibility of load curtailment, timely payment of bill, customer reputation, significance level are considered depending upon the type of load.

3 Problem formulation

The proposed optimal scheduling problem is formulated as a multi-objective optimization problem with four objective functions, in four different operating cases over 24 time periods.

3.1 Objective functions and constraints

3.1.1 Objective functions

$$ \begin{gathered} {\text{Min }}Z_{1} = \mathop \sum \limits_{m = 1}^{{N_{{{\text{bus}}}} }} \mathop \sum \limits_{n = 1}^{{N_{{{\text{bus}}}} }} Pl_{m,n,t} \hfill \\ {\text{if}} \;m \& n \;{\text{are}} \;{\text{connected}}\; \& \;m \ne n,\;\; \forall t \hfill \\ \end{gathered} $$
(3)
$$ \min { }Z_{2} = \mathop \sum \limits_{i = 1}^{{N_{{{\text{CGS}}}} }} C_{gi,t} \quad \forall t $$
(4)
$$ \begin{aligned} C_{{gi,t}} = & \left\{ {\begin{array}{*{20}l} {a_{i} *P_{{gi,t}}^{2} + b_{i} *P_{{gi,t}} + c_{i} } \hfill & {{\text{if}}\;~X_{{i,t}} = 1} \hfill \\ 0 \hfill & {{\text{if}}\;~X_{{i,t}} = 0} \hfill \\ \end{array} } \right. \\ ~ & \quad \forall i \in \left[ {1,~N_{{{\text{CGS}}}} } \right],~\quad \forall t \\ \end{aligned} $$
(5)

In (3), \({Z}_{1}\) is the objective function that represents the total distribution power loss, and \({Pl}_{m,n,t}\) represents the active power flow through the line connected between the buses m and n at time period t. In (4), \({Z}_{2}\) is the objective function that represents the total cost of generation of CGS such as DG, MT. In (5), \({C}_{gi,t}\) is the quadratic cost function of ith CGS, \({a}_{i}\), \({b}_{i}\), \({c}_{i}\) are the cost coefficients, and \({P}_{gi,t}\) is the power generated by ith CGS. Xi,t is the binary variable that indicates the on/off status of ith CGS at time period t.

3.1.2 Network constraints

$$ P_{G,t}^{{{\text{CGS}}}} + P_{G,t}^{{{\text{RES}}}} + P_{{{\text{dis}},t}}^{{{\text{BB}}}} - P_{{{\text{ch}},t}}^{{{\text{BB}}}} = \mathop \sum \limits_{j = 1}^{nl} P_{dj,t} + P_{{{\text{loss}},t}} \quad \forall t $$
(6)
$$ \Delta P_{m,t} = \mathop \sum \limits_{{\begin{array}{*{20}c} {n = 1} \\ {m \ne n} \\ \end{array} }}^{{N_{{{\text{bus}}}} }} Pl_{m,n,t} \quad \forall m \in \left[ {1,N_{{{\text{bus}}}} } \right],\quad \forall t $$
(7)
$$ \Delta Q_{m,t} = \mathop \sum \limits_{{\begin{array}{*{20}c} {n = 1} \\ {n \ne m} \\ \end{array} }}^{{N_{{{\text{bus}}}} }} Ql_{mn,t} \quad \forall m \in \left[ {1,N_{{{\text{bus}}}} } \right],\quad \forall t $$
(8)
$$ \begin{aligned} Pl_{m,n,t}& = \left| {V_{m,t}^{2} } \right|*\left| {Y_{m,n} } \right|*{\text{cos}}\theta_{m,n}\\&\quad - \left| {V_{m,t} } \right|*\left| {V_{n,t} } \right|*\left| {Y_{m,n} } \right|\\ & \quad *{\text{cos}}\left( {\theta_{m,n} - \delta_{m,t} + \delta_{n,t} } \right) \hfill \\&\quad \forall t, \forall m,n \in \left[ {1,N_{{{\text{bus}}}} } \right] \hfill \end{aligned} $$
(9)
$$ \begin{aligned} Ql_{m,n,t} &= - \left| {V_{m,t}^{2} } \right|*\left| {Y_{m,n} } \right|*{\text{sin}}\theta_{m,n} \\ & \quad + \left| {V_{m,t} } \right|*\left| {V_{n,t} } \right|*\left| {Y_{m,n} } \right|\\ & \quad *{\text{sin}}\left( {\theta_{m,n} - \delta_{m,t} + \delta_{n,t} } \right) \hfill \\ &\quad \forall t, \forall m,n \in \left[ {1,N_{{{\text{bus}}}} } \right] \hfill \end{aligned} $$
(10)

Equation (6) is the equality constraint, in which the total generation including the discharging power of BB is equal to the sum of total load, distribution power loss in the network, and charging power of BB. \({P}_{G,t}^{\mathrm{CGS}}\) is the total power generation from CGS, and \({P}_{G,t}^{\mathrm{RES}}\) is the total power generation from RES, Eqs. (7) & (8) represent the active and reactive power balance equations at mth bus during the time period t, and \(\Delta {P}_{m,t}\) & \(\Delta {Q}_{m,t}\) are the net active and reactive power injection at bus m. Equations (9) & (10) calculate the active and reactive power flow through the line connected between the mth bus and nth bus. \({V}_{m,t},\) \({\delta }_{m,t}\) are the magnitude and phase angle of mth bus voltage. \({Y}_{m,n}\) & \({\theta }_{m,n}\) are the magnitude and angle of line admittance connected between buses m & n.

3.1.3 CGS constraints

$$ P_{gi,t} - P_{gi,t - 1} \le RU_{i} \quad \forall t, i \in \left[ {1,N_{{{\text{CGS}}}} } \right] $$
(11)
$$ P_{gi,t - 1} - P_{gi,t} \le RD_{i} \quad \forall t,i \in \left[ {1,N_{{{\text{CGS}}}} } \right] $$
(12)
$$ \begin{gathered} \max \left[ {\left( {P_{gi}^{\min } , P_{gi,t - 1} - RD_{i} } \right)*X_{i,t} } \right] \le P_{gi,t} \le \hfill \\ \min \left[ {\left( {P_{gi}^{\max } ,P_{gi,t - 1} + RU_{i} } \right)*X_{i,t} } \right] \hfill \\ \forall t, i \in \left[ {1,N_{{{\text{CGS}}}} } \right] \hfill \\ \end{gathered} $$
(13)

Equations (11) & (12) represent the ramp-up and ramp-down constraints of ith CGS. Equation (13) represents the minimum and maximum generation limits of ith CGS.

3.1.4 Battery bank constraints

The battery is charged only when there is surplus power available from RES, and it is discharged when the total load demand on the system is greater than the total power generation from CGS and RES. The lower and upper limits of charging and discharging power of the battery are given in Eqs. (14) & (15). In practical scenario, maximum limits of \({P}_{\mathrm{ch},t}^{\mathrm{BB}}\) and \({P}_{\mathrm{dis},t}^{\mathrm{BB}}\) will not depend only on \({P}_{\mathrm{ch},\mathrm{max}}^{\mathrm{BB}}\) and \({P}_{\mathrm{dis},\mathrm{max}}^{\mathrm{BB}}\). The charging power of BB also depends upon the difference between the total power generated by RES and the sum of the maximum load demand on the system, and the power loss. If the excess power available from RES is more than \({P}_{\mathrm{ch},\mathrm{max}}^{\mathrm{BB}}\), then the charging power of BB is less than or equal to \({P}_{\mathrm{ch},\mathrm{max}}^{\mathrm{BB}}\). Similarly, the discharging power to be supplied by BB depends upon the difference between the sum of total load demand on the system, distribution power loss, and the sum of power generation from RES and CGS. While discharging, if the power to be supplied by BB to meet excess load demand is greater than \({P}_{\mathrm{dis},\mathrm{max}}^{\mathrm{BB}}\), then discharging power of BB is less than or equal to \({P}_{\mathrm{dis},\mathrm{max}}^{\mathrm{BB}}\). \({X}_{\mathrm{ch},t}^{\mathrm{BB}}\) and \({X}_{\mathrm{dis},t}^{\mathrm{BB}}\) are the binary variables that indicate the charging and discharging status of BB. BB is not allowed to charge and discharge simultaneously by Eq. (16). Also, when BB remains idle, \({X}_{\mathrm{ch},t}^{\mathrm{BB}}\) = \({X}_{\mathrm{dis},t}^{\mathrm{BB}}\)  = 0. Equation (17) is used to update the SOC of BB after each time period t. \(\varnothing \) is the self-discharge factor, ηch & ηdis are the charging and discharging efficiencies, Δt is the time interval, and \({E}_{\mathrm{max}}^{\mathrm{BB}}\) is the capacity of BB. The minimum and maximum limits of SOC of BB are given in Eq. (18).

$$\begin{aligned} {}&0 \le P_{{{\text{ch}},t}}^{{{\text{BB}}}} \le \min \\ & \quad\times\left[ {\left( {P_{{{\text{ch}},{\text{max}}}}^{{{\text{BB}}}} , P_{G,t}^{{{\text{RES}}}} - \left( {\mathop \sum \limits_{j = 1}^{nl} P_{dj,t} + P_{{{\text{loss}},t}} } \right)} \right)*X_{{{\text{ch}},t}}^{{{\text{BB}}}} } \right]\quad \forall t \end{aligned}$$
(14)
$$ \begin{aligned} {}&0 \le P_{{{\text{dis}},t}}^{{{\text{BB}}}} \le \min \\ & \quad\times \left[ {\left( {P_{{{\text{dis}},\max }}^{{{\text{BB}}}} , \sum \limits_{j = 1}^{nl} P_{dj,t}+ P_{{{\text{loss}},t}} }\right. }\right. \\ & \quad\quad \left.{\left.{- \left( { P_{G,\max }^{{{\text{CGS}}}} + P_{G,t}^{{{\text{RES}}}} } \right) \vphantom{\sum \limits_{j = 1}^{nl}}} \right)*X_{{{\text{dis}},t}}^{{{\text{BB}}}} } \right] \quad \forall t\end{aligned} $$
(15)
$$ X_{{{\text{ch}},t}}^{{{\text{BB}}}} + X_{{{\text{dis}},t}}^{{{\text{BB}}}} \le 1\quad \forall t $$
(16)
$$ {\text{SOC}}_{t} = \left( {1 - \emptyset } \right)*{\text{SOC}}_{t - 1} + \frac{{P_{{{\text{ch}},t}}^{{{\text{BB}}}} *\eta_{{{\text{ch}}}} *\Delta t}}{{E_{\max }^{{{\text{BB}}}} }} - \frac{{P_{{{\text{dis}}}}^{{{\text{BB}}}} *\Delta t}}{{\eta_{{{\text{dis}}}} *E_{\max }^{{{\text{BB}}}} }}\quad \forall t $$
(17)
$$ {\text{SOC}}_{\min }^{{{\text{BB}}}} \le {\text{SOC}}_{t}^{{{\text{BB}}}} \le {\text{SOC}}_{\max }^{{{\text{BB}}}} \quad \forall t $$
(18)

3.1.5 Security limits

$$ V_{m}^{\min } \le V_{m,t} \le V_{m}^{\max } \quad \forall t, \forall m \in \left[ {1,N_{{\text{bus }}} } \right] $$
(19)
$$ \delta_{m}^{\min } \le \delta_{m,t} \le \delta_{m}^{\max } \quad \forall t, \forall m \in \left[ {1,N_{{\text{bus }}} } \right] $$
(20)
$$ - Pl_{m,n}^{\max } \le Pl_{m,n,t} \le Pl_{m,n}^{\max } \quad \forall t, \forall m,n \in \left[ {1,N_{{\text{bus }}} } \right] $$
(21)
$$ - Ql_{m,n}^{{{\text{max}}}} \le Ql_{m,n,t} \le Ql_{m,n}^{{{\text{max}}}} \quad \forall t, \forall m,n \in \left[ {1,N_{{\text{bus }}} } \right] $$
(22)
$$ 0 \le P_{dj,t} \le P_{dj,t}^{{{\text{max}}}} \quad \forall t, \forall j \in \left[ {1,nl} \right] $$
(23)

Equations (19)–(20) represent the minimum and maximum limits of mth bus voltage magnitude and phase angle at any time period t. Equations (21) and (22) represent the minimum and maximum active and reactive power flow limits through the line connected between the buses m & n. Equation (23) represents the minimum and maximum limits of allowed load demand of jth load during any time period t.

3.2 Voltage stability index

In distribution networks, excessive loading of the network buses, improper performance of transformers, and many other factors lead to voltage instability. VSI can be used as a measure to determine the security level of the distribution network. Network security needs to be considered in determining the optimal schedule of generation sources and loads. In any network, the bus which has a minimum value of VSI is more vulnerable to instability. Hence, VSI is considered in one of the objectives in the formulation of MPOS framework. Sensitive buses in the network are located based on the value of VSI, and then, they are taken care of in the objective function.

The VSI model presented in [31,32,33] can be used for both mesh and radial networks. For a radial distribution network, the VSI model described in [39, 40] is used in this paper. The expression for VSI can be written as in Eq. (24). \({P}_{n}\) & \({Q}_{n}\) are the effective active and reactive powers at bus \(n\).

$$ \begin{aligned} {\text{VSI}}_{n} &= V_{m}^{4} - 4(P_{n} *X_{mn} - Q_{n} *R_{mn} )^{2} \\ & \quad - 4V_{m}^{2} \left( {P_{n} *R_{mn} + Q_{n} *X_{mn} } \right), \hfill \\ &\quad n = \left[ {2, 3, \ldots ..N_{{{\text{bus}}}} } \right] \hfill \end{aligned} $$
(24)
$$ v_{n} = \left\{ {\begin{array}{*{20}c} {0\quad {\text{if}}\quad {\text{VSI}}_{n} > 0} \\ {1\quad {\text{if}} \quad {\text{VSI}}_{n} \le 0} \\ \end{array} } \right. $$
(25)

In Eq. (25), \(v_{n}\) is the binary number which determines the sensitive buses in the network. The objective function Z3 is written as follows:

$$ Z_{3} = \mathop \sum \limits_{n = 2}^{{N_{{{\text{bus}}}} }} \left( {v_{n} *{\text{VSI}}_{n} } \right) $$
(26)

3.3 MPOS formulation as a goal programming problem

The formulation of the MPOS problem as a goal programming problem is presented in this section. In general, the goal of each customer is to get continuous and sufficient power supply. This is possible only when the available power is greater than the total load demand on the system. However, in an islanded distribution network, during limited generation periods, it is not possible to provide sufficient power supply to all loads. In such a scenario, there is a need to prioritize the loads according to their necessity in day-to-day life. Therefore, in this paper, the MPOS problem is modeled as a GP problem, and the loads are categorized into priority levels. Hospitals are considered critical loads that depend on the continuous power supply to run critical equipment that saves lives. A small interruption in the power supply can be deleterious to patients in critical care and those undergoing surgery. In view of this, hospitals are considered to have the highest priority over any other load. Hence, K1 consists of hospitals, followed by K2, with public consumer loads like railway stations, bus stations, etc., K3, consisting of industries, K4, having educational centers, and K5, with domestic loads.

The problem is solved sequentially by first optimizing K1, followed by K2, K3, K4, and K5. To determine the precedence of loads within the priority level, weights are assigned to the underachievement and overachievement variables using AHP depending upon the relevant attributes of each load. It is assumed that MGEMC has enough information of attributes for each load to be able to determine the acceptable set of weights.

The objective function of the goal programming-based MPOS problem is given in Eq. (27).

$$ {\text{Min}} Z_{4} = \mathop \sum \limits_{l = 1}^{np} K_{l} \left[ {\mathop \sum \limits_{j = 1}^{nl} W_{lj} *\left( {\mu_{j,t} + \rho_{j,t} } \right)} \right] \quad \forall t $$
(27)
$$ \mathop \sum \limits_{j = 1}^{nl} P_{i,j,t} \le P_{gi,t}\quad \forall i \in \left[ {1,ng} \right], \, \forall t $$
(28)
$$ \mathop \sum \limits_{i = 1}^{ng} P_{i,j,t} + \mu_{j,t} - \rho_{j,t} = P_{dj,t}^{{{\text{max}}}}\quad \forall j \in \left[ {1,nl} \right], \, \forall t $$
(29)
$$ P_{i,j,t } ,\mu_{j,t} , \rho_{j,t} \ge 0 \quad \forall j \in \left[ {1,nl} \right], \forall t $$
(30)

In (27), Z4 is the weighted sum of underachievement and overachievement variables in each priority level, and minimization of Z4 minimizes the total load curtailment of loads or maximizes the power supply to loads according to their weightage, satisfying Eq. (23). np is the number of priority levels, Kl is the lth priority level, and nl is the number of loads in the network. Wlj is the weight assigned to the jth load in the lth priority level, and μj and ρj are the underachievement and overachievement variables of jth load. Equations (28)–(30) represent the goal constraints. According to Eq. (28), for ith generation source, the total power supply provided to all loads should not be greater than the power it generates in any time period t. Pgi,t is the power generated by the ith source, and Pi,j,t is the power flow from ith source to jth load. According to Eq. (29), for the jth load, the total power obtained from all sources should satisfy its maximum demand in any period t. \({P}_{dj,t}^{\max}\) is the maximum demand of the jth load.

4 Multi-period optimal scheduling framework

4.1 Implementation

The effectiveness of the proposed MPOS algorithm is tested by implementing it on a modified 34 bus system over 24 time periods, considering four different operating cases depending upon the total generation and maximum load demand on the system. The maximum load demand and the total allowed load demand in the network are given in Eqs. (31) and (32). The condition to be satisfied to choose the operating case for solving the MPOS problem is given in Eqs. (33)–(36).

$$ P_{D,t}^{{{\text{max}}}} = \mathop \sum \limits_{j = 1}^{nl} P_{dj,t}^{{{\text{max}}}} \quad \forall t $$
(31)
$$ P_{D,t} = \mathop \sum \limits_{j = 1}^{nl} P_{dj,t} \quad \forall t $$
(32)

Condition for case 1:

$$ P_{D,t}^{{{\text{max}}}} < P_{G,t}^{{{\text{RES}}}} \quad \forall t $$
(33)

Condition for case 2:

$$ P_{D,t}^{{{\text{max}}}} < P_{G,t}^{{{\text{RES}}}} + P_{{G,{\text{max}}}}^{{{\text{CGS}}}} \quad \forall t $$
(34)

Condition for case 3:

$$ P_{D,t}^{{{\text{max}}}} < P_{G,t}^{{{\text{RES}}}} + P_{{G,{\text{max}}}}^{{{\text{CGS}}}} + P_{{{\text{dis}},t,{\text{max}}}}^{{{\text{BB}}}} \quad \forall t $$
(35)

Condition for case 4:

$$ P_{D,t}^{\max } \ge P_{G,t}^{{{\text{RES}}}} + P_{G,\max }^{{{\text{CGS}}}} + P_{{{\text{dis}},t,\max }}^{{{\text{BB}}}} \quad \forall t $$
(36)

The complete procedure of the MPOS framework is given in the algorithm. Steps 1 to 9 correspond to data input and data collection from smart meters. Number of loads (nl), number of DERs (ng), number of conventional generation sources (NCGS), and network data are initialized. The local agents collect the generation and load data from all the smart meters and forward it to MGEMC. In the subsequent steps, the implementation procedure of optimal scheduling is given.

According to (33), if the maximum demand on the system is less than the total power generation from RES, the scheduling problem is solved according to case 1, which corresponds to steps 10–11 in the algorithm. Else, if the maximum demand on the system is less than the sum of total generation from CGS & RES, as per (34), then the MPOS problem is solved according to case 2, which corresponds to steps 12–13. Else, if the maximum demand on the system is less than total power generation from CGS, RES, and BB, as per (35), case 3 is followed to solve the MPOS problem, which corresponds to steps 14–15. Else, if the maximum demand on the system is greater than or equal to the total generation from CGS, RES & BB, as per (36), then the MPOS problem is solved according to case 4, which corresponds to steps 16–19 in the algorithm.

figure a

4.2 System description

The modified IEEE 34 bus test system, depicted in Fig. 2, consists of 6 DERs and 14 loads [41]. DG, MT, PV, 2 wind turbines (WT-1, WT-2), and BB are the generation sources, and loads comprise 3 hospitals (H-1, H-2, H-3), 2 public consumer loads (PC-1, PC-2), 3 industries (I-1, I-2, I-3), 3 education centers (EC-1, EC-2, EC-3), and 3 domestic loads (D-1, D-2, D-3) connected at various buses. Table 2 gives the details of the buses at which all the DERs and loads are connected and the designation of each DER and load in the modified 34 bus system. Pg1 is the power generated by DG, connected at bus 1; Pg2 is the power generated by MT, connected at bus 6. Pd1 is the load demand of H-1, connected at bus 5, and Pd2 is the load demand of H-2, connected at bus 9, and so on.

Fig. 2
figure 2

Modified IEEE 34 bus test system

Table 2 Interconnection and designation of DERs and loads in modified IEEE 34 bus system

The MPOS problem can be described as follows:

In Eq. (4), NCGS = 2, i = 1 indicates DG, and i = 2 indicates MT. In Eq. (5), a1, b1, and c1 are the cost coefficients of DG, and a2, b2, and c2 are the cost coefficients of MT. With respect to Eq. (6), \({P}_{G}^{\mathrm{CGS}}\) = Pg1 + Pg2 and \({P}_{G}^{\mathrm{RES}}\) = Pg3 + Pg4 + Pg5, \({P}_{\mathrm{ch}}^{\mathrm{BB}}\)= –Pg6, and \({P}_{\mathrm{dis}}^{\mathrm{BB}}\) = Pg6. With respect to, Equation (7), ΔP1  =  Pg1, ΔP2  =  ΔP3 = ΔP4 = 0, ΔP5 = –Pd1, ΔP6 = Pg2, and so on. In Eq. (27), the number of priority levels, np = 5, and the number of loads, nl = 14.

The categorization of loads into priority levels is shown in Table 3. The load curves of all loads and generation curves of solar PV and wind turbines used in the implementation of the MPOS framework are depicted in Fig. 3 [42,43,44,45]. The hourly generation data of PV and wind turbines is obtained from non-conventional energy laboratory, Visvesvaraya National Institute of Technology, Nagpur, India, for the location Nagpur (latitude 21.092°, longitude 79.048°).

Table 3 Categorization of loads into priority levels
Fig. 3
figure 3

Load curves of all loads and generation curves of solar PV and wind turbines

4.3 Multi-objective optimization

Multi-objective optimization (MOO) algorithms are useful in dealing with multiple objectives which are diverse or conflicting in nature simultaneously. There are two methods to determine the optimal solution of a MOO problem: preference-based approach and ideal approach. In preference-based approach, weights are given to objective functions and MOO problem is converted to single objective optimization problem. In ideal approach, all objective functions are given equal importance and solved as MOO problem. So, optimal solution obtained will be completely rational.

Evolutionary algorithms are random population-based algorithms which are used to solve complex, real-world optimization problems. Non-dominated Sorting Genetic Algorithm-II (NSGA_II) is the most popular and benchmark evolutionary algorithm to solve multi-objective optimization problems. It uses a fast non-dominated sorting procedure, an elitist-preserving approach, and a parameter less niching operator [46]. The non-dominated set of solutions are represented using a plot, termed as pareto optimal front. All points in the plot are optimal solutions. However, an optimal solution with higher fitness in one objective function may have lower fitness in the other objective function. In such a scenario, crowding distance (cd) is calculated among pareto points to determine the best compromise solution [46].

Crowding distance is calculated as

$$ cd_{pq} = \frac{{f_{q} \left( {E_{p + 1} } \right) - f_{q} \left( {E_{p - 1} } \right)}}{{f_{q} \left( {E_{{{\text{max}}}} } \right) - f_{q} \left( {E_{{{\text{min}}}} } \right)}} $$
(37)
$$ cd_{p} = \mathop \sum \limits_{q = 1}^{M} cd_{pq} \quad p = \left[ {2,3, \ldots P - 1} \right] $$
(38)

In Eqs. (37) and (38), \(M\) represents the number of objective functions, \(p\) is the index of pareto point, P represents the number of pareto points, \({cd}_{pq}\) is the crowding distance of \(p\) th pareto point for \(q\) th objective function, and \({cd}_{p}\) is the total crowding distance of \(p\) th pareto point. For pareto points \(p=1\) & \(p=P\), cd = ∞ because of the absence of neighbors. For diversity preservation, the decision variable vector corresponding to a pareto point with the maximum crowding distance in the pareto optimal front with rank 1 is regarded as the best compromise solution.

5 Results and discussion

The proposed MPOS framework is implemented on a modified IEEE 34 bus test system, and the scheduling problem is solved using Non-dominated Sorting Genetic Algorithm-II (NSGA-II). The optimization program is coded in MATLAB and implemented on Intel(R) Core(TM) i7-10700 CPU @2.9 GHz, 64 bit, 8 GB RAM, octa-core processor. To verify the accuracy of results, the proposed scheduling problem is also solved using Python optimization modeling objects (Pyomo) with interior point optimizer (IPOPT) as the solver. Pyomo software is an algebraic modeling language that supports the formulation and analysis of various optimization models, including deterministic and stochastic programs [47]. IPOPT is an open-source optimization software package used to solve large-scale NLP problems. In Pyomo, the multi-objective optimization problem is solved in two steps. In step-1, only one objective function is considered to solve the optimization problem. In step-2, second objective function is optimized with first objective function acting as an inequality constraint. The optimization problem is solved iteratively by repeating step 1 and step 2 until a compromise solution is obtained.

The technical and economic parameters of all the generation sources are given in Table 4 [16]. The case-wise categorization of time periods based on Eqs. (33)–(36) is shown in Table 5. In cases 1, 2, & 3, optimal generation scheduling is done, and in case 4, optimal load scheduling is done along with charging/discharging schedule of BB. In case-4, the MPOS problem is solved using goal programming under limited generation conditions to determine the optimal schedule of loads. The weights of loads within the priority level are calculated using AHP, and the pair-wise comparison matrix A and attributes weights calculated for industries are shown in Table 6. Highest importance is given to carbon emissions (c1) followed by harmonic content (c2), possibility of load curtailment (c3), and timely payment of bills (c4). The carbon emissions of industries have the highest role in determining the weight. As a result of the consistency ratio (CR) being equal to 0.029, matrix A is deemed to be sufficiently consistent. The performance matrix D and the weights assigned to industries are given in Table 7. The performance score is inversely proportional to the magnitude of carbon emissions and harmonic content, it is proportional to timely payment of bills, and less score is given to industry which has the possibility of load curtailment. Matrices A & D are formulated based on the responses of microgrid operator, and it is assumed that MO has vast experience and MGEMC has surplus information about all loads and their attributes. Similarly, the weights of loads in the other priority levels are obtained using AHP, given in Table 8.

Table 4 Technical and economic parameters of all generation sources
Table 5 Casewise categorization of time periods
Table 6 Pair-wise comparison matrix A and attribute weights for industries
Table 7 Performance matrix D and weights assigned to industries
Table 8 Weights assigned to loads in all priority levels

The pareto optimal fronts obtained while solving MPOS problem by NSGA-II are depicted in Fig. 4 for one time period in each case. The best compromise solution corresponds to the pareto point with maximum crowding distance. The solution of the MPOS problem is shown in Table 9 for one time period in each case. In case-1, time period T-1, the maximum demand on the system is less than the total generation from RES. The allowed load demand of all loads is equal to their maximum demand, that is, sufficient power supply is provided to all loads. Total power generation from RES, Pg3 + Pg4 + Pg5, is 156 kW. The total load demand on the system is 110 kW, and the distribution loss is 5.97 kW. According to (14), the power available to charge the battery is 40.03 kW, and with Δt = 1 in Eq. (17), SOC1 becomes 0.69.

Fig. 4
figure 4

Pareto optimal front for one time period in each case a case-1, time period T-1, b case-2, time period T-5, c case-3, time period T-7, d case-4, time period T-8

Table 9 Solution of MPOS problem for one time period in each case

In case-2, time period T-5, the total power generation from RES is less than the maximum load demand on the system. Optimal generation of DG & MT is determined to meet the excess load. The battery remains idle, and SOC remains unaltered, assuming the self-discharge factor of BB \(\varnothing \)=0 in Eq. (17). The power supply to each load is equal to its maximum demand. Total generation from CGS & RES is 214.72 kW. The total load on the system is 203 kW, and the distribution loss is 11.72 kW.

In case-3, time period T-7, the maximum load demand on the system is greater than the sum of maximum power generation from CGS and RES. So, BB is allowed to discharge to meet the excess load. Power generated by DG & MT is equal to their capacity. The power supply to each load is equal to its maximum demand. Total power generation is 420.93 kW. The total load on the system is 389 kW, and the distribution loss is 31.93 kW.

In case-4, for the time periods T-8 to T-21, the MPOS problem is solved with prioritized loads in 5 stages, optimizing one priority level in each stage, satisfying all network constraints, goal constraints, security limits, and inter-temporal constraints. In stage-1, priority level K1 is optimized to ensure sufficient power supply to hospitals. After optimizing K1 completely or to a compromise solution, if excess power is available, in stage-2, K2 is optimized to provide power supply to public consumer loads. After stage-2, if excess power is still available, in stage-3, K3 is optimized for industries, followed by K4 & K5 in the subsequent stages depending upon the availability of power. In stage-4, if the available power is less than the total load demand of education centers, K4 is optimized according to the weights assigned to EC-1, EC-2, & EC-3. If excess power is unavailable after a particular stage, the optimization problem is terminated, and loads in the remaining lower priority levels receive zero power supply during any time period t.

In time period T-8, the maximum load demand on the system is greater than the sum of maximum power generation from CGS, RES, and BB. For loads, Pd1 to Pd12, the allowed demand is equal to their maximum demand. Loads in the lowest priority level, Pd13 receives insufficient power supply, and Pd14 receives zero power supply. Power generated by DG & MT is equal to their capacity. After T-7, SOC of BB becomes 0.5, thus, it provides a discharging power of 56.96 kW in T-8 to meet excess demand partially and distribution loss, and eventually SOC becomes 0.2. Total generation is 432.97 kW, maximum load demand on the system is 430 kW, total allowed load demand is 400.3 kW, and distribution loss is 32.57 kW. In the remaining time periods, T-9 to T-21, loads with higher priority receive sufficient power supply, and loads with lower priority receive insufficient or zero power supply according to the weights assigned.

The comparison of maximum demand and allowed demand of all loads in the modified 34 bus test system is depicted in Fig. 5 for all time periods. It can be observed that continuous and sufficient power supply is ensured to loads, Pd1 to Pd5, having the highest priority for all the time periods, illustrated in Fig. 5a–e. For the other loads in the subsequent priority levels, there is insufficient or zero power supply during few time periods in case 4, as shown in Fig. 5f–n. The charging and discharging power of BB is shown in Fig. 6a. Power in the negative axis during the time periods T-1 to T-4, T-23, and T-24 indicates charging power of BB, and positive power during the time periods T-7 and T-8 indicates discharging power of BB. During the remaining time intervals, BB remains idle. The variation of SOC of BB over 24 time periods is illustrated in Fig. 6b. BB is charged during time periods T-1 to T-4, and SOC reaches 0.92 by the end of T-4. BB remains idle during T-5 and T-6. For the time periods T-7 and T-8, BB is discharged, and SOC is reduced; as a result, SOC7 and SOC8 become 0.5 and 0.2. From T-9 to T-22, BB remains idle, and SOC22 remains at 0.2. During T-23 and T-24, excess power is available from RES to charge the battery, and SOC increases to 0.52 by the end of T-24.

Fig. 5
figure 5figure 5

Maximum and allowed load demand of all loads

Fig. 6
figure 6

Charging/discharging power and SOC of BB

The power generated by DG & MT during each time period is shown in Fig. 7. DG & MT remain idle from T-1 to T-4 and T-23, T-24. From T-5 to T-22, they generate power to meet the excess load demand. It can be observed from Figs. 6a, 7a and b that the BB is charged during those time periods in which DG & MT are idle, which shows that the charging power of BB is obtained only from RES. The maximum load demand curve and allowed load demand curve on the network are shown in Fig. 8a. It can be seen that the allowed load demand is equal to the maximum load demand during time periods T-1 to T-7 and T-22 to T-24. During time periods T-8 to T-21, power supply is provided to loads according to their priority.

Fig. 7
figure 7

Power generated by a DG b MT

Fig. 8
figure 8

a Maximum load demand curve (\(P_{D,t}^{\max }\)) and allowed load demand (\({P}_{D,t}\)) curve of the network, b percentage load curtailment

The percentage load curtailment of all loads is depicted in Fig. 8b. It can be observed that there is zero load curtailment for high priority loads during the entire scheduling horizon.

The percentage distribution power loss is shown in Fig. 9a, and the power flow through the lines is depicted in Fig. 9b for all 24 time periods. The percentage distribution power loss is calculated by taking the ratio of power loss to the sum of power generated by all sources and the discharging power of BB. The observations made after solving the MPOS problem on the 34 bus system are listed in Table 10.

Fig. 9
figure 9

a Percentage distribution loss, b power flow through lines

Table 10 Observation made in operating cases of MPOS framework

6 Comparison with the scheduling framework without considering load priorities

To describe the need of considering load priorities in the optimal scheduling framework during limited generation periods, the result obtained in case 4 of the MPOS problem is compared with that of the result obtained without considering load priorities. Figure 10a and b depicts the percentage of allowed load demand of hospitals and public consumer loads for all the time periods of case 4. The percentage allowed load demand is the ratio of allowed load demand according to the scheduling framework without considering load priorities to the allowed load demand according to the MPOS framework expressed as a percentage. In Fig. 10a, it can be observed that the percentage allowed load demand is not equal to 100 in any of the time periods, which proves that sufficient power is not supplied to the highest priority loads in the scheduling framework without considering load priorities. Further, the aggregate allowed load demand is only 65.15%, 66.4% and 64.1% of the maximum load demand of hospitals H-1, H-2 & H-3 when load priorities are not considered, shown in Fig. 10c. In hospitals, it is required to provide continuous power supply to medical equipment in critical care units & surgery rooms, and proper illumination and air conditioning are also equally important. Hence, it is imperative to provide sufficient power supply to hospitals.

Fig. 10
figure 10

Percentage of allowed load demand a hospitals, b public consumer loads, c aggregate allowed load demand for time periods in case 4

In priority level K2 also, the percentage allowed load demand is not equal to 100 in any of the time periods, as shown in Fig. 10b. The aggregate allowed load demand is only 75.6% and 74.41% of maximum load demand for public consumer loads PC-1 & PC-2 when load priorities are not considered, shown in Fig. 10c. Insufficient power supply to these loads causes interruption to signaling and ticketing systems that lead to financial loss to the customer. Hence, the MPOS framework with prioritized loads is better in providing sufficient power supply to high priority loads during limited generation periods than the scheduling framework without considering load priorities.

7 Conclusion

The proposed multi-period optimal scheduling (MPOS) framework considering load priorities is implemented on a modified IEEE 34 bus system over 24 time periods, aiming to minimize the total distribution loss or the total cost of generation or total load curtailment. Voltage Stability Index is considered as a common objective function in all the operating cases to assure distribution network security throughout the scheduling horizon. PV & WT are prioritized during their availability. To reduce carbon emissions, BB is charged only when there is surplus power available from RES. The most practical method of charging and discharging the battery is described. Weights are assigned to loads in a most rational way considering relevant attributes. Furthermore, observations are provided at the end of Sect. 5 to give a complete picture of the scheduling framework. By comparing with the scheduling framework without considering load priorities, it can be concluded that the proposed MPOS framework can provide sufficient power supply to high priority loads during limited generation periods, whereas the scheduling framework without considering priorities can provide only 65.15%, 66.4%, 64.1%, 75.6%, and 74.41% of maximum load demand to hospitals and public consumer loads. The accuracy of results is validated by comparing them to the results obtained by solving the proposed scheduling problem using Pyomo software.

The implementation of time-of-use (ToU) pricing along with peak load shifting to ascertain the financial benefit to low priority loads and the role of network reconfiguration in the optimal scheduling framework can be analyzed as extensions of this work.