Scientists in Iraq used a k-Nearest Neighbors algorithm to evaluate the operational status of PV modules under various conditions, including partial shade, open circuit and short circuit scenarios. They found that the model’s overall performance in predicting wealth was “remarkably accurate.”
Scientists from the Technical University – Iraq have used the k-Nearest Neighbors (k-NN) machine learning (ML) algorithm to classify the operational status of PV panels and predict their voltage, current and power.
“At its core, k-NN works on the principle that similar things exist in close proximity. In practical terms, it can be understood that the algorithm predicts the label of a new data point based on the majority votes or the average of the ‘k’ nearest neighbors in the feature space,” the scientists explained. “In classification tasks, k-NN is used to categorize new observations into predefined classes, based on the most common class among the nearest neighbors.”
The research group trained the algorithm on a dataset generated via Python and LTspice XVII software, using a 2-diode-based equivalent modeling technique for PV modules. It created nearly seven million cases reflecting a broad spectrum of conditions, including parameters such as solar radiation levels, PV panel configurations, fault conditions, partial shade conditions and temperature variations.
Half of the dataset was used for training, while the other half was used for testing. For classification purposes, the scientists used accuracy and F1 statistics. For power prediction, they used two assessment statistics of regression analysis: root mean square error (RMSE) and coefficient of determination (R2).
“The classification accuracy for the main categories is 99.2%, while when classifying the subcategories it dropped slightly to 98.9%,” the scientists said. The k-NN model also recorded an RMSE score of 0.036 for stress prediction and an R2 of 1.00. In terms of power, it showed an RMSE of 1.813 and an R2 of 0.878, while the analysis, in terms of power, shows an RMSE of 0.371 and an R2 of 0.994.
“Although power forecasting posed some challenges, the model’s overall performance in predicting power output was remarkably accurate, further validating the potential of ML techniques in improving the efficiency and reliability of solar energy systems “, the team concluded. “Through this study, the study not only confirmed the viability of simulation-based data in pre-experimental assessments, but also highlighted the important role of ML, especially the k-NN algorithm, in advancing research and application of solar -energy.”
Their findings were presented in the study “Electrical energy yield evaluation of k-nearest neighbor photovoltaic solar cells: a statistical analysis approach with machine learning,” published on e-Prime – Advances in electrical engineering, electronics and energy.
This content is copyrighted and may not be reused. If you would like to collaborate with us and reuse some of our content, please contact: editors@pv-magazine.com.