## 4 Simulation Results and Discussion
### Scenario 1: A Two-Area Power System (TAPS) Integrating Hydropower Plants (Figure 2)
This extended simulation explores how well the PSO-optimized PID controller can uphold frequency stability and power balance across tie-lines. By analyzing the system's dynamic responses to varying load conditions, the study offers valuable insights into the controller's real-world practicality. It showcases its reliability and efficiency in complex power systems. In this extended study, the simulation time will last for 60 s with a load that changes over time to mimic real-world conditions. To ensure consistency throughout the simulation process, the parameters set for the PSO algorithm remain unchanged for this scenario (Table 4). The load variation undergoes the following three distinct phases (Figure 6): from 1 to 20 s, the load gradually ramps up to 0.03 pu, much like the increased demand during peak hours. From 20 to 40 s, it increases to 0.05 pu, representing a period of consistently high demand, similar to heavy industrial usage or increased residential consumption. Finally, from 40 to 60 s, the load abruptly drops to 0.01 pu, illustrating situations where demand suddenly decreases, such as factory shutdowns or demand-side management initiatives. By continuously adjusting the load in this way, the research captures the unpredictable nature of real power systems. Moreover, it thoroughly tests how well the PSO-optimized PID controller can adapt and remain frequency stable under these fluctuating conditions. Below are the simulation results for the continuous load variation scenario (Table 5), demonstrating the capability of the PSO-optimized PID controller to maintain frequency stability (Figure 7) and power balance between interconnected areas (Figure 8):  
Overall, all three graphs (red, blue, and green) exhibit a similar trend in frequency variation. From 0 to 20 s, they show relatively large frequency fluctuations, with negative deviations ranging from \(-\)0.06 to \(-\)0.08 Hz, before gradually approaching a stable level (approximately 0 Hz). Moving into the 20-40 s interval, the frequency once again shows signs of fluctuation, this time ranging from about \(-\)0.04 to 0.05 Hz, before returning to a near-stable state. During the final 20 s of the simulation, all three graphs display their highest amplitude of frequency deviation, with positive deviations ranging from 0.08 to nearly 0.1 Hz. In summary, all three graphs indicate significant frequency fluctuations  
Figure 4: Convergence of PSO for PID frequency control (scenario 1). under load variations, yet they retain the ability to regulate and bring the frequency back to a stable state. \begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Unit** & **Value** \\ \hline \(B_{1}=B_{2}=B_{3}\) & pu.MW/Hz & 0.425 \\ \(R_{1}=R_{2}=R_{3}\) & Hz/pu.MW & 2.4 \\ \(T_{g1}=T_{g3}\) & s & 0.08 \\ \(T_{t1}=T_{13}\) & s & 0.3 \\ \(K_{r1}\) & Hz/pu.MW & 0.5 \\ \(T_{r1}\) & s & 10 \\ \(T_{gh2}\) & s & 0.3 \\ \(T_{rs2}\) & s & 5 \\ \(T_{rh2}\) & s & 28.75 \\ \(T_{w2}\) & s & 0.3 \\ \(K_{ps1}=K_{ps2}=K_{ps3}\) & Hz/pu.MW & 120 \\ \(T_{ps1}=T_{ps2}=T_{ps3}\) & s & 20 \\ \(T_{12}=T_{23}=T_{31}\) & pu.MW/Hz & 0.545 \\ \hline \end{tabular}
\end{table} 
Table 4: Parameters for scenario 2. Figure 5: Model of frequency control system for hydropower, reheat, and non-reheat thermal power plant integration. During the first 20 s, the red graph shows a few short-term positive peaks (around +0.01 to +0.02 pu) and slight dips (approximately \(-0.005\) pu), generally oscillating around the 0 pu level. The blue graph remains relatively stable, fluctuating within \(\pm 0.01\) pu, while the green graph exhibits even smaller deviations, ranging from \(\pm 0.005\) to \(\pm 0.01\) pu, indicating weaker load impacts on this branch. Between 20 and 40 s, the red and blue graphs display more significant variations, particularly near the 40 s mark, where the red graph drops below \(-0.02\) pu, and the blue graph spikes to +0.02 pu before falling to around \(-0.02\) to \(-0.03\) pu. In contrast, the green graph maintains mild fluctuations, rarely exceeding \(\pm 0.01\) pu.