# Fault Prediction and Reconfiguration Optimization in Smart Grids: AI-Driven Approach
## 1 Introduction  
Smart grids (SGs) represent the future solution for electricity transmission and distribution networks [1, 2, 3], as their main objective is to achieve full network monitoring, allowing a better energy balance between producers and consumers. SG systems must be able to react quickly and predictably, adapting to changes in energy demand and supply through the control of energy consumption and storage devices. The applications managing the SG must rely on a secure, highly scalable, and always available communication network, as they need to handle large volumes of real-time data to consistently respond to changes in the network state [4, 5].  
One of the most important aspects of SGs is the reconfiguration of the power distribution within the network. This is crucial because it allows the system to reroute power in case of a failure in one of the network links, or simply to optimize the distribution based on a given criterion [6]. Many existing contributions [7, 8, 9] place more emphasis on the latter case, in which reconfiguration through optimization improves power losses due to propagation or line overload, or by addressing other electrical parameters. Generally, most reconfiguration algorithms applied to SGs focus on network resilience in case of faults aim to provide backup routes or paths to perform the distribution. However, the proposed strategies are always reactive to the fault, whether in a centralized or distributed manner.  
Therefore, in this work, we aim to generate a preventive, and thus proactive, reconfiguration strategy for network faults by leveraging real-world SG datasets and MachineLearning (ML) and Deep Learning (DL) techniques. The proposed approach is based on a previously existing routing and reconfiguration solution for SGs, known as DEN2 DE [10]. We build upon this foundation to develop a novel fault prediction mechanism that classifies alternative routes to preemptively identify those likely to cause network errors. Our work contributes to the field by providing a fault prediction solution tailored specifically for SG reconfiguration, which is trained and validated using real datasets as detailed in Section 3. Furthermore, we ensure its generalizability across diverse network topologies by testing it with random configurations generated through the Boston University Representative Internet Topology Generator (BRITE) tool, using parameters from the IEEE 123 Node Test Feeder model [11]. Through these validations, we examine the optimization of multiple ML and DL models for DEN2 DE by employing feature selection, assessing the most suitable predictive model for each scenario.  
This article is organized as follows. Section 2 provides an overview of related reconfiguration algorithms applied to SGs. Section 3 presents the main real-world datasets analyzed for this study. Section 4 briefly explains the foundation routing and reconfiguration solution and how our proposal extends it. Section 5 presents the validation environment and the evaluation of the different Artificial Intelligence (AI) models along with their respective optimizations. Section 6 outlines the results obtained, as well as the best configuration of the evaluated models, together with a brief discussion regarding the generalization of our study, and finally, Section 7 provides the conclusions and future work.