1 Introduction

1.1 General overview

At a power generating station, the load demand is not sufficed by a single generating entity. Rather, a conglomerate of such entities fulfills the total demand. Moreover, to produce the same amount of power, each unit is incurred with its own cost function (price bid). Economic load dispatch (ELD) works on the fact that not all generating units incur the same amount of cost to suffice the same amount of load, rather some are relatively more costly than others for equal amount of production. So aptly allocating a certain share of the entire demand could actually lower the fuel cost. The total load demand is distributed among various generators, which in turn affects the estimation, invoicing, unit commitment and numerous related functions (Sihna 2019). The total generation of power has to comply with the total current demand. To address this, the ELD could be further categorized into two variations depending upon the nature of load demand. The constant load, classical static economic load dispatch (SELD), ignores practical constraints because every load-consuming area does not have a constant all-day load demand characteristics, but its nature depends upon the prevalent climatic factors, location and attributes of job undertaken by the inhabitants (Yalcinoz and Short 1997; Dhillon et al. 1993). In opposition to this, a dynamic economic load dispatch (DELD) efficiently handles the practical constraint (Wang and Shahidehpour 1994). In DELD, we forecast the demand for the upcoming hours and accordingly distribute the load among different generation to optimize the production.

Energy management strategy (EMS) of microgrids falls in DELD category of cost minimization but is more complicated than SELD. To begin with, microgrid can be imagined as a collection of distributed energy resources (DERs) and loads within a confined geographical area. DERs include fossil-fueled generators, various renewable energy sources (RES) depending upon the availability of the microgrid location, microturbines, fuel cells and energy storage systems (ESS) such as battery and flywheel (Hatziargyriou 2013). It is because of the individual modeling and constraints associated with these DERs that economic dispatch of microgrid becomes a complex and cumbersome process for power engineers. Microgrid basically operates in two modes: either islanded or utility connected (Luu 2014). Figure 1a, b depicts the two different working modes of a microgrid system. It is quite obvious that the utility-connected mode is more reliable and efficient as the microgrid can sell/buy power from the utility depending upon the surplus/deficit production of power from its DERs. Also, utility-connected microgrid can rely on the grid in case one of its DER fails, thus preventing from an unwanted and major shutdown of the network.

Fig. 1
figure 1

a Architecture of an islanded microgrid. b Architecture of grid-connected microgrid (Fan et al. 2018)

1.2 Literature review

The last decade has witnessed a lot of research in the microgrid energy management area. Matrix real-coded GA (MRCGA) and imperialist competitive algorithm (ICA) were used by authors in Chen et al. (2011) and Kasaei (2018) to minimize the generation cost of a grid-connected microgrid, wherein various cases were studied to analyze the capability of algorithms in handling tight operating ranges of DERs, variable loads and fluctuating electricity price. Cuckoo search algorithm (CuSA) yielded better results than PSO and DE when both SELD and DELD were performed by Basu and Chowdhury (2013). An islanded microgrid system was considered for DELD which consisted of two wind turbines (WTs) to be separately modeled based on wind speed. The authors performed pareto-optimal front-based economic–emission dispatch on a utility-connected microgrid system using adaptive modified PSO (AMPSO) in Moghaddam et al. (2011) and GAMS in Fan et al. (2018). Optimization results were reported giving maximum weightage to economic and emission dispatch separately, and thereafter a compromised solution emphasizing both the objectives with approximately equal weightage was studied where the proposed algorithms outperformed other optimized techniques studied. Trivedi et al. (2018) used interior search algorithm (ISA) to perform ELD and price-penalty-based combined economic–emission dispatch (CEED) on an islanded microgrid powered by three fossil-fueled generators, a PV and a wind system. These results were again outperformed by modified harmony search algorithm (MHSA) implemented by Elattar (2018) for the same microgrid system. But the major drawback in these two articles was that the formulation of different types of price penalty factors was not done. Neither any valid reason was mentioned about which type of price penalty factor was chosen to perform CEED. This demerit was attended by Dey et al. (2019) where the various price penalty factors were formulated and calculated and the least (min–max) penalty factor was chosen to perform CEED. Further, whale optimization algorithm (WOA) provided better-quality solutions than other optimization techniques used to evaluate CEED. The Lahon and Gupta (2018) proposed an energy management system for the coalition forming microgrids and utility. In the proposed framework, conditional value at risk, a measure to lessen the danger faced by the aggregator due to power transaction fluctuations was also considered. Lahon and Gupta (2018) proposed energy management framework that minimizes the operating cost of coalition microgrids incorporating worst-case net transaction mechanism. GA and improved GA (IGA) were used by authors in Yong and Tao (2007) and Ganjefar and Tofighi (2011) to minimize the dynamic cost of a 10-unit system with and without wind power, respectively. Sequential quadratic programming (SQP) was used by Wibowo et al. (2017) to minimize the generation cost of a grid-connected microgrid powered by a diesel generator, a battery, a microturbine and a PV system.

Optimal scheduling of the energy storage system was done in Bahmani-Firouzi and Azizipanah-Abarghooee (2014) by considering its lifetime, total per day cost, fixed cost and maintenance cost, thereafter minimizing the generation cost of a grid-connected microgrid using improved bat algorithm (IBA). In recent years, authors have used quasi-oppositional swine influenza model-based optimization (QOSIMBO) in Sharma et al. (2018) and grey wolf optimization (GWO) in Sharma et al. (2016) for the same test system to yield better and superior results compared to IBA. 2 m point estimation method was used by authors in Sharma et al. (2018) for the uncertainty modeling of the RES and electricity market prices, and then WOA was implemented to minimize the microgrid cost. Mixed integer linear programming (MILP) was used by authors in Koltsaklis et al. (2018) to minimize the generation cost of a grid-connected microgrid system. The generation cost was influenced by the transaction price of the grid, annual investment cost of the DERs, capital recovery factor and penalized allowable limit of pollutants emission from fossil-fueled DERs. Artificial fish swarm algorithm (AFSA) was used in Kumar and Saravanan (2019) to minimize the generation cost of a microgrid system. Two scenarios were considered with different load demands and RES generation, and the generation cost was influenced by the penalized price of load shedding.

1.3 Motivation

