###### Abstract  
Over the last decade, flexible alternating current transmission systems (FACTS) have been crucial in ensuring optimal power distribution within modern power systems. A vital component of FACTS devices is the distribution static compensator (DSTATCOM), which is essential for maintaining a reliable power supply. It is commonly used for reactive power compensation, voltage regulation, and harmonic reduction. Determining the appropriate size and placement of DSTATCOMs is vital to ensuring their efficiency. This study introduces the improved gray wolf optimizer (I-GWO), a refined version of the classical gray wolf optimization (GWO) method. The I-GWO incorporates a dimension learning-based hunting (DLH) strategy to preserve population diversity, balance exploration and exploitation, and prevent the premature convergence of classical GWO. In this research, the I-GWO was applied to determine the optimum allocation and sizing of the DSTATCOMs, considering system constraints, including those presented by the intermittent and stochastic nature of the load and renewable energy resources, specifically wind and solar energy. The suggested approach was successfully tested on 33-, 69-, and 85-bus distribution systems and then compared with existing studies. The results demonstrated the I-GWO-based approach's superiority in terms of reducing power losses, improving voltage profiles, and enhancing voltage stability. DSTATCOM; I-GWO; optimization; radial distribution system; power losses; voltage stability; energy resources; uncertainty; total annual cost savings +
Footnote †: journal: _Sci. reduce power losses, enhance voltage stability, and improve voltage profiles. Compared with conventional capacitor compensators, the DSTATCOM offers superior flexibility by providing lagging and leading reactive power. It responds instantly to disturbances, delivering rapid voltage regulation and continuous reactive power support. Beyond these benefits, the DSTATCOM can also mitigate harmonics, elevate overall power quality, and buttress the system voltage during faults. In contrast to capacitor banks that may introduce resonance challenges, the DSTATCOM operates without such resonance risks. Its compact dimensions demand minimal space, and its solid-state composition guarantees diminished maintenance needs and a prolonged operational lifespan. However, ensuring that the DSTATCOM is optimally sized and allocated within the radial distribution system is imperative. Inappropriate size or placement can have negative impacts, potentially undermining the benefits it offers. Recently, many algorithms have been developed for the optimum allocation and sizing of DSTATCOs in power distribution systems. Most of these algorithms employ metaheuristic techniques. Such methods are renowned for finding global solutions, avoiding becoming trapped in local minima, and rapidly searching large solution spaces. Examples include the differential evolution algorithm (DEA) [3], particle swarm optimization (PSO) [4], genetic algorithms (GA) [5], immune algorithm (IA) [6], lightning search algorithm (LSA) [7], bat algorithm (BA) [8], bacterial foraging optimization algorithm (BFOA) [9], and cuckoo search algorithm (CSA) [10], as well as the multi-objective sine-cosine approach (MOSCA) and multi-objective particle swarm optimization (MOPSO), which are both discussed in Reference [11]. Most existing research does not consider the presence of renewable energy sources and load fluctuations. These factors introduce intermittency and uncertainty, significantly impacting the load flow of the power system. The main contributions of this study are:  
* Introducing a new method for the optimal allocation and sizing of DSTATCOs in radial distribution systems. * Incorporating the uncertainty associated with load fluctuations and renewable energy generation into the DSTATCOM allocation and sizing process.