## 3 PSO Algorithm  
PSO is a population-based optimization algorithm inspired by the behavior of social animals, such as flocks of birds or schools of fish. This algorithm was developed by [PERSON] and [PERSON] in 1995 and has become one of the most popular derivative-free optimization methods. PSO simulates the movement of \"particles\" in the search space, with each particle representing a point in the solution space. Each particle remembers the best position it has achieved (pBest) and shares information about the global best position of the entire swarm (gBest). This optimization process allows the particles to gradually move towards optimal solutions, minimizing or maximizing the objective function the algorithm is solving. The movement of each particle in PSO is influenced by three main factors--the particle's velocity, the particle's personal best position (pBest), and the global best position (gBest) of the entire swarm. The velocity of each particle is updated according to the following formula:  
\[v_{i}(t+1)=wv_{i}(t)+c_{1}r_{1}(pBest_{i}-x_{i}(t))+c_{2}r_{2}(gBest-x_{i}(t)) \tag{8}\]  
After calculating the new velocity, the position of the particle will be updated according to the following formula:  
\[x_{i}(t+1)=x_{i}(t)+v_{i}(t+1) \tag{9}\]  
The position of particle \(i\) at time \(t+1\) is updated by adding the updated velocity to the current position. The PSO algorithm works by iteratively searching for the optimal solution. It starts with initializing a swarm of particles, each placed randomly within the search space and given random velocities. The fitness of each particle is then evaluated based on the objective function at its current position. Afterward, the algorithm updates each particle's position and velocity according to specific formulas. As the process progresses, each particle keeps track of its own best position (pBest), and the swarm updates the global best position (gBest) accordingly. This cycle repeats until the algorithm meets a stopping condition, such as reaching a set number of iterations or finding a solution that meets the desired level of accuracy. PSO offers several advantages, such as its simplicity, ease of implementation, and effectiveness in tackling a wide variety of optimization problems. One key benefit is that it does not require the calculation of gradients, which makes it especially useful for solving problems that are non-differentiable, nonlinear, or have multiple objectives. PSO also excels in global search, meaning it can explore the solution space efficiently and avoid getting stuck in local minima. However, PSO is not without its challenges. The algorithm's performance is highly dependent on the proper selection of parameters like \(w\), \(c_{1}\), and \(c_{2}\), and fine-tuning these parameters for different problems can be time-consuming. In very large or complex search spaces, PSO may struggle and take longer to find the optimal solution. While PSO is effective in many situations, it does not always guarantee convergence to the global optimum and may occasionally settle for a local optimum too early. The PSO algorithm is applied to various optimization problems across different fields, particularly in power systems. In frequency control systems, PSO can be used to optimize the parameters of PID controllers to adjust the generation power of power plants (such as hydropower and thermal power plants), thereby maintaining a stable frequency in the system. PSO helps to find optimal values for parameters like \(K_{p}\), \(K_{i}\), and \(K_{d}\) in PID controllers, aiming to minimize frequency errors and fluctuations when there are changes in consumption or generation power. Additionally, PSO is applied to optimize power distribution in multi-area power systems, helping to balance the load and minimize power generation costs. With its ability to efficiently search in complex solution spaces, PSO is a powerful tool for improving the stability and operational efficiency of power systems (Figure 1).