Introduction

Renewable distributed generators integrated into distribution networks have multiple benefits in terms of technological, economic, and environmental aspects. It can be classified into four types according to whether electrical power is injected into the grid or absorbed from the network1. Wind and solar energy technologies are the most prevalent among these categories. Wind turbine (WT) technology and geographical location are two factors that affect the penetration of wind energy-based DG into the electric utility. Nevertheless, greater degrees of penetration might result in adverse effects such as heightened voltage fluctuations and power losses in the network. On the other hand, the amount of solar radiation that a photovoltaic (PV) system receives at the installation site largely determines the power it produces. However, by effectively integrating WT and PV systems, it is possible to achieve a degree of penetration that guarantees the smooth functioning of the electrical grid.

Distributed generators (DGs) are typically installed on the distribution side of the electrical utility due to the higher ratio of R/X compared to the transmission side. A high R/X ratio indicates increased power loss across distribution networks2. Therefore, integrating DGs into distribution networks (DNs) plays a vital role in minimizing line losses of the systems, enhancing system reliability, refining voltage stability, maintaining system integrity, and improving voltage profiles. However, improper placement of DG units can undermine these important characteristics. Moreover, the intermittent nature of solar radiation and wind speed in PV systems and WTs poses challenges for their optimal allocation in DNs in terms of technical, financial, and environmental aspects3,4. The literature has extensively examined the implications of disregarding the uncertainties in demand and generation during the installation of renewable energy sources1,5,6. However, these studies have not addressed realistic scenarios involving time-varying load and generation, as the capacity and location of DG may differ under varying loading levels, particularly at peak demand.

Several research studies have employed various analytical expressions7,8,9 and heuristic or meta-heuristic optimization algorithms to address numerous challenges in DG allocation issues. In Ref.7, the authors proposed an analytical formulation based on DG operating at unity power factor (UPF) to identify the optimal location using demand data, admittance matrix, and generation data. However, this approach is suitable only for a single DG unit. Another analytical technique, presented in Ref.8, utilized a multi-objective index considering time-varying load models to allocate a single DG unit based on active power loss, voltage deviation, and reactive power loss. Nevertheless, it is limited to DG installations with a UPF. Freshly, the authors of Ref.9 studied the impact of time-varying voltage-dependent load profiles on hybrid PV and WT systems using a multi-objective index. This index incorporates apparent power capacity, voltage fluctuation, and active/reactive loss, considering uncertainties in wind speed and solar irradiance to improve voltage profiles, mitigate power loss, and reduce line capacity limits. However, it also focused on a single PV and WT unit with consideration of different load profiles. In addition to analytical approaches, multiple meta-heuristic algorithms have been proposed to address the DG optimal allocation challenge10,11. However, they overlook the probabilistic behavior of renewable energy sources and assume numerous voltage-dependent load models. For illustration, the authors of Ref.10 proposed a framework based on the multi-objective Lichtenberg and thermal exchange optimization techniques for installing three units of capacitor banks and DGs with different operating power factors, considering eight different load models, to enhance voltage stability while alleviating power loss and voltage deviation. In Ref.11, the weighted multi-objective stud Krill herd algorithm has been utilized to optimize the allocation of multiple PV-based DGs under varied load models, aiming to maximize the technical benefits of the PV generation system. In Ref.12, the hybrid gray wolf and PSO algorithms are suggested to address the optimal inclusion of multiple DGs in a realistic Dilla distribution system. The goal is to enhance the voltage level and lower both active and reactive power losses. The aggregated multi-objective coefficient approach is used to combine these various objectives into a single objective.

Efficient optimization algorithms have been employed to specify the optimal sizing and capacity of a single DG unit under time-variant voltage-dependent load profiles in several studies13,14,15,16. As an illustration, in Ref.13, a hybrid renewable DG system combining PV, WT, and battery energy units was proposed using an improved version of the Crow search algorithm to decrease energy loss and voltage fluctuations under varying load levels. Monte Carlo simulation was utilized to model the uncertainties associated with PV and WT systems. In Ref.14, a novel Weibull function-based time-coupled probabilistic generation model was developed to determine a suitable location and capacity of WT. The particle swarm optimization algorithm was used to address the multi-objective optimization model, which aims at minimizing reactive and actual losses, maximizing voltage stability, and mitigating voltage drop. The authors of Ref.15 introduced a hybrid technique combining slap swarm and PSO algorithms to specify the optimum sitting and sizing of a single WT and PV unit, integrated individually or simultaneously into distribution systems, with the aim of minimizing technical objectives related to the WT unit. In Ref.16, the slap swarm optimizer was utilized to optimally assign a single WT unit on 33 and 69-bus DNs. The study further investigated the influence of various time-variant voltage-dependent load demands, including constant, commercial, industrial, residential, and mixed types, on distribution system performance and optimal DG planning problems.

Furthermore, the optimal integration of multiple WT and PV units into different radial DNs was addressed in Ref.17 using the slap swarm optimization technique. However, this approach did not simulate the stochastic nature of load and generating units. Authors of Refs.18,19 presented approaches for determining the optimal deployment of PV and WT units in small-scale DNs, considering the stochastic behavior of load and generation, to reduce annual energy loss. In Ref.20, the simulated annealing algorithm was combined with the manta ray foraging method to enhance the exploitation rate of the random foraging operator, which was used for optimal sizing of an inverter-based PV unit integrated into 69-bus test system under commercial load type. In this study, the battery energy storage (BES) was incorporated with the non-dispatchable PV to transform it into a dispatchable source. However, the convergence characteristics of these algorithms were not discussed. In Ref.21, the integration of PV with BES system into 33-bus and 69-bus DNs have been accomplished using the non-dominated multi-objective manta ray foraging optimizer algorithm, presuming plug-in electric vehicles. The multi-objective seeks to capture maximum techno-economic benefits of the PV-BES units. In Ref.22, the integration of single and double WT and PV units, with UPF and optimal power factor (OPF), into a 33-bus DN was proposed using two heuristic algorithms, namely genetic algorithm and PSO, with the aim of reducing aggregated multi-objectives of annual energy losses and voltage deviation index. In this study, the uncertainties associated with generation and load across four seasons have been investigated. In Ref.23, the archimedes optimizer (AO) was utilized to find the appropriate location and capacity of single and multiple PVs integrated simultaneously with battery energy storage systems under commercial, residential, and industrial load profiles. The main goal of the AO was to mitigate active power loss in the 69-bus DN for one practical day, taking into account equality and inequality restrictions. Nonetheless, the efficacy and superiority of the proposed approach have not been measured.

However, several modification theories are incorporated into conventional optimization techniques to strengthen their convergence characteristics and boost the exploitation and exploration stages from diverse perspectives. In other words, using advanced optimization methods results in obtaining multiple benefits and achieving superior results. In this context, the authors of Ref.24 boosted the artificial ecosystem-based optimizer to identify the appropriate placement and sizing of WT and PV units, considering the unpredictable behavior of solar irradiance and wind speed, with the goal of minimizing energy loss in 33-bus and 85-bus DNs. The developed algorithm incorporated five powerful methods: improved linear weight coefficient, production operator, enhanced consuming operator, enhanced decomposition operator, and opposition-based learning. In Ref.25, a hybrid technique integrating PSO and gravitational search algorithms was developed to optimize the economic and technological advantages of WT and PV systems while accounting for seasonal fluctuations in demand and generation. A study reported in Ref.26 hybridized the simulated annealing algorithm with the Henry gas solubility optimizer to enhance the exploitation rate of the original HGS. The proposed hybrid HGS algorithm was utilized for strategic planning of PV and BES hybrid units to lessen daily active power loss in the 69-bus system under commercial load demand. However, the numerical findings showed the slow convergence characteristics of the developed algorithm. The authors of Ref.27 enhanced the sunflower algorithm to boost the performance of distribution networks by optimizing both wind turbine placement and network reconfiguration. A Monte Carlo simulator was used to replicate the intermittent nature of wind speed, while two load profiles were used to simulate the variation in demand over a year. The enhanced algorithm incorporated an adaptive pollination rate and an adaptive sunflower inertial displacement to improve its convergence characteristics and solution quality. Ultimately, the authors of Ref.28 applied the basic artificial hummingbird optimizer for allocating single PV and WT synchronously in the 69-bus DN with consideration of the intermittences associated with solar radiation and wind speed in WT and PV systems. The studied multi-objective function is optimized to raise the techno-economic benefits of the DGs.

