Sistem tanılama makine öğrenmesi ve derin öğrenme modelleri ile güneş radyasyonu tahmini
Solar radiation forecasting using system identification machine learning and deep learning models
Yazar: GÖKSEL KADER
Danışman: PROF. DR. ÖNDER GÜLER
İstanbul Teknik Üniversitesi / Lisansüstü Eğitim Enstitüsü / Enerji Bilim ve Teknoloji Ana Bilim Dalı / Enerji Bilim ve Teknoloji Bilim Dalı
Derece: Yüksek Lisans, 2022
Konu: Enerji = Energy
Dizin: Derin öğrenme = Deep learning ; Güneş enerjisi sistemleri = Solar energy systems ; Makine öğrenmesi = Machine learning ; Radyasyon = Radiation ; Yenilenebilir enerji = Renewable energy

Özet:
Dünyadaki teknolojik gelişmelerle birlikte enerji ihtiyacı artmaktadır. Modern toplumda artan insan nüfusu ile birlikte insanların günlük ihtiyaçları ve faaliyetlerini yerine getirilebilmesi büyük ölçüde enerjiye bağımlıdır. Fosil yakıtların sonlu enerjiler olması bilinmektedir ve enerji ihtiyacını karşılamak için yeni ve yenilenebilir enerji kaynaklarına ihtiyaç duyulmaktadır. Yenilenebilir enerji kaynakları olarak güneş enerjisi, rüzgar enerjisi, jeotermal enerji ve hidroelektrik enerji başlıca doğadan elde edilebilen yenilenebilen kaynaklardır.  Özellikle güneş enerjisi ve rüzgar enerjisi, konvansiyonel kaynakların neden olduğu küresel ısınmayı azaltırken, elektrik enerji talebinin önemli bir kısmını karşılayabilmektedir. Son yıllarda çevresel kaygılar, teknolojik gelişimler ve kurulum maliyetlerinin düşmesine paralel olarak rüzgar ve güneş enerjisi kurulumları büyük bir artış göstermiştir. Yapılan yatırımların fizibiletesi açısından rüzgar hızlarının ve güneş radyasyonunun doğru tahmin edilmesi, güç sistemi tasarımcıları ve şebeke operatörleri için son derece önemlidir.Güneş radyasyonu ölçümü oldukça maliyetli ve sensör bakım işlemlerinin operasyon, planlama ve yatırım maliyeti gibi güçlükleri vardır. Bu çalışma kapsamında güneş radyasyonun tahmini meteorolojik veriler kullanılarak sistem tanılama, makine öğrenmesi ve derin öğrenme tahmin modelleri yardımıyla yapılmıştır.
Çalışma kapsamında 2012-2017 yılları arasında Şanlıurfa, Adıyaman, Diyarbakır, Gaziantep ve Hatay illerindeki ölçüm merkezlerinden alınan 10 dakikalık veri setleri tahmin modellerinde ve doğrulamalarda kullanılmıştır. Veri setindeki sıcaklık, nem, hava basıncı, ET0 ve güneş radyasyonu değişkenleri tez kapsamında yapılan analizler sonucunda modelleme ve doğrulama için en uygun değişkenler olarak seçilmiştir. Veri setindeki eksik veriler doğrusal enterpolasyon ile tamamlanmış ve uygun olmayan veriler elemine edilmiştir. Bu tez kapsamında sistem tanılama, makine öğrenmesi ve derin öğrenme tahmin modelleri Şanlıurfa ölçüm merkezi baz alınarak elde edilmiştir.
İlk olarak doğrusal sistem tanılama modellerinden olan dışsal kaynaklı otoregresif  ve Box-Jenkins yöntemleri kullanılarak doğrusal olarak güneş radyasonu tahmin modelleri oluşturulmuştur. Doğrusal olmayan tahmin modellerinin sonuçları göz önüne alınarak problemin doğrusal olmayan modeller kullanılarak tanılanmasına karar verilmiştir. Doğrusal olmayan sistem tanılama modellerinden olan dışsal kaynaklı otoregresif modeli ve Hammerstein-Wiener modeli kullanılarak doğrusal olmayan güneş radyasyonu modelleri elde edilmiştir.
İkinci yöntem olarak makine öğrenmesi modellerinden olan destek vektör makinelerin zaman serisi tahmin modellerine uygulanabilen regresyon modeli olan destek vektör regresyonu ile farklı kerneller kullanılarak ve parametreleri optimize edilerek doğrusal olmayan güneş radyasyonu modelleri oluşturulmuştur. 
Üçüncü yöntem olarak derin öğrenme yöntemlerinden olan tekrarlayan sinir ağlarının geliştirilmesi ile kullanılmaya başlayan ve güçlü bir doğrusal olmayan modellemeye sahip uzun kısa süreli hafıza modelleri oluşturulmuş,  uzun kısa süreli hafıza modeli için hiperparametreler optimize edilmiştir.
Performans metrikleri olarak istatistiki çalışmaların hata analizinde kullanılan R kare, ortalama mutlak hata, kök ortalama kare hata ve normalleştirilmiş kök ortalama kare hata kullanılmıştır.
Bu tez kapsamında oluşturulan modellerin, Gaziantep, Diyarbakır, Adıyaman ve Hatay verileri kullanılarak doğrulamaları yapılmıştır. Doğrulama sonuçlarına  bakıldığında performans metrikleri kriterine göre uzun kısa süreli hafıza modelinin en iyi performansı sergilediği görülmüştür.

