1. Introduction
Solar energy is one of the important energy sources, and many countries, therefore, have realized the important role of renewable energies due to the depletion of conventional energy sources [
1,
2]. In particular, interest in solar power generation is increasing due to the dangers of nuclear/thermal power generation that have recently occurred in several countries. The advantages of using solar power generation are as follows. First, because it uses solar energy, it does not require fuel costs and is a clean energy source that does not generate air pollution or waste. Second, because the power generation unit is composed of semiconductor devices, there is no vibration and noise, and automation is easy. Lastly, efficient power generation is possible because power can be maximized during the daytime and summer when the power load is high.
However, photovoltaic power generation has several problems. First, there is a time constraint on energy generation. This is a very important issue and inevitably causes the problem of maximum efficiency and storage capacity in a limited time. Second, the profitability is not good due to the high unit price for power generation. For example, it is about 4 to 5 times more expensive than nuclear power generation.
In everyday life, one can often see solar panels installed in multi-apartment buildings to generate solar energy, as shown in
Figure 1. An installation angle of the solar panel is important to collect photons efficiently [
3]. If the solar panels are installed in a parallel direction to the building, then the energy efficiency is usually not optimal at each location. Therefore, we propose a simple mathematical algorithm for setting the angle and direction of the solar panel that can produce the maximum solar energy efficiency at each location based on the latitude and azimuth angle under several constraints.
As there is a lot of interest in solar panels and photon collectors around the world, many researchers have investigated calculating their optimal tilt angles [
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18]. Not only the optimal angle calculation but also the research on factors that can affect the performance of solar panels such as wind speed [
19], weather [
20], latitude and longitude [
21] are in progress. In South Africa, the authors in [
5] calculated the annual solar insolation for all possible angles on fixed collectors using the data obtained from the nine measuring stations. Other studies proposed using incident beam radiation-based maximization approach [
6], a latitude-based optimization approach in the Mediterranean region [
7], and non-linear time-varying particle swarm optimization in Taiwan [
8].
As most researchers have reported that the maximum power can be harvested when a solar panel is equipped with a sun-tracking system. Referred researches suggest that the different adjustment number of intervals from 4 to 12 to obtain maximum energy in each country: 8 times a year in Iraq [
10], 12 times a year in Syria [
11], and also 12 times a year but each month adjusting the tilt angle which can achieve 8% more surface radiation compared with yearly adjustment in Saudi Arabia [
12]. Furthermore, the solar panel with a fixed tilt angle without representing the number of yearly adjustments got 10–25% higher irradiations with increasing latitude in USA [
13], the variation of optimal tilt angle throughout a year is between
and
in Turkey [
14].
In [
16], the authors present several models to calculate the optimal slope of the solar panel accurately at any location in the world. Using the proposed models, the authors estimate the annual energy output along with the amount of irradiance stored per hour according to the slope of the solar panel. There is a study that calculates the optimal tilt angle of a solar panel using machine learning recently [
17]. In this study, energy generation simulations of panels are performed to calculate monthly and yearly panel angles, and economic cost effects are also evaluated in real-world environments. In [
18], the optimal solar panel angle is calculated for the maximum energy yield. Calculating the cosine effect of the angle of the sun and the angle of the panel, the authors present a permanent fixed optimal angle but also a four-season or monthly adjustment to improve the total annual solar energy yield. In [
22], the authors investigate the arrangement of solar panels for various spaces. Solar panels can be arranged to maximize energy production in limited spaces such as rooftops of buildings. The results suggest that the suitable deployment of solar panels could increase energy production by up to 6%. In [
23], the authors introduce a new term, the tolerance angle. The tolerance angles refer to the angular range of optimal solar panels that minimize economic losses. It can be useful during actually installing solar panels.
The main purpose of this paper is to present a mathematical algorithm for the optimal orientation of solar panels for multi-apartment buildings under several constraints. Let
and
be the representative of the solar beam and normal vector of the panel, respectively. Then, we consider the following optimizing problem
when the solar vector
and certain constraint for
is given.
The outline of this paper is as follows. A mathematical model for finding the optimal position of a solar panel for buildings is described in
Section 2. Numerical results are listed in
Section 3. We finalize the paper with the conclusion in
Section 4. A code implementation is included in
Appendix A for users who may not be familiar with the content.
2. Mathematical Modeling
In this section, we propose our mathematical modeling to derive the optimal orientation of solar panels under several constraints. First, we consider a rectangular panel
(represented dark gray) whose horizontal and vertical lengths are
and
, respectively, as shown in
Figure 2.
As shown in
Figure 2a, we suppose that the panel
is on
-plane and the coordinates of
, and
C are determined automatically. Then, we move the solar panel while keeping the coordinate of
fixed. Moreover, we fix the height of panel
. We then obtain a moved solar panel
, which is represented by light gray. Here, let
a and
b be the lengths of the perpendicularity from
and
to the plane
, respectively. We can know that the length of the perpendicularity from
to
is
. Note that the foot perpendicular on the plane
from
is a point on the plane, not
B. Similarly, it is important to know that each foot perpendicular on the plane
from
and
is also a point on the plane. By using the Pythagorean theorem, we can obtain the coordinate of
as
. However, we only obtain the
x-coordinate of
as
b. In this case, we define the coordinate of
as
, in which
y and
z are unknown constants. The purpose of our modeling is to find the best-fitted normal vector of the plane
to a given sunlight vector. In other words, finding
is our primary goal. In our modeling, we can get the two equations from the geometry. The first equation is obtained from the fact that the length of
equals the diagonal of a rectangular panel. That is,
Moreover, we know that the length of
is equal to the height of the panel,
, we have the following
Then, we can combine the two Equations (
2) and (
3) to get
y and
z in terms of
a,
b,
, and
as follows:
Now, we get
from the fact that it shares the midpoint of the rectangle (
). To find the normal vector
of plane
, we define both vectors
and
using
, and
. By using the cross product of
and
, we can find the normal vector
as follows:
Similarly, we consider the case in which
B is fixed as shown in
Figure 2b. Following the above method, we can obtain the specific coordinates of
and
, which are moved points from
and
C, respectively. To sum up, let us assume that the coordinates
and
C are given as follows:
For the cases (i) fixed
A and (ii) fixed
B, we can derive the remaining coordinates of the panel as follows:
Subsequently, we need to evaluate the normal vector of the panel. In multi-apartment buildings, if an inclination angle is formed between the panel and the bottom plane perpendicular to the wall where the panel is installed less than a certain degree, it can be a nuisance downstairs due to a shade from the panel. For this reason, the angle is restricted by regulation, and we take a threshold as
in this paper. Therefore, we can set the maximum value of
b to
; hence we have the constraint
for the problem (
1).
Figure 3a shows the curved triangular region where all the possible normal vectors can be located. Note that we set
for simplicity.
There are two cases for the given vector representing a solar beam
. One is in the curved triangular region, and the other is outside of the curved region. We just take
to the former. However, one cannot take a normal vector that coincides with
if
is outside of the region. In this case, we have to choose
such that
is maximized. Such a vector can be found as normalizing the vector, which is given by the projection of
to the plane generated by any two vectors that lie on the nearest boundary of the region to
.
Figure 3b depicts the process of how to find the corresponding fitted normal vector to
.
To be more precise, we can obtain the normal vector
as follows:
where
. An important thing is that we can simplify the representation of boundary vectors as the relation between
a and
b. Three endpoints of the triangular boundary are expressed by (i)
,
, (ii)
,
where
A is fixed, (iii)
,
where
B is fixed. Thus, one can easily get the best-fitted orientation for the solar panel by following the above process.
The solar beam
is treated as a given constant throughout the whole process so far. The only remaining thing is, therefore, to choose an appropriate representative
. One way to find the representative of a solar beam is by applying the mean value property to the trace of the sun. Assume that Earth is a sphere, and the orbit of Earth is a circle. Then the azimuth can be computed. Considering the spherical coordinates system while looking at the celestial body from the current position. Note that we fix the current position as Seoul, whose latitude is approximately
. The south meridian altitude of the sun is on a great circle of spheres when the celestial body passes through the meridian of Earth. Furthermore, there are two times when the orbit of Earth and its axis of rotation are perpendicular; we call this vernal/autumnal equinox, respectively. Moreover, summer and winter solstices are parallel to the equinox. Therefore, the procedure assumes that the values between the maximum and minimum south meridian altitude have the same normal vector. To depict it clearly, we present
Figure 4a as follows.
Because the normal vectors of solstice and equinox are identical, we can easily find the trajectory of average solar movement via the intersection curve with this unique normal vector. Then we can compute
if we know the azimuth angle of the place to install the solar panel. Suppose that we wish to install the panel in the building to a certain degree.
Figure 4b depicts a trace of solar movement and the corresponding representative solar vector.
Therefore, combining all of the above conditions, we can find the best-fitted vector out of all the normal vectors that the solar panel can take along with respect to the solar vector.
Figure 4c shows the evaluated solar vector and the derived best-fitted normal vector corresponding to the solar vector.
In summary, the optimal solar panel installation can be determined by knowing the south-middle altitude of the desired area and the azimuth angle of the building where the solar panel will be installed.
Figure 5 depicts the procedure for finding the optimal installation specification of solar panels with respect to geometric features.
3. Numerical Simulation Results
We present several numerical simulation results in this section. We fix the solar panel specification as
and
because this is the common length ratio of the standard solar panel. To evaluate the solar elevation angle
at noon, we use the following formula [
24].
where
is the latitude, and
is the declination angle defined as
where
is degree of the rotation axis of Earth, and
d represents the number of days since January 1st in 2022. For instance, one can take
for 09:00 A.M. on 4 January 2022. Note that this approximation formula is fitted to UTC + 00:00. Though there is a slight difference (up to the second decimal place) between the fixed and local time-based formula, this condition can be ignored because we consider the declination angle only up to the first decimal place. All the latitudes are sourced from [
25].
Table 1 shows monthly installation specification data with respect to the monthly arithmetic average of the south altitude of each city with the azimuth angle
from the north. Note that we use the notation
to represent the computed parameters hereafter.
Next, we present
Table 2, a monthly installation specification data with respect to the monthly arithmetic average of the south altitude of each city with the azimuth angle
from the north.
Subsequently, we present
Table 3, which represents optimal installation specification data with respect to the monthly average of the south altitude of each city with the azimuth angle
.
According to the above tables, it can be verified that the rate of change of the parameter
is nearly zero when the south meridian altitude is high, and the latitude is low. These results are independent of the azimuth angle of buildings. Because time series data can be generated, it would be better to rotate the panel in real-time; however, in the case of installing a solar panel in a residential area, it is expensive to construct the panel support that moves according to the time. Therefore, we employ a weighted mean of monthly
based on daylight time. More precisely, we adopt the following weight formula to each monthly weight
as
where
represents the length of the trajectory of the sun for the
i-th month.
Figure 6,
Figure 7 and
Figure 8 represent the weighted average values of the south meridian altitude in selected regions and those of parameters
.
In addition, we evaluate the energy efficiency compared to the panel installed in parallel to its support by using the following function,
where
is given constant and
represents a normal vector of the panel installed in parallel to its support.
Table 4 shows the annual efficiency based on (
13) for each city.
From the above results, it is effective to set the installation angle of the solar panel using the proposed method. In particular, the reason why the efficiency is higher in the area near the equator is that the south meridian altitude is much higher than in other areas.