Previous research has only conducted a few investigations on the fluctuations in demand and electricity generated by PV and WT renewable DG sources. In other words, the most common load profile studied in the literature was the commercial load type. In conclusion, the performance of DNs and the challenges associated with DG optimal planning are influenced by the type of load9,14,15,16. Additionally, the uncertainties in generation and load further complicate the DG optimal planning problem. It is well-established that improving the performance of optimization algorithms leads to significant benefits and more optimal solutions, as discussed in Refs.26,27,29,30. Therefore, this study focuses specifically on the effects of individually and concurrently assigning various WTs and PVs on the operation of the distribution system. The analysis takes into account the load profiles of commercial, residential, industrial, and mixed sectors. Further, the stochastic nature of the wind speed and solar irradiance is simulated using efficient probability distribution functions. The optimal DG allocation challenge is achieved using an enhanced variant of the prairie dog optimization (PDO) method31, which is a novel meta-heuristic technique that imitates the habits of prairie dogs in their natural environment.

The PDO incorporates four behaviors of prairie dogs to accomplish the exploration and exploitation phases, which are essential stages in optimization. The foraging activity and cave construction of prairie dogs are utilized to support the algorithm's exploratory behavior. When the food supply becomes exhausted, prairie dogs scour the whole colony and its environs for other food sources. Upon finding alternative sources of food, they quickly start building burrows in that area. Utilizing prairie dogs' distinctive responses to various warning or communication noises makes the exploitation phase simpler. They emit noises or alerts in various situations, such as the existence of predators or the presence of food. Communication plays a crucial role in meeting their nutritional requirements and ensuring their safety against potential assailants. In the case of the PDO algorithm, these two characteristics drive the prairie dogs to converge at a certain position or a desirable location, where further search (exploitation) is carried out to identify more favorable or nearly optimum solutions. PDO has recently been applied to address damage identification challenges in engineering structures32, which indicated the need for enhancing the algorithm to handle extensive optimization challenges.

Therefore, in this work, the slime mold algorithm (SMA) is employed to enhance the exploration capabilities of the standard PDO. The performance of the modified prairie dog optimizer (mPDO) is evaluated by different statistical analyses and compared with well-known competitors based on the standard cec2020 benchmark functions. Subsequently, the original and mPDO algorithms are applied to identify the optimal planning of single and multiple PVs and WTs incorporated into 69-bus DN, considering a snapshot of generation and load, while mitigating active losses of the system. The simulation outcomes are compared with those of known optimization approaches, including the new heuristic approach (NHA)5 and the novel stochastic fractal search algorithm (SFSA)6. Finally, the mPDO is applied to specify the optimal deployment of single and multiple PVs and WTs under various time-variant voltage-dependent loads, including commercial, residential, and industrial sectors. Further, several performance metrics are utilized to measure the efficacy of the present test system. The study also investigates the combined installation of PV and WT units in the presence of various load patterns. The findings proved the success rate of the mPDO in handling the optimal allocation challenge of DG when both generation and demand are unpredictable. The following is a summary of the key innovations and contributions of this study:

  • Enhancing the performance of the novel prairie dog optimization algorithm by incorporating the reinforced learning slime mold algorithm, resulting in the modified mPDO algorithm. Further, the success and superiority of the mPDO are verified through its implementation on the cec2020 test suite benchmark and rigorous statistical analysis.

  • Applying suitable probability distributions to model the ambiguity caused by solar irradiation and wind velocity, enabling the simulation of power variability in WT and PV units. Additionally, dynamic load characteristics representing industrial, commercial, residential, and mixed sectors are have been deemed to capture changes in demand throughout the day.

  • Employing the mPDO to obtain the optimal inclusion of single and multiple WT and PV systems in 69-bus DN with the goal of lowering the daily active power loss, considering both deterministic and stochastic scenarios.

  • Investigating the impacts of different dynamic load patterns on the performance of DN and the scheduling of the PV and WT units. This analysis provides insights into the optimal utilization of these renewable energy sources under varying load conditions.

  • The numerical outcomes highlighted the robustness and reliability of the mPDO in addressing the optimal installation challenges of the PV and WT systems, particularly in the existence of uncertainty related to supply and demand.

The subsequent parts of this article are structured in the following manner. In the next section, the objective function, operating constraints, and mathematical expressions related to PV system modeling, WT modeling, and time-variant load modeling are presented. Section "Probabilistic models of generation and demand" introduces the proposed methodology and its implementation. The numerical solutions are extensively discussed in Section "Numerical simulation and discussions". Eventually, Sect. “Conclusion and future work” outlines a summary of the outcomes and offers suggestions for future research.

Problem expression

Objective function

This paper addresses the allocation problem of a non-dispatchable renewable DG, such as PV and WT systems, aiming to optimize the objective function, which involves reducing network energy loss under uncertainties related to generation and demand. The modified algorithm is employed to achieve this optimization, considering diverse load patterns such as residential, industrial, and commercial profiles. Though, it is crucial to ensure that the installation of DGs in the distribution network adheres to operational constraints to maintain system integrity.

Let us consider a two-node network \((s, s+1)\) illustrated in Fig. 1 with \(n\) nodes and \((n-1)\) lines. The connecting line has a resistance and reactance of \({(R}_{s,s+1}+j{X}_{s,s+1})\). In such systems, the supply is the substation, in which the real and reactive line flow between every two connecting buses are respectively represented by \({P}_{s}\) and \({Q}_{s}\). Let the reactive and active demand power are symbolized by \({Q}_{d}\) and \({P}_{d}\), respectively. In this context, after integrating a unit of WT into bus \((s+1)\) while supplying real and reactive power of \({P}_{wt,s+1}\) and \({Q}_{wt,s+1}\), respectively, the forward line flow equations of the backward-forward sweep (BFS) algorithm can be expressed as below33. The BFS is executed with a tolerance of 106 to solve the distribution system load flow.

Figure 1
figure 1

Part of distribution network with an integrating PV at bus \(s\) and WT at bus \((s+1)\) simultaneously.

$${P}_{s+1}={P}_{wt,s+1}+{P}_{s}-{P}_{D,s+1}-{R}_{s,s+1}\left(\frac{{P}_{s}^{2}+{Q}_{s}^{2}}{{\left|{V}_{s}\right|}^{2}}\right) ,$$
(1)
$${Q}_{s+1}={Q}_{wt,s+1}+{Q}_{s}-{Q}_{D,s+1}-{X}_{s,s+1}\left(\frac{{P}_{s}^{2}+{Q}_{s}^{2}}{{\left|{V}_{s}\right|}^{2}}\right),$$
(2)
$${V}_{s+1}^{2}={V}_{s}^{2}-2\left({R}_{s,s+1} {P}_{s}+{X}_{s,s+1} {Q}_{s}\right)+\left({P}_{s}^{2}+{Q}_{s}^{2}\right)\left(\frac{{\left|{R}_{s,s+1}+j{X}_{s,s+1}\right|}^{2}}{{\left|{V}_{s}\right|}^{2}}\right),$$
(3)

Accordingly, the active line loss in a branch of a DN, i.e. \((s, s+1)\), can be estimated using the expression (4) as,

$${P}_{l,(s,s+1)}={R}_{s,s+1}\left(\frac{\left({{P}_{s+1}}^{2}+{{Q}_{s+1}}^{2}\right)}{{\left|{V}_{s}\right|}^{2}}\right),$$
(4)

The total active power \(({P}_{LOSS})\) dissipation across the whale network, encompassing all branches, can be evaluated by summing up the loss across all lines of the DN, as given in Eq. (5).

$${P}_{LOSS}=\sum_{i=1}^{n-1}{P}_{l,i} ,$$
(5)

The main focus of optimal DG installation problems is to boost the positive effects while mitigating the negative impacts on power systems. Therefore, the key contribution of the paper is to develop the capabilities of the PDO method in determining the optimal locations for single and multiple DGs, with the objective of diminishing the daily active line loss as defined in Eq. (6).

$$Fit=min\left(\frac{\sum_{t=1}^{24}{P}_{LOSS-DG}(t)}{\sum_{t=1}^{24}{P}_{LOSS-base}(t)}\right) .$$
(6)

Here, \({P}_{LOSS-DG}\) and \({P}_{LOSS-base}\) are the active power loss with and without DG, respectively. The optimization of Eq. (6) is achieved by utilizing the proposed algorithm algorithm to meet the equality and inequality restrictions, as depicted in the following subsection.

Network constraints

Power balance constraints

To keep the flow of active and reactive power in the system balanced, Eqs. (7) and (8)34 show the link between the power from the DG and the substation, as well as the system loss and the load demand.

$${P}_{sub}+\sum_{g=1}^{{n}_{dg}}{P}_{DG, g}= \sum_{h=1}^{n}{P}_{D,h}+\sum_{j=1}^{n-1}{P}_{l,j},$$
(7)
$${Q}_{sub}+\sum_{g=1}^{{n}_{dg}}{Q}_{DG,g}= \sum_{h=1}^{n}{Q}_{D,h}+\sum_{j=1}^{n-1}{Q}_{l,j},$$
(8)

where, \({P}_{sub}\) and \({Q}_{sub}\) are respectively corresponding to the active and reactive power injected by the grid. \({P}_{DG}\) and \({Q}_{DG}\), respectively, symbolize the active and reactive power supplied by the DGs. The total number of DGs and the reactive power loss are denoted by \({n}_{dg}\) and \({Q}_{l}\), respectively.

