1 Introduction

Microgrids (MGs) are small-scale networks, which consist of renewable energy sources (RES), conventional generation sources, energy storage systems (ESS), and controllable/non-controllable loads (Lasseter and Microgrids 2002; Shivam and Dahiya 2018). The flexible operation of MGs resources enables the possibility of using various optimization techniques to achieve technical, environmental and economic benefits (Phani Raghav et al. 2022). Energy management systems (EMS) are required for MGs to achieve objectives, such as minimization of operating costs, reduced losses, and improved reliability. These objectives depend on the efficient management of resources, flexible loads, and energy transactions with the grid (Parisio et al. 2014). MG's energy management (EM) recently received great attention for MG's resources optimal operation.

Different structures have been proposed for EMS utilizing a variety of optimization algorithms and energy sources. To reduce the operating cost in MG, a multi-objective genetic algorithm (MOGA) is employed in Torkan et al. (2022). Ref. Aguila-Leon et al. (2022), a Particle swarm optimization (PSO) algorithm is employed to incorporate the RESs to the EMS of the MG efficiently. A developed manta ray foraging optimization (DMRFO) in Dong et al. (2022) is used to reduce the operating cost and emissions in the MG. For MG capacity planning, Ref. Bukar et al. (2022) employed seven different optimization algorithms: grey wolf optimization (GWO), dragonfly algorithm (DFA), cuckoo search algorithm (CSA), the grasshopper optimization algorithm (GOA), Salp swarm algorithm (SSA), ant lion optimization (ALO), and PSO.

By integrating intelligent technologies in MGs, communication may be created between MG consumers and the EMS, as well as between the EMS and the main grid. Thus, Demand response programs (DRP) can contribute significantly to cost savings (Rahimiyan et al. 2014).Also, the use of DRP can enhance the load curve by allowing the positive contribution of the customers (Palensky and Dietrich 2011). DR is defined as changing customers' power consumption in response to fluctuating electricity prices or incentive payments (Aalami et al. 2010). There are two different categories of DR: Incentive-based DR (IDR) and price-based DR (Jordehi 2019). Numerous studies have been conducted on the efficient implementation of DR into and its contribution to the demand–supply balance, grid reliability, and performance, particularly in MG with its distributed generation (DG) sources. Robert et al. (2018) and Parisio et al. (2014) examined the effectiveness of integrating DR with MG in order to achieve environmental and economic benefits. In Shehzad Hassan et al. (2019) PDR is incorporated in the EMS of the MG, using PSO the MG's profit is maximized for different pricing strategies. In Faria et al. (2013), to reduce the MG's operating cost PSO algorithm was employed in EMS for achieving optimal scheduling to the DR and MG. A genetic algorithm (GA) is used in Wang et al. (2018) for optimal scheduling of MG's resources with a PDR program. Also, GA is embedded in the EMS of MG for reduction of the operating cost in Arif et al. (2014). A combination of modified PSO and differential Evolutionary (DE) algorithm with IDR is used to solve the problem of EM and planning in Sedighizadeh et al. (2019). In Soroudi et al. (2016), a PDR is developed for the minimization of power losses in MG. Based on real-time pricing, Ref. presented Yu and Hong (2016) a DR for the optimal EM. Different DRP types are employed in the EMS of Multi-Microgrid the problem is solved using linear programming with mixed integer liner programing (MILP) mathematical models in Nguyen et al. (2018). To reduce the operating cost and to maximize the operator benefit is the EM problem solved using Honey Badger Optimizer (HBA) in Alamir et al. (2022b) and using Alamir et al. (2022a) Artificial Hummingbird Algorithm (AHA).

According to the aforementioned studies, various optimization techniques have been employed to solve different engineering problems effectively, particularly for different EMS objectives. So these researches revealed a chance for establishing new and improved optimization strategies for solving specific problems. Also, thanks to the No-Free-Lunch (NFL) theorem (Wolpert and Macready 1997), which state that "there are no metaheuristic optimization algorithms capable of addressing all optimization problems and guarantee the same performance". These two previously mentioned reasons clarify our motivation to propose the Quantum Artificial Rabbits Optimization (QARO) as an improved version of Artificial rabbits optimization (Wang et al. 2022) which was chosen owing to their exceptional performance in solving a variety of mathematical and engineering design problems. A summary comparison for the related work is shown in Table 1.

Table 1 Summary for the related work

