Boosting prairie dog optimizer for optimal planning of multiple wind turbine and photovoltaic distributed generators in distribution networks considering different dynamic load models

Deploying distributed generators (DGs) supplied by renewable energy resources poses a significant challenge for efficient power grid operation. The proper sizing and placement of DGs, specifically photovoltaics (PVs) and wind turbines (WTs), remain crucial due to the uncertain characteristics of renewable energy. To overcome these challenges, this study explores an enhanced version of a meta-heuristic technique called the prairie dog optimizer (PDO). The modified prairie dogs optimizer (mPDO) incorporates a novel exploration phase inspired by the slime mold algorithm (SMA) food approach. The mPDO algorithm is proposed to analyze the substantial effects of different dynamic load characteristics on the performance of the distribution networks and the designing of the PV-based and WT-based DGs. The optimization problem incorporates various operational constraints to mitigate energy loss in the distribution networks. Further, the study addresses uncertainties related to the random characteristics of PV and WT power outputs by employing appropriate probability distributions. The mPDO algorithm is evaluated using cec2020 benchmark suit test functions and rigorous statistical analysis to mathematically measure its success rate and efficacy while considering different type of optimization problems. The developed mPDO algorithm is applied to incorporate both PV and WT units, individually and simultaneously, into the IEEE 69-bus distribution network. This is achieved considering residential, commercial, industrial, and mixed time-varying voltage-dependent load demands. The efficacy of the modified algorithm is demonstrated using the standard benchmark functions, and a comparative analysis is conducted with the original PDO and other well-known algorithms, utilizing various statistical metrics. The numerical findings emphasize the significant influence of load type and time-varying generation in DG planning. Moreover, the mPDO algorithm beats the alternatives and improves distributed generators' technical advantages across all examined scenarios.

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 structures 32 , 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.

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 connect- ing line has a resistance and reactance of (R s,s+1 + jX 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 integrat- ing 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 below 33 .The BFS is executed with a tolerance of 10 6 to solve the distribution system load flow.
(1) P s+1 = P wt,s+1 + P s − P D,s+1 − R s,s+1 P www.nature.com/scientificreports/Accordingly, the active line loss in a branch of a DN, i.e. (s, s + 1) , can be estimated using the expression (4) as, The total active power (P LOSS ) dissipation across the whale network, encompassing all branches, can be evalu- ated by summing up the loss across all lines of the DN, as given in Eq. (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).
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.

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.
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: (2)  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 limits 35,36 and at the fundamental frequency.
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 follows 36 .
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, follows 10 .The possible nodes for installing DGs are approximately 36% of the system's buses.

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, follows 37 .In this equation, V j , and V swing.refer to the jth bus voltage magnitude and the swing bus voltage, respectively.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 equation 38 : Here, the real and reactive power at bus s + 1 are denoted by P (s+1) and Q (s+1) , 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.www.nature.com/scientificreports/Equation ( 18) determines the PLM index, which is used to assess the percent reduction in power loss after deployment of DGs.
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.

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/m 2 , 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 as 40,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.
Here, P β (S) symbolize the beta distribution function of S , while Ŵ represents the gamma function.S signifies a random variable of solar radiation in kW/m 2 .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 .
The probability of solar radiation at a particular time may be specified using the aggregate distribution function ( ρ s ), as depicted in expression (23).While, S 1 and S 2 represent the constraints of the solar radiation state.
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 (S) at a specific solar irradiance S , can be provided by Eq. ( 24), follows 42 .
where, FF , N symbolize the fill factor and the total number of PV modules, respectively.I mp and V mp are the cor- responding 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 deter- mined by the following equation.
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/m 2 .

Wind turbine modelling
Weibull probability distribution function (WeibullPDF) has been implemented 43,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 (v) , may be given as.
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 ( µ ) and std ( σ ) of wind speed.
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 restrictions 45 .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 (29) P pv−net (t) = t 0 P pv (S)ρ s dS.www.nature.com/scientificreports/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.
Here, N s represents the total number of wind speed discrete levels.The probability of the wind speed (F w (v) ) for every level at any certain period t , is computed as Eq.(34).The WeibullPDF of wind speed at 7 a.m. is rep- resented in Fig. 6. and the output power of WT with the average wind speed of v avg , for a stage i , is formulated as per Eq.(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 as 43 .

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.
Here, P g (t) and P g (t) are respectively the active and reactive power demand at bus g , while Q ′ g (t) and P ′ g (t) denote the injected reactive and real power at node g .The exponential reactive and real load voltages are sym- bolized 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 food 31 .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 meas- ures.• 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.
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.
( www.nature.com/scientificreports/ The following two equations show the location for every coterie and every dog using uniform distribution. 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.

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 Max iter 4 or when Max iter 4 is less than Max iter 4 but less than Max iter 2 .The change in position for searching food and constructing new holes can be described by the following formulas: 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 (ρ) 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.
In the above equations, r refers to random property for guaranteeing exploration and 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. www.nature.com/scientificreports/where, PE refers to the impact of the predator and can be given in the following equation and τ signifies a small number indicating the quality of the food supply.

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: 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: Then, the novel exploration updating equation can be formulated as follows: www.nature.com/scientificreports/Here, vb is a value which falls in the range [−A, A] and ∝ can be calculated from exp −iter max iter , 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. 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

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.
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.

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.
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 test 56 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.

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 kVAR 57 .The base MVA and kV are, respectively, 100 and 12.66.The summation of reactive and active line losses of the network before allocating www.nature.com/scientificreports/ The hourly historical statistics of solar radiation 58 and wind speed 43 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#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.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 , PSO 59 , 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.
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  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.
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.4235kVAr, while the total active load demand is 53,353.5065kW.Without the integration of WTs or PVs into the test system, the total reactive and active loss over 24 h is 491.2141kVAr, and 2,173.9944kW, 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.5492kWh 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.2363kW, 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.4973kW, alleviated the power loss to 1,021.7016kW, 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.1394kWh, 20,130.4336kWh, and 22,808.8910kWh, 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.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.4213kWh, 24,396.5031kWh, and 27,469.4198kWh, 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%.
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.

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.4221kVAr and 48,570.9576kW, respectively.Similarly, without the integration of WT or PV units into the test system, the total apparent power loss for 24 h is 1868.0756kW + 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.4353kWh.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.9086kW 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.1613kWh, 13,823.8395kWh, and 15,639.2792kWh, respectively.Figure 18 visualizes the solar PV-generated power during the day when three  WT 1 @ bus-61 WT 2 @ bus-17 Figure14.PV output power at nodes11, 17 and 61 using the mPDO algorithm during installing three PVs for the commercial load.www.nature.com/scientificreports/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.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.3281kWh, and 1260.2829kWh by incorporating one, two, and three WT units, respectively, into the 69-bus network.The injected energies from the WT units are 12,441.3026kWh, 15,292.6953kWh, and 17,179.1904kWh 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.
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.8976kW and a reactive demand of 35,644.0184kVAr.With the original case, the total active power loss over a practical day is 1,890.2107kWh, and the reactive power loss is 860.6678kVAr.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.5428kW at nodes 11, 17, and 61 (depicted in Fig. 22) leads to a reduction in energy loss of 19.6372%.
The total active power output over 24 h for the PV system is 9,563.6475kWh, 11,803.7588kWh, and 13,348.4840kWh, 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   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.7980kWh, 1,331.6519kWh, and 1,323.7414kWh, respectively, with corresponding percentage reductions of 27.2675, 29.5501, and 29.9686.Furthermore, the injected energies of 12,015.2254kWh, 14,807.2747kWh, and 16,677.8832kWh 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.

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.0853The 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.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.

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  www.nature.com/scientificreports/ 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.
For the commercial load type, three PVs with a net capacity of 1566.6621kW 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.4062kWh and 24,438.7642kWh, 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.4072kWh and 1279.5147kWh, 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 PV @ bus-17 PV @ bus-11 PV @ bus-61      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.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.

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.

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

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

Figure 8 .
Figure 8. Flowchart of the original PDO algorithm.

Figure 9 .
Figure 9. Convergence curve of mPDO with other competitors.

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

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

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

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 .
Figure 17.Voltage profile of 69-bus DN during integrating three WTs for the commercial load type.

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.

61 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.

17 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.

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

Figure 25 .
Figure 25.Voltage profile of 69-bus DN during integrating three WTs for the industrial 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.

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.

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.

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 33 .
Figure 32.Voltage profile of 69-bus DN during simultaneous integration of three WTs and three PVs for different load type.
Beta distribution for the solar irradiance at 9.00 a.m.
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.

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

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

Table 3 .
Numerical simulations of the mPDO and other algorithms for incorporating PV into 69-bus DN without uncertainty.Convergence curves of the mPDO compared with the PDO for optimal allocating PVs in the 69-bus system without uncertainty.

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

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

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

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

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

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