Scientists from the University of Technology – Iraq have utilized 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 output.
“At its core, k-NN operates 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 vote or average of its ’k’ nearest neighbors in the feature space,” explained the scientists. “In classification tasks, k-NN is employed to categorize new observations into predefined classes based on the most common class among its nearest neighbors.”
The research group trained the algorithm on a dataset generated via by Python and LTspice XVII software, employing a 2-diode-based equivalent PV module modeling technique. It created almost seven million cases reflecting a wide spectrum of conditions, including parameters such as solar irradiation levels, PV panel configurations, fault conditions, partial shading 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 metrics. For the power output forecast, they used two assessment metrics of regression analysis – root mean square error (RMSE) and coefficient of determination (R2).
“The classification accuracy for the main categorizing is noticed to be 99.2% while it slightly dropped to 98.9 % when classifying the subcategories,” said the scientists. The k-NN model also recorded an RMSE score of 0.036 for predicting voltage and an R2 of 1.00. As for current, it showed an RMSE of 1.813 and an R2 of 0.878, while, in terms of power, the analysis shows an RMSE of 0.371 and an R2 of 0.994.
“Although predicting current presented some challenges, the overall performance of the model in forecasting power output was notably accurate, further validating the potential of ML techniques in enhancing the efficiency and reliability of solar energy systems,” concluded the team. “Through this investigation, the study not only confirmed the viability of simulation-based data in pre-experimental assessments but also highlighted the significant role of ML, particularly the k-NN algorithm, in advancing solar energy research and application.”
Their findings were presented in the study “Evaluating electrical power yield of photovoltaic solar cells with k-Nearest neighbors: A machine learning statistical analysis approach,” published on e-Prime – Advances in Electrical Engineering, Electronics and Energy.
This content is protected by copyright and may not be reused. If you want to cooperate with us and would like to reuse some of our content, please contact: editors@pv-magazine.com.
By submitting this form you agree to pv magazine using your data for the purposes of publishing your comment.
Your personal data will only be disclosed or otherwise transmitted to third parties for the purposes of spam filtering or if this is necessary for technical maintenance of the website. Any other transfer to third parties will not take place unless this is justified on the basis of applicable data protection regulations or if pv magazine is legally obliged to do so.
You may revoke this consent at any time with effect for the future, in which case your personal data will be deleted immediately. Otherwise, your data will be deleted if pv magazine has processed your request or the purpose of data storage is fulfilled.
Further information on data privacy can be found in our Data Protection Policy.