Inequality constraints

The capacity constraints of DG integrated into DN are given below:

$${P}_{DG, Total}\le \left({P}_{D, Total}+{P}_{PLOSS}\right) ,$$
(9)
$${Q}_{DG, Total}\le \left({Q}_{D, Total}+{Q}_{PLOSS}\right),$$
(10)
$${P}_{DG,min}\le {P}_{DG}\le {P}_{DG, max} ,$$
(11)
$${PF}_{DG, min}\le {PF}_{DG}\le {PF}_{DG, max},$$
(12)

where, \({PF}_{DG, min}\) and \({PF}_{DG, max}\) show the minimum and maximum boundaries of the OPF of the DG units, respectively. The upper and lower boundaries of the power generated by the DG is presented by \({P}_{DG,min}\) and \({P}_{DG,max}\), respectively. In this paper, the limitations of DG's active power exist within the range of \([0.3, 3]\) MW, while its power factor is within 0.7 and 1, respectively.

Connecting DGs to the grid will significantly impact the voltage at each bus. Hence, it is crucial to ensure that all node voltages remain within the defined limits35,36 and at the fundamental frequency.

$${V}_{j,min}\le {V}_{j}\le {V}_{j, max} .$$
(13)

Here, \({V}_{j,min}\) and \({V}_{j,max}\) are respectively the lower and upper voltage magnitudes at node \(j\). These boundaries are chosen to be 5% of nominal values for satisfying good voltage stability.

Ultimately, the slack bus is excluded from the candidate nodes for integrating DGs; thus, the possible location for the DG allocation is constrained by Eq. (14), which follows36.

$${2\le Loc}_{DG}\le {n}_{c},$$
(14)

where, \({n}_{c}\) symbolizes the number of nodes that are candidates for DG installation. Note that, this paper utilizes the active power loss sensitivity (APLS) index to specify the feasible nodes for installing DGs to decrease the space of the search agents and decline the computational time of the optimizer, as depicted in Fig. 2, follows10. The possible nodes for installing DGs are approximately 36% of the system's buses.

Figure 2
figure 2

APLS index for the IEEE 69-bus distribution system.

Calculation of performance indices

The impact of the optimal allocation of DGs on the performance of the DN is evaluated using four indices, as described below. These parameters comprise the total voltage deviation (TVD), summation voltage stability (SVS) index, power loss mitigation (PLM) index, and penetration level (PL) of the DGs.

The TVD is a crucial metric for determining the voltage quality; it is the aggregate of all the buses' voltage magnitudes relative to the swing bus voltage. Also, while assessing the reliability of a service, it is an essential metric to consider. Equation (15) can evaluate the TVD, follows37. In this equation, \({\text{V}}_{\text{j}}\), and \({\text{V}}_{\text{swing.}}\) refer to the \(jth\) bus voltage magnitude and the swing bus voltage, respectively.

$$TVD=\sum_{j=1}^{n}\left|{V}_{swing.}-{V}_{j}\right|.$$
(15)

Moreover, it is critical to maintain a suitable range for the bus voltages at the distribution system level to prevent the occurrence of the earlier power system collapse. The voltage stability index (VSI) at bus \((s+1)\) can be measured using the following equation38:

$${VSI}_{\left(s+1\right)}={\left|{V}_{(s)}\right|}^{4}-4{\left({P}_{\left(s+1\right)}{X}_{\left(s,s+1\right)}-{Q}_{\left(s\right)}{R}_{\left(s,s+1\right)}\right)}^{2}-4{\left|{V}_{\left(s\right)}\right|}^{2}\left({Q}_{\left(s+1\right)}{X}_{\left(s,s+1\right)}+{P}_{\left(s+1\right)}{R}_{\left(s,s+1\right)}\right) .$$
(16)

Here, the real and reactive power at bus \(s+1\) are denoted by \({P}_{\left(s+1\right)}\) and \({Q}_{\left(s+1\right)}\), respectively; \({V}_{(s)}\) refers to the voltage at bus \(s\). Thus, the SVS index for the whale number of the system's bus is given below.

$$SVS=\sum_{k=1}^{n}{VSI}_{k} .$$
(17)

Equation (18) determines the PLM index, which is used to assess the percent reduction in power loss after deployment of DGs.

$$PLM=\frac{{P}_{LOSS-base}-{P}_{LOSS-DG}}{{P}_{LOSS-base}} \times 100.$$
(18)

Ultimately, the penetration level (PL) of the DGs, considering different technologies, is given by Eq. (19)39. In this formula, the total active power of the DG is represented by \({P}_{DG}\), while \({P}_{D}\) refers to the total demand of the system.

$$PL=\frac{{P}_{DG}}{{P}_{D}} \times 100 .$$
(19)

Probabilistic models of generation and demand

In this section, we present the mathematical representation of the power produced by wind turbines and photovoltaic systems considering the uncertain nature of solar irradiation and wind speed. Additionally, we incorporate the time-varying characteristics of loads to account for the complete uncertainties associated with generation and demand.

Photovoltaic modelling

The solar radiation variation throughout the day can be represented using the beta probability distribution function (BetaPDF) based on historical data gathered over a specific time period. To achieve this, the daily data is divided into 24-h segments, and the hourly mean and standard deviation (std) of radiation data are used. By discretizing the solar radiation values of each time segment into 20 states with a step size of 0.05 kW/m2, the BetaPDF is employed to capture the distributions in a discrete form. Subsequently, the expected power output per hour can be calculated. Recent studies, such as40,41, have utilized the beta distribution to model the intermittent characteristics of solar radiation, as demonstrated in Ref.42. The probability description of solar radiation can be expressed as follows.