The objective of this paper is to introduce a QARO algorithm based on the quantum mechanics to enhance the conventional ARO. The second objective is to optimize the MG operation taking incentive DR into account and comparing to other optimization metaheuristics.

The following are the principal contributions of this work to the investigation, as mentioned earlier:

  1. 1.

    A Quantum Artificial Rabbits Optimization is proposed to enhance the performance of the original ARO algorithm and to solve the EM problem in MG. A quantum mechanics by employing the Monte Carlo method is used to prevent premature convergence to local minimum.

  2. 2.

    Considering the demand response program, the EM problem in MG is solved by employing the proposed QARO algorithm. And its performance is compared with well-known and newly developed algorithms to solve the EM problem.

The rest of this paper is structured as follows: Sect. 2 presents the modeling of the Grid-connected Microgrid with modeling of DRP. Section 3 discusses the EM optimization problem modeling; Sect. 4 focuses on the traditional ARO and the proposed QARO algorithms. The obtained simulation results are presented in Sect. 5. Finally, the paper is concluded in Sect. 6.

2 Problem formulation

The proposed grid-connected MG scheme is shown in Fig. 1, which consists of Dispatchable conventional sources such as conventional diesel generator (CDG), renewable sources such as Photovoltaic (PV), Wind Turbine (WT), and responsive residential customers (RC) as described below. The MG is assumed to have a connection to the Utility Grid (UG) with the possibility of two way energy transactions.

Fig. 1
figure 1

The overall scheme of the grid-connected MG

2.1 Utility grid power transaction