Abstract:
The world's technological advancements have increased the need for energy. Fossil fuels are known to be finite energies, as a result, alternative and renewable energy sources are needed to meet the energy consumption. New technologies such as electric motor vehicles, bitcoin, and robotics-based manufacturing, for example, are increasing the need for electrical energy. Renewable energy sources such as solar energy, wind power energy, geothermal energy and hydroelectric energy are the sources which can be mainly obtained from nature. Solar radiation measurement is quite expensive and sensor maintenance comes with its own set of issues, including operational, planning, and investment expenses.
Within the scope of this thesis, the importance of time series forecasting models for solar radiation, which is highly critical for the accuracy of measurement and forecast in solar plants, are emphasized. Time series forecasting is a technique which is used to predict events through a time sequence. This technique predicts future events by analyzing past trends with the assumption that future trends will be similar to previous trends. By their nature, meteorological variables are time-dependent variables.
For Sanliurfa, Adıyaman, Diyarbakır, Gaziantep, and Hatay, data with 10-minute observations acquired from Turkey's Meteorological Services between 2012 and 2017 were utilized. The data set has 19 separate variables. The correlations of variables with sun radiation were investigated using the Pearson's Correlation matrix and the relations of the variables with the solar radiation were analyzed by figures. Temperature, humidity, air pressure, ET0, and solar radiation data were used in the thesis as a consequence of the analyses. Linear interpolation was used to fill in the missing data in our data set, and improper data was eliminated.
Forecast models were acquired based on Sanliurfa's data and those forecast models were applied using the variables selected before for Adıyaman, Diyarbakır, Gaziantep and Hatay data. Those forecast models were validated for the Adıyaman, Diyarbakır, Gaziantep, and Hatay. Solar radiation estimation was discussed with three different methods commonly used in the estimation of time series.
As the first method, system identification forecast models were produced with using MATLAB Identification Toolbox. First of all, the autoregressive model with exogenous input, which is one of the linear system identification models which produces better results thanks to external input, was used than the classical autoregressive models used with large data. By varying polynomial degrees systematically, ten alternative autoregressive models with exogenous input were created.
The Box-Jenkins model was then utilized, which is a linear system identification model derived from autoregressive integrated moving average models. Changing the polynomial degrees yielded ten diffferent Box-Jenkins models.
It was determined to use the problem with nonlinear models as a result of the outputs of linear models. Initially, a nonlinear system identification model called an autoregressive model with exogenous input was utilized. Using tree partition, sigmoid, and wavelet network activation functions, as well as modifying polynomial degrees, three nonlinear autoregressive with exogenous input models were created for forecasting solar radiation. Second, models were generated using the Hammerstein-Wiener model, which combines linear and nonlinear structures from nonlinear system identification models to create models. For input and output non-linearity, all combinations of piecewise linear, sigmoid, saturation, dead zone, and wavelet network activation functions are constructed, yielding twenty-five alternative forecast models.
For the second method, forecast models were created with the regression model support vector regression, which can be applied to the time series prediction models of support vector machines, which is one of the machine learning models, by using the Python programming language. Three kernels were employed to give the nonlinear structure: radial-based function, sigmoid function, and polynomial function. the C, γ and ε parameters for the radial basis function kernel were optimized systematically to generate 12 forecast models. For the sigmoid kernel, 10 prediction models were created by optimizing the C and γ parameters. by making optimizations for the polynomial kernel, models were generated, however the results were not given due to the fact that the polynomial kernel's inability to converge. For the C parameter, the values range of 0.01, 0.1, 10 and 1000 were utilized. For the γ parameter, the values range of 0.001, 0.01, 0,1 and 1 were utilized. For the ε parameter, the values range of 0,001 and 0,01 were utilized.
The third method is the long-short term memory model, which is one of the deep learning methods and developed over recurrent neural networks, with a strong nonlinear modeling background. Hyperparameters such as neuron size, epoch size, and batch size were tuned. Initially, ten models were developped with batch size parameters ranging from 1 to 256 with all other characteristics remaining constant. It was discovered that when the Batch size was set to 8, the best results were obtained. Second, nine models were developped, with the neuron size ranging from 1 to 128 and all other characteristics remaining constant. When the Neuron sizes was set to 32, the best results were obtained. Finally, eight models were developed, with epoch sizes varying from 4 to 256 and all other parameters remaining constant. When the epoch size was set to 256, the best results were obtained. The hyperparameters for batch size, neuron size, and epoch size were identified as 8 for batch size, 32 for neuron size, and 256 for epoch size as a result of the optimization research.
R square is a statistical measure that represents the proportion of the variance for a dependent variable that's explained by an independent variable or variables in a regression model., mean absolute error (MAE) is measures the average magnitude of the errors in a set of forecasts, without considering their direction, root mean square error (RMSE) is a quadratic scoring rule which measures the average magnitude of the error., and normalized root mean square error (nRMSE) is the comparison between datasets or models with different scales were employed as performance metrics for comparing forecast model errors.
According to Şanlıurfa validation results, the best result in linear system identification models is Box-Jenkins with 0.91314 R square, the best result in nonlinear system identification models is Hammerstein-Wiener with 0.95546 R square, the best result in machine learning model is 0.8890 R square and the best result in deep learning model is 0.8890 R square
Adiyaman validation results were seen that Box-Jenkins reached 0.91154 R square in linear system identification models, Hammerstein-Wiener reached 0.9339 R square in nonlinear system identification models, machine learning model reached 0.8764 R square and LSTM model reached 0.9723 R square as the best forecast results.
Diyarbakir validation results were showed that the best forecast result was Box-Jenkins with 0.92292 R square in linear system identification models, Hammerstein-Wiener with 0.94438 R square in nonlinear system identification models, machine learning model with 0.8751 R square, and LSTM model with 0.9680 R square.
Gaziantep validation results were obtained that Box-Jenkins achieved 0.92322 R square in linear system identification models, Hammerstein-Wiener achieved 0.94333 R square in nonlinear system identification models, machine learning model achieved 0.8289 R square, and LSTM model achieved 0.9614 R square as the best forecast result.
Hatay validation results were observed that Box-Jenkins achieved 0.9306 R square value in linear system identification models, Hammerstein-Wiener achieved 0.93641 R square value in nonlinear system identification models, machine learning model achieved 0.8159 R square value, and LSTM model achieved 0.9763 R square value as the best forecast result.