## 2 Literature Overview  
Most research papers dealt with harmonics using APFs through different optimization problems in terms of defining different objective functions with different constraints using various optimization algorithms. In chronological order since 2010, optimization algorithms such as the Tabu algorithm [15], the Fuzzy algorithm [16], the music-inspired algorithm [17], ant colony algorithms [18], wave algorithms [19], the gray wolf algorithm [20], and the bacterial foraging algorithm [21] are used. However, the most popular optimization methods are associated with evolutionary algorithms, with genetic algorithm (GA) [22; 23] and swarm-based algorithms in focus. Numerous authors focus their research on highlighting the advantages and potential of specific optimization methods,while the aspect of the actual resolution of the APF placement problem is neglected [9]. According to the most recent literature, particle swarm optimization (PSO) and modifications of PSO have been taken as the most prominent optimization methods [24; 25; 26; 27; 28]. Considering the above-mentioned observations and the authors in [29], which stated that PSO algorithms have been widely applied in various scientific fields in recent years, this paper uses PSO as an optimization algorithm. Additionally, observing the literature overview, it is noted that authors often neglect one critical aspect when addressing the optimal placement and sizing of the APF: the time variability of harmonics during the day. Ignoring the significance of nonlinear loads' time and harmonic spectrum variability, emphasizing new integrated forms of load (DGs, EV chargers, and energy battery storage) can lead to sub-optimal solutions. A group of authors of reviewed papers have taken a similar approach in the optimization process, using the same objective function and constraints. Still, the lack of standardized test systems and problem descriptions enabled a direct analysis result comparison. As shown in Table 1, linear test networks are mainly used in which authors arbitrarily apply nonlinearities. Nonlinearities are often not implemented throughout the network; instead, they focus only on specific buses and limit the search space to the predefined buses. Predefined IEEE systems are frequently used where load and harmonic level variations are not incorporated. Also, authors rarely refer to real-world cases of power systems, missing the opportunities for comparative analysis of the effectiveness of different optimization methods. Since nonlinear loads are variable, harmonics also fluctuate over time. In the papers [30; 31], the authors noted the importance of time variability of loads, and the influence of load variation on power quality indicators was pointed out. Neglecting the time variability feature of loads in the optimization process can result in a sub-optimal solution [32]. Given the substantial impact of nonlinear loads and injecting variable harmonics, the analysis should include this variation. A summary of referenced systems used in studies over the last ten years is provided in Table 1, indicating load or harmonic order variation implementation in tested systems. In a paper [9], a group of authors concluded that research should focus on optimizing the sizing and placement of APFs in LV distribution networks, such as radial distribution systems (RDSs) and industrial facility networks. An optimization solution for these networks could improve power quality, reduce installation costs, and achieve actual economic savings. Additionally, according to the authors in [9], it is essential to explore optimization with global control of groups of APFs, where it would be possible to generate waveforms different from those resulting from the connection point of the APF devices. Numerous authors tested their optimization processes on medium voltage (MV) networks even though the majority of nonlinearities occur in LV networks (<1 kV), as confirmed by publications [23; 33].