Fault Detection and Diagnosis of Grid-Connected Photovoltaic Systems Using Machine Learning

Faults in a grid-connected photovoltaic (PV) system - a failed inverter switch, a wrong current sensor, grid voltage sags, partial shading, an open-circuited array, badly tuned MPPT or boost-converter controllers - reduce the energy yield and can damage equipment, and several of them are hard to see with fixed thresholds. This project detects and classifies such faults from 10 kHz DC and AC measurements of a REAL laboratory rig: the GPVS-Faults data set of Bakdi, Guichi, Mekhilef and Bounoua (Mendeley Data n76t439f65, CC BY 4.0; CSV_Files.zip 120.9 MB, SHA-256 checked) with 16 experiments (healthy F0 and seven fault types F1-F7, each in IPPT and MPPT mode). A classical physics-based threshold method (pvlib single-diode expected power plus current, voltage, AC/DC, unbalance and DC-link ratios) is compared with a Random Forest and an SVM on 49 window features and a 1-D CNN on the raw windows, under four evaluation protocols. On randomly mixed windows (leaky) the Random Forest reaches 99.8 % accuracy, on time-blocked windows 99.1 %, but on an unseen experiment only 76.2 % (macro F1 42.9 %) and across operating modes 34.1 %: the fault TYPE does not transfer to unseen recordings. Detection does: on unseen experiments the Random Forest raises an alarm in 7/7 experiments with a detectable fault step (median delay 0.32 s) with 1 false alarm in 91.9 s of healthy operation; the threshold baseline detects 5/7 with 2 false alarms. ngspice and GNU Octave cross-checks (run), a complete MATLAB version (written, not run) and a web application with five databases are included. Everything runs on a standard laptop CPU (8 GB RAM, no GPU).

Category: Electrical and Electronics Engineering (Renewable Energy, Solar Photovoltaic Systems, Grid-Connected Inverters, Power Electronics, Boost Converter, MPPT / IPPT Control, Fault Detection and Diagnosis, Condition Monitoring, pvlib Single-Diode Model, ngspice Circuit Simulation, Machine Learning, Random Forest, Support Vector Machine, 1-D Convolutional Neural Network, PyTorch, GNU Octave, MATLAB, Python)

Electrical & Electronics Engineering Project EE14 from ProTechSC Academy, with graphical abstract, video demonstration and project guidance.