A very valuable component of flexible AC transmission systems (FACTs) is the Unified Power Flow Controller (UPFC). By simultaneously regulating both active and reactive power on transmission lines, it maintains voltage stability on linked buses. This study devised a thorough control strategy for the Unitary Power Flow Controller (UPFC), combining traditional and artificial intelligence (AI)-based methods. To see how the system would react in different situations and how well artificial intelligence control worked compared to more traditional proportional-integral power control, we ran a lot of simulations. The study found that the control strategy based on artificial intelligence (AI) was better than the proportional-integral (PI) control at managing power flow, keeping the voltage stable, and responding to changes in the environment. The results of this study emphasize the capacity of artificial intelligence methods to improve the performance and stability of FACT components such as the UPFC. The research provides important insights into power system control and optimization, indicating that strategies based on artificial intelligence could greatly enhance power generation. In order to enhance the AI control strategy, future research should focus on its practical application in actual power systems.