Optimizing Solar Panel Tilt Using Machine Learning Techniques
Optimizing Solar Panel Tilt Using Machine Learning Techniques
Abstract—As the world seeks to produce energy from re- facilities to change their angle, simply install the photovoltaic
newable sources, the number of photovoltaic installations has panels with an inclination equal to the local latitude. However,
increased. With this, there arises a need for maximizing power this inclination may not always be efficient [1]. Many local
output. Higher availability of data and computational units
have helped machine learning algorithms to make predictions variables, such as the wind, cloud coverage, and local geogra-
faster. The need to predict the optimum tilt angle for maximum phy affect the power generation. We present different machine
power generation is essential. Choosing an optimum angle of learning models to establish a relationship between variables
inclination of a solar panel often involves theoretical calculations recorded from weather stations and the recorded output. We
which have interdependent and location specific variables. This also present an application of the forecasting model to predict
paper presents a machine learning model that takes other
environmental weather dependent factors and changing seasons data from sensors which cant be normally obtained from
across the year to compare and presents a model that can weather forecast models. This ameliorates the void caused by
estimate the inclination angle for optimum generation of power the lack of data which will prevent the tilt angle optimization
by the solar array. We use algorithms like gradient boosting, model to prognosticate the angle based on upcoming trends in
extreme gradient boosting and multilayer perceptrons to establish the weather. The analytical model presented serves to validate
a relationship between inclination angle and power generation.
With our system, we predict an increase of 8.44%-11.8% with the results obtained from the machine learning approach.
the predicted optimised angle. Our models predict an optimized Reference [2] presents machine learning models to optimize
inclination with a variation of 1.5% in the final value. We also the tilt angles for solar panels present in South Korea.Thus,in
present an analytical model which has been used to corroborate this paper, we have demonstrated alternative models used
the results obtained from the machine learning models. on a data set having non-identical variables. This especially
Index Terms—Solar power, renewable energy, inclination an-
gle, tilt angle optimization showcases the lack of requirement for a certain style of data.
190
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd Global Power, Energy and Communication Conference (IEEE GPECOM2021), October 5-8, 2021, Online Conference
inclination for the years from 2015-18 are available. Three 7 shunt connections draw power from the ground array’s
installations were considered: generation capability. The total power generated is simply the
sum of these values.
TABLE I: Systems and specifications
1) Combination and Imputation: PV generation data and
System Name Dc Rated output(kW) Inclination angle weather data were combined to include different variables
Parking lot canopy 243 5◦
responsible for generation. K-Nearest Neighbours(KNN) im-
Ground Mount Array 271 20◦ putation was used to fill the missing columns in our data due
Roof tilted array 73.7 10◦ to the periodic nature of data and time variability.
2) Amalgamation of Similar Columns: The data contains
the outputs of sensors that have been set up to monitor
the health and output of the data. All the solar arrays have
C. Data Visualization and Site Environmental Factors
different numbers of columns due to different configurations
and different numbers of sensors used . Thus it was imperative
to combine excess data and create a uniform dataset across the
data for roof, ground, and canopy solar arrays. The combined
weather station and power generation files were cleaned and
the outputs of the following modules were averaged.
• Pyranometers: Used for measuring irradiance of every
solar array in the roof, canopy, and ground system, the
columns were averaged to include the data of all the
arrays. This ensured that the data from the panels that
receives sunlight and those that were shaded by buildings
was included in the final column .
• RTD Sensors: Temperature of solar panels plays a crucial
Fig. 1: Energy Generation of the three arrays over a period of role in the amount of power generated. It affects the
two years [3] power generated inversely. The temperatures of individual
solar panels were approximated to compensate for the
We observe that the majority of the power generated is minute differences in individual temperatures and com-
generated by the canopy and ground arrays. Of the two, the bined into a single column.
ground array has steeper cliffs and higher peaks. The energy • Reference Cells: Used to measure irradiance ,these sen-
generated by the tilted roof array shows comparatively smaller sors are able to detect instantaneous change in radiation
variation, but produces significantly less energy compared to and are sensitive to pollution .Thus, these sensors provide
the other two. accurate readings. The readings have been averaged since
the individual solar arrays in a system are situated besides
each other .
• Output Power: Power measurement of individual solar
arrays in a system (different for Roof,canopy and ground),
these columns are the outputs of combiner boxes that
have been attached to each solar panel in an array and
the total power generated can be taken as the sum of
power generated of each combiner box output.
Fig. 2: Power generated over the course of one day in winter 3) Feature engineering: The data has to be converted into
2017 for the Ground Array [kW] [3] a trainable format. The Date Time column is useful, but
not in the string form. Thus the Timestamp column was
represented as a combination of sine and cosine signal to
retain distinctiveness over the period and converted to ”Time
of day” and ”Time of year”. Angles are not desirable as
training input data and cannot justify linearity. Thus the Wind
speed and Wind direction columns were converted into a wind
vector(Wx,Wy) by taking utilizing the maximum wind speed
and taking the cosine and sine of the wind angle.
4) Correlation Analysis: Columns that have maximum im-
pact on the generation were chosen from the data. Different
Fig. 3: Power generated over the course of one day in summer techniques were analysed, Spearman analysis was selected
2017 for the Ground Array [kW] [3] because of non linearity of the data. It assesses the monotonic
relationships between the data and determines linearity as well
191
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd Global Power, Energy and Communication Conference (IEEE GPECOM2021), October 5-8, 2021, Online Conference
and gives a coefficient which is a non-parametric measure algorithm which was used as an alternative since it is known
of rank correlation. The variables the table II were selected to outperform standard GBR. The model was able to predict
for further processing . The table below shows the selected the generation at original angle with 1.1% error Multilayer
features and its correlation with output power:
TABLE II: Correlation Analysis
Correlation Coefficient Variables
1 Power generated
0.882 Reference Cell
0.876 Pyranometer
0.805 Time of Day sine
0.674 RTD sensor
0.344 Temperature
0.031 Time of Year sine
-0.137 Wx
-0.151 Time of Day cosine
-0.159 Wy
-0.202 Time of Year cosine minutes
192
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd Global Power, Energy and Communication Conference (IEEE GPECOM2021), October 5-8, 2021, Online Conference
193
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd Global Power, Energy and Communication Conference (IEEE GPECOM2021), October 5-8, 2021, Online Conference
the year 2000 was around 370 ppmv, increasing by approx- Times at an interval of 1 hour were batch-processed for
imately 2 per year. For our analysis, 390 was chosen as the SMARTS2 and the average irradiance was taken. These values
carbon monoxide concentration. were corroborated with the values available from NREL data
7) Extraterrestrial Spectrum: Using Gueymard’s new spec- for locations in the United States. A average error of 2.39%
trum, proposed in 2004, results in SMARTS2 using a solar was obtained for the values calculated by SMARTS2 with
constant of 1366.10, which overrides any other solar constant the parameters listed above and the values obtained from the
used by legacy code in the program. This new spectrum, irradiance data. Running the simulations with different values
internally called the synthetic spectrum, is recommended for of the solar constant and changing several other parameters
normal use by Gueymard. increased the error to values as large as 15%.
8) Aerosol Model: Publicly available aerosol exponent data, The average tilted irradiance over the summer months for
viewable on AERONET, does not reveal the exact Angstrom the years 2016 and 2017 was 1.4725 kW m2 . For the winter
wavelength exponent. Because of this, we chose the urban months, it was 0.6391 kW . Approximately half the irradiance
m2
model prebuilt into the algorithm. of the summer months is observed in the winter months.
9) Turbidity: The average atmospheric optical depth at Secondly, we need to determine how much solar radiation
500nm is prebuilt into SMARTS2, which is what we have ’passes through’ after hitting the surface of the solar panel.
used. This is because the visible light spectrum generally Not all of the energy hitting the surface of the solar panel is
is used by solar panels to generate electricity, with an av- utilized by internal electronics.
erage wavelength of 565nm. All other options available for There is no standard way to go about this. Radiative
SMARTS2 check for wavelengths greater than 1000nm or transport theory is a field in itself and its technicalities are
require specialized observations at the local site. outside the scope of this paper. Instead, we use a simplification
10) Albedo: The surrounding environment geometry of of Blinn’s model.
the solar installation needs to be taken into account when
Assume that a layer of dust having thickness T settles on
considering the far-field albedo for calculating backscattering.
the surface of the solar panel. This dust layer consists of
There is no fixed way in which to go about this. To measure
small spherical particles. Let the number density be n, the
the local albedo, a pyranometer must be used to measure
number of small particles per unit area. The actual volume
temperatures at several places around the solar installation. 3
of the layer is then 4nπr 3 , where r is the radius of the
There are no recorded data available for the albedo of the NIST
particles (assumed uniform). This density will practically be
during the year range 2016-18. Because of this, we chose to
very low. We also make a very important assumption that
use SMARTS2’s prebuilt non-Lambertian surface, ’old runway
each particle’s individual albedo is very low. This implies that
concrete’, based on the fact that the solar installations are
almost all of the energy hitting each particle is fully absorbed,
surrounded by buildings. This effect is modeled as an increase
and that reflections from one particle to another can be safely
of reflectance with the tilt angle,
ignored. This is justified because the site itself is situated in
1 an environment consisting of soil, asphalt, and concrete. Any
ρb = ρb0 (1 − cosZLn (1 + ))0.35 (1)
cosZ dust settling on the solar panels will mostly consist of tiny
where Z is the zenith angle, ρb is the reflectance for beam salt, asphalt, and concrete particles eroded by wind, rain, and
radiation. It should be noted that the inbuilt data have been snow.
measured for a zenith angle of about 53°, but there is no easy
way around this without further data. After ρb is calculated,
the final value is obtained by ρd = 1.167ρb
11) Tilting: For the three different angles situated at the
solar installation, six different input files were created. This
was because the orientation of the panels is east-west, so one
triplet of files accounts for all the east-facing panels and the
other for the west-facing.
12) Spectral Ranges: SMARTS2 was built for calculations
Fig. 9: The setup
for wavelengths ranging from 280nm to 4000nm. However, so-
lar panels require wavelengths in the range of visible light, as
previously mentioned. Because of this, we set the wavelength Assume that the angle of incidence is i, the angle of
range from 380nm to 750nm. The Solar Correction Factor, the reflection is R, and the angle between the directions of
inverse of the square of the actual Earth-Sun distance, varies incidence and reflection is a. We call this angle the viewing
0.966 and 1.034. However, for simplicity’s sake, this factor is angle.
set to 1. 14) Viewing Angle Function: If each particle is too small
13) Simulation methods: SMARTS2 offers a few ways to to be individually seen, the net observed brightness will be
simulate the solar radiation [5]. It provides the irradiance at a the integral over a particle area. This is simply the viewing
certain decimal time, to any practical accuracy. The Rayleigh angle a. We observe that as a tends to π, the brightness of
optical mass of the air at a particular time can be used as well. that particle will be tend to 0. We now introduce the viewing
194
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd Global Power, Energy and Communication Conference (IEEE GPECOM2021), October 5-8, 2021, Online Conference
angle function, Ω(a), that will give us the brightness of the ,where cosθ is cosScosZ + sinSsinZcos(χ − χs ). Here, S
observed particle when viewed from different angles. is the actual inclination, χs is the surface azimuth, χ is the
The amount of radiation reflected will be hampered by dust sun’s azimuth, and Z is the zenith angle. For a particular
particles in the line of sight. If the beam of light is assumed instant in time, everything aside from S is constant. Averaging
to be a cylinder of radius r, the probability of the entire every value for our site, we only optimize the tilt angle S by
beam hitting the observation instrument is P (0; V ), that is, differentiating with respect to S and equating to 0, since the
the probability of there being 0 particles in a given volume V . average values of Esλ and Esλ are known. This results in an
The number of particles in a given volume at any particular optimized angle of 14.62°for every installation available.
instant of time is simply nV . For small values of n, we model
IV. C ONCLUSION
this as a Poisson process and hence
We conclude that our theoretical model is in agreement
P (0; A) = e−nV (2) with the results obtained by machine learning(ML), giving
us a framework to reasonably guess the inclination angle for
Assume that the albedo of a particle is µ. The brightness of a photovoltaic installation site given readings for the local
the given layer of dust, calculated using [7] will simply be the weather conditions. Our ML models optimize the angle based
following: purely on weather data and provide approximately 10% greater
πr2 output. The table V shows the angles obtained from the
B= µΩ(a)nP (0; V )T (3)
cosR different models that have been presented in the paper.
Now all that remains is choosing an appropriate Ω. There are
TABLE V: Predicted angles
several options available. We can set Ω = 1 for an isotropic
approximation. However, this feels too simplistic. We choose Name Predicted Inclination Angle
the Rayleigh function for this purpose:
GBR 16◦
Ω(a) = 0.75(1 + cos a). 2
(4) XGBoost 15◦
MLP 14.4◦
Other, more accurate functions such as the Henyey-Greenstein Analytical Model 14.62◦
elliptical fit could have been chosen, but those functions
require one more parameter which must be empirically mea-
sured. Data are not available for the surfaces we require for R EFERENCES
this function, and hence we go with pure Rayleigh scattering. [1] Mohamed Nfaoui, Khalil El-Hami, Extracting the maximum energy from
Dust particles are of the order of 0.01 mm in radius. The solar panels, Energy Reports, Volume 4, 2018, Pages 536-545, ISSN
United States’ Environmental Protection Agency maintains 2352-4847, https://doi.org/10.1016/j.egyr.2018.05.002.
[2] Gi Yong Kim, Doo Sol Han, and Zoonky Lee. ”Solar Panel Tilt
a table of acceptable particulate concentrations for healthy Angle Optimization Using Machine Learning Model: A Case Study
living. We assume that this concentration is slightly more of Daegu City, South Korea”. In: Energies 13.3 (Jan. 2020), p.
µg 529.doi:10.3390/en13030529
for urban areas, and use a round figure of 50 m 3 (which is
[3] Boyd M, Chen T, Dougherty B (2017) NIST Campus Photovoltaic (PV)
slightly higher than the 35 recommended) for n. For direct Arrays and Weather Station Data Sets. National Institute of Standards
normal reflection, R and a will be 0. The albedo of concrete and Technology. U.S. Department of Commerce, Washington, D.C.
is around 0.4, the albedo of asphalt is around 0.05, and the [Data set]. https://doi.org/10.18434/M3S67G
[4] Tianqi Chen and Carlos Guestrin. ”XGBoost”. In:Proceedings of the
albedo of soil is around 0.15. Averaging these three to get an 22nd A(CM, SIGKDD) In-ternational Conference on Knowledge Dis-
albedo for our dust, µ will be 0.2. All that remains is choosing covery and Data Mining. 2016
an appropriate T . Assuming that T = 0.02mm (assuming a [5] Gueymard, C. (1995). ”SMARTS, A Simple Model of the Atmo-
spheric Radiative Transfer of Sunshine: Algorithms and Performance
single-particle layer), B turns out to be 3.53 ∗ 10− 11. In fact, Assessment.” Professional Paper FSEC-PF-270-95. Florida Solar Energy
any reasonable value of T , even up to a few centimeters, still Center, 1679 Clearlake Rd., Cocoa, FL 32922.
shows that the order of the reflected radiation hovers around [6] Gueymard, C. (2001). ”Parameterized Transmittance Model for Direct
Beam and Circumsolar Spectral Irradiance.” Solar Energy (71:5); pp.
10−6 , signifying that the dust layer reflects very little radiation 325â346.
and can be safely ignored. [7] Blinn, J. F. (1982). Light reflection functions for simulation of clouds
The amount of radiation available for the solar panel to and dusty surfaces. ACM SIGGRAPH Computer Graphics, 16(3), 21â29.
doi:10.1145/965145.801255
utilize will now simply be the amount of radiation hitting the
surface, and only the internal efficiency of the solar panel acts
as a roadblock. For a given efficiency of 14%, the amount of
energy generated will be 0.14 times the incident energy.
Compensating for the tilt itself is required. A relation
between Esλ , the global tilted irradiance, and Ebλ , the global
irradiance, must be established. A first-order approximation of
the formula used by SMARTS2 is as follows:
195
Authorized licensed use limited to: to IEEExplore provided by University Libraries | Virginia Tech. Downloaded on June 06,2022 at 10:46:33 UTC from IEEE Xplore. Restrictions apply.