Objectives: The study looks at power quality issues, such as phase imbalance, voltage sags, and power factor issues, in aircraft systems. It highlights how immediate power factor correction steps are required to avoid equipment longevity problems and boost system efficiency, which will ultimately improve the performance of the entire aviation system. Methodology: Using a variety of data sources, real-time data gathering, and machine learning approaches, this study focuses on data collecting and real-time monitoring in aviation systems. Predictive modeling, testing methods for data preparation and analysis, and optimization algorithms for capacitor bank size and placement are all included. Considerations for privacy and security are covered. Result: Salp Swarm Optimization and the Dragonfly Algorithm are used in the study to assess the ideal capacitor sizes and positions, which results in better voltage profiles and lower active power losses. Aviation systems benefit from improved power factor correction through the application of integrated machine learning and optimization, which promotes sustainability and energy efficiency. Conclusion: The study demonstrated the significance of power factor correction in aviation by successfully addressing power quality issues in aircraft electrical systems through the use of optimization algorithms for capacitor sizing and location.