STM32-based edge AI for segment-level photovoltaic I–V anomaly detection using deep learning
This study presents a resource-aware Edge AI approach on STM32 for segment-level anomaly detection in photovoltaic I–V measurements. It evaluates both offline classification performance and on-device feasibility of lightweight deep learning models on a microcontroller. Temporal Convolutional Network (TCN) and 1D Convolutional Neural Network (1D-CNN) models were trained, converted to ONNX, and deployed on an STM32F407G-DISC1 platform. After preprocessing, 32,352,000 I–V samples were segmented into 126,375 fixed-length segments, each containing 256 time steps and two channels. The dataset includes 85,178 normal and 41,197 anomalous segments, forming a moderately imbalanced binary classification task. Data splits were carefully separated to avoid data leakage, and normalization parameters were calculated exclusively from the training data. On the PC-based evaluation, the TCN achieved an accuracy of 0.9142 and an F1-score of 0.8997, while the 1D-CNN achieved an accuracy of 0.9040 and an F1-score of 0.8904. On the STM32 platform, the 1D-CNN achieved an accuracy of 0.8975 and an F1-score of 0.8818, while the TCN achieved a higher recall of 0.8835. Regarding embedded execution characteristics, the 1D-CNN exhibited lower inference latency (101.28 ms) and RAM usage (18 KB), whereas the TCN required 199.40 ms inference time and 51 KB RAM but occupied less Flash memory (38 KB). These measurements characterize the computational latency and memory requirements of the deployed models; power consumption and energy per inference were not measured in this study. Overall, both models maintained their classification capability after deployment on the STM32 platform, demonstrating the feasibility of lightweight deep learning for segment-level photovoltaic I–V anomaly classification on resource-constrained embedded hardware.
Authors
- Sabır Rüstemli (ORCID: https://orcid.org/0000-0002-4957-1782)
- Erdal Akin (ORCID: https://orcid.org/0000-0002-2223-3927)
- Gökhan Şahin (ORCID: https://orcid.org/0000-0003-2862-2453)
- Ali Cengiz Rustemli (ORCID: https://orcid.org/0009-0008-2247-5898)
Institutions
- Malmö University (SE)
- Utrecht University (NL)
- Vilentum University of applied sciences (NL)
- Bitlis Eren University (TR)
- Ostim Technical University (TR)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-24
- DOI
- https://doi.org/10.1038/s41598-026-80293-8
- Primary Topic
- Photovoltaic System Optimization Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Malmö Högskola