Abstract
Smart grids improve electricity management and ensure efficient power distribution, but they are highly vulnerable to cyber attacks such as false data injection, denial-of-service, and replay attacks. These cyber threats can disrupt power supply and compromise critical infrastructure. To address this issue, this project proposes an intelligent cyber threat detection system using classification algorithms such as K-Nearest Neighbors (KNN), Decision Tree, Support Vector Machine (SVM), and Random Forest. To further enhance performance, optimization techniques including Genetic Algorithm, Grid Search, and Particle Swarm Optimization (PSO) are applied for feature selection and hyperparameter tuning. The system is trained and tested on benchmark smart grid datasets to ensure realistic evaluation. Experimental results show that optimized models significantly improve detection accuracy and reduce false alarms, providing a reliable and efficient solution for securing smart grid environments.