Researchers are highly fascinated with soft computing techniques primarily because they are not restricted by complexity of system models, which has made them apply these techniques to power system optimization problems. Their vibrant results of techniques like genetic algorithm (GA), particle swarm optimization (PSO) and differential evolution (DE) over numerous benchmark functions have resulted in the application of these algorithms for solving energy management operations of microgrids such as minimization of generation and transmission costs and load scheduling. Nevertheless, GA, PSO and DE have their own list of disadvantages too. The crucial demerit of GA lies in its slow rate of convergence. This is precisely due to the uncontrolled mutation stage in GA where a random number is added to any parameter of a member from a whole lot or population. DE suffers from unstable convergence and easily drops down to regional optimum. Likewise, PSO also drops down to regional optimum and has untimely convergence. In addition to that, multiplicity of population is not enough in PSO. Also, some time is consumed in tuning the control parameters present in all of the aforementioned optimization techniques.

Crow search algorithm (CSA) is a recently developed optimization technique which imitates the memory-based sly nature of the crows to hide their food from other crows and also steal food from others. Few of the noticeable advantages of CSA are explained below:

  1. 1.

    Minimum number of pivotal equations-

Unlike GA, DE, GWO, WOA, symbiotic organisms search (SOS) which have many stages and equations to go through the entire optimization process, CSA has only one such equation which makes the algorithm not only easy to be coded and executed but also consumes less computational time to attain the stopping criteria yielding a prominent and better-quality solution.

Algorithms like sine cosine algorithm (SCA), JAYA and PSO also have very less number of pivotal equations like CSA, but these algorithms have their own demerits. JAYA has no dedicated control over the search space, whereas SCA is less consistent, yielding a different value for the fitness function every time due to higher number of random numbers. This reduces the robustness of SCA. PSO suffers from getting trapped in local minima. All of these three algorithms are prone to premature convergence.

  1. 2.

    Minimum number of tuning parameters and random numbers

GA, DE and PSO have many parameters to be tuned and checked to obtain a better result. GWO, WOA, SOS, TLBO and DE have many stages, and every stage employs some random numbers to be multiplied with the string of decision (control) variables (or a particle of the population as we may say it). The presence of these tuning parameters and random numbers makes the optimization process cumbersome, reduces the consistency-cum-robustness of the algorithms and indulges in consuming a huge amount of computational time to attain the best value of fitness function, satisfying all the pre-assigned limits and constraints of every element of the particle. CSA on the other hand has only two tuning parameters: flight length (fl) and awareness probability (AP). AP can be formulated to gradually decrease its value (linearly/exponentially) from 1 to 0 throughout the iterations to maintain a smooth transition between intensification and diversification. We are only left with ‘fl’ to tune with, the value of which conducts the search for optimal values globally or locally.

  1. 3.

    Capacity to handle large-dimensional problems in less amount of computational time

A microgrid consists of many DERs whose prime concern is to satisfy the load demand through a given period of time. Now, these DERs have their own set of constraints to be abided by while sizing them to obtain the optimum value of the fitness function.

Let us suppose a microgrid has D DERs and a 24-h period is studied. A particle of the population will contain D times 24 elements and is represented as:

$$ P_{i} = \left[ {P_{i,DER1}^{1} ,P_{i,DER1}^{2} , \ldots P_{i,DER1}^{24} ,P_{i,DER2}^{1} ,P_{i,DER2}^{2} , \ldots P_{i,DER2}^{24} \ldots P_{i,DERD}^{1} ,P_{i,DERD}^{2} , \ldots P_{i,DERD}^{24} } \right];\quad i = 1,2, \ldots Pop\_Size $$
(1)

And if D = 10 (as in microgrid test system 4 discussed in Sect. 4) the population size (Pop_Size) is say 80, then the population matrix becomes

$$ P_{{}} = \left[ \begin{aligned} P_{{1,{\text{DER}}1}}^{1} ,P_{{1,{\text{DER}}1}}^{2} , \ldots P_{{1,{\text{DER}}1}}^{24} ,P_{{1,{\text{DER}}2}}^{1} ,P_{{1,{\text{DER}}2}}^{2} , \ldots P_{{1,{\text{DER}}2}}^{24} \ldots P_{{1,{\text{DER}}10}}^{1} ,P_{{1,{\text{DER}}10}}^{2} , \ldots P_{{1,{\text{DER}}10}}^{24} \hfill \\ P_{{2,{\text{DER}}1}}^{1} ,P_{{2,{\text{DER}}1}}^{2} , \ldots P_{{2,{\text{DER}}1}}^{24} ,P_{{2,{\text{DER}}2}}^{1} ,P_{{2,{\text{DER}}2}}^{2} , \ldots P_{{2,{\text{DER}}2}}^{24} \ldots P_{{2,{\text{DER}}10}}^{1} ,P_{{2,{\text{DER}}10}}^{2} , \ldots P_{{2,{\text{DER}}10}}^{24} \hfill \\ P_{{3,{\text{DER}}1}}^{1} ,P_{{3,{\text{DER}}1}}^{2} , \ldots P_{{3,{\text{DER}}1}}^{24} ,P_{{3,{\text{DER}}2}}^{1} ,P_{{3,{\text{DER}}2}}^{2} , \ldots P_{{3,{\text{DER}}2}}^{24} \ldots P_{{3,{\text{DER1}}0}}^{1} ,P_{{3,{\text{DER}}10}}^{2} , \ldots P_{{3,{\text{DER}}10}}^{24} \hfill \\ \ldots \ldots \ldots \hfill \\ \ldots \ldots \ldots \hfill \\ P_{{80,{\text{DER}}1}}^{1} ,P_{{80,{\text{DER}}1}}^{2} , \ldots P_{{80,{\text{DER}}1}}^{24} ,P_{{80,{\text{DER}}2}}^{1} ,P_{{80,{\text{DER}}2}}^{2} , \ldots P_{{80,{\text{DER}}2}}^{24} \ldots P_{{80,{\text{DER}}10}}^{1} ,P_{{80,{\text{DER}}10}}^{2} , \ldots P_{{80,{\text{DER}}10}}^{24} \hfill \\ \end{aligned} \right] $$
(2)

i.e., (10*24*80 = 19,200) elements to be optimally sized together to obtain a best value of the fitness function in every iteration. It is also to be noted that each of this DERs has its own set of constraints, such as operating limits, on/off time, charging/discharging limits and state of charge (if the DER is a battery) to be maintained at the end of every iteration.

So, if an algorithm has multiple stages and equations (as discussed in the previous point), it is very much time-consuming process for a particle of the population to pass through all those stages, thereafter satisfying their own assigned constraints. This significant and critical disadvantage is avoided by CSA.

  1. 4

    Memory-based algorithm

