Comparative Study on KNN and SVM Based Weather Classification Models for Day Ahead Short Term Solar PV Power Forecasting
<p>Flow chart illustration of classification modeling.</p> "> Figure 2
<p>Demonstration of the <span class="html-italic">K</span>-nearest neighbors (KNN) method.</p> "> Figure 3
<p>An example linearly separable problem and the hyperplane that separates the data points.</p> "> Figure 4
<p>The mapping of feature vectors from a low dimension (shown as triangles) to a higher dimension (shown as squares).</p> "> Figure 5
<p>Factors influencing classification accuracy.</p> "> Figure 6
<p>The grid-connected photovoltaic (PV) farm used in the case study in this work.</p> "> Figure 7
<p>The quantities of data in each generalized weather classes (GWC) weather class.</p> "> Figure 8
<p>Typical solar irradiance curves of four GWCs. (<b>a</b>) Solar irradiance curves of GWC A; (<b>b</b>) Solar irradiance curves of GWC B; (<b>c</b>) Solar irradiance curves of GWC C; (<b>d</b>) Solar irradiance curves of GWC D.</p> "> Figure 9
<p>The process of the simulation program.</p> "> Figure 10
<p>The accuracy of KNN method over different values of the <span class="html-italic">K</span> parameter and training data sample scales.</p> "> Figure 11
<p>The accuracy of KNN compared with the support vector machines (SVM) method.</p> "> Figure 12
<p>Detailed view of the accuracy of KNN and SVM method for high values of <span class="html-italic">K</span> and large amounts of training data.</p> "> Figure 13
<p>The better performing method in different parameter regions.</p> "> Figure 14
<p>The Product’s accuracy (PA) of KNN and SVM of four generalized weather classes. (<b>a</b>) PA values of GWC A; (<b>b</b>) PA values of GWC B; (<b>c</b>) PA values of GWC C; (<b>d</b>) PA values of GWC D.</p> "> Figure 15
<p>The User’s accuracy (UA) of KNN and SVM of four generalized weather classes. (<b>a</b>) UA values of GWC A; (<b>b</b>) UA values of GWC B; (<b>c</b>) UA values of GWC C; (<b>d</b>) UA values of GWC D.</p> "> Figure 16
<p>The best accuracy of KNN and SVM.</p> "> Figure 17
<p>The exponential curve fit to the performance results of the KNN.</p> "> Figure 18
<p>The exponential curve fit to the performance results of the SVM.</p> "> Figure 19
<p>The Overall accuracy (OA) difference of different classification cases: (<b>a</b>) case 1: OA difference of 4-category classification for GWC A, B, C and D; (<b>b</b>) case 2: OA difference of 2-category classification for GWC A and B; (<b>c</b>) case 3: OA difference of 2-category classification for GWC B and C; (<b>d</b>) case 4: OA difference of 2-category classification for GWC C and D.</p> "> Figure 19 Cont.
<p>The Overall accuracy (OA) difference of different classification cases: (<b>a</b>) case 1: OA difference of 4-category classification for GWC A, B, C and D; (<b>b</b>) case 2: OA difference of 2-category classification for GWC A and B; (<b>c</b>) case 3: OA difference of 2-category classification for GWC B and C; (<b>d</b>) case 4: OA difference of 2-category classification for GWC C and D.</p> "> Figure 20
<p>The OA of the KNN method when <span class="html-italic">K</span> = 17.</p> "> Figure 21
<p>The <span class="html-italic">K</span>-OA curves with different sample scale.</p> "> Figure 22
<p><span class="html-italic">K<sub>opt</sub></span> and the minimum quantity of the four GWC training samples with different overall training sample scales.</p> ">
Abstract
:1. Introduction
2. Data Classification
2.1. The Basic Description of Data Classification
2.2. Brief Introductions to Selected Classifiers
2.2.1. K-Nearest Neighbors
2.2.2. Support Vector Machines
3. Problem Statement
4. Case Studies
4.1. Data
4.2. Modeling and Simulation Process
- Step 1. Select the sample data day (i = 1, 2 …or 310).
- Step 2. Select training data among the rest of the 309 days with an approximate GWC ratio of A, B, C and D at 24:119:148:19.
- Step 3. Estimate the GWC of the selected sample data with the SVM and KNN methods.
- Step 4. Record the classification results with different sample data (), different training data quantity (), different methods (SVM or KNN) and different parameter K of KNN (K = 1, 3…, 21).
- Step 5. Calculate the performance indexes of the recorded results.
5. Results and Discussion
5.1. Global Comparison
5.2. The Influence of Sample Scale
5.3. The Influence of Categories
5.4. The Optimal Value of the Nearest Neighbors for KNN
5.5. Summary
- If all the data or the majority of data are balanced across different categories, the performance of classifier will be significantly correlated with the training data scale.
- The SVM method can achieve a relatively high performance with small sample scales, while the KNN is not applicable in this situation. However, the KNN method has a better potential and a higher upper limit of accuracy in classification than the SVM. With increases in training sample scale, the performance of the KNN method will have a significant improvement, and the performance of SVM will stagnate after a certain degree of growth.
- For the KNN method, the accuracy and the optimal parameter K are all mainly dependent on the size of the smallest category.
6. Conclusions
Acknowledgments
Author Contributions
Conflicts of Interest
References
- Pandey, A.K.; Tyagi, V.V.; Selvaraj, J.A.; Rahim, N.A.; Tyagi, S.K. Recent advances in solar photovoltaic systems for emerging trends and advanced applications. Renew. Sustain. Energy Rev. 2016, 53, 859–884. [Google Scholar] [CrossRef]
- Turkay, B.E.; Telli, A.Y. Economic analysis of standalone and grid connected hybrid energy systems. Renew. Energy 2011, 36, 1931–1943. [Google Scholar] [CrossRef]
- International Energy Agency (IEA). IEA Energy Technology Perspectives 2014. International Energy Agency (IEA): Paris, France, 2014. [Google Scholar]
- International Energy Agency (IEA). Excerpt from Renewables Information, 2015 ed. International Energy Agency (IEA): Paris, France, 2015. [Google Scholar]
- International Energy Agency (IEA). Technology Roadmap, Solar Photovoltaic Energy, 2014 ed. International Energy Agency (IEA): Paris, France, 2014. [Google Scholar]
- Chen, Q.; Wang, F.; Hodge, B.-M.; Zhang, J.; Li, Z.; Shafie-Khah, M.; Catalao, J.P.S. Dynamic Price Vector Formation Model-Based Automatic Demand Response Strategy for PV-Assisted EV Charging Stations. IEEE Trans. Smart Grid 2017, 8, 2903–2915. [Google Scholar] [CrossRef]
- Peng, J.; Lu, L. Investigation on the development potential of rooftop PV system in Hong Kong and its environmental benefits. Renew. Sustain. Energy Rev. 2013, 27, 149–162. [Google Scholar] [CrossRef]
- Wang, F.; Zhen, Z.; Mi, Z.; Sun, H.; Su, S.; Yang, G. Solar irradiance feature extraction and support vector machines based weather status pattern recognition model for short-term photovoltaic power forecasting. Energy Build. 2015, 86, 427–438. [Google Scholar] [CrossRef]
- Kheshti, M.; Yeripour, M.N.; Majidpour, M.D. Fuzzy dispatching of solar energy in distribution system. Appl. Sol. Energy 2011, 47, 105–111. [Google Scholar] [CrossRef]
- Diagne, M.; David, M.; Lauret, P.; Boland, J.; Schmutz, N. Review of solar irradiance forecasting methods and a proposition for small-scale insular grids. Renew. Sustain. Energy Rev. 2013, 27, 65–76. [Google Scholar] [CrossRef]
- Wang, F.; Xu, H.; Xu, T.; Li, K.; Shafie-khah, M.; Catalão, J.P.S. The values of market-based demand response on improving power system reliability under extreme circumstances. Appl. Energy 2017, 193, 220–231. [Google Scholar] [CrossRef]
- Orwig, K.D.; Ahlstrom, M.L.; Banunarayanan, V.; Sharp, J.; Wilczak, J.M.; Freedman, J.; Haupt, S.E.; Cline, J.; Bartholomy, O.; Hamann, H.F.; et al. Recent Trends in Variable Generation Forecasting and Its Value to the Power System. Sol. Energy 2014, 6, 192–203. [Google Scholar] [CrossRef]
- Brancucci Martinez-Anido, C.; Botor, B.; Florita, A.R.; Draxl, C.; Lu, S.; Hamann, H.F.; Hodge, B.M. The value of day-ahead solar power forecasting improvement. Sol. Energy 2016, 129, 192–203. [Google Scholar] [CrossRef]
- Zhang, J.; Florita, A.; Hodge, B.-M.; Lu, S.; Hamann, H.F.; Banunarayanan, V.; Brockway, A.M. A suite of metrics for assessing the performance of solar power forecasting. Sol. Energy 2015, 111, 157–175. [Google Scholar] [CrossRef]
- Tuohy, A.; Zack, J.; Haupt, S.E.; Sharp, J.; Ahlstrom, M.; Dise, S.; Grimit, E.; Mohrlen, C.; Lange, M.; Casado, M.G.; et al. Solar Forecasting: Methods, Challenges, and Performance. IEEE Power Energy Mag. 2015, 13, 50–59. [Google Scholar] [CrossRef]
- Kleissl, J.; Coimbra, C.F.M.; Pedro, H.T.C. Solar Energy Forecasting and Resource Assessment; Academic Press: Cambridge, MA, USA, 2013. [Google Scholar]
- Pelland, S.; Remund, J.; Kleissl, J.; Oozeki, T.; De Brabandere, K. Photovoltaic and Solar Forecasting: State of the Art. IEA PVPS Task 2013, 14, 1–36. [Google Scholar]
- Bernecker, D.; Riess, C.; Angelopoulou, E.; Hornegger, J. Continuous short-term irradiance forecasts using sky images. Sol. Energy 2014, 110, 303–315. [Google Scholar] [CrossRef]
- Alonso-Montesinos, J.; Batlles, F.J.; Portillo, C. Solar irradiance forecasting at one-minute intervals for different sky conditions using sky camera images. Energy Convers. Manag. 2015, 105, 1166–1177. [Google Scholar] [CrossRef]
- Wang, F.; Zhen, Z.; Liu, C.; Mi, Z.; Hodge, B.-M.; Shafie-khah, M.; Catalão, J.P.S. Image phase shift invariance based cloud motion displacement vector calculation method for ultra-short-term solar PV power forecasting. Energy Convers. Manag. 2018, 157, 123–135. [Google Scholar] [CrossRef]
- Marquez, R.; Pedro, H.T.C.; Coimbra, C.F.M. Hybrid solar forecasting method uses satellite imaging and ground telemetry as inputs to ANNs. Sol. Energy 2013, 92, 176–188. [Google Scholar] [CrossRef]
- Polo, J.; Wilbert, S.; Ruiz-Arias, J.A.; Meyer, R.; Gueymard, C.; Súri, M.; Martín, L.; Mieslinger, T.; Blanc, P.; Grant, I.; et al. Preliminary survey on site-adaptation techniques for satellite-derived and reanalysis solar radiation datasets. Sol. Energy 2016, 132, 25–37. [Google Scholar] [CrossRef]
- Dong, Z.; Yang, D.; Reindl, T.; Walsh, W.M. Satellite image analysis and a hybrid ESSS/ANN model to forecast solar irradiance in the tropics. Energy Convers. Manag. 2014, 79, 66–73. [Google Scholar] [CrossRef]
- Chow, C.W.; Urquhart, B.; Lave, M.; Dominguez, A.; Kleissl, J.; Shields, J.; Washom, B. Intra-hour forecasting with a total sky imager at the UC San Diego solar energy testbed. Sol. Energy 2011, 85, 2881–2893. [Google Scholar] [CrossRef]
- Sun, Y.; Wang, F.; Wang, B.; Chen, Q.; Engerer, N.A.; Mi, Z. Correlation Feature Selection and Mutual Information Theory Based Quantitative Research on Meteorological Impact Factors of Module Temperature for Solar Photovoltaic Systems. Energies 2016, 10, 7. [Google Scholar] [CrossRef]
- Akarslan, E.; Hocaoglu, F.O. A novel adaptive approach for hourly solar radiation forecasting. Renew. Energy 2016, 87, 628–633. [Google Scholar] [CrossRef]
- Soubdhan, T.; Ndong, J.; Ould-Baba, H.; Do, M.T. A robust forecasting framework based on the Kalman filtering approach with a twofold parameter tuning procedure: Application to solar and photovoltaic prediction. Sol. Energy 2016, 131, 246–259. [Google Scholar] [CrossRef]
- Fatemi, S.A.; Kuh, A.; Fripp, M. Online and batch methods for solar radiation forecast under asymmetric cost functions. Renew. Energy 2016, 91, 397–408. [Google Scholar] [CrossRef]
- Wang, F.; Mi, Z.; Su, S.; Zhao, H. Short-term solar irradiance forecasting model based on artificial neural network using statistical feature parameters. Energies 2012, 5, 1355–1370. [Google Scholar] [CrossRef]
- Aybar-Ruiz, A.; Jiménez-Fernández, S.; Cornejo-Bueno, L.; Casanova-Mateo, C.; Sanz-Justo, J.; Salvador-González, P.; Salcedo-Sanz, S. A novel Grouping Genetic Algorithm–Extreme Learning Machine approach for global solar radiation prediction from numerical weather models inputs. Sol. Energy 2016, 132, 129–142. [Google Scholar] [CrossRef]
- Perez, R.; Lorenz, E.; Pelland, S.; Beauharnois, M.; Van Knowe, G.; Hemker, K.; Heinemann, D.; Remund, J.; Müller, S.C.; Traunmüller, W.; et al. Comparison of numerical weather prediction solar irradiance forecasts in the US, Canada and Europe. Sol. Energy 2013, 94, 305–326. [Google Scholar] [CrossRef]
- Obara, S.Y.; El-Sayed, A.G. Compound microgrid installation operation planning of a PEFC and photovoltaics with prediction of electricity production using GA and numerical weather information. Int. J. Hydrog. Energy 2009, 34, 8213–8222. [Google Scholar] [CrossRef]
- Verzijlbergh, R.A.; Heijnen, P.W.; de Roode, S.R.; Los, A.; Jonker, H.J.J. Improved model output statistics of numerical weather prediction based irradiance forecasts for solar power applications. Sol. Energy 2015, 118, 634–645. [Google Scholar] [CrossRef]
- Ma, W.W.; Rasul, M.G.; Liu, G.; Li, M.; Tan, X.H. Climate change impacts on techno-economic performance of roof PV solar system in Australia. Renew. Energy 2016, 88, 430–438. [Google Scholar] [CrossRef]
- Huber, I.; Bugliaro, L.; Ponater, M.; Garny, H.; Emde, C.; Mayer, B. Do climate models project changes in solar resources? Sol. Energy 2016, 129, 65–84. [Google Scholar] [CrossRef]
- Belaid, S.; Mellit, A. Prediction of daily and mean monthly global solar radiation using support vector machine in an arid climate. Energy Convers. Manag. 2016, 118, 105–118. [Google Scholar] [CrossRef]
- Zhang, Y.; Beaudin, M.; Taheri, R.; Zareipour, H.; Wood, D. Day-Ahead Power Output Forecasting for Small-Scale Solar Photovoltaic Electricity Generators. IEEE Trans. Smart Grid 2015, 6, 2253–2262. [Google Scholar] [CrossRef]
- Lima, F.J.L.; Martins, F.R.; Pereira, E.B.; Lorenz, E.; Heinemann, D. Forecast for surface solar irradiance at the Brazilian Northeastern region using NWP model and artificial neural networks. Renew. Energy 2016, 87, 807–818. [Google Scholar] [CrossRef]
- Shah, A.S.B.M.; Yokoyama, H.; Kakimoto, N. High-Precision Forecasting Model of Solar Irradiance Based on Grid Point Value Data Analysis for an Efficient Photovoltaic System. IEEE Trans. Sustain. Energy 2015, 6, 474–481. [Google Scholar] [CrossRef]
- Engerer, N.A. Minute resolution estimates of the diffuse fraction of global irradiance for southeastern Australia. Sol. Energy 2015, 116, 215–237. [Google Scholar] [CrossRef]
- Yang, H.T.; Huang, C.M.; Huang, Y.C.; Pai, Y.S. A Weather-Based Hybrid Method for 1-Day Ahead Hourly Forecasting of PV Power Output. IEEE Trans. Sustain. Energy 2014, 5, 917–926. [Google Scholar] [CrossRef]
- Shi, J.; Lee, W.J.; Liu, Y.; Yang, Y.; Wang, P. Forecasting power output of photovoltaic systems based on weather classification and support vector machines. IEEE Trans. Ind. Appl. 2012, 48, 1064–1069. [Google Scholar] [CrossRef]
- Chen, C.S.; Duan, S.X.; Cai, T.; Liu, B.Y. Online 24-h solar power forecasting based on weather type classification using artificial neural network. Sol. Energy 2011, 85, 2856–2870. [Google Scholar] [CrossRef]
- Larson, D.P.; Nonnenmacher, L.; Coimbra, C.F.M. Day-ahead forecasting of solar power output from photovoltaic plants in the American Southwest. Renew. Energy 2016, 91, 11–20. [Google Scholar] [CrossRef]
- Nonnenmacher, L.; Kaur, A.; Coimbra, C.F.M. Day-ahead resource forecasting for concentrated solar power integration. Renew. Energy 2016, 86, 866–876. [Google Scholar] [CrossRef]
- Hmeidi, I.; Hawashin, B.; El-Qawasmeh, E. Performance of KNN and SVM classifiers on full word Arabic articles. Adv. Eng. Informat. 2008, 22, 106–111. [Google Scholar] [CrossRef]
- Alpaydın, E. Introduction to Machine Learning; MIT Press: Cambridge, MA, USA, 2014; Volume 1107. [Google Scholar]
- Wolff, B.; Lorenz, E.; Kramer, O. Statistical Learning for Short-Term Photovoltaic Power Predictions. In Computational Sustainability; Springer International Publishing: Berlin, Germany, 2016; pp. 31–45. [Google Scholar]
- Cover, T.; Hart, P. Nearest neighbor pattern classification. IEEE Trans. Inf. Theory 1967, 13, 21–27. [Google Scholar] [CrossRef]
- Denoeux, T. A k-nearest neighbor classification rule based on Dempster-Shafer theory. IEEE Trans. Syst. Man Cybern. 1995, 25, 804–813. [Google Scholar] [CrossRef]
- Lanjewar, R.B.; Mathurkar, S.; Patel, N. Implementation and Comparison of Speech Emotion Recognition System Using Gaussian Mixture Model (GMM) and K-Nearest Neighbor (K-NN) Techniques. Procedia Comput. Sci. 2015, 49, 50–57. [Google Scholar] [CrossRef]
- Aburomman, A.A.; Ibne Reaz, M. Bin A novel SVM-kNN-PSO ensemble method for intrusion detection system. Appl. Soft Comput. J. 2016, 38, 360–372. [Google Scholar] [CrossRef]
- Zhang, H.; Berg, A.C.; Maire, M.; Malik, J. SVM-KNN: Discriminative Nearest Neighbor Classification for Visual Category Recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, New York, NY, USA, 17–22 June 2006; Volume 2, pp. 2126–2136. [Google Scholar]
- Cortes, C.; Vapnik, V. Support-Vector Networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Vapnik, V.N. Statistical Learning Theory; Wiley: New York, NY, USA, 1998. [Google Scholar]
- Vapnik, V. The Nature of Statistical Learning Theory; Springer Science & Business Media: Berlin, Germany, 1995. [Google Scholar]
- Melgani, F.; Bazi, Y. Classification of electrocardiogram signals with support vector machines and particle swarm optimization. IEEE Trans. Inf. Technol. Biomed. 2008, 12, 667–677. [Google Scholar] [CrossRef] [PubMed]
- Subasi, A. Classification of EMG signals using PSO optimized SVM for diagnosis of neuromuscular disorders. Comput. Biol. Med. 2013, 43, 576–586. [Google Scholar] [CrossRef] [PubMed]
- Cervantes, J.; García Lamont, F.; López-Chau, A.; Rodríguez Mazahua, L.; Sergio Ruíz, J. Data selection based on decision tree for SVM classification on large data sets. Appl. Soft Comput. 2015, 37, 787–798. [Google Scholar] [CrossRef] [Green Version]
- Shen, X.-J.; Mu, L.; Li, Z.; Wu, H.-X.; Gou, J.-P.; Chen, X. Large-scale support vector machine classification with redundant data reduction. Neurocomputing 2016, 172, 189–197. [Google Scholar] [CrossRef]
- Duffie, J.A.; Beckman, W.A. Solar Engineering of Thermal Processes, 4th ed.; John Wiley and Sons: New York, NY, USA, 2013. [Google Scholar]
- Chang, C.-C.; Lin, C.-J. LIBSVM: A library for support vector machines. ACM Trans. Intell. Syst. Technol. 2011, 2, 27:1–27:27. [Google Scholar] [CrossRef]
- Curve Fitting Toolbox-MATLAB. Available online: http://www.mathworks.com/products/curvefitting/?s_tid=srchtitle (accessed on 10 November 2017).
Method | Coefficients | ||
---|---|---|---|
OAopt | R | M. | |
NN | 96.18 | 0.007754 | −8.232 |
SVM | 95.14 | 0.01294 | −7.353 |
© 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, F.; Zhen, Z.; Wang, B.; Mi, Z. Comparative Study on KNN and SVM Based Weather Classification Models for Day Ahead Short Term Solar PV Power Forecasting. Appl. Sci. 2018, 8, 28. https://doi.org/10.3390/app8010028
Wang F, Zhen Z, Wang B, Mi Z. Comparative Study on KNN and SVM Based Weather Classification Models for Day Ahead Short Term Solar PV Power Forecasting. Applied Sciences. 2018; 8(1):28. https://doi.org/10.3390/app8010028
Chicago/Turabian StyleWang, Fei, Zhao Zhen, Bo Wang, and Zengqiang Mi. 2018. "Comparative Study on KNN and SVM Based Weather Classification Models for Day Ahead Short Term Solar PV Power Forecasting" Applied Sciences 8, no. 1: 28. https://doi.org/10.3390/app8010028
APA StyleWang, F., Zhen, Z., Wang, B., & Mi, Z. (2018). Comparative Study on KNN and SVM Based Weather Classification Models for Day Ahead Short Term Solar PV Power Forecasting. Applied Sciences, 8(1), 28. https://doi.org/10.3390/app8010028