Heidari, JalqalPeykarporsan, RasoolOshnoei, SoroushLie, Tek TjingVandevelde, LievenCrevecoeur, Guillaume2026-01-272026-01-272026-01-27International Journal of Electrical Power and Energy Systems, ISSN: 0142-0615 (Print); 1879-3517 (Online), Elsevier. doi: 10.1016/j.ijepes.2026.1116070142-06151879-3517http://hdl.handle.net/10292/20550With the increasing development of renewable energy resources, stand-alone structures are gaining more attention. Among these, wind energy systems are particularly notable because of their advantages, including sustainability, low operational expenses, and minimal environmental impact. Due to the challenges of load balancing in such systems, four-leg inverters have emerged as a viable solution, offering improved performance under unbalanced load conditions. However, like all inverters, they remain susceptible to internal faults. Accordingly, this paper proposes a hierarchical two-level Transformer-based model to detect switch internal faults, including open-circuit and short-circuit in four-leg inverters. The OPAL-RT hardware-in-the-loop setup was used to generate data in various scenarios to validate the efficiency of the proposed framework. The results demonstrate that the developed technique can effectively classify fault types and identify faulty switches compared to state-of-the-art algorithms and single-level structures.© 2026 The Authors. Published by Elsevier Ltd. Note: This article is available under the Creative Commons CC-BY-NC license and permits non-commercial use, distribution and reproduction in any medium, provided the original work is properly cited.400803 Electrical energy generation (incl. renewables, excl. photovoltaics)0906 Electrical and Electronic EngineeringEnergy4008 Electrical engineering4009 Electronics, sensors and digital hardware4601 Applied computingFault detection and diagnosisFour-leg inverterStand-alone wind energy systemTransformer algorithmHierarchical Switch Fault Diagnosis Based on Transformer Algorithm in Four-leg Inverters of Stand-alone Wind Energy Conversion SystemsJournal ArticleOpenAccess10.1016/j.ijepes.2026.111607