CSA is a memory-based optimization technique like PSO. This means after every iteration, CSA compares the solution obtained in the current iteration with that of the previous iteration and memorizes the best solution between them. Further, the algorithm updates its particles with the best position found for itself and the best position ever found of the population. Thereafter, these best positions are used to proceed with successive iterations. This crucial nature of CSA enables the algorithm to attain a superior and prominent quality solution compared to many algorithms mentioned above.

1.4 Contribution

This paper employs the proposed CSA to perform EMS on six different microgrid test systems (total of 18 different cases) as mentioned in Table 2. Also, nine more algorithms are studied on the same test systems and a comparative analysis among the results obtained using all of these algorithms is presented. Furthermore, a statistical analysis is also carried out to prove the significance of the proposed approach.

1.5 Organization of the paper

Section 2 of this paper formulates the objective function. The superior optimization technique, CSA, is discussed in detail, and the rest of the optimization techniques which are studied to provide a comparative analysis are concisely mentioned in Sect. 3. Various combinations of the microgrid test systems are studied, and the results are reported in Sect. 4. The paper concludes in Sect. 5.

2 Objective function formulation

2.1 Economic load dispatch

The economic load dispatch (ELD) problem speculates the objective of sharing the load of a power system among the various generation units in such a way as to minimize the fuel costs of the conventional generators, satisfying the various constraints and fulfilling the load demand of the system. The standard ELD equation for a grid-connected microgrid powered with FFG numbers of fossil-fueled generators, RES numbers of renewable energy sources and ESS numbers of energy storage devices can be expressed as:

$$ F(P_{\text{DER}} ) = \sum\limits_{t = 1}^{24} {\sum\limits_{b = 1}^{\text{ESS}} {\sum\limits_{r = 1}^{\text{RES}} {\sum\limits_{g = 1}^{\text{FFG}} {\underbrace {{\left\{ {u_{g} *\left( {P_{g}^{t} } \right)^{2} + v_{g} *\left( {P_{g}^{t} } \right) + w_{g} } \right\}}}_{{{\text{Cost}}\;{\text{function}}\;{\text{of}}\;{\text{conventional}}\;{\text{FFG}}}}} } } } + c_{\text{RES}} *\left( {P_{\text{RES}}^{t} } \right) + c_{\text{ESS}} *\left( {P_{\text{ESS}}^{t} } \right) + c_{\text{grid}} *\left( {P_{\text{grid}}^{t} } \right) $$
(3)

where P is the power output of the DER. ug, vg and wg are the cost coefficients of the gth fossil-fueled generator. \( c_{\text{RES}} ,c_{\text{ESS}} \;{\text{and}}\;c_{\text{grid}} \) are the cost coefficients of RES, ESS and electricity market price, respectively. F(PDER) is in $/h.

2.2 Valve point loading effect

Valve point loading effect (VPE) is a natural attribute of a thermal turbine. The turbine of a generator has several governing valves to control the flow rate of steam into the turbine. The fuel cost curve of the generator is shown in Fig. 2. With the inclusion of VPE, fuel cost curve becomes nonlinear (non-smooth and non-convex) and non-differentiable and contains multiple minima. In this paper, for practical operation of generators, the VPE is considered as a result of which the objective function is the superposition of quadratic and sinusoidal functions. Incorporating VPE in the fuel cost function of the generating units, the cost function of the conventional generators in Eq. (3) will be replaced with the expression \( \sum\nolimits_{t = 1}^{24} {\sum\nolimits_{g = 1}^{\text{FFG}} {\{ u_{g} *\left( {P_{g}^{t} } \right)^{2} + v_{g} *\left( {P_{g}^{t} } \right) + w_{g} + \left| {\delta_{g} \sin \theta_{g} \left( {P_{g,\hbox{min} }^{t} - P_{g}^{t} } \right)} \right|\} } } \). The rest of Eq. (3) remains unaltered. δ and θ are the VPE parameters of the gth generating unit.

Fig. 2
figure 2

Fuel cost curve of a generator with and without VPE

2.3 Emission dispatch

The combustion of fossil fuels by the conventional generators releases some harmful toxic gases such as CO2 and SOx in the atmosphere which should also be taken care of. The emission dispatch minimizes the release of these harmful gases in the atmosphere. The emission dispatch function is also a convex polynomial like the ELD and can be written as

$$ E(P_{\text{FFG}} ) = \sum\limits_{t = 1}^{24} {\sum\limits_{g = 1}^{\text{FFG}} {\left\{ {x_{g} *\left( {P_{g}^{t} } \right)^{2} + y_{g} *\left( {P_{g}^{t} } \right) + z_{g} } \right\}} } $$
(4)

where xg, yg and zg are the emission coefficients of the gth generation unit. The unit of E(P) is kg/h.

2.4 Combined economic–emission dispatch

As discussed above, it can be seen that the economic load dispatch and emission dispatch are two different objectives. The former deals with the minimization of the fuel costs of the conventional generators, and the latter minimizes the emission of harmful and toxic pollutants in the atmosphere. Hence, it is necessary to arrive at a compromised solution which can attain both minimized fuel cost emitting least amount of pollutants in the atmosphere. This is done by formulating a combined economic–emission dispatch (CEED) problem by combining Eqs. (3) and (4) with the help of a parameter called ‘Price Penalty factor.’ Mathematically, the price penalty factor or simply penalty factor is a multiplication factor associated with each of the emission coefficients which transforms two differently aimed single-objective function to a CEED problem. Needless to say, the lower the value of the penalty factor, the lesser the value of the CEED problem. The various types of penalty factors are formulated in Table 1 (Dey et al. 2019).

Table 1 Penalty factor calculation (Dey et al. 2019)

The combined economic–emission dispatch problem can thus be mathematically formed by including the expression \( \sum\limits_{t = 1}^{24} {\sum\nolimits_{g = 1}^{\text{FFG}} {\left[ {\{ u_{g} *\left( {P_{g}^{t} } \right)^{2} + v_{g} *\left( {P_{g}^{t} } \right) + w_{g} \} + h_{g} *\{ x_{g} *\left( {P_{g}^{t} } \right)^{2} + y_{g} *\left( {P_{g}^{t} } \right) + z_{g} \} } \right]_{{}} } } \) in Eq. (3) in place of the cost function of the conventional fossil-fueled generators.

where hg is the penalty factor of the gth generating unit. The unit of hg is $/kg. The cost functions of the remaining DERs of Eq. (1) remain unchanged.

2.5 Formulation of the cost component of RES