$${P}_{\beta }\left(S\right)=\left\{\begin{array}{ll}\frac{\Gamma \left(\varphi +\varepsilon \right)}{\Gamma \left(\varphi \right)+\gamma \left(\varepsilon \right)}{s}^{\varphi -1}{(1-S)}^{\varepsilon -1} & \quad 0\le s\le 1, \varepsilon ,\varphi \ge 0 \\ 0 & \quad \text{ else}\end{array}\right.$$
(20)

Here, \({\text{P}}_{\upbeta }\left(\text{S}\right)\) symbolize the beta distribution function of \(S\), while \(\Gamma\) represents the gamma function. \(\text{S}\) signifies a random variable of solar radiation in kW/m2. The mean \((a)\) and std \((b)\) of the solar radiation are mainly adopted to form the shape of the beta distribution, as per Eqs. (21) and (22)42.

$$\varphi =\left(1-a\right)\left(\frac{\Gamma \left(1+a\right)}{{b}^{2}}-1\right) ,$$
(21)
$$\varepsilon =\frac{a\varphi }{1-a},$$
(22)

The probability of solar radiation at a particular time may be specified using the aggregate distribution function (\({\rho }_{s}\)), as depicted in expression (23). While, \({S}_{1}\) and \({S}_{2}\) represent the constraints of the solar radiation state.

$${\rho }_{s}=\underset{{s}_{1}}{\overset{{s}_{2}}{\int }}{P}_{\beta }\left(S\right)dS.$$
(23)

The ambient temperature and solar radiation of the location are the principal governing parameters that influence the power produced by the PV module. The generated output power of the PV module, \({P}_{pv}\left(S\right)\) at a specific solar irradiance \(S\), can be provided by Eq. (24), follows42.

$${P}_{pv}\left(S\right)=FF\times N\times {I}_{i}\times {V}_{v},$$
(24)
$$FF=\frac{{I}_{mp}\times {V}_{mp}}{{I}_{sc}\times {V}_{oc}},$$
(25)
$${V}_{v}={V}_{oc}-{T}_{c}\times {K}_{v},$$
(26)
$${I}_{i}=S \left[{I}_{sc}+{K}_{i}\times \left({T}_{c}-25\right)\right],$$
(27)
$${T}_{c}={T}_{a}+S\left(\frac{{T}_{o}-20}{0.8}\right),$$
(28)

where, \(FF\), \(N\) symbolize the fill factor and the total number of PV modules, respectively. \({I}_{mp}\) and \({V}_{mp}\) are the corresponding current and voltage at maximum power, respectively, while \({I}_{sc}\) and \({V}_{oc}\) denote respectively the short circuit current and open circuit voltage. \({T}_{o}\) and \({T}_{a}\) are the normal operating temperature and ambient temperature in °C; \({K}_{i}\) and \({K}_{v}\) illustrate respectively the temperature coefficients of current and voltage in A/℃ and V/°C.

For a given period \(t\), the predicted average power output of a photovoltaic system \({P}_{pv-net}(t)\), may be determined by the following equation.

$${P}_{pv-net}\left(t\right)=\underset{0}{\overset{t}{\int }}{P}_{pv}\left(S\right) {\rho }_{s} dS.$$
(29)

Therefore, the normalized PV production for a day can be obtained by finding the average predicted power for each hour, as depicted in Fig. 3. Figure 4 clarifies the beta distribution representing the solar irradiance at 9.00 a.m., with a state value of 0.05 kW/m2.

Figure 3
figure 3

Normalized PV-generated power profile over 24 h.

Figure 4
figure 4

Beta distribution for the solar irradiance at 9.00 a.m.

Wind turbine modelling

Weibull probability distribution function (WeibullPDF) has been implemented43,44 to characterize the probabilistic nature of wind speed over a certain time interval. For a given wind speed \(v(m/s)\) at the \(t\)-time, the Weibull distribution \({W}_{v}\left(v\right)\), may be given as.

$${W}_{v}\left(v\right)=\frac{k}{c}{\left(\frac{v}{c}\right)}^{k-1}\text{exp}\left(-{\left(\frac{v}{c}\right)}^{k}\right) \forall c>1; v>0,$$
(30)

The following relations, Eqs. (31) and (32) describe the scale factor \((c)\) and shape parameter \((k)\) at a t-time interval, which are dependent on the mean (\(\mu\)) and std (\(\sigma\)) of wind speed.

$$k={\left(\frac{\sigma }{\mu }\right)}^{-1.086},$$
(31)
$$c=\frac{\mu }{\Gamma \left(1+\frac{1}{k}\right)}.$$
(32)

As mentioned, to determine the amount of energy generated by DGs powered by the WT technology, the continuous PDF for a certain period has been partitioned into states (intervals) in which the wind velocity fall within predetermined restrictions45. In this study, each time segment of wind speed has been divided into 15 states with a step of 1 m/s, and the probability of all these possible states governs the power produced by the WT for that time. Hence, the average power of WT per hour \(({P}_{wt})\) corresponding to a particular t-time interval, can be expressed by Eq. (33). Figure 5 shows a typical day for one year of the normalized output power of WT.

Figure 5
figure 5

Normalized WT-generated power profile for 24 h.

$${P}_{wt}=\sum_{i=1}^{{N}_{s}}{P}_{wt}\left({v}_{i}\right)*{F}_{w}\left({v}_{i}\right).$$
(33)

Here, \({N}_{s}\) represents the total number of wind speed discrete levels. The probability of the wind speed \(({F}_{w}\left(v\right)\)) for every level at any certain period \(t\), is computed as Eq. (34). The WeibullPDF of wind speed at 7 a.m. is represented in Fig. 6.

Figure 6
figure 6

The WeibullPDF of wind speed at 7 a.m.

$${F}_{w}\left(v\right)=\underset{{v}_{1}}{\overset{{v}_{2}}{\int }}{W}_{v}\left(v\right) dv ,$$
(34)

and the output power of WT with the average wind speed of \({v}_{avg}\), for a stage \(i\), is formulated as per Eq. (35).

$${P}_{wt}\left(v\right)=\left\{\begin{array}{ll}0 & \quad {v}_{cout} <{v}_{avg}<{v}_{cin}\\ {K}_{1}\times {v}_{avg}^{3}+{K}_{1}\times {P}_{n} & \quad {v}_{cin}<{v}_{avg} < {v}_{n} \\ {P}_{n} & \quad {v}_{n}\le {v}_{avg}\le {v}_{cout}\end{array}\right.$$
(35)

where, \({P}_{n}\) and \({v}_{cout}\) identify, respectively, the nominal rated power of wind turbine and cut-out wind speed. \({K}_{1}\) and \({K}_{2}\) are constants that mainly depend on the cut-in speed \({(v}_{cin})\) and nominal wind speed \(({v}_{n})\), respectively, and are formulated as43.

$${K}_{1}=\frac{{P}_{n}}{\left({v}_{n}^{3}-{v}_{cin}^{3}\right)},$$
(36)
$${K}_{2}=\frac{{v}_{cin}^{3}}{\left({v}_{n}^{3}-{v}_{cin}^{3}\right)}.$$
(37)

Load modelling

This paper addresses the time-variant load demands in the distribution networks, considering the need to supply dynamic loads. It examines industrial, residential, and commercial dynamic load models to identify the appropriate location and capacity of DGs using an analytical approach, as described in Ref.9. Figure 7 illustrates the normalized load pattern for one day, showcasing the maximum demand of 1 p.u., for these three types of demands. Equations (38) and (39) in Ref.46 express the mathematical representation of voltage-dependent dynamic load patterns during a specific time.

Figure 7
figure 7

Commercial, residential, and industrial load patterns in p.u. for 24 h.

$${P}_{g}^{\prime}\left(t\right)={P}_{g}\left(t\right)\times {{V}_{g}}^{{e}_{ac}} ,$$
(38)
$${Q}_{g}^{\prime}\left(t\right)={Q}_{g}\left(t\right)\times {{V}_{g}}^{{e}_{rc}}.$$
(39)

Here, \({P}_{g}\left(t\right)\) and \({P}_{g}\left(t\right)\) are respectively the active and reactive power demand at bus \(g\), while \(Q^{\prime}_{g} \left( t \right)\) and \(P^{\prime}_{g} \left( t \right)\) denote the injected reactive and real power at node \(g\). The exponential reactive and real load voltages are symbolized by \({e}_{rc}\) and \({e}_{ac}\), respectively. The exponential coefficient \(({e}_{ac})\) value is 0.920, 6.0, and 3.40 for residential, industrial, and commercial demand patterns, respectively. Similarly, The value of the exponential coefficient \(({e}_{rc})\) is 4.040, 0.180, and 1.510 for residential, industrial, and commercial demand patterns, respectively.

Optimization technique

Original prairie dog optimizer

The prairie dog optimization is a metaheuristic algorithm inspired by the behavior of prairie dogs in nature. This section presents the mathematical formulas of PDO along with its optimization techniques. In nature, prairie dogs engage in various activities throughout the day, such as eating, evading predators, creating and maintaining holes, and searching for food31. They exhibit caution when foraging to avoid predators and use signals and sounds to communicate with other individuals. These signals convey information about the presence of predators, food availability, and more. Notably, prairie dogs can recognize different predators and their hunting patterns.

To mathematically model prairie dog behavior, certain assumptions are considered:

  • The population consists of a certain number of prairie dogs \({n}_{p}\) organized into cliques, with a total of \(m\) cliques.

  • The entire population is divided into multiple precincts, with dogs from the same clique being assigned to the same precinct.

  • Initially, ten holes are required in each precinct, and this number increases to 100 over time.

  • Two types of signals are used: one indicating a new food source and the other signaling anti-hunting measures.

  • The exploration phase involves searching for food and building holes, while the exploitation phase focuses on anti-hunting operations.

  • Similar activities are performed by other cliques, and the solution space is divided into precincts (cliques). The exploitation and exploration operations are repeated for the number of cliques present.

The PDO optimizer starts with random population in the initial generation, similar to all other metaheuristics algorithms. Assume, the number of dogs is \({n}_{p}\) in the same coterie, then the location of \({i}^{th}\) in every coterie, which has a total number of \(m\), can be given by the following equation.

$$CT= \left(\begin{array}{cc}\begin{array}{ccc}{CT}_{\text{1,1}}& {CT}_{\text{1,2}}& \dots \\ {CT}_{\text{2,1}}& {CT}_{\text{2,2}}& \dots \end{array}& \begin{array}{cc}{CT}_{1,d-1}& {CT}_{1,d}\\ {CT}_{2,d-1}& {CT}_{2,d}\end{array}\\ \begin{array}{ccc}.& .& \dots \\ {CT}_{m,1}& {CT}_{m,2}& \dots \end{array}& \begin{array}{cc}.& .\\ {CT}_{m,d-1}& {CT}_{m,d}\end{array}\end{array}\right),$$
(40)

where \({CT}_{i,j}\) refers to the dimension number \(j\) of the ith individual. The next equation gives the location of the dogs in the same coterie.

$$PD= \left(\begin{array}{cc}\begin{array}{ccc}{PD}_{\text{1,1}}& {PD}_{\text{1,2}}& \dots \\ {PD}_{\text{2,1}}& {PD}_{\text{2,2}}& \dots \end{array}& \begin{array}{cc}{PD}_{1,d-1}& {PD}_{1,d}\\ {PD}_{2,d-1}& {PD}_{2,d}\end{array}\\ \begin{array}{ccc}.& .& \dots \\ {PD}_{{n}_{p},1}& {PD}_{{n}_{p},2}& \dots \end{array}& \begin{array}{cc}.& .\\ {PD}_{{n}_{p},d-1}& {PD}_{{n}_{p},d}\end{array}\end{array}\right).$$
(41)

The following two equations show the location for every coterie and every dog using uniform distribution.

$${CT}_{i,j}=U\left(\text{0,1}\right)\times \left({UB}_{j}-{LB}_{j}\right)+{LB}_{j },$$
(42)
$${PD}_{i,j}=U\left(\text{0,1}\right)\times \left({UB}_{j}-{LB}_{j}\right)+{LB}_{j,}$$
(43)

where \({UB}_{j},{LB}_{j}\) refer to upper and lower bounds respectively, \(U\) is a uniformly distributed number with the interval [0, 1]. Equation (44) will be utilized to calculate the fitness function for all individuals and save them in an array.

$$f\left(PD\right)=\left[\begin{array}{l}{f}_{1}([{PD}_{\text{1,1}} {PD}_{\text{1,2}} \dots {PD}_{1,d-1} {PD}_{1,d}])\\ \begin{array}{l}{f}_{2}([{PD}_{\text{2,1}} {PD}_{\text{2,2}} \dots {PD}_{2,d-1} {PD}_{2,d}])\\ {f}_{.}([ . . \dots . . ])\end{array}\\ {f}_{{n}_{p}}([{PD}_{{n}_{p},1} {PD}_{{n}_{p},2} \dots {PD}_{{n}_{p},d-1} {PD}_{{n}_{p},d}])\end{array}\right].$$
(44)

Exploration phase

Exploration plays a vital role in every optimization algorithm, and the PDO incorporates exploration through the activities of food seeking and hole building. When prairie dogs face a scarcity of food in their current location, they instinctively move to new locations, thoroughly exploring the entire search space in search of nutrition resources or better solutions. The construction of holes is equally crucial for their survival, providing protection against predators and contributing to a healthy environment.

Prairie dogs typically reside in colonies that are divided into distinct areas or family units. Each group of prairie dogs explores and constructs holes within their designated boundaries. The exploration process occurs collectively, and they relocate to new locations only when there is a threat from predators. The PDO is divided into two phases: exploration and exploitation, which are based on four distinct scenarios. The total number of iterations is separated into four groups, with the first two categories using exploration and the following two categories employing exploitation. The first two parts utilized for exploration phase are applicable when \(iter\) is less than \(\frac{{Max}_{iter}}{4}\) or when \(\frac{{Max}_{iter}}{4}\) is less than \(\frac{{Max}_{iter}}{4}\) but less than \(\frac{{Max}_{iter}}{2}\). The change in position for searching food and constructing new holes can be described by the following formulas:

$${PD}_{i+1,j+1}={GBest}_{i,j}-{eCBest}_{i,j}\times \rho -{CPD}_{i,j}\times Levy\left({n}_{p}\right) \quad \forall iter<\frac{{Max}_{iter}}{4}$$
(45)
$${PD}_{i+1,j+1}={GBest}_{i,j}\times rPD \times DS \times Levy\left({n}_{p}\right)\quad \forall \frac{{Max}_{iter}}{4}\le iter<\frac{{Max}_{iter}}{2}$$
(46)

where, \({GBest}_{i,j}\) signifies the best individual, \({eCBest}_{i,j}\) is the obtained best individual effects as shown in Eq. (47), \({CPD}_{i,j}\) refers to the effect of randomized cumulative as expressed in Eq. (48), \(DS\) refers to the strength of coterie’s digging, and \(rPD\) is the location of random individual, the specific food source alert \((\rho )\) has a set frequency of 0.1 kHz, \(Levy\) is a leavy distribution, which is recognized to promote a more effective and efficient exploration of the issue search space.

$${eCBest}_{i+1,j+1}={GBest}_{i,j}\times \Delta +\frac{{PD}_{i,j} \times mean({PD}_{{n}_{p},m})}{{GBest}_{i,j}\times \left({UB}_{j}-{LB}_{j}\right)+\Delta } ,$$
(47)
$${CPD}_{i,j}=\frac{{GBest}_{i,j}-{rPD}_{i,j}}{{GBest}_{i,j}+\Delta },$$
(48)
$$DS=1.5\times r\times {\left(1-\frac{iter}{{Max}_{iter}}\right)}^{\left(2\frac{iter}{{Max}_{iter}}\right)} .$$
(49)

In the above equations, \(r\) refers to random property for guaranteeing exploration and \(\Delta\) refers to minor value which calculates difference that exist in the prairie dogs.

Exploitation phase

This section focuses on the exploitation behavior in PDO. The exploitation phase of the optimization process utilizes the response of prairie dogs to two distinct signals. Prairie dogs use different sounds to communicate with each other in various situations, such as signaling the availability of food or the presence of predators. These communication and interaction skills are crucial for meeting the nutritional requirements of the dogs and improving their defensive capabilities against predators. These behaviors are mathematically simulated through the expressions given in Eqs. (50) and (51). Additionally, the flowchart of the original PDO is illustrated in Fig. 8.

$${PD}_{i+1,j+1}={GBest}_{i,j}-{eCBest}_{i,j}\times \tau -{CPD}_{i,j}\times rand \quad \forall \frac{{Max}_{iter}}{2}\le iter<3\frac{{Max}_{iter}}{4}$$
(50)
$${PD}_{i+1,j+1}={GBest}_{i,j}\times PE \times rand \quad \forall 3\frac{{Max}_{iter}}{4}\le iter<{Max}_{iter}$$
(51)

where, \(PE\) refers to the impact of the predator and can be given in the following equation and \(\tau\) signifies a small number indicating the quality of the food supply.

Figure 8
figure 8

Flowchart of the original PDO algorithm.

$$PE=1.5\times {\left(1-\frac{iter}{{Max}_{iter}}\right)}^{\left(2\frac{iter}{{Max}_{iter}}\right)}.$$
(52)

Modified Prairie dog optimizer (mPDO)

The original PDO has limitations like imbalanced exploration and exploitation, susceptibility to local suboptimal regions, and premature convergence. To overcome these drawbacks, this study presents a new version of the prairie optimizer. Our proposed optimizer incorporates a novel exploration phase inspired by the slime mold algorithm (SMA)47 food approach. We enhance the explorative capability of mPDO by introducing the smell index parameter from SMA. The calculation of the smell index weight is as follows:

$$\overrightarrow{W(SmellIndex(i))}=\left\{\begin{array}{cc}1+r.\text{log}(\frac{GBest-SO(i)}{GBest-wf}+1)& condition\\ 1-r.\text{log}(\frac{GBest-SO(i)}{GBest-wf}+1)& others\end{array}\right.$$
(53)

where, \(GBest\) refers to the best solution; \(wf\) is the worst existed solution; \(SO\) is the smell order of the sorted fitness function. We also introduce a non-linear operator called \(A\), which calculated as follows:

$$A=\text{arctanh}\left(-\left(\frac{iter}{{max}_{iter}}\right)+1\right) .$$
(54)

Then, the novel exploration updating equation can be formulated as follows:

$${PD}_{i}=\left\{\begin{array}{ll}{GBest}_{i,j}+vb.(W*{PD}_{A}-{PD}_{B})& r<rand\\ {PD}_{A}+F.\propto . \left|{PD}_{A}-{PD}_{i}\right|& otherwisw\end{array}\right.$$
(55)

Here, \(vb\) is a value which falls in the range \([-A,A]\) and \(\propto\) can be calculated from \(exp\left(\frac{-iter}{{max}_{iter}}\right),\) where \(iter\), and \({max}_{iter}\) are respectively the current and total number of iterations, \(F\) is a random variable falls in the rand [− 1, 1], and \({PD}_{A}, {PD}_{B}\) refer to two different randomly chosen individuals. Algorithm 1 provides in depth the pseudo code of the developed mPDO algorithm.

Algorithm 1
figure a

Pseudo-code of the mPDO algorithm.

Numerical simulation and discussions

This section provides the mathematical validation of the modified algorithm compared with the other counterparts via cec2020 benchmark functions using different statistical metrics. Then, the mPDO is implemented to address the optimal inclusion of deterministic (the uncertainty associated with the generation and load demand is ignored) and stochastic (the uncertainty associated with the generation and load demand is considered) DGs in the 69-bus DN under numerous dynamic load behaviors. The main goal of the optimization model is to mitigate line loss in the system during the day.

Experimental validation of mPDO algorithm

In this subsection, we assess the performance of the mPDO algorithm on 10 different functions from the cec2020 test suite benchmark, which involves unimodal, multimodal, hybrid, and composite functions. To ensure a fair comparison, we compare mPDO with the original PDO and eight other algorithms: COVID optimizer algorithm (COVIDIAO)48, Chernobyl disaster optimizer (CDO)49, tunicate swarm algorithm (TSA)50, sine cosine algorithm (SCA)51, stochastic paint optimizer (SPO)52, Harris hawks optimizer (HHO)53, particle swarm optimization (PSO)54, and whale optimization algorithm (WOA)55. The default parameters of these metaheuristic optimization algorithms are used.

Each algorithm is independently executed 30 times, with a maximum of 1000 iterations and a population size of 30, to ensure fair comparisons. Performance parameters in this study include minimum, maximum, mean, and std of fitness values, as well as Wilcoxon rank-sum p-values. The implementation of the developed optimizer is written in MATLAB R2020b M files and executed on a personal computer equipped with an Intel Core (TM) i7 G15-5511, processor running at 2.3 GHz and 16 GB of RAM.

Statistical results

This subsection presents the outcomes of the mPDO compared to other competitors in terms of different metrics, as previously mentioned. These comparisons are recorded in Table 1 for a dimension of 10. The table reveals that mPDO achieved the top rank in six functions (F2, F4, F6, F8-F10), ranked second in F5, and third in F3-F7. This demonstrates the superiority of the suggested optimizer.

Table 1 Results of the suggested optimizer with other 9 algorithms.

Furthermore, mPDO delivers competitive results when compared to other approaches and achieves optimal values for nearly all of the cec2020 test functions. Table 1 confirms that the mPDO approach surpassed the other efficient algorithms in terms of Friedman rank test results.

The mPDO shows notable strengths in several benchmark functions. For instance, it achieves the best performance (rank 1) in functions F2, F4, F6, F8, and F9 in terms of minimum values. This indicates that mPDO is particularly effective at finding optimal or near-optimal solutions in these cases, demonstrating its robustness and efficiency in various scenarios.

In terms of average performance, mPDO often ranks among the top performers. For example, in functions F2, F3, F6, F9, and F10, it consistently shows competitive average values, highlighting its ability to maintain a good balance between exploration and exploitation throughout the optimization process.

Convergence curve

This subsection presents a graphical analysis of the convergence rate of mPDO across 10 functions from the cec2020 benchmark, with a dimension of 10. The convergence characteristics of all optimizers for these ten functions are depicted in Fig. 9. From this figure, it is evident that the proposed mPDO exhibits quick convergence rate compared to other methods, particularly for functions F2, F3, F4, F6, F8, F9, and F10. However, in certain cases such as functions F1, F5, and F7, mPDO becomes trapped in a near-optimal state. Nevertheless, it is worth noting that the suggested optimizer consistently achieves superior solutions in most cases, requiring fewer iterations. This rapid convergence property positions the mPDO algorithm as a viable tool for efficiently addressing online optimization issues that demand efficient calculation.

Figure 9
figure 9figure 9

Convergence curve of mPDO with other competitors.

Boxplot behavior analysis

Figure 10 illustrates the boxplot curves representing the mPDO, as well as its competitors, showcasing data distributions across various functions from cec2020 with a dimension of 10. The boxplots depict the minimum and maximum values achieved by the algorithms, represented by the edges of the whiskers. A narrow boxplot indicates a high level of agreement within the data.

Figure 10
figure 10

The curves of Boxplot curves for mPDO and other competitors optimizers over CEC0 2020 benchmark.

Analyzing the boxplots for the majority of functions, it is evident that the suggested mPDO approach exhibits the best distribution with lower values. Consequently, the mPDO algorithm outperforms other recent optimization algorithms in most cases, emphasizing its superior performance.

Wilcoxon rank sum test analysis

To validate the significance of the findings acquired by mPDO and other algorithms, a statistical test known as the Wilcoxon rank-sum test56 was conducted. This test was performed to demonstrate that the observed performance was not merely a result of chance. The results of the test, achieved at a significance level of 5% for most functions, are listed in Table 2. These results provide evidence that mPDO is a suitable and well-structured set of optimization rules, enabling the attainment of optimal solutions.

Table 2 Wilcoxon Rank sum test for mPDO vs compared algorithm cec2020.

DG optimal allocation problem

In this subsection, the proposed mPDO algorithm is applied to investigate the impacts of different dynamic load patterns on the performance of the 69-bus DN (shown in Fig. 11) and the scheduling of the PV and WT units. This is achieved under deterministic and stochastic DG optimum allocation challenges. Moreover, a comparative study is performed to evaluate the performance of the mPDO against the traditional PDO and other robust optimization approaches under constant power load requirements. The overall load demand for this distribution system, which includes 69 nodes and 68 lines, is 3801.5 kW and 2694.6 kVAR57. The base MVA and kV are, respectively, 100 and 12.66. The summation of reactive and active line losses of the network before allocating renewable DGs are 102.16 kVAR and 225.0012 kW, respectively, while the lowest voltage profile, TVD, and SVS index are, respectively, 0.90919 p.u., 1.8374, and 61.2173.

Figure 11
figure 11

The configuration of the 69-bus radial distribution feeders.

The hourly historical statistics of solar radiation58 and wind speed43 are utilized to accommodate the periodic characteristics of renewable energy resources. In this study, the average values for the four seasons through 24 h are adopted to express the uncertainty throughout a one practical day. The total number of iterations and population size are 200 and 50 across all studied scenarios. In summary, this research studies many optimization situations as below:

Case #1: Deterministic optimal plaining of PV and WT.

Case #2: Stochastic optimal planning of PV and WT under commercial demand.

Case #3: Stochastic optimal planning of PV and WT under industrial demand.

Case #4: Stochastic optimal planning of PV and WT under residential demand.

Case #5: Stochastic optimal planning of PV and WT under mixed demand.

Case #6: Synchronous optimum PV and WT allocation for the different load models.

Case#1: deterministic optimal plaining of PV and WT

Table 3 presents the findings of the mPDO for providing the optimal capacity and placement of single and multiple PV in the 69-bus system. The results are compared with the traditional PDO and other algorithms reported in the literature, assuming no hourly variation in solar radiation. In this instance, the PVs contribute only active power to the grid i.e., operate at UPF.

Table 3 Numerical simulations of the mPDO and other algorithms for incorporating PV into 69-bus DN without uncertainty.

The table demonstrates that the active power loss is reduced by 63.0122%, 68.1446%, and 69.1436% when employing one, two, and three PV units, respectively, in the test network. Furthermore, the corresponding TVD decreases from the base value of 1.8374 p.u. to 0.8729 p.u., 0.5002 p.u., and 0.4498 p.u. with the incorporation of one, two, and three PV units, respectively. Additionally, installing one, two, and three PV units enhances the SVS from the base value of 61.2173 p.u. to 64.6165 p.u., 66.0244 p.u., and 66.2205 p.u., respectively. It is worth noting that the number of state variables in this case increases to six when three units of PV systems are installed, considering the location and capacity variables.

To assess the efficiency of the mPDO, it is compared with the original PDO, bat algorithm (BA)59, PSO59, improved golden jackal optimization (IGJO)60, novel heuristic approach (NHA), novel stochastic fractal search algorithm (SFSA), quasi-oppositional-chaotic symbiotic organisms search algorithm (QOCSOS)29, and chaotic quasi-oppositional barnacles mating optimizer (CQOBMO-7)30. It is observed from Table 3 that the mPDO consistently beats the basic PDO and the state-of-the-art optimizers, exhibiting the lowest power loss when incorporating single and multiple PVs into the test system. This also demonstrated by Fig. 12, which illustrates convergence performance of the mPDO and the original algorithm. Accordingly, maximizes the technical benefits of the PV-based DG system.

Figure 12
figure 12

Convergence curves of the mPDO compared with the PDO for optimal allocating PVs in the 69-bus system without uncertainty.

As indicated in Tables 3 and 4, the WT has a more favorable impact compared to PV systems because it can contribute both active and reactive power to the grid. In this scenario, the mPDO achieves significant reductions in active power loss when integrating one, two, or three WT units into the test network, with percentages of 89.7028%, 96.7994%, and 98.1039% respectively. Incorporating one, two, or three WT units with OPF also results in a decrease in TVD from the base value of 1.8374 per unit (p.u.) to 0.5873 p.u., 0.1300 p.u., and 0.06449 p.u. respectively. Furthermore, the SVS index increases from 61.2173 p.u. (the base value) to 65.7205 p.u. (for one WT), 67.4823 p.u. (for two WTs), and 67.7427 p.u. (for three WTs). It is worth noting that the number of state variables raises to nine when three WTs are installed, considering the variables of location, size, and power factor.

Table 4 Numerical simulations of the mPDO and other algorithms for incorporating WT into 69-bus DN without uncertainty.

The efficacy of the mPDO algorithm is evaluated by comparing its results with those obtained from the traditional PDO, BA, PSO, NHA, SFSA, QOCSOS, and hybrid symbiotic organisms search algorithm (HSSA)61. Table 2 demonstrates that the integration of single and multiple PV units into the DN leads to considerable decline in power loss when using the mPDO, surpassing the performance of other rivals. Figure 13 illustrates the convergence behavior of both the improved and traditional PDO methods.

Figure 13
figure 13

Convergence curves of the mPDO compared with the PDO for optimal allocating WTs in the 69-bus system without uncertainty.

In summary, the mPDO exhibits faster and more stable convergence towards the optimal solution, as depicted in Figs. 12 and 13. Moreover, considering the ability of WT to inject reactive power, the integration of WT yields superior results compared to PV in terms of power loss reduction, voltage profile enhancement, and voltage stability improvement. Therefore, only mPDO is utilized in the subsequent sections to determine the optimal positioning and sizing of single and multiple PV and WT units integrated into the distribution system. This is done to reduce power loss per day while considering the stochastic nature of solar irradiance, variation in wind speed, and time-varying load demand patterns, including commercial, residential, and industrial demands.

Case #2: stochastic optimal planning of PV and WT under commercial demand

In this particular scenario, the total reactive load profile throughout 24 h amounts to 37,818.4235 kVAr, while the total active load demand is 53,353.5065 kW. Without the integration of WTs or PVs into the test system, the total reactive and active loss over 24 h is 491.2141 kVAr, and 2,173.9944 kW, respectively. However, by incorporating a single PV unit at node 61 using the mPDO, the active power loss of the system is significantly reduced to 1,124.5492 kWh for 24 h, achieving a 48.2727% reduction. Moreover, the optimal placement and sizing of two PV units at nodes 61 and 17 result in a system loss of 1,038.2363 kW, representing a further 4% improvement compared to the integration of a single PV unit. Furthermore, the deployment of three PVs at nodes 11, 17, and 61, with a net sizing of 3,030.4973 kW, alleviated the power loss to 1,021.7016 kW, achieving a slight additional reduction of 53.0035% compared to the two-PV configuration. The total energy generated by incorporating one, two, and three PV units into the test network amounts to 16,319.1394 kWh, 20,130.4336 kWh, and 22,808.8910 kWh, respectively. Figure 14 illustrates the total daily energy output when three PV units are integrated at nodes 11, 17, and 61, operating at UPF. The voltage profiles of the present system are graphically depicted in Fig. 15, revealing that the optimal sitting of three PVs is unable to meet the minimum voltage constraints. For instance, bus 65 exhibits the smallest voltage levels of approximately 0.9407 p.u at 7 a.m. and 0.9455 p.u at 8 a.m.

Figure14
figure 14

PV output power at nodes11, 17 and 61 using the mPDO algorithm during installing three PVs for the commercial load.

Figure 15
figure 15

Voltage profile of 69-bus DN during integrating three PVs for the commercial load type.

Alternatively, integrating one, two, and three WT units with OPF using the mPDO algorithm reduces the total energy loss over 24 h to 679.6316 kWh, 560.7521 kWh, and 539.2907 kWh, respectively, as listed in Table 5. The net energy injected into the grid by installing one, two, and three WT units amounts to 19,814.4213 kWh, 24,396.5031 kWh, and 27,469.4198 kWh, respectively. Unlike PV systems, the integration of three WT units achieves a significant reduction in daily active power loss, with a PLMI of 75.1936, as depicted in Fig. 16. This is attributed to the fact that WT units can supply apparent power (active and reactive), whereas PV systems only supply active power to the utility. The penetration level of renewable PV and WT is also noteworthy, with the highest penetration observed in the case of WT, particularly when three WTs are installed, reaching 51.4857%.

Table 5 Optimal incorporation of single and multiple PV and WT units integrated into 69-bus under commercial load type using mPDO algorithm.
Figure 16
figure 16

WT output power at nodes11, 17 and 61 using the mPDO algorithm during installing three WTs for the commercial load.

Figure 17 illustrates the voltage levels of the 69-bus system when three WTs are deployed at OPF. The inclusion of three WTs helps maintain the bus voltages within acceptable limits. Notably, there is a significant improvement in voltage levels when WT power is available, while a slight decline occurs during periods when WT power is absent, especially from 6 p.m. until the end of the day. In conclusion, the optimal deploying non-dispatchable renewable WT and PV systems into the 69-bus test network, accounting for their uncertainties and utilizing the time-varying commercial load model, significantly enhances loss reduction and voltage profile, highlighting the effectiveness of the mPDO algorithm.

Figure 17
figure 17

Voltage profile of 69-bus DN during integrating three WTs for the commercial load type.

Case #3: stochastic optimal planning of PV and WT under residential demand

In this case, the summation of the reactive and active loads over 24 h amount to 34,428.4221 kVAr and 48,570.9576 kW, respectively. Similarly, without the integration of WT or PV units into the test system, the total apparent power loss for 24 h is 1868.0756 kW + 850.4165 kVAr. The results presented in Table 6 demonstrate that incorporating a single PV unit at node 61 alleviates the active power loss of the network by 25.6221%, resulting in a daily loss of 1389.4353 kWh. Moreover, by strategically locating and sizing two PVs at buses 17 and 61, the system loss decreases to 1349.2406 kW, representing an improvement of approximately 2% compared to the integration of a single PV unit. Furthermore, deploying three PVs at nodes 11, 17, and 61 with a net power of 2,077.9086 kW decreases the active power loss by 28.1783% compared to the integration of two PVs. The energy generated by a single, two, and three PVs in the test network is 11,207.1613 kWh, 13,823.8395 kWh, and 15,639.2792 kWh, respectively. Figure 18 visualizes the solar PV-generated power during the day when three units are located at nodes 11, 17, and 61. However, as described in Fig. 19, the voltage profiles of the test network violate the minimum acceptable limits, indicating that even the best incorporation of three PV units cannot meet the strictest voltage requirements in this load profile. For example, node 65 experiences a voltage level as low as 0.9128 p.u. at 8 p.m. and 0.9093 p.u. at 9 p.m.

Table 6 Optimal incorporation of single and multiple PV and WT units integrated into 69-bus under residential load type using mPDO algorithm.
Figure 18
figure 18

PV output power at nodes11, 17 and 61 using the mPDO algorithm during installing three PVs for the residential load.

Figure 19
figure 19

Voltage profile of 69-bus DN during integrating three PVs for the residential load type.

The integration of WTs yields a significantly better reduction in energy loss, as evidenced in Table 6. Using the mPDO optimizer, the total active power loss for one day is mitigated to 1313.3289 kWh, 1268.3281 kWh, and 1260.2829 kWh by incorporating one, two, and three WT units, respectively, into the 69-bus network. The injected energies from the WT units are 12,441.3026 kWh, 15,292.6953 kWh, and 17,179.1904 kWh for one, two, and three units, respectively. Figure 20 illustrates the optimized WT profiles located at buses 11, 17, and 61, each with an OPF of 0.81515, 0.8339, and 0.8156, respectively. The PL of WT unit is 25.6147%, 31.4853%, and 35.3693% for one, two, and three units, respectively. The voltage magnitudes of the test network, shown in Fig. 21, indicates that the voltage magnitudes in most nodes remain within 5% of the nominal value, particularly after 7 p.m., when WT power generation is absent. Consequently, the integration of non-dispatchable renewable WT and PV systems, considering their uncertainties with the time-varying load model, leads to slight improvements in loss reduction and voltage profile within the 69-bus test network.

Figure 20
figure 20

WT output power at nodes11, 17 and 61 using the mPDO algorithm during installing three WTs for the residential load.

Figure 21
figure 21

Voltage profile of 69-bus DN during integrating three WTs for the residential load type.

Case #4: stochastic optimal planning of PV and WT under industrial demand

In the fourth scenario, the mPDO algorithm is adopted to address the scheduling of single and multiple PVs and WTs, considering the uncertainty of the industrial load model in the 69-bus, as well as the intermittence of solar irradiance and wind speed. This load profile exhibits a daily active demand of 50,285.8976 kW and a reactive demand of 35,644.0184 kVAr. With the original case, the total active power loss over a practical day is 1,890.2107 kWh, and the reactive power loss is 860.6678 kVAr.

Similar to the previous scenario, the mPDO is employed to identify the optimal inclusion of PVs and WTs in order to minimize energy loss. According to the results presented in Table 7, incorporating a single PV unit at node 61 reduces the energy loss of the network to 1553.5745 kWh, resulting in a reduction of 17.8095%. By strategically placing two PVs at buses 17 and 61, the energy loss is further reduced to 1524.4738 kWh, achieving a slight improvement of approximately 1.6% compared to a single PV unit. Additionally, deploying three PVs with a total capacity of 1,773.5428 kW at nodes 11, 17, and 61 (depicted in Fig. 22) leads to a reduction in energy loss of 19.6372%.

Table 7 Optimal incorporation of single and multiple PV and WT units integrated into 69-bus under industrial load type using mPDO algorithm.
Figure 22
figure 22

PV output power at nodes11, 17 and 61 using the mPDO algorithm during installing three PVs for the industrial load type.

The total active power output over 24 h for the PV system is 9,563.6475 kWh, 11,803.7588 kWh, and 13,348.4840 kWh, respectively, for the incorporation of one, two, and three PVs into the 69-bus DN. The voltage profile of the present test system after including multiple PVs using the mPDO is illustrated in Fig. 23. As seen in this figure, the optimum distribution of three PVs does not completely meet the voltage restrictions, specifically after 6 p.m.

Figure 23
figure 23

Voltage profile of 69-bus DN during integrating three PVs for the industrial load type.

As shown in Table 7, the mPDO is also applied to optimize the distribution of single and multiple WTs with the OPF in the 69-bus system under the industrial load pattern. The integration of 1, 2, or 3 WT units in the network results in a reduction of the daily active power loss by 1,374.7980 kWh, 1,331.6519 kWh, and 1,323.7414 kWh, respectively, with corresponding percentage reductions of 27.2675, 29.5501, and 29.9686. Furthermore, the injected energies of 12,015.2254 kWh, 14,807.2747 kWh, and 16,677.8832 kWh are achieved by incorporating one, two, and three WT units, respectively. The WT profiles are depicted in Fig. 24, with an optimal distribution at bus 11, bus 17, and bus 61, along with OPF of 0.81586, 0.8326, and 0.8146, respectively. Figure 25 illustrates the voltage profile of the test system, demonstrating that after 7 p.m., most nodes have voltage magnitudes lower than 5% of the nominal value due to the limited WT power production. Therefore, the optimum planning of WT and PV systems, considering the time-varying industrial demand model, leads to a partial enhancement in the loss alleviation and bus voltage magnitude of the 69-bus test network.

Figure 24
figure 24

WT output power at nodes11, 17 and 61 using the mPDO algorithm during installing three WTs for the industrial load type.

Figure 25
figure 25

Voltage profile of 69-bus DN during integrating three WTs for the industrial load type.

Case #5: stochastic optimal planning of PV and WT under mixed demand

In this case study, the optimized 69-bus DN encloses a mix of residential (buses 1–27, buses 47–52, buses 66–69), industrial (buses 26–33), and commercial loads. At the base scenario, the total kWh and kVAr are 49,694.0853 and 35,226.1325, respectively. The developed algorithm is adopted to offer the optimal inclusion of three PVs and WTs into the present system under a mixed load profile, as listed in Table 8. The best integration of three PVs decreases the energy loss to 1474.5365 kWh with a PLMI and Pl of 21% and 28.3148, respectively. On the other hand, the optimal deployment of three WTs operated with OPF mitigates the daily active power loss to 1297.7713 kWh with an enhancement of PLMI of 9.5% and an increased PL of 5.5% against the PV system. Further, the curve of the generated output power of the PV and WT installed at buses 11, 17, and 61 are displayed in Figs. 26 and 27, respectively.

Table 8 Optimal incorporation of single and multiple PV and WT units integrated into 69-bus under mixed load type using mPDO algorithm.
Figure 26
figure 26

PV output power at nodes11, 18 and 61 using the mPDO algorithm during installing three WTs for the mixed load type.

Figure 27
figure 27

WT output power at nodes11, 17 and 61 using the mPDO algorithm during installing three WTs for the mixed load type.

Figures 28 and 29 display the voltage profile during one practical day after incorporating multiple PVs and WTs for the mixed load demand. Because output power is frequently only available between 6:00 a.m. and 7:00 p.m. for PV systems and between 12:00 a.m. and 6:00 p.m. for WT, the system's voltage profile is confined under the minimal limit, especially from 7:00 p.m. to 12:00 a.m. As a result, the type of load and DG technology has a significant influence on the voltage profile of the distribution grids.

Figure 28
figure 28

Voltage profile of 69-bus DN during integrating three PVs for the mixed load type.

Figure 29
figure 29

Voltage profile of 69-bus DN during integrating three WTs for the mixed load type.

Case #6: synchronous optimum PV and WT allocation for the different load models

Unlike the previous scenarios, the mPDO is applied to study the impacts of different dynamic load profiles on the performance of the 69-bus DN, considering the simultaneous plaining of multiple PVs and WTs (as listed in Table 9). Figure 30 illustrates the power output curves of the integrated PVs and WTs for three different load patterns: commercial, residential, and industrial.

Table 9 Simultaneous integration of multiple PV and WT units into 69-bus DN using the mPDO algorithm under uncertainty for different load type.
Figure 30
figure 30

WT and PV output power curves using the mPDO algorithm during simultaneous integration of three WTs and three PVs for different load type.

For the commercial load type, three PVs with a net capacity of 1566.6621 kW are installed at nodes 12, 60, and 64. Three WTs are located at bus 17, bus 49, and bus 61, with OPF of 0.7000, 0.8125, and 0.7000 respectively. The total energy generated by the multiple PVs and WTs is 11,791.4062 kWh and 24,438.7642 kWh, respectively, resulting in a PL of 67.9059%. By deploying multiple PVs and WTs simultaneously, a substantial reduction in losses is accomplished under the time-varying commercial load pattern. The loss reduction amounts to 395.9191 kWh, which corresponds to 81.7884% improvement.

Using the mPDO algorithm, the appropriate sizing and placement of three PVs and three WTs are optimized to address the residential and industrial load requirements. This optimization results in energy loss reductions of 1147.4072 kWh and 1279.5147 kWh, with PLs of 49.1827% and 44.2924% respectively.

Figures 31 and 32 depict the daily active power loss and system voltage profiles for different load patterns in the 69-bus system when multiple WTs and PVs are integrated simultaneously. These figures show that the integration of PVs with WTs improves the voltage profile and reduces energy loss to a lesser extent for the residential and industrial load profiles, in comparison to the commercial load profile. It can be observed from Fig. 31 that the performance of the distribution system is highly influenced by the dynamic load behaviour and the type of DG technology. For instance, the optimal inclusion of multiple WTs and PVs simultaneously satisfies the voltage requirements for the commercial load profile. However, the voltage levels drop below the allowable voltage range for residential and commercial loads for more than three hours during the day.

Figure 31
figure 31

Daily active power loss for different loads of the 69-bus with and without simultaneous integration of three WTs and three PVs using the mPDO algorithm.

Figure 32
figure 32

Voltage profile of 69-bus DN during simultaneous integration of three WTs and three PVs for different load type.

In addition, Fig. 33 illustrates the convergence curves of the mPDO algorithm for the three different load profiles. This provides further evidence that the mPDO method is capable of solving the optimum allocation of DGs under both deterministic and probabilistic situations with a high degree of efficiency and superiority.

Figure 33
figure 33

Convergence characteristics of the mPDO algorithm for simultaneous integration of three WTs and three PVs for different load type.

Conclusion and future work

This paper has studied the significant impacts of various dynamic load behaviors on the performance of the distribution system and the planning of the PV-based and WT-based DGs. This has been accomplished using a modified prairie dog optimization algorithm that incorporates a new exploration phase inspired by the slim mold algorithm. Efficient probability distribution models are expressed to model the uncertainty associated with solar irradiation and wind velocity. The optimization model considers practical requirements to minimize energy loss in the distribution network. The effectiveness of the mPDO algorithm has been verified with the aid of the cec2020 benchmark functions, and a comparative study with the original PDO and other recognized algorithms is accomplished through multiple statistical metrics. The deterministic optimal inclusion of single and multiple PV and WT in the 69-bus DN is specified to mitigate active power loss. The simultaneous deployment of PVs and WTs in the test system is also studied, considering commercial, residential, industrial, and mixed load profiles. The simulation results demonstrated that generation and demand uncertainty had a significant impact on distribution grid performance and optimal DG inclusion. The developed algorithm successfully achieves high penetration levels for synchronous integration of WT and PV units under different load demands, leading to significant energy savings. As an illustration, the penetration levels for industrial, residential, and commercial loads are 44.2924%, 49.1827%, and 67.9059%, respectively, with PLMI of 32.3084%, 38.5781%, and 81.7884%.

The proposed optimizer could be applied to address various complex optimization problems in future research. Furthermore, the integration of dispatchable sources, such as biomass, with wind turbine generators will be explored to enhance their dispatchability and overall system reliability. Additionally, potential future work includes incorporating energy storage systems, utilizing dynamic load models, exploring multi-objective optimization approaches, conducting comprehensive economic analyses, and assessing the impact of renewable energy integration on grid resilience and stability.

Future work on the mPDO can explore several promising directions to enhance its capabilities and expand its applicability. One potential avenue is the development of a binary version of the mPDO, which would enable it to handle discrete optimization problems such as feature selection, clustering, and the knapsack problem more effectively. Additionally, creating a multi-objective version of the mPDO can facilitate its application to problems with multiple conflicting objectives, allowing for a more comprehensive optimization process in complex scenarios.

Furthermore, the incorporation of advanced operators, such as local escape operators and opposition-based techniques, can be investigated to improve the optimizer's ability to balance exploration and exploitation. These enhancements could help the mPDO avoid local minima and better navigate the solution space, leading to more robust optimization performance. By pursuing these improvements, the mPDO can be made more versatile and powerful, opening up new possibilities for its application across a broader range of optimization problems.