Prediction Method For Solar Power Using
Prediction Method For Solar Power Using
1 (2021) 653–666
© Universiti Tun Hussein Onn Malaysia Publisher’s Office
PEAT
Homepage: http://penerbit.uthm.edu.my/periodicals/index.php/peat
e-ISSN : 2773-5303
DOI: https://doi.org/10.30880/peat.2021.02.02.063
Received 13 January 2021; Accepted 01 March 2021; Available online 25 June 2021
Abstract: The world is running out of fossil energy sources. Because of this, we are
searching for alternative energy sources for next generation energy needs. However,
solar energy may be the best choice for the future world because solar energy is the
most abundant renewable energy sources. Photovoltaic power is unpredictable and
depends on solar irradiation and temperature. Therefore, a prediction method is
required. The maximum error can be obtained using this prediction method. Fuzzy
logic system was used to get the accurate value of power. With the help from fuzzy
logic and linear regression, the maximum error will be shown accurately.
1. Introduction
Nowadays, the depletion of fossil fuels become a crisis in energy sector. Because of this, we are
looking for new sources of energy for the energy needs of the next decade. We should also make all
forms of energy more environmentally, socially and economically sustainable. [1].
Taking into consideration, renewable energy sources such as solar, wind, hydropower and
geothermal energy are important because they are environmentally friendly. However, solar energy may
be the best choice for the future world because solar energy is the most abundant renewable energy
sources. Asian countries have the highest potential to receive more sunlight compared to other
temperate countries within a year. A lot of solar radiation is unused and wasted essentially [2].
Solar photovoltaic (PV) is becoming an integral component of our energy consumption and will
soon become an energy source to our world. Photovoltaic panels continue to be more efficient, keeping
solar power replacing other conventional sources of energy. Photovoltaic energy is unpredictable and
*Corresponding author: [email protected]
2021 UTHM Publisher. All right reserved.
penerbit.uthm.edu.my/periodicals/index.php/peat
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
depends on solar irradiation and other meteorological factors such as temperature, humidity,
precipitation, wind speed, and cloud coverage [3].
From the previous researchers some of them describe the same objective which is to collect data
for solar power using various parameter which are solar irradiation and temperature. The data for solar
irradiation and temperature used in this project collected at UTHM Parit Raja. The prediction method
used is different from this project. Linear regression and fuzzy logic are used from this project to
predicting the value of maximum error and RMSE values. It also to predict which predicting method
performance is better.
Fuzzy logic helps to conceptualizing the fuzziness in the system into a crisp quantifiable parameter.
Thus, fuzzy logic-based models can be adopted for effective energy planning to arrive at pragmatic
solutions. Fuzzy logic deals with reality and it is a form of many valued logic. It deals with reasoning
that is approximate having also linguistic values rather than crisp values. Fuzzy logic handles the
concept of truth value that ranges between completely true and completely false (0–1). Fuzzy logic has
been applied in many areas. Fuzzy logic and probability are different ways of indicating variability [4].
Linear regression is a supervised machine learning algorithm where the predicted output is
continuous and has a constant slope. Linear regression makes prediction for continuous/real or numeric
variables based on the value of another variable [5].
2. Methodology
Figure 1 shows the whole process of developing PV module, fuzzy logic and linear regresion in
Matlab/Simulink. The PV module was generated to predict the solar output power using two types of
parameters which are temperature and irradiance. The value of temperature and solar irradiance was
collected at UTHM Parit Raja. Then the data obtained will inserted in PV module simulink model to
predict the value of output power.
The input value of temperature and irradiance has been inserted in fuzzy logic system to get the
output power and current from that system. If the output result has error, the step will be repeated until
it show the best result from fuzzy logic system. Linear regression and fuzzy logic model has been
developed using matlab code to get the desired output. The results from linear regression and fuzzy
logic is been being compared to get the value of maximum error. The results data from the two
prediction method then been analysed. The PV Module supply for this project is 200 Watt.
654
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
655
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
656
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
𝑉 + 𝐼 .𝑅𝑠
𝐼𝑠ℎ = ( ) Eq. 3
𝑅𝑠ℎ
PV Current (I):
𝑞.(𝑉 + 𝐼 .𝑅𝑠 )
I = Iph − I0 . [exp(
𝑛 .𝐾 .𝑁𝑠 .𝑇
) − 1] − Ish Eq. 5
657
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
3. Simulink Result
From the simulation results, there are three types of output. The output power from PV module is
obtained from the value of parameters used which are temperature and solar irradiance to get the output
power and current .Secondly, the value of output power from fuzzy logic will be obtained. Fuzzification,
inference and defuzzification process was used to obtain the predicted output power and current. Linear
regression will be perform in Matlab/Simulink using matlab code. The value of output power will be
normalized using matlab code then will be inserted in linear regression system to display the scatter
graph.
3.1 Performance of PV Module with different temperature and solar irradiance
The two inputs which are temperature and solar irradiance was used to get the output current,
voltage and power. The 350 set of input data are collected at UTHM Parit Raja and has been recorded
for every 30 minutes in a day. Table 3 shows the value of input and output from solar PV module in
Matlab/Simulink.
658
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
659
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
3.2.1 Fuzzification
Fuzzification is the process of decomposing a system input and/or output into one or more fuzzy
sets. The input and output uses same partition grid system in FIS system. It is a step that helps to convert
the inputs where crisp numbers are converted into fuzzy sets [9]. The fuzzifier are separated the input
signals into three state which are, “small”, “medium” or “high” Then, the sets are passes to the control
system for further processing. Figure 6-9 shows the membership function in fuzzy logic.
Fuzzy inference is the process of formulating the mapping from a given input to an output using
fuzzy logic. The rule used in this system are low, medium and high. Figure 10 shows the rule editor in
fuzzy logic system.
660
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
661
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
3.2.2 Defuzzification
The defuzzification is the inverse step of fuzzification which it transforms the fuzzy set into a crisp
set. It is typically needed in fuzzy control system. This will have a number of rule that transform a
number of variables into a fuzzy result that is described in term of membership in fuzzy set.
Defuzzification will interpreting the membership degrees of the fuzzy set into a specific decision or
value [10]. Figure 11 shows the defuzzification process in fuzzy logic system.
The final output for prediction can be demonstrated through surface view. This section is a fuzzy
implication that helps evaluate the rules involved.
Total sum of the squares around the mean for the dependant variable:
𝑆𝑡 = (𝑦 − 𝑚𝑒𝑎𝑛 𝑦)² Eq. 7
Sum of the squares of residuals around the regression line:
662
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
𝑆𝑟 = 𝑒² Eq. 8
Error:
𝑒 = 𝑦 − (𝑎0 + 𝑎1 𝑥) Eq. 9
Slope:
𝑛 ∑ 𝑥𝑦−∑ 𝑥 ∑ 𝑦
𝑎1 = 𝑛 ∑ 𝑥²−(∑ 𝑥)²
Eq. 10
Intercept:
𝑎0 = 𝑚𝑒𝑎𝑛 𝑦 − 𝑎1 (𝑚𝑒𝑎𝑛 𝑥) Eq. 11
Mean x and y:
∑𝑥
𝑀𝑒𝑎𝑛 𝑥 = 𝑛
Eq. 12
∑𝑦
𝑀𝑒𝑎𝑛 𝑦 = 𝑛
Eq. 13
Arithmetic mean:
𝑦 = 𝑎0 + 𝑎1 𝑥 Eq. 14
RMSE:
663
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
664
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
1 and RMSE is lies between 0 to 100.00 %. If the correlation coefficient equal to 1, and RMSE is near
0 the smaller error that the system will produce. The output value for the scatter graph from
Matlab/Simulink of MSE is 2.0078e+0.3, RMSE is 44.8087 and correlation coefficient is 0.0189. As
can be seen in figure, there is linear regression gap trend between the measured data and target data.
Based on the results it can be seen that the measured data slightly closed to the target. This is because
linear regression try to find a best straight line that fitted the data.
4.3 Summary
The fuzzy logic system and linear regression has been compared. Linear regression shows the
maximum error and RMSE value while fuzzy logic only shows the error power output value from the
solar irradiance and temperature. The best performance of prediction method is using linear regression
because the value of error is nearest 1. The value error in power for fuzzy logic was calculate between
output PV module using equation and the error is only between 10.00 %.
5. Conclusion
In conclusion, solar PV module has been developed in Matlab/Simulink to predict the output using
two types of parameters which are solar irradiance and temperature. The value of solar irradiance and
temperature obtained at UTHM Parit Raja in every 30 minutes in a day. In the beginning, learning about
fuzzy logic techniques needs to be mastered to identify the processes that will be involved to predicted
the output values. Then, the input values have been used to predict the output value of current and
power. Fuzzy logic used to give accurate reasoning to achieve the definite output. Linear regression are
used to predict the maximum error between training data and testing data . The training data used was
70 % of the 350 set output data while 30 % of testing data. If the value of correlation coefficient is 1 or
near 1, the RMSE will be 0 because all the points lie on the regression line and it also means that no
errors. The value of RMSE lies between 0 to 100 %, so the smaller value of RMSE the better because
there is only slightly error in that system.
References
[1] R. D. Q. D. Lqglu et al., “A Review of Data Mining and Solar Power Prediction,” vol. 5, pp.
3–7, 2016.
665
Abiden et al., Progress in Engineering Application and Technology Vol. 2 No. 1 (2021) p. 653-666
[2] N. Kannan and D. Vakeesan, “Solar energy for future world : - A review,” vol. 62, pp. 1092–
1105, 2016, doi: 10.1016/j.rser.2016.05.022.
[3] A. Shafi, H. Sharadga, and S. Hajimirza, “Design of Optimal Power Point Tracking Controller
Using Forecasted Photovoltaic Power and Demand,” vol. 3029, no. c, pp. 1–8, 2019, doi:
10.1109/TSTE.2019.2941862.
[4] X. Meng, “Dempster – Shafer based probabilistic fuzzy logic system for wind speed
prediction.”
[5] S. Prasanna, “Efficient Utilization of Non-Conventional Hybrid Energy system Using Arduino
and Fuzzy Logic,” pp. 580–583, 2013
[6] N. Abd, H. Wooi, and J. Selvaraj, “The 3 rd International Conference on Sustainable Future for
Human Security Photovoltaic module modeling using simulink / matlab,” Procedia Environ.
Sci., vol. 17, pp. 537–546, 2013, doi: 10.1016/j.proenv.2013.02.069.
[7] K. Ding, X. Bian, H. Liu, and T. Peng, “A MATLAB-Simulink-Based PV Module Model and
Its Application Under Conditions of Nonuniform Irradiance,” vol. 27, no. 4, pp. 864– 872,
2012.
[8] L. Suganthi, S. Iniyan, and A. A. Samuel, “Applications of fuzzy logic in renewable energy
systems – A review,” Renew. Sustain. Energy Rev., vol. 48, pp. 585–607, 2015, doi:
10.1016/j.rser.2015.04.037.
[9] M. S. Khireddine, N. Slimane, Y. Abdessemed, and M. T. Makhloufi, “Fault detection and
diagnosis in induction motor using artificial intelligence technique,” MATEC Web Conf., vol.
16, pp. 6–9, 2014, doi: 10.1051/matecconf/20141610004.
[10] N. Boumella, J. C. Figueroa, and S. Iqbal, “Generalized Orthogonality Principle,” 2012.
666