Furthermore, both the fuel costs and the pollutants emission can be reduced by the inclusion of available renewable resources for the generation of power. The renewable energy resources are clean sources of energy which neither incur any fuel cost nor do emit harmful toxic gases in the atmosphere. Although these renewable energy sources do include some installation cost, depreciation cost, lifetime degradation cost and operation and maintenance cost, the cost component of RES can be calculated as below (Trivedi et al. 2018):

$$ c_{\text{RES}} = c_{\text{DC}} + G^{\text{E}} $$
(5)

where GE is the operation and maintenance cost of the RES used. The depreciation cost of the DGs which is a function of the depreciation cost per kilowatt hour (DC), the maximum power output of the DG (Pmax), the hourly output of the DG and its capacity factor cf can be accounted as:

$$ c_{\text{DC}} = \frac{\text{DC}}{{P_{r}^{\hbox{max} } \times 8760 \times cf}} \times P_{r} $$
(6)

DC is further dependent on the installation cost (IC), rate of interest ‘k’ and the life span ‘l’ of the DG sources as shown in (6):

$$ {\text{DC}} = {\text{IC}} \times \frac{{k(1 + k)^{l} }}{{(1 + k)^{l} - 1}} $$
(7)

2.6 Modeling of RES

  • Wind Turbine The power output of wind generator depends on the available wind speed vi,t and the parameters of the WT wind power conversion curve, as shown in Fig. 3. The speed at which the turbine starts to rotate and generate power is called the cut-in wind speed vcut-in. As the wind speed rises above vcut-in, the electrical power output rises rapidly and at rated wind speed vrated, the power output reaches the limit that the generator is capable of. Beyond vrated, forces on the turbine structure continue to rise and at some extreme wind speed, called the cutout wind speed vcutout, there is a risk of damage to the rotor. Consequently, a braking system is employed to bring the rotor to standstill. We therefore employ the piecewise linear approximation of the wind power curve as follows (Chen et al. 2011)

    $$ P_{wt,i}^{t} = \left\{ {P_{wt,i}^{\hbox{max} } *\left( {\begin{array}{*{20}l} 0 \hfill & {v < v_{\text{cut - in}} } \hfill \\ {\frac{{v - v_{\text{cut - in}} }}{{v_{r} - v_{\text{cut - in}} }}} \hfill & {v_{\text{cut - in}} \le v < v_{r} } \hfill \\ {P_{wt,i}^{\hbox{max} } } \hfill & {v_{r} \le v < v_{\text{cut - out}} } \hfill \\ 0 \hfill & {v \ge v_{\text{cut - out}} } \hfill \\ \end{array} } \right)} \right\} $$
    (8)
    Fig. 3
    figure 3

    Flow of wind

  • PV System The output power of each PV module depends on the amount of solar irradiance, the ambient temperature and the characteristics of the module itself. The available PV power output at actual cell temperature Tt C and insolation GC can be modeled as (Chen et al. 2011)

    $$ P_{i,t}^{\text{PV}} = P^{\text{STC}} \frac{{G^{\text{C}} }}{{G^{\text{STC}} }}\left[ {1 - 0.0045\left( {T_{t}^{\text{C}} - T^{\text{STC}} } \right)} \right] $$
    (9)

    where PSTC denotes the output at standard test conditions of 298 K (TSTC) and insolation 1000 W/m2 (GSTC).

2.7 Equality and inequality constraints

The above objective function is subject to constraints such as:

  1. i.

    Generation constraints The power generated by the conventional generators, the RES as well as the grid must lie between a maximum and minimum limit. Mathematically,

    $$ \begin{aligned} P_{g,\hbox{min} } \le P_{g}^{t} \le P_{g,\hbox{max} } ;\quad \forall \;g \in {\text{FFG}} \hfill \\ P_{r,\hbox{min} } \le P_{r}^{t} \le P_{r,\hbox{max} } \,;\quad \forall \;r \in {\text{RES}} \hfill \\ P_{b,\hbox{min} } \le P_{b}^{t} \le P_{b,\hbox{max} } \,;\quad \forall \;b \in {\text{ESS}} \hfill \\ P_{\text{grid,min}} \le P_{\text{grid}}^{t} \le P_{\text{grid,max}} \hfill \\ \end{aligned} $$
    (10)
  2. ii.

    Energy storage system constraints

    $$ E_{b}^{t} = E_{b}^{t - 1} - P_{b}^{t} *\eta $$
    (11)
    $$ E_{b,\hbox{min} } \le E_{b}^{t} \le E_{b,\hbox{max} } $$
    (12)

where Eb denotes the energy stored in the bth battery and η is the efficiency of the battery.

  1. iii.

    Power supplydemand balance constraint The power generated at any instant of time by all the conventional generators, the RES and transaction with the grid (if available) should satisfy the total desired load of the system. This can be mathematically stated as:

$$ P_{{{\text{Load}}\;{\text{Demand}}}}^{t} = P_{\text{FFG}}^{t} + P_{\text{ESS}}^{t} + P_{\text{RES}}^{t} + P_{\text{grid}}^{t} $$
(13)

3 Optimization techniques used

3.1 Crow search algorithm

The family of crow (corvids) are the most intelligent and clever species in the avian kingdom. Evidence of slyness of crows is manifold. Owing to these characteristics of the bird, Askarzadeh developed an optimization algorithm in 2016 and named it as crow search algorithm (CSA) (Askarzadeh 2016). Crows possess the habit of observing and follow other birds in order to determine their food storage locations and take their food in their absence. Moreover, if the crow does steal food from another bird, it becomes extra cautious and keeps shifting its own hiding place to avoid becoming a victim of robbery in the future. Not only this, it also uses its own knowledge to prevent its food from the robbers. The CSA is based on these behaviors of a crow.

Let us suppose that there is a d-dimensional environment including N number of crows. The position of ith crow during iteration ‘iter’ is denoted by a vector \( X^{{i,{\text{iter}}}} (i \in 1,2 \ldots N;\quad {\text{iter}} \in 1,2, \ldots {\text{iter}}_{\hbox{max} } ) \) where \( X^{{i,{\text{iter}}}} = \left[ {X_{1}^{{i,{\text{iter}}}} ,X_{2}^{{i,{\text{iter}}}} , \ldots ,X_{d}^{{i,{\text{iter}}}} } \right] \) and \( {\text{iter}}_{\hbox{max} } \) is the maximum number of iterations. Now, every crow memorizes its hiding place. For iteration ‘iter,’ the hiding place of crow i is denoted by \( m^{{i,{\text{iter}}}} \) and is the current best position of crow i.

