2.1. Description of the PV System
The research was carried out on the basis of a photovoltaic panel system. The PV system is composed of three modules (monocrystalline type), connected to the Soladin 600 solar inverter. Photovoltaic panels are positioned at 30 degrees to the horizon and are directed to the South. The total installation power is 330 [Wp]. The PV system works in Rzeszów (geographical location 50°02′ N 22°17′ E).
The photovoltaic measurement system included measurement of voltage and DC current in front of the inverter, voltage, AC current, power and frequency at the inverter output. At the same time, measurements of solar radiation in the plane of PV panels were made using a pyranometer. All parameters were measured on a current basis; however, their average values were recorded every minute in the database. The measurement data taken in the time interval from November to October of the next year were used for the research.
In our research, two measured factors were used in the PV system: the daily value of insolation and the total value of DC energy generated during the day, calculated per 1 [m2] of the active area of photovoltaic panels. In addition, measurements of the daily maximum temperature in the analyzed period came from a meteorological station in the system’s work place. Therefore, the forecasts of the daily energy produced in a PV system will be generated on the basis of two factors, i.e., air temperature and daily insolation. Developed forecasting models generate forecasts in the perspective of one day.
The total set of measurement data consisting of 347 samples (days) was divided into a training set (174 samples) and a test set (173 samples). This manner of division allowed to achieve even coverage of the measurement space with test and learning points. The algorithm for creating the learning set was as follows:
Let MST = (mST1, mST2, …, mSTn) be a sequence of measurements ordered by ascending temperature: mSTi is a tuple <t, g>, where t is the value of temperature and g is the value of insolation; ∀i = 1, 2, …, n − 1: mSTi·t ≤ mSTi + 1·t ∧ mSTi·g ≤ mSTi + 1·g.
Let MSG = (mSG1, mSG2, mSGn) be a sequence similar to the mentioned before, but ordered by ascending insolation: ∀i = 1, 2, …, n: mSGi·g ≤ mSGi + 1·g.
The learning set is defined as M
L = M
LT ∪ M
LG, where M
LT and M
LG are given by (1) and (2):
The test set is defined as MT = MST/ML.
Based on the training set the parameters of the forecasting models were determined and the test set was used to verify these models.
Figure 1 presents the distribution of measure points in space of air temperature (T) and insolation (G).
Figure 2 presents the distribution of measurements in the air temperature set (T) and
Figure 3 shows the distribution of measurements in the set of daily insolation (G).
Figure 1,
Figure 2 and
Figure 3 allow to visually evaluate the quality of input data. From
Figure 1, we can say that elements of learning and test sets are distributed quite uniformly over the space of measurements. Two remaining charts show values of temperature and insolation typical for the temperate climate area where the city of Rzeszów lies. Short winder days, cloudy spring and autumn are the reason for many measurements with low values of insolation and values of temperature around 8 °C.
2.2. Mathematical Modes of the Power Production of Photovoltaic Panels
In the literature [
25,
26], several models of estimation of daily power production by a solar panel operating in Maximum power point tracking (MPPT) conditions are presented. One paper [
25] proposes the equation:
where:
a′,
b′,
c′ and
d′ are constants. Another model for determining the power of a PV panel is presented by the following formula [
26]:
where
G is the insolation in the plane of the PV panel,
Gn is the insolation on the surface of the Earth in the horizontal plane,
G0 is the standard insolation 1000 (Wh/m
2),
T is the air temperature,
Tj is the temperature of the PV panel,
Tjref is the reference temperature of the PV panel and
Tjref = 25 (°C),
AM is the air mass ratio,
AM0 is the air mass ratio for the Sun at the zenith,
AM0 = 1.5,
A is the active surface of the panel and
p,
q,
m and
u are constants.
The following dependence allows replacing the solar insolation
Gn with solar radiation
G. We consider the average daily parameter measurements and assume that
AM has a constant value for one daily measurement, depending on the calendar day. Because the
G values are measured, the daily change of the
AM parameter is included in the
G measurement. With these assumptions, (2) takes the form:
where
c′1,
c′2,
c′3,
c′4 and
c′5 are constants.
In [
18], the value of
c’5 ∈ (1.0618, 1.6601) was determined, depending on the panel manufacturer. In Equations (3)–(5), there is the parameter
Tj—the panel temperature. The authors made air temperature measurements. In [
27], it was shown that there is the following relationship between the air temperature and the panel temperature:
where
h is a constant and
t is the air temperature. Considering the above, Equation (3) takes the form:
and (5) can be simplified to the following formula:
where:
a,
b,
c,
d and
e and
c1,
c2,
c3,
c4,
c5 and
c6 are constants.
A higher degree of polynomial approximating power in relation to (5) results from the fact that (8) takes into account the dependence of photovoltaic panel efficiency on insolation. This phenomenon was not modeled in (5).
The measurements contain the total energy produced by one square meter of the PV panel surface during the period of 24 h, e.g., E = P × t, where P is the power of the PV panel operating under the MPPT condition, time t = const = 24 h.
Taking the above into account, we obtain energy
E =
k×
P. If we use Matlab to find the constant coefficients of the polynomial equation of the power output of a PV panel, we have:
The value of the constant k will be included in the calculated coefficients c1, …, c6. The presented analysis allows to use measured energy E instead of power in the process of calculation constants c1, …, c6.
In order to interpolate the measurement results with (7) and (8), the following parameters were determined:
a,
b,
c,
d,
e,
c1, …,
c6,
h using Matlab’s lsqcurvefit function [
28]. The interpolation method with minimization of mean square error was applied, as shown in Algorithm 1.
Table 1 and
Table 2 contain the calculated values of parameters.
Algorithm 1 A Matlab program for computing coefficients of the Equation (5). |
1: | fileID = fopen(’measurements.csv’,’r’); |
2: | formatSpec = ’%d %f %f’; sizeA = [3 Inf]; |
3: | test = fscanf(fileID,formatSpec,sizeA); test = test’; |
4: | fclose(fileID); |
5: | x1 = test(:,1); x2 = test(:,2); y = test(:,3); x = [x1 x2]; |
6: | p = [1, 1, 1, 1, 1]; |
7: | f = @(p,x) p(1) * x(:,2).^2 + p(2).*x(:,1).*x(:,2) + ... |
8: | p(3) * x(:,2) + p(4) * x(:,1) + p(5); |
9: | abcde = lsqcurvefit(f,p,x,y) |
2.3. Adaptive Network-Based Fuzzy Inference System ANFIS
In this section, the goal is to design a fuzzy application system that predicts the total daily production of electricity by the solar panel, based on insolation and air temperature.
The structure of the forecasting system was obtained using a classic engineering approach. The optimal values of the fuzzy system parameters were determined by Matlab software. The components of the system are presented in
Figure 4.
Based on the models presented in
Section 2.2 and in accordance with the principles given in [
29], let us introduce the following linguistic variables: temperature
t, insolation
g and power
P. Let us define the following sets of linguistic values for the introduced variables:
For the given values of the linguistic variables, we specify the triangular fuzzy sets, as shown in
Figure 4. We do not specify sets for the variable
P, because they will be determined automatically. Membership functions for the linguistic values are given by the following equations (where the symbols ∧ and ∨ mean the minimum and maximum, respectively):
and
Numerical constants that appear in (13) and (14) are taken from the measurements data and depend on minimal and maximal values of temperature and insolation. Ranges for
t and
g are as follows:
t ∈ (−5; 31),
g ∈ (102.6; 8371).
Figure 5 shows the chart of functions given by (13); the chart of functions (14) looks similar.
Taking into account the power models from
Section 2.2 and the values of variables
t and
g, nine rules can be formulated to determine the power produced by the panel.
P | Temperature t |
Low | Medium | High |
insolation g | low | low1 | low4 | low7 |
medium | medium2 | medium5 | medium8 |
high | medium3 | high6 | high9 |
Applying the algorithm described in [
30] and the Matlab software for the training data, numerical values for elements of the
P set were obtained, as shown in the
Table 3.
2.4. Rule Based System with Linear Membership Functions
Equations (15)–(18) and the chart form the
Figure 6 are citations from [
20]. We place them here so that the reader can understand the method without the need for checking other publications. Similarly to
Section 2.3, let us introduce the following linguistic variables: temperature
t ∈ {low,
}, insolation
g ∈ {low,
} and power
P = {
p1,
p2,
p3,
p4}. Let us assume that the temperature and irradiation are bounded:
t ∈ (−
αt,
βt),
g ∈ (−
αg,
βg). For the given values of linguistic variables, let us define fuzzy sets shown below:
Figure 6 shows the charts of the membership functions
µlow(
t) and
. The values of the variable
P will be real numbers. In [
20], it is shown that with expressed conditions the zero-order Takagi-Sugeno system described by the following rules:
IF t is low AND g is low THEN P = p1,
IF t is AND g is low THEN P = p2,
IF t is low AND g is THEN P = p3,
IF t is AND g is THEN P = p4,
is equivalent to the following equation:
Equations (3) and (19) define the same polynomial: they have a degree of 1 and both are functions of temperature and insolation. Therefore, the system can be modeled by (19) only when on the input there is given the temperature of the PV panel, not the air temperature.
2.5. Rule Based System—Nonlinear Membership Functions
As in
Section 2.4, we cite Equation (20) and the chart from the
Figure 7 from the work [
20], where it was shown that using a certain class of nonlinear membership functions, it is possible to present a zero-order Takagi-Sugeno system as the scalar product of two matrices. Let us assume the following denotes:
Temperature, t ∈ {low, medium, high}
Insolation, g ∈ {low, medium, high}
Power, P ∈ {p1, p2, …, p9}
Suppose that temperature
t ∈ (−
αt,
βt) and insolation
g ∈ (−
αg,
βg), i.e., the values of temperature and solar radiation are limited to a certain range. For given values of linguistic variables, let us define fuzzy sets as follows:
where parameter λ satisfies the condition 0 <
λ ≤ 1. In the further part of the discussion, we will assume that
λ = 1. The chart of the membership functions
µlow(
t),
µmedium(t) and
µhigh(
t) for the parameter
λ = 1 is shown in
Figure 7.
In [
20], it was shown that with the given assumptions, the zero-order Takagi-Sugeno system described by the rules:
IF t is low AND g is low THEN P = p1,
IF t is medium AND g is low THEN P = p2,
IF t is high AND g is low THEN P = p3,
IF t is low AND g is medium THEN P = p4,
IF t is medium AND g is medium THEN P = p5,
…
IF t is high AND g is high THEN P = p9,
is equivalent to the following equation:
where:
n1, …,
n9 are constant parameters. The Formula (21) is a generalization of polynomials (3), (7) and (8), so the system is able to model the daily production of energy with both air temperature and the panel temperature.
Using the test data file and the Matlab program similar to the one showed on the Algorithm 1, parameters of Equation (21) were computed.
Table 4 contains obtained values.