If we denote the amount of power transaction with the UG at any time interval \(t\) as \({P}_{{\mathrm{UG}}_{t}}\), then the Locational Marginal Prices (LMP's) (\({\gamma }_{t})\) (Nwulu and Fahrioglu 2013) is employed to express the cost of power transaction \({C}_{\mathrm{UG}}\left({P}_{{\mathrm{UG}}_{t}} \right)\) as:

$${C}_{\rm UG}\left({P}_{{\rm UG}_{t}} \right)= {\gamma }_{t}\times {P}_{{\rm UG}_{t}}$$

2.2 Generation model

  1. a.

    WT model

WT output power is Probabilistic in its nature; the generated power (\( P_{{{\text{wind}}_{t} }} \)) is entirely dependent on wind speed \({(v}_{{\mathrm{hub}}_{t}})\) at the hub height \({{h}}_{\mathrm{hub}}\), Wind speed can be calculated based on the reference wind speed (\({v}_{{\mathrm{ref}}_{t}} )\) at the reference height \({h}_{\mathrm{ref}}\) as Tazvinga et al. (2014):

$${v}_{{\mathrm{hub}}_{t}}={v}_{{\mathrm{ref}}_{t}}{\left(\frac{{h}_{\mathrm{hub}}}{{h}_{\mathrm{ref}}}\right)}^{\beta }$$

where \(\beta \) is the power law exponent in the range of \(\frac{1}{7}\).

The WT hourly generated power is given as:

$$P_{{{\text{wind}}_{t} }}=0.5{n}_{\mathrm{w}}{p}_{\mathrm{air}}{C}_{\mathrm{p}}A{v}_{{\mathrm{hub}}_{t}}$$

where \(A\) is the swept area by the rotor; \({n}_{\mathrm{w}}\) is the efficiency of WT; \({p}_{\mathrm{air}}\) air density; \({C}_{\mathrm{p}}\) is the power coefficient of the turbine.

  1. b.

    Solar PV model

The hourly generated power from PV solar array depends on the incident solar irradiation on the PV array \({I}_{{\mathrm{Pv}}_{t}}\) (kW h/m2) and it is expressed as Tazvinga et al. (2013):

$${{P}_{\mathrm{PV}}}_{t}={\eta }_{\mathrm{PV}}{A}_{\mathrm{c}}{I}_{{\mathrm{Pv}}_{t}}$$

Also, solar power depends on the efficiency of the solar array (\({\eta }_{\mathrm{pv}})\), and the PV array area \({A}_{\mathrm{c}}\) (Tazvinga et al. 2013).

  1. c.

    CDG and load model

The CDG is considered as an essential generation source in MGs. The output power of these CDGs can be adjusted flexibly by the operator. The fuel cost of CDG \({C}_{i}\left({P}_{{\mathrm{CDG}}_{i,t}}\right)\) can be expressed by the quadratic model as:

$${C}_{i}\left({P}_{{\mathrm{CDG}}_{i,t}} \right)={a}_{i}{{{p}_{\mathrm{CDG}}}^{2}}_{i,t}+{b}_{i}{P}_{{\mathrm{CDG}}_{i,t}}$$

where \(i\) is the CDG number; \({a}_{i}\) and \({b}_{i}\) are fuel cost coefficients.

Usually, load is modelled by adding up the separate customer loads. In this paper, customers are grouped according to their participation in DRP.

2.3 Demand response model

If the customer type is \(\theta \), which refers to its willingness to participate in the DR program and \({P}_{{c}_{j,t}}\) is the amount of consumption reduction; then customer’s \(j\) cost function (\({C}_{j}\left(\theta ,{P}_{{c}_{j,t}}\right)\)) can be expressed as Fahrioglu and Alvarado (2000):

$${C}_{j}\left(\theta ,{P}_{{c}_{j,t}}\right)={k}_{1}{{P}_{{c}_{j,t}}}^{2}+{k}_{2}{P}_{{c}_{j,t}}(1-\theta )$$

where \({k}_{1}\), and \({k}_{2}\) are cost coefficients,

Then the benefit of the responsive customer is calculated as:

$$ B_{1,j} (\theta ,y,P_{{c_{j,t}^{{}} }} = y_{j,t} - (k_{1} P_{{c_{j,t}^{{}} }}^{2} + k_{2} P_{{c_{j,t}^{{}} }} - k_{2} P_{{c_{j,t}^{{}} }} ),\quad {\text{for}}\;j = 1,2, \ldots J $$

where \({y}_{j,t}\) is the incentive payment that customer \(j\) receive. Customers will participate in DR only in case that \({B}_{j}\ge 0\).

The benefit of MG from the participation of customer \(j\) in DR program can be expressed as:

$${B}_{2,j}\left(\theta ,\lambda ,{P}_{{c}_{j,t}}\right)={\lambda }_{j,t}{P}_{{c}_{j,t}}-{y}_{j,t}$$

where \({\lambda }_{j,t}\) is the cost of power interruption of customer \(j\); its value can be calculated based on the optimal power flow analysis (Fahrioglu and Alvarado 2000).

So that the total benefit of MG is calculated based on (8) for the entire interval \(T\) as:

$${B}_{2}=\sum_{j=1}^{J}\sum_{t=1}^{T}{\lambda }_{j,t}{P}_{{c}_{j,t}}-{y}_{j,t} $$

3 Energy management problem formulation

As mentioned previously, MG's proposed architecture in this paper consists of different types of generation sources, as WT, PV, and CDG, and responsive customers with DRP. Main objective of the EMS is to optimize the operation of these generation sources. For this purpose of solving Multi-objective optimization problems;

Following is a mathematical description of two objective functions.

3.1 Objective function

The EM problem in this paper is formulated as a multi-objective problem as following:

  1. (a)

    Minimization of the operating cost (\({f}_{1}\left(x\right)),\) which is the cost of power generation and the cost of power transaction with the utility grid.

    This mathematical representation of this objective function can be described as follows:

    $$\mathrm{min}{f}_{1}\left(x\right)=\mathrm{min}\sum_{t=1}^{T}\sum_{i=1}^{I}{C}_{i}\left({P}_{{\mathrm{CDG}}_{\mathrm{i},\mathrm{t}}} \right)+\sum_{t=1}^{T}{C}_{\mathrm{UG}}\left({P}_{{\mathrm{UG}}_{t}}\right)$$

    where \(I\) is the total number of CDG.

    The first term of Eq. (10) is for CDG generation cost minimization, while the second is for the power transaction cost.

  2. (b)

    Maximization of the MG operator benefit \({f}_{2}\left(x\right)\) considering the DRP in EMS. This objective function can be expressed as:

    $$\mathrm{max}{f}_{2}\left(x\right)=\mathrm{max}\sum_{j=1}^{J}\sum_{t=1}^{T}{\lambda }_{j,t}{P}_{{c}_{j,t}}-{y}_{j,t} $$

    Therefore, the mathematical model of the objective function for MG management is represented as:

    $$\mathrm{min}{w}_{1}\left[\left.\sum_{t=1}^{T}\sum_{i=1}^{I}{C}_{i}\left({P}_{{\mathrm{CDG}}_{i,t}} \right)+\sum_{t=1}^{T}{C}_{\mathrm{UG}}\left({P}_{{\mathrm{UG}}_{t}} \right) \right]\right.+{w}_{2} \left[\left.\sum_{j=1}^{J}\sum_{t=1}^{T}{{y}_{j,t}-\lambda }_{j,t}{P}_{{c}_{j,t}} \right]\right.$$

    With the following Equation should be satisfied:


    where \({w}_{1}\) and \({w}_{2}\) are the weighting factors for the first and second objective functions, respectively.

3.2 Constraints

The proposed operation of the EMS operation problem is subjected to the following constraints:

3.2.1 Electrical load balance

For any time interval \(t\) the electrical load demand with DRP should equal the summation of the total generated power from PV, WT, CDGs and the power transacted with the utility grid \({P}_{{\mathrm{UG}}_{t}}\). Thus, the electrical load balance can be modelled as:


3.2.2 Dispatchable CDGs constraints

The output power from each CDG should be within its minimum (\({P}_{{\mathrm{CDG}}_{i,\mathrm{min}}})\) and maximum (\({P}_{{\mathrm{CDG}}_{i,\mathrm{max}}})\) limits as it is indicated in Eq. (15). Also constraint in (16) states that the ramping up and down rate (\({DR}_{i})\) limits should not be violated.

$${P}_{{\mathrm{CDG}}_{i,\mathrm{min}}}\le {P}_{{\mathrm{CDG}}_{i,t}}\le {P}_{{\mathrm{CDG}}_{i,\mathrm{max}}}$$
$${-\mathrm{DR}}_{i}\le {P}_{{\mathrm{CDG}}_{i,t+1}}-{P}_{{\mathrm{CDG}}_{i,t}}\le {\mathrm{UR}}_{i}$$

3.2.3 Grid constraint

Power transaction with the utility constraints is as in Eq. (17), which limits the power transaction below the maximum limit \({(-P}_{{UG}_{max}})\) .

$${-P}_{{UG}_{max}}\le {P}_{{UG}_{t}}\le {P}_{{UG}_{max}}$$

3.2.4 Demand response constraints

Based on (7), the function of benefit for responsive customer is prolonged for the entire time horizon (1 day). This ensures that the customer incentive during the day is greater than what should be paid if electricity is consumed rather than curtailed; this limitation is expressed as:

$$\sum_{t=1}^{T}{y}_{j,t}-({k}_{1}{{P}_{{c}_{j,t}}}^{2}+{k}_{2}{P}_{{c}_{j,t}}-{k}_{2}{P}_{{c}_{j,t}}{\theta }_{j}\ge 0$$

Constraint (19) specifies the permitted amount of customer \(j\) power curtailment, where \({P}_{{\mathrm{CM}}_{j}}\) is the customer's daily power curtailment limit.

$$\sum_{t=1}^{T}{P}_{{c}_{j,t}}\le {P}_{{\mathrm{CM}}_{j}}$$

The DRP is employed with consideration of the daily budget limit (DBL) of the MG as in the following Equation:

$$\sum_{t=1}^{T}\sum_{j=1}^{J}{y}_{j,t}\le \mathrm{DBL}$$

4 Solution method

4.1 Original artificial rabbits optimization (ARO)

The original ARO mimics the foraging and hiding tactics of actual rabbits, as well as their energy shrink leading to transiting between these tactics (Wang et al. 2022).

  1. (a)

    Detour foraging (exploration)

In detour foraging behavior of ARO, each individual in the search space tends to update its location towards the other search individual chosen randomly from the group and add a perturbation. The following equation describe the mathematical model of the detour foraging:

$${v}_{i}\left(t+1\right)={x}_{j}\left(t\right)+R\times \left({x}_{i}\left(t\right)-{x}_{j}\left(t\right)\right)+\mathrm{round}\left(0.5\times \left(0.05+{r}_{1}\right)\right)\times {n}_{1}, i,j=1,\dots .,j\ne i$$
$$R=L\times c$$
$$L=(e-{e}^{{\left(\frac{t-1}{T}\right)}^{2}})\times \mathrm{sin}(2\pi {r}_{2})$$
$$c\left(k\right)=\left\{\begin{array}{l}1\quad if\; k==g(l)\\ 0\quad else \end{array} k=1,\dots .,d\; \mathrm{and}\; l=1,\dots .,[{r}_{3},d]\right.$$
$$g=\mathrm{randperm}\left(d\right), {n}_{1}\sim N(\mathrm{0,1})$$
  1. (b)

    Random hiding (exploitation)

To escape from predators, a rabbit commonly digs some holes nearby its nest for hiding. This equation is given in this regard as:

$${b}_{i,j}\left(t\right)={x}_{i}\left(t\right)+H.g.{x}_{i}\left(t\right), i=1,\dots .,n \; \mathrm{and}\; j=1,\dots .,d$$
$$H=\frac{T-t+1}{T}.{r}_{4}, {n}_{2}\sim N(\mathrm{0,1})$$
$$g\left(k\right)=\left\{\begin{array}{l}1\quad if\; k==j\\ 0\quad else \end{array} k=1,\dots .,d\right.$$

The rabbits to be survive need to find a safe residence to hide. So, they select randomly a hole from their holes for hiding to escape from getting caught. This random hiding tactic is modeled as below:

$${v}_{i}\left(t+1\right)={x}_{i}\left(t\right)+R\times \left({{r}_{4}\times b}_{ir}\left(t\right)-{x}_{i}\left(t\right)\right) i=1,\dots .,n$$
$$g\left(k\right)=\left\{\begin{array}{l}1\quad if\; k==[{r}_{5}\times d]\\ 0 \quad else \end{array} k=1,\dots .,d\right.$$

After detour foraging or p random hiding is reached, the position update of the ith rabbit is:

$${x}_{i}\left(t+1\right)=\left\{\begin{array}{l}{x}_{i}\left(t\right) f({x}_{i}\left(t\right) \le f({v}_{i}\left(t+1\right) )\\ {v}_{i}\left(t+1\right) f({x}_{i}\left(t\right) >f({v}_{i}\left(t+1\right) ) \end{array}\right.$$
  1. (c)

    Energy shrink (switch from exploration to exploitation)

An energy factor is considered to model the switch from exploration to exploitation phases. The energy factor in this algorithm can be given as follows:


4.2 Proposed QARO

Quantum mechanics are employed to enhance the conventional ARO technique. This quantum model of an ARO algorithm will be referred to as a QARO algorithm. The quantum mechanics was used to develop the PSO algorithm in Coelho (2008). In the quantum model, using Monte Carlo method, the solution \({x}_{\mathrm{new}1}\) can be calculated as follows Elkasem et al. (2022):

$$ \begin{array}{*{20}l} {{\text{If}}\;h \ge \, 0.5} \hfill \\ {x_{{{\text{new1}}}} = p + \alpha .\left| {{\text{Mbest}}_{i} - X_{i} } \right| .\ln \left( {1/u} \right)} \hfill \\ \end{array} $$


$$ {x_{{{\text{new1}}}} = p - \alpha .\left| {{\text{Mbest}}_{i} - X_{i} } \right| .\ln \left( {1/u} \right)} $$


where \(\alpha \) is a design parameter, \(u\) and h are uniform probability distribution in the range of [0, 1], \(\mathrm{Mbest}\) represents the mean best of the population, and it is defined as the mean of the global best positions. It is can be calculated as follows El-Sattar et al. (2022):


where \(g\) is the index of the best solution. The flowchart of the proposed QARO algorithm is presented in Fig. 2. Moreover, Algorithm 1 describes the QARO algorithm’s pseudocode.

Fig. 2
figure 2

Flowchart of QARO algorithm

figure a

4.3 Computational complexity analysis of QARO

Computational complexity provides a valuable tool for assessing the effectiveness of algorithms in solving optimization problems. The complexity of an algorithm is influenced by several factors, including the number of individuals involved (n), the dimensionality of the problem's variables (d), and the maximum number of iterations (T). In the case of QARO, the total computational complexity can be expressed as follows:

$$\text{O}(\text{QARO}) =\text{ O}(\text{problem definition}) +\text{ O}(\text{initialization}) +\text{O}(\text{function evaluation}) +\text{ O}(\text{Position updating in detour foraging}) +\text{O}(\text{Position updating in random hiding}) +\text{ O}(\text{Position updating in Quantum}1)+\text{ O}(\text{Position updating in Quantum}2) = O\left(1+n+Tn+\frac{1}{2}Tnd+\frac{1}{2}Tnd+\frac{1}{2}Tnd+\frac{1}{2}Tnd\right)\cong O(2Tnd+Tn+n)$$

5 Simulation results and discussion

Performance analysis of the QARO algorithm.

5.1 Benchmark functions

All techniques have been run under the similar situations so that a reasonable assessment is made. The number of search agents has been 50, while the maximum iteration equal to 200, and independent runs is 20 times to avoid the stochastic nature of the algorithms. The parameters specified in the original reference were employed for each method. Table 2 displays the parameter configurations for these techniques. These methods were compared using a laptop with a 2.9 GHz frequency, and the operating system used was Windows 10. The MATLAB 2016a platform was used to execute the techniques. The competence and the precision of the proposed QARO algorithm are evaluated on 23 benchmark functions based on different statistical measurements such as the best, average, median, worst values, standard deviation (std) and rank for the solutions achieved using the conventional ARO algorithm and other recent techniques such as the supply-demand-based optimization (SDO) (Zhao et al. 2019), the Equilibrium optimizer (EO) (Faramarzi et al. 2020), and the Grey wolf optimizer (GWO) (Mirjalili et al. 2014).

Table 2 Parameter settings of the selected techniques

These benchmark functions comprise three types of test functions: unimodal, multimodal, and low-dimensional multimodal test functions (Fan et al. 2021). The mathematical formulation for these test functions can be found in Table 3. The first group of test functions belongs to the unimodal family, and contains only one global optimum, without any local optima. These test functions are highly suitable for evaluating algorithm convergence speed and exploitation capabilities. The second group, which belongs to the multimodal family, consists of test functions with multiple local solutions in addition to the global optimum. These test functions are useful for testing an algorithm's ability to avoid local optima and explore alternative solutions. The composite test functions are a combination of rotated, shifted, biased, and merged versions of various unimodal and multimodal test functions.

Table 3 Benchmark functions

5.1.1 Comparison simulation results

The comparisons for these algorithms are presented in Table 4. From Table 4, it is noticed that the proposed QARO algorithm achieves best results on the most of these types of functions in all values. The comparison of techniques in these functions is according to the average value. These functions are compared based on their mean values using a technique called Tied rank (TR). This rank-based approach assigns ranks to the techniques according to their average values, with the technique with the smallest average value being allocated rank 1, and so on. The technique with the lowest TR value is considered the most effective compared to the other algorithms (El-Dabah et al. 2023; Wu et al. 2019). The statistical results of the tied rank on 23 benchmark functions are shown in Table 4. After Table 4 is inspected; the applied techniques are sorted. It is seen from the ranking order that the QARO algorithm outperforms the other compared techniques on 23 function problems. ARO and EO displays robust effectiveness that are the second and third optimal. Figure 3 displays the ranking of all compared algorithms for each function, using a radar chart. The average of these ranks is presented in Fig. 4. Upon examining Fig. 4, it becomes evident that QARO has the lowest average rank value, implying that it ranks first among all algorithms. This underscores QARO as the top-performing optimizer in the comparison, based on the tied rank approach. This outcome further validates that our method can efficiently discover the global optimum for various problems. It is concluded from this discussion that the QARO technique becomes an effective algorithm for solving these types of problems. The convergence characteristics of these algorithms for those functions are displayed in Fig. 5. For more investigation on the performance of the proposed algorithm, a boxplot of outcomes for each algorithm and objective function is presented in Fig. 6 also displays that the boxplots of proposed QARO algorithm for most of the functions are narrow and among the smallest values.

Table 4 The statistical results of 23 benchmark functions
Fig. 3
figure 3

Radar chart for ranks among all compared algorithms

Fig. 4
figure 4

Mean ranks obtained by tied rank test for 23 functions using various algorithms

Fig. 5
figure 5figure 5

The convergence curves of all algorithms for 23 benchmark functions

Fig. 6
figure 6figure 6

Boxplots for all algorithms for 23 benchmark functions

5.1.2 Wilcoxon's rank test results

The Wilcoxon signed-rank test is a nonparametric test used to determine whether the median of a paired sample differs significantly from a hypothesized value. It is commonly used in situations where the data is not normally distributed or the assumptions for a paired t test are not met. To compare the performance of any two algorithms, the Wilcoxon signed rank test is carried out. This involves gathering all fitness values over 30 runs of the objective for both algorithms, computing the sum of ranks for runs in which one algorithm outperforms the other, and calculating the p value to determine the significance of the results. Table 5 presents the results obtained using the Wilcoxon signed rank test. The column H0 defines whether the null hypothesis is valid or not. If H0 is valid with a significance level of α = 0.05, the performance of two methods is statistically the same for the study case (Biswas et al. 2018; Derrac et al. 2011).

Table 5 Table Statistical comparisons of Wilcoxon signed-rank test for QARO versus ARO, SDO, EO, and GWO

To compare the performance of two algorithms, the following steps were taken:

  • Gathered all fitness values for both algorithms over 30 runs of the objective in a case study.

  • Calculated R+, the sum of ranks for runs in which algorithm 'A' outperforms algorithm 'B'.

  • Calculated R−, the sum of ranks for runs in which algorithm 'B' outperforms algorithm 'A'.

  • Calculated the p value, which indicates the significance of results in a statistical hypothesis test. A smaller p value suggests stronger evidence against the null hypothesis H0.

Table 5 shows that QARO outperforms all other competitors for most functions, indicating a significant improvement in performance.

5.1.3 Kruskal–Wallis statistical analysis of the results

The Kruskal–Wallis test is a widely recognized statistical test that takes into account the overall rankings of multiple variables across different datasets (Gupta et al. 2020). The QARO algorithm exhibits a significantly better median rank compared to the other groups, as indicated by the ANOVA Kruskal–Wallis test results presented in Table 6. The probability value verified by the chi-square test further supports this finding. Based on the nonparametric tests conducted, it can be inferred that the QARO algorithm demonstrates greater precision and accuracy than the algorithms it was compared against (Table 6).

Table 6 Anova Kruskal–Wallis test

5.2 Real-world application

This section presents the numerical analysis and result of the proposed QARO to solve the EM problem to evaluate its performance. QARO determines the optimal operating conditions for the MG resources and the optimal scheduling for DRP operation. The generation data for WT and solar PV are given in Nwulu and Xia (2017), and it is assumed that their operational cost is negligible. The cost function's coefficients of CDG are used in Alamir et al. (2022a). To evaluate the performance of the proposed QARO in solving the EMS problem, two different MG test systems based on the proposed MG architecture shown in Fig. 1 have been formulated and simulated.

Case Study 1

The grid-connected MG's architecture in the first case study consists of three CDG units, one WT unit, one Solar PV unit, and three customers. The parameters of the three CDGs, including fuel cost coefficients, generation limits, and ramping up and down limits, are provided in Table 7. Data of the three residential customers included cost coefficients,\({\theta }_{j}\), and the daily power curtailment are detailed in Table 8. Power interruptibility (λj,t) for the three customers is provided in Table 9. The hourly WT and PV power generation, as well as the initial load demand (\({P}_{D,t}\)) are shown in Fig. 7. It is also assumed that MGO has previous information about its own daily budget of $500.

Table 7 Parameters of the three CDG units (case study 1)
Table 8 Customers data (Case study 1)
Table 9 Power interruptibility λj,t data for case study 1
Fig. 7
figure 7

Initial demand load and the power generated from PV and WT

All simulations were conducted on MATLAB 2021b on an i7-2.9 GHz computer with 8 GB of RAM. The results of 30 independent runs of the proposed MG architecture are compared using the proposed QARO, ARO (Wang et al. 2022), PSO (Moghaddam et al. 2011), JAYA (Warid et al. 2016), INFO (Ahmadianfar et al. 2022), and SO (Hashim and Hussien 2022). The results are presented in Table 10. The proposed QARO has the best performance in terms of best, worst, mean and Standard deviation (STD) values. The best results for each algorithm are compared, and the results will be discussed. The convergence characteristics of the original algorithm ARO and the proposed QARO are shown in Fig. 8; it can be seen that the QARO has faster convergence characteristics and better performance in giving lower operating cost.

Table 10 Comparison of the EM problem for case study 1
Fig. 8
figure 8

The convergence characteristics of AQO and QARO

Using QARO, the power generated from the CDG units for the whole interval is shown in Fig. 9. The load demand before and after employing the DRP with the power curtailed from all customers as a response to the DR are shown in Fig. 10. A detailed customer curtailment and total incentive are given in Table 11. A comparison for all studied techniques in terms of total energy curtailment, power transaction, and MG benefit is shown in Fig. 11. Negative power transaction means the power sold to the utility grid is higher than that bought from it. The total curtailment during the day in case of using the proposed QARO is equal to 104.97 kWh. From the figure, the MG benefit is the highest in the case of QARO.

Fig. 9
figure 9

The power generated from CDG and transacted with the grid

Fig. 10
figure 10

The initial and final load and total curtailment for case study 1

Table 11 Comparison of the EM problem for case study 1
Fig. 11
figure 11

Comparison of all studied optimization techniques for case study 1

Case Study 2

To validate the scalability of the proposed QARO algorithm, a second test system with a larger MG is simulated; in this test system, the MG consists of 10 CDG, aggregated model for 10 WT units, aggregated model for 10 solar PV units, and seven residential consumers. The CDGs' fuel cost coefficients and generation limits are given in Alamir et al. (2022a). The customers' cost coefficients,\({\theta }_{j}\), and the daily power curtailment are detailed in Table 12. The forecasted power from WT and PV units (Nwulu and Xia 2017) as well as the daily power interruptibility values for each customer (Kim and Kim 2019) are shown in Table 13.

Table 12 Customers data (Case study 2)
Table 13 WT and PV output power and customers' interruptibility values (Case study 2)

In this case study simulated on MATLAB using different optimization techniques, the best results for the independent suns in each algorithm are compared; the total operating cost for all studied techniques is shown in Fig. 12; it can be noted that the proposed QARO achieved best operating cost over all the other techniques.

Fig. 12
figure 12

Comparison for the operating cost for case study 2

Using QARO, the power generated from the CDG units for the whole interval is shown in Fig. 13. Customers' power curtailed and the incentive they get during the day are shown in Figs. 14 and 15 respectively. The load demand before and after employing the DRP with the sum of power curtailed from all customers as a response to the DR are shown in Fig. 16. A comparison for all studied techniques in terms of total energy curtailment, power transaction, and MG benefit is shown in Table 14. The total curtailment during the day in case of using the proposed QARO in case study 2 is equal to 2679.5 MWh. The MG's benefit using the proposed QARO algorithm is about 3000$, which is higher than that in the case of PSO, INFO, SO, ARO.

Fig. 13
figure 13

Generated power from CDGs for case study 2

Fig. 14
figure 14

Customers' curtailment for case study 2

Fig. 15
figure 15

Customers' incentive for case study 2

Fig. 16
figure 16

The initial and final load and total curtailment for case study 2

Table 14 Comparison for all studied techniques for case study 2

6 Conclusion

This paper proposes a modified QARO algorithm to enhance the performance of the ARO algorithm by augmenting it with a quantum mechanism based on MCS simulation. The modified algorithm is applied to solve the EM problem of MG to minimize the operating costs and maximize the MGO benefit. The performance of the improved algorithm has been tested using 23 test bench functions and comparison with well-known techniques (e.g. SDO, EO, GWO and the original ARO), different statistical assessment are performed. TR technique used to rank the performance of algorithms based on the average value, Wilcoxon's rank test based on median value, and Anova Kruskal–Wallis test are performed. These tests demonstrated the effectiveness of the proposed algorithm.

The proposed QARO is employed to solve a day-ahead EM problem in the MG. A comparison among the convergence characteristics of the proposed QARO algorithm and the original ARO algorithm proves the adequacy of the proposed algorithm in solving the optimization problem. The robustness of the proposed QARO has been validated by comparing its performance on two different MG test systems with other common techniques from the literature (PSO, JAYA, INFO, SO, and the original ARO). The proposed QARO achieved the best solution in the mean, worst, and STD. The total curtailment is 104.97 kWh and 2679.5 MWh in case study 1 and 2, respectively, while the highest benefit is achieved by QARO algorithm is $50 and $3010 for the two cases, respectively.

The proposed QARO algorithm can be employed for solving an extended probabilistic energy management problem with considering the uncertainty in the renewable generation, load and energy prices. The Ruidas et al. (2023b) used PSO to optimize the inventory cost related to the investments in reduction of emissions and green innovation. The Quantum behaved PSO (QPSO) is used in Ruidas et al. (2022) to optimize the economic production quantity for production system while in Ruidas et al. (2021) a new inventory cost called development cost is added to the optimization process. Additional QPSO is applied in Ruidas et al. (2023a) to derive the optimal profit in production inventory model for high-tech products. The proposed QARO can be employed to solve these problems and compare its performance with the PSO and QPSO algorithms.