Supposedly at iteration ‘iter’ crow ‘j’ wants to visit its hiding place \( m^{{j,{\text{iter}}}} \). And in the same iteration, say crow ‘i’ plans to follow crow ‘j’. At this instant, two cases may happen:

Case 1: Crow ‘j’ is totally unaware of the fact that it is followed by crow ‘i’ and as a result crow ‘i’ will know the hiding place of crow ‘j’.

Case 2: Crow ‘j’ knows that it is being followed by crow ‘i’ and hence fools crow ‘i’ by diverting it to a different random location within the search space.

These two cases can be mathematically represented with a set of equations as:

$$ X^{i,iter + 1} = \left\{ {\begin{array}{*{20}l} {X^{i,iter} + rand_{i} \times fl^{i} \times (m^{j,iter} - X^{i,iter} )} & {rand_{j} \ge AP^{j} } \\ {{\text{a}}\;{\text{random}}\;{\text{position}}} & {\text{otherwise}} \\ \end{array} } \right. $$
(14)

where randi and randj are random numbers with uniform distribution between 0 and 1 and fli is the flight length of the ith crow. If ‘Case 1’ occurs, the updating of the memory of crow ‘i’ will occur based on the formula below:

$$ m^{i,iter + 1} = \left\{ \begin{aligned} X^{{i,iter + 1\;\;\;\;\;\;\;\;{\text{if}}\;f(X^{i,iter + 1} )\;{\text{is}}\;{\text{better}}\;{\text{than}}\;f(m^{i,iter} )}} \hfill \\ m^{i,iter} \;\;\;\;\;{\text{otherwise}} \hfill \\ \end{aligned} \right. $$
(15)

f(∙) denotes the value of the fitness function.

The value of ‘fl’ decides the vicinity of search space. Small values of ‘fl’ indicate local search, i.e., near and around xi,iter. Larger values of ‘fl’ lead to global search far away from xi,iter. AP means the awareness probability of crow ‘j’. Since it is a probability, its value lies between 0 and 1, both inclusive. AP maintains the exploration and exploitation of the crow search algorithm. Lower value of AP means CSA searches near and around the local best position where the current best solution is obtained. This increases the exploitation capability of the algorithm. On the other hand, larger values of AP make CSA expand the vicinity of the search space to a global scale, thus increasing the exploration capability of CSA. Proper selection of AP and fl helps to maintain an appreciable balance between exploration and exploitation, which is a must quality of a metaheuristic algorithm. Figure 4 depicts the flowchart of the proposed CSA.

Fig. 4
figure 4

Flowchart of crow search algorithm

3.2 Particle swarm optimization (PSO)

Particle swarm optimization or PSO as we all know is one of the most popular and widely used metaheuristic soft computing techniques in the field of optimization. Since it was developed by Kennedy and Eberhart (2010), PSO has been widely used by engineers and mathematicians for optimization of both single- and multi-objective problems. The PSO algorithm works on the social behavior of particles in the swarm. Therefore, it finds the global best solution by simply adjusting the trajectory of each individual toward its own best location and toward the best particle of the entire swarm at each time step (generation). The PSO method is becoming very popular due to its simplicity of implementation and ability to quickly converge to a reasonably good solution. Mathematically, PSO is summed up using two governing equations, viz. the velocity update equation and the position update equation, which are represented in (10) and (11), respectively.

$$ vel_{i}^{iter + 1} = \omega *vel_{i}^{iter} + c_{1} *rand()*\left( {pbest_{i}^{iter} - x_{i}^{iter} } \right) + c_{2} *rand()*\left( {gbest^{iter} - x_{i}^{iter} } \right) $$
(16)
$$ x_{i}^{iter + 1} = x_{i}^{iter} + vel_{i}^{iter + 1} $$
(17)
$$ \omega = \omega_{\hbox{max} } - \left( {\omega_{\hbox{max} } - \omega_{\hbox{min} } } \right)*\frac{iter}{\hbox{max} \_iter} $$
(18)

where vel denotes the velocity of the particle ‘i’. ω is the inertia weight. c1 and c2 are the social and cognitive factors. x denotes the position of the particle i. pbest and gbest are the position best of the ith particle and global best of the population, respectively.

3.3 Genetic algorithm (GA)

Here, GA is used to determine the optimum magnitude of DERs which are the control variables and appear within a solution string in GA as shown in Eq. (1). Initially, a set of solution strings are created randomly in such a manner so that all the control variables have to be within their maximum and minimum limits as defined. Hence, in the initialization process of GA (Goldberg and Holland 1988), a population vector consisting of several control variables is generated. Then, the objective function is computed for every individual of the population. A biased roulette wheel is created from the values obtained after computing the objective function for all the individuals of the current population. Thereafter, the usual genetic operation such as reproduction, crossover and mutation takes place. Two individuals are randomly selected from the current population for reproduction. Then, crossover takes place with a probability close to one (here 0.8). Finally, mutation with a specific probability (very low) completes one genetic cycle and individuals of same population with improved characters are created in the next generation. The objective function is then again calculated for all the individuals of the new generation and all the genetic operations are again performed and the second generation of same population size is produced. This procedure is repeated till the final goal is achieved.

3.4 Differential evolution (DE)

Like GA, initialization is also done in the case of DE (Storn 1997) to prepare a population matrix of the control variables. Each population vector is nothing but the control variables represented by a string such a way that all the parameter values should lie within their maximum and minimum value and abide by their self-assigned constraints. Here, each vector in a population becomes a target vector. Each target vector is combined with a donor vector and a random vector differential in order to produce the DERs. These population vectors are created in a trial vector. If the cost of the trial vector is less than the target vector, the trial vector replaces the target in the next generation. The donor vector is selected in such a way so that its cost is either less than or equal to the target vector.

Mutation in GA is generally performed by generating random value utilizing a predefined probability density function. In DE, the differential vector, where the contributors are the target vectors, donor vector and two other randomly selected vectors perform the mutation operation. The objective function is calculated for all the individuals of the new generation and all the operations are again performed. This procedure is repeated till the final goal is achieved.

3.5 JAYA algorithm

JAYA is a Sanskrit word meaning victory or success. The algorithm has only one governing equation. In every iteration, the algorithm tends to shift away from the worst solution (or failure), hence getting close to the best solution (or success/victory) as the termination criteria are attained. The simple governing equation of the JAYA algorithm is (Venkata Rao 2016):

$$ X_{p,q,r}^{\text{updated}} = X_{p,q,r} + c^{\prime}*(X_{p,best,r} - \left| {X_{p,q,r} } \right|) - c^{\prime\prime}*(X_{p,worst,r} - \left| {X_{p,q,r} } \right|) $$
(19)

where p, q and r are whole numbers denoting number of variables, particle of the population and current iteration, respectively. c′ and c″ are random numbers lying between 0 and 1, both inclusive. The positive term in the equation defines the tendency of shifting the solution toward the best solution (success), and the negative term in the equation depicts the tendency to shift the solution away from the worst solution (failure).

3.6 Sine cosine algorithm (SCA)

The entire process of a stochastic population-based optimization algorithm can be divided into two phases. The first phase is the exploration phase where the random solutions of the fitness function involve very high rate of randomness to broaden the search space and locate the promising region of a superior solution. On the other hand in the second phase, also called the exploitation phase, the degree of randomness decreases and slow and gradual changes are implemented in the solutions to proceed toward a better-quality solution.

The sine cosine algorithm (SCA) employs these two stages in its governing equation which is (Mirjalili 2016):

$$ X_{d}^{iter + 1} = \left\{ \begin{aligned} X_{d}^{iter} + r_{1} * \sin (r_{2} ) * \left| {r_{3} * P_{d}^{iter} - X_{d}^{iter} } \right|,\;r_{4} < 0.5 \hfill \\ X_{d}^{iter} + r_{1} * \cos (r_{2} ) * \left| {r_{3} * P_{d}^{iter} - X_{d}^{iter} } \right|,\;r_{4} \ge 0.5 \hfill \\ \end{aligned} \right. $$
(20)

where d is the dimension, X is the solution and P is the position of solution from the destination point. The random numbers r1, r2, r3 and r4 have their own significance. The direction of the next position, whether it lies in between solution and destination or away from both, is governed by r1, whereas r2 implies how lengthy should be the displacement and should it be away from or toward the destination. While r3 acts as a weightage factor for the destination, the random number r4 switches between the sine and cosine function.

3.7 Grey wolf optimizer (GWO) and modified GWO

Grey wolves’ hunt in packs. There exists a hierarchical leadership among the wolves of the pack. The leader wolf is called alpha. It may not be the strongest in the pack but maintains dominance and is followed by all the other members of the pack. The second ranked wolf is called beta. Beta acts as an advisor to alpha in decision making, maintains discipline in the pack and is most likely the successor to take the position of alpha when alpha becomes old or passes away. Omega is the third ranked wolf in the hierarchy and is very submissive in nature. It often acts as a scapegoat or babysitter for the pack. The rest of the wolves are collectively termed as delta.

In mathematical modeling of GWO, three best solutions are considered. The best solution is termed as alpha. Beta and omega are the second and third best solutions. The rest of the solutions are termed as delta. The mathematical equations to express the hunting behavior of the wolves and the position updating procedure are mentioned in Mirjalili et al. (2014).

Considering the fact that the best solution (prey) may be trapped among the delta wolves too, modified GWO (MGWO) involves the participation of the delta wolves in hunting procedure. A new family is generated by finding the mean position of omega and delta wolves, and their position is considered as the fourth best solution. Thereafter, the position updating procedure is formulated as explained in Khandelwal et al. (2018).

3.8 Whale optimization algorithm (WOA)

Whales hunt in a three-dimensional space, and hence their hunting mechanism (exploitation phase) is a bit more rigorous and sophisticated compared to GWO. The foraging behavior of whale is also called bubble-net feeding method. Whale approaches its prey in two ways: the shrinking circle path and the spiral-shaped path. It is to be noted that a whale hunts its prey simultaneously in both the ways. To model this simultaneous behavior, we assume that there is a probability of 50% to choose between the shrinking encircling mechanism and the spiral model to update the position of whales during optimization as mentioned in Mirjalili and Lewis (2016). The search for prey (exploration phase) by the whales is mathematically similar to that of GWO.

3.9 Teaching–learning-based optimization (TLBO)

In a real-time classroom, the teacher tries to imbibe the student with his knowledge. He does not focus on one pupil only but tries to teach every student equally. However, despite the best efforts of teacher, not all students learn the same amount. Some excel more than others. This happens because of personal merit of a student and the ability to grasp quickly. The main difference between getting taught from a teacher in a classroom than from a fellow student is the interaction the students have with one another. Here also, the personal grasping power of a student plays an important role, but the probability of learning from a better student is more than from a less sophisticated student. Teaching–learning-based optimization (TLBO) algorithm (Rao et al. 2011) also portrays this environment and could be understood as follows:

The intelligence level of a student is ascertained by his fitness value obtained from the fitness function. During the first phase, it is assumed that the best student (with best fitness value) will inherit the entire knowledge of the teacher and will be at the same intelligence level as the teacher himself (Teacher). Now, the job of the Teacher is to impart knowledge to students in such a way so as to increase the overall mean of all subjects in the class and to increase the overall mean to a new level (Desired). Their difference helps to modify the current level of each student. Thereafter, two random students are chosen and their fitness functions are compared. Depending upon this comparison in terms of fitness values and their difference, a change in the current level of student is proposed again. Hence, we come across a two-level modification to ensure achievement of optimal result.

3.10 Symbiotic organisms search (SOS)

There exist three types of relationships between any two organisms in an ecosystem as stated by Cheng and Prayogo (2014). They are mutualism, commensalism and parasitism. The relation between a flower and a bee can be termed as mutualism where both bees and flower are benefitted from each other. Bees suck nectar from the flower and in turn help the flower with pollination. Commensalism is a relation between two organisms where one of them is benefitted without providing any positive or negative impact on the other one. Remora fish sticks itself with the shark feeding on shark’s excreta which is an example of commensalism. Parasitism is that relation between two organisms where one is benefitted harming the other. The organism that is harmed is called the host, whereas the organism that is benefitted in parasitism is called the parasite. Deer ticks stick themselves to the body of the deer sucking their blood and make the host prone to harmful and fatal diseases.

In SOS, initially an ecosystem (population matrix) is formed with a defined value of organisms (particles). All the organisms maintain their self-assigned constraints, and their fitness functions are evaluated. Thereafter, each of the organisms pass through the aforementioned three relations represented mathematically until the algorithm yields the best value of the fitness function.

4 Results and discussion

4.1 Overview of the test systems

For the purpose of energy management evaluation, six microgrid test systems are considered in this paper. An overall description of all the test systems is displayed in Table 2. The operating ranges, cost, emission and valve point coefficients of the conventional generators of microgrid test systems 1 and 2 are listed in Tables 3 and 4, and the necessary parameters to model the RES for these two systems are listed in Tables 5 and 6, respectively. Figures 5, 6 and 7 show the load demand, wind speed and PV outputs of microgrid test systems 1 and 2, respectively. Table 7 contains the DG parameters of microgrid test system 3. Figure 8 shows the RES output, load demands and market price of electricity of microgrid test system 3. The DG parameters of test system 4 and 5 are gathered from Yong and Tao (2007), Ganjefar and Tofighi (2011) and Wibowo et al. (2017). Microgrid test systems 3 and 5 are both grid-connected microgrid systems; the difference being microgrid test system 3 does not include an ESS, and the real-time electricity price varies with time, whereas microgrid test system 5 is backed up by an ESS and the electricity price is fixed throughout the day. Lastly, the necessary data for performing ELD and CEED on microgrid test system 6 were collected from Trivedi et al. (2018). The proposed crow search algorithm (CSA) was applied to solve energy management problem for the microgrid test systems along with nine other optimization algorithms discussed in Sect. 3. The algorithms were coded in MATLAB R2013a environment installed in a personal computer having specifications of core i3 as processor with a clock frequency of 2.53 GHz and a RAM of capacity 2 Gigabyte. For all optimization techniques, the population size was varied altered in the range 60–80 with 500 iterations for 20 repeated trials. For PSO, the values of wmax, wmin, c1 and c2 are 0.9, 0.7, 2 and 2, respectively. The mutation factor and crossover probability for DE were considered as 0.7 and 0.25, respectively.

Table 2 Description of the microgrid test systems considered for energy management
Table 3 DG parameters of microgrid test system 1
Table 4 DG parameters of microgrid test system 2
Table 5 Renewable energy sources’ parameters for microgrid test system 2 (Lahon and Gupta 2018)
Table 6 Wind energy parameters for microgrid test systems 1 and 2
Fig. 5
figure 5

Load demand of microgrid test systems 1 and 2

Fig. 6
figure 6

PV output of microgrid test system 2

Fig. 7
figure 7

Wind speed for microgrid test systems 1 and 2

Table 7 DG parameters for microgrid test system 3
Fig. 8
figure 8

Load demands, hourly outputs of RES and utility price for microgrid test system 3

4.2 Comparative analysis

Various penalty factors were calculated as listed in Table 1, and their values are displayed in Table 8. It can be realized that minmax penalty factor is the least among all. Furthermore, CEED was evaluated with and without RES using the min–max penalty factor for microgrid test system 1. Table 9 enlists the generation cost when ELD and CEED were performed using the ten optimization techniques with and without RES. The effect of RES can be realized with the decrease in the value of ELD and CEED. A 12% drop in the values of ELD and CEED can be observed after the inclusion of the RES in the system. The generation cost (ELD) was found to be $117,436.5559 without RES which dropped down to $103,469.3322 upon the inclusion of RES. Similarly, the value of CEED was $137,062.8987 before wind turbine was incorporated to share which later reduced to $120,219.0719 after the inclusion of wind turbine. The proposed CSA yielded the least and profound result for all the four cases studied for microgrid test system 1 when compared to all the other optimization techniques used. Table 10 highlights the hourly outputs of various generators and the wind turbine when CEED was evaluated including RES to achieve a minimum and best cost of $120,219.0719. Figure 9 shows the convergence characteristic curve for all the optimization techniques used when CEED was evaluated including RES. It can be seen that CSA converges pretty early with the minimum possible cost compared to all the other algorithms.

Table 8 Penalty factors ($/kg) calculated for microgrid test system 1
Table 9 Generation cost for microgrid test system 1 ($)
Table 10 Hourly outputs for microgrid test system 1 using CSA (CEED with RES) (kW/h)
Fig. 9
figure 9

Convergence characteristics of microgrid test system 1 using wind

Table 11 displays the generation cost of the microgrid test system 2 which was effected by valve point loading considering RES like PV and wind. Various cases were studied for this test system, namely without wind, without PV and without RES. For all the cases, it can be seen from Table 11 that CSA provided better results with the minimum possible cost even though the cost function was a non-smooth one. 9% savings in the cost function was attained by CSA when the fitness function was evaluated using both the RES as the generation cost dropped down to $37,704.0429 from $41,650.8604. Table 12 highlights the hourly outputs when the generation cost was calculated for microgrid test system 2 with RES. Figures 10 and 11 show the convergence characteristics when generation cost of microgrid test system 2 was evaluated using ten optimization techniques without and with RES, respectively. The proposed crow search algorithm shows quick convergence with better and superior quality results when compared with the rest of the optimization techniques used.

Table 11 Generation cost for microgrid test system 2 ($)
Table 12 Hourly outputs for microgrid test system 2 using CSA (VPE with RES) (kW/h)
Fig. 10
figure 10

Convergence characteristics of microgrid test system 2 without RES

Fig. 11
figure 11

Convergence characteristics of microgrid test system 2 using wind and PV

Table 13 displays the minimum generation cost, for grid-connected microgrid test system 3, obtained using eight different soft computing techniques. Three different cases, viz. normal loading, without PV and 5% overloading, were studied for this test system. CSA minimized the microgrid generation cost to a great extent for all the three cases when compared with other optimization techniques used. 21% to 25% savings in the generation cost was realized when the proposed CSA minimized the value of the fitness function to $225.7871 during normal conditions, $272.9262 without the support of PV and $251.0270 when the system was 5% overloaded. The dashed line in Fig. 12 represents the convergence curve of CSA to minimize the fitness function in the normal condition. It is clearly evident that CSA converges early with much superior quality result than most of the optimization tools used. Figures 13 and 14 depict the hourly scheduling of the DERs when the generation cost was minimized using CSA for normal and 5% overloading condition, respectively. The active participation of grid to buy and sell power to and from the microgrid system is distinct from the figures. Also, the fuel cell with the lowest cost coefficients is scheduled to its maximum output for maximum hours. The rest of the load is shared between DE and MT along with the grid based on peak demand and high electricity price.

Table 13 Generation cost for microgrid test system 3 ($)
Fig. 12
figure 12

Convergence characteristics of microgrid test system 3 under normal loading condition

Fig. 13
figure 13

Hourly output of microgrid test system 3 under normal loading condition using CSA

Fig. 14
figure 14

Hourly output of microgrid test system 3 with 5% overloading condition using CSA

The proposed CSA outperformed PSO, TLBO, SCA and other hybrid optimization tools found in the literature when the non-smooth fuel cost function of microgrid test system 4 was evaluated with and without the support of wind power. Table 14 lists the generation cost of the microgrid system minimized with the aforementioned soft computing techniques and those available in the literature. CSA brought down the generation cost to $1,014,996.2345 without wind and $979,585.5032 with wind, thus saving 1.5–2% than the predetermined cost. Figure 15 shows the convergence curves when fitness function of test system 4 was minimized using PSO, TLBO, SCA and CSA. CSA converged as early as 170–180 iterations with the best and minimized generation cost compared to the rest of the three optimization techniques. The hourly load sharing among the 10 generators and wind turbine when the least cost was obtained using CSA is shown in Fig. 16. Figure 17 shows the cost comparative analysis when the generation cost of microgrid test system 4 was calculated with and without wind support. It can be realized from the figure that 3.14% savings in the generation cost was attained when the subject microgrid test system was incorporated with wind power. Also, CSA diminished the generation costs to 0.4% and 1.19% than the costs reported in Ganjefar and Tofighi (2011) and Yong and Tao (2007) when microgrid test system 4 was functioning without and with wind power, respectively.

Table 14 Generation cost for microgrid test system 4 ($)
Fig. 15
figure 15

Convergence characteristics of microgrid test system 4 with wind

Fig. 16
figure 16

Hourly output of microgrid test system 4 with wind

Fig. 17
figure 17

Cost comparative analysis of microgrid test system 4 with and without wind support

Figure 18 depicts the load sharing of the DERs included in microgrid test system 5. The ESS charges itself during the off-peak hours and maintains its state of charge. PV, with the highest cost coefficient maintains a low profile, whereas grid with the lowest cost coefficient delivers the remaining load after DE and MT have contributed its share, thus maintaining the supply–demand equation. A massive 33% savings in the generation cost was realized when CSA was implemented to minimize the generation cost of microgrid test system 5 by reducing the cost to $574.350 compared to that of $866.758 by SQP. The generation costs achieved by PSO and proposed CSA for microgrid test system 5 are listed in Table 15, and the percentage of savings is shown in Fig. 19.

Fig. 18
figure 18

Hourly output of microgrid test system 5

Table 15 Generation cost for microgrid test system 5 ($)
Fig. 19
figure 19

Cost comparative analysis of microgrid test system 5 using the proposed CSA

Table 16 highlights the generation costs when ELD was performed on microgrid test system 6 using DE, SOS, JAYA and proposed CSA. It can be seen that the proposed CSA outperformed various algorithms in providing a better and minimized cost in all the four scenarios studied for the aforementioned test system. CSA brought down the generation cost to $166,792.8781 which saves 9% economy compared to that of reported in the literature. Table 17 lists the various price penalty factors evaluated for the test system 6 as per Eq. (1). Min–Max penalty factor is the least among all and is used for further evaluation of CEED. A 17% savings was realized when CEED was performed using CSA in test system 6 considering both PV and wind together. CSA minimized the generation cost to $192,169.3625 which outperformed $232,053 obtained by reduced gradient method (RGM) as reported in the literature, and this is shown in Table 18. Similarly, in all the subsequent scenarios for this test system, CSA consistently provided a superior result outperforming all the other soft computing techniques reported. Tables 19 and 20 list the various hourly outputs and hourly costs when CSA was used to minimize the generation cost, while CEED was evaluated with and without RES, respectively. Figure 20 shows the cost comparative analysis for various cases studied of microgrid test system 6. It is clear from the figure that the generation cost of the system was reduced (up to 5.23%) when RES was incorporated compared to the case without RES. One more benefit of involving RES is that it reduces stress on the FFGs by sharing their loads, thus improving their durability and longevity.

Table 16 Generation cost (ELD) for microgrid test system 6 ($)
Table 17 Penalty factors ($/kg) calculated for microgrid test system 6
Table 18 Generation cost (CEED) for microgrid test system 6 ($)
Table 19 Hourly outputs (kW) and hourly costs ($/h) for CEED using CSA (all sources)
Table 20 Hourly outputs (kW) and hourly costs ($/h) for CEED using CSA (without RES)
Fig. 20
figure 20

Cost comparative analysis of microgrid test system 6 for various scenarios

4.3 Wilcoxon signed-rank test

Wilcoxon signed-rank test (Wilcoxon 1945) was used to test one sample data set, received as the outcome of the mentioned algorithm. It is a pairwise test done to find substantial variances in the behavior of two diverse algorithms. Any given algorithm maybe considered robust if is able to prove its statistical worth. For this purpose, it has to provide sufficient evidence against the null hypothesis. The p value (probability value) which comes out to be less than 0.05 achieved by employing this test gives clear proof against the proposed null hypothesis. The p values received from this test for all the cases with their minimum, maximum, average values and standard deviation are listed in Table 21. From this table, it was observed that the p value in every case was much lower than the desired value of 0.05, thereby establishing statistical significance of results.

Table 21 Wilcoxon signed-rank test for various results obtained using CSA

4.4 Robustness

Initialization of evolutionary algorithms is always done randomly which is why multiple trial runs are needed to arrive at a decision regarding robustness of the same. CSA was evaluated for 20 trial runs for all cases. The number of times it hit the minimum solution is shown in Table 21. It can be seen that the lowest number of times it hit the minimum solution was 17, whereas the highest number was 19. The average success rate came out to be 90% which is highly appreciable.

5 Conclusion

Renewable integrated microgrid systems, operating in both islanded and grid-connected modes, were considered in this paper for solving energy management problems. Modeling of the RES which are based on the day-ahead evaluation of solar irradiance, wind speed, etc., was done to calculate the hourly support provided by them to share the loads with the conventional generators. Incorporation of RES in microgrid systems does not only reduce the emission of harmful pollutants released in atmosphere by the fossil-fueled generators but also provides less stress on the generators by reducing their load, thereafter increasing their durability and longevity. Classical optimization techniques like sequential quadratic programming, state-of-the-art evolutionary algorithms like GA, DE, PSO and many recently developed metaheuristic soft computing algorithms were involved in this study. The proposed CSA outperformed all the soft computing techniques in providing a least generation cost for 18 different scenarios of all the six test systems which included both smooth and non-smooth and non-convex cost functions. Statistical parameters such as standard deviation and Wilcoxon signed-rank test prove the superiority of the proposed CSA over the others in handling complex-constrained smooth and non-smooth fuel cost functions.