2.1. Modeling of Photovoltaic Array
In this research, the utilized SAPV model consists of two main parts, a PV cell model and a battery model. The single-diode
Rp model [
30] is used in this study. The I-V characteristics of the PV cell are obtained by
where
I and
V are the cell’s output current in (A) and voltage in (V), respectively.
IPh is the photo current in (A),
IO is the diode saturation current in (A),
RS and
RP are the cell’s series and parallel resistance values in (Ohms), respectively,
a is the diode’s ideality factor,
K is Boltzmann’s constant (1.3806503 × 10
−23 J/K), and
T is the cell temperature in (K).
The five parameters of this model (
IPh,
IS,
a,
RS, and
RP) depend on temperature and radiation [
30,
31]. In this study, differential evolution with adaptive mutation (DEAM) is proposed for estimating the five parameters by using the method in [
32]. In DEAM, a set of measured I-V curves is first obtained [
32]. This set is shown in
Figure 1 for the used PV module (Kyocera KC120-1). Then, for each measured I-V curve, DEAM is used to find the values of the five parameters that result in the least erroneous simulated I-V curves.
This is done by formulating an objective (fitness) function that calculates the root mean square error between measured and simulated PV module’s current. The objective function is described by,
where
where
Ve and
Ie are the experimental (measured) values of the PV panel’s voltage and current, respectively,
θ is a vector whose elements are the five parameters and
n is the number of PV module’s current measurements of one I-V curve. DEAM is based on the classical differential evolution (DE) algorithm [
33], and it consists of the same steps (initialization, crossover, and selection). As for mutation, the process in DEAM algorithm is different. In the DEAM algorithm, two mutation types may be used depending the type of the objective function. These types are conventional mutation in differential evolution algorithm (
Md), and the mutation of electromagnetism algorithm’s (
Me). This process assures better accuracy and lower execution time [
33].
The flow chart of DEAM is shown in
Figure 2. Similar to the DE algorithm, the solution is called individual, while the group of solutions are called population. Parent is the first population that a generation starts, while child is the fourth resulting pollution in a specific generation.
In general, the variables of any optimization algorithm that are controlled to reach the optimal solution are called decision variables. Thus, in this research, the five parameters of the PV modules are the decision variables. During the optimization process, the solution space matrix has a specific number of decision variables (rows of a population). Meanwhile, this matrix has a specific number of number of individuals (columns of a population). The following equation describes a population (
POP) of a generation (
G),
where
where
is an individual vector that implies decision variables (target vector) in the generation
G,
d is the number of decision variables (from 1 to
D), and
Xd,i is the value of the
d th decision variable in the
i th individual. Finally,
i denotes the index of individuals (from 1 to
N). The details of the proposed algorithm’s steps are presented next.
A population is created randomly whereas the value of each decision variable in each individual is determined as follows,
where
is the initial value of the
d th decision variable in the
i th individual,
Xd,L,i and
Xd,H,i are the lowest and highest limits for a decision variable’s value, and
R is a random number that lies between zero and one. This equation guarantees uniformly distributing the initial values of the five parameters.
After a
D by
N sized initial population is formed, the mutation process is executed either according to
Md or
Me based on a condition. In
Md, a mutant vector
is generated for each target vector
according to the equation below,
α, β, and γ are different individual indices and there are randomly selected subjects to not having any of these indices coinciding with the target vector’s index; F is a scaling the mutation process parameter and it value is usually in the range of (0.5, 1).
As for
Me the mutation process is also based on three distinct individuals that are chosen randomly from the current population. However, here one of the selected individuals can be the same as the target individual. Mutation in the EM algorithm depends on the force applied by two of the three individuals (
and
) to the third one (
). In order to get this force, the charges
(between
and
) and
(between
and
) are first calculated,
where
f(
X) is the fitness value for the individual
X,
and
are the worst and best individuals in the population
G, respectively. The force that
and
exert on
is given by,
where
Finally, the mutant vector according to
Me can be found by,
The criterion by which DEAM chooses between
Md or
Me is given below,
where σ
G is the standard deviation vector of a population’s row vectors for the
G th generation, σ
0 is the same as σ
G but for the initial generation, ‖σ‖ is the norm of that vector, and
ε2 is a parameter that controls switching between
Me and
Md; this parameter is given a value within the interval [0,1].
Here, the conventional crossover process of DE algorithm’s is applied. The result of this phase
i an initial vector called
. This vector is tested then according to the following equation,
where
dR is an index with a value in the range of (1, D),
CR is the cross over rate that controls the operation of the crossover, and it usually has a value in range of (0.5, 1).
Using the role implied in equation 15,
is named target vector
or mutant vector
. Here, if
CR has a value of one, the mutant vector is chosen as the trial vector. However, a trial vector may contain decision variable values that lie outside the preset limits for the adapted variables. Thus, the reassigning process of the trial vector by using Equation (16) in the case that the trial vector violate limits assigned for the variables.
Again, selection here is performed according to the conventional DE algorithm. The selection stage begins when all individuals of the current population have been recombined (have gone through mutation and crossover). In the selection stage, the best individuals from the trial and target populations are chosen. Since the objective function is defined in terms of RMSE, the individuals with the smallest fitness values are selected as the individuals of the parent population for the next generation. This process is described by,
The four steps are repeated for the new generation, and the ones that follow, until the maximum number of generations (Gmax) is reached.
The performance of DE is dependent on the mutation factor (
F) as well as the crossover rate (
CR). These parameters normally have constant values in the classical DE algorithm. Improper values of these parameters can result in a long convergence time. In the proposed algorithm, the values of both
F and
CR are governed by the following logistic sigmoid function,
where
L and
H are two constants that guarantee having normal
F and
CR values (between 0.5 and 1),
L = 0.5 and
H = 1,
K is a factor that determines the steepness of the logistic sigmoid function’s curve, and
and
the are the best individuals for the generations
G and
G − 1, respectively.
The absolute error (AE) is used to measure the error between the current simulated using the estimated parameters (
IS) and the experimental current (
Ie). The average error is calculated as follows,
To get the module-level current and voltage, the PV cell current and voltage are modified as follows,
where
NPC and
NSC are the number of parallel and series cells in a module respectively,
IM is the module’s current, and
VM is the module’s voltage. Similarly, the array level current and voltage are determined as follows,
where
IA and
VA are the array’s current (A) and voltage (V),
NPM is the number of parallel modules, and
NSM is the number of series models. The output of the PV array in (W) is simply,
An MPPT controller is assumed to be used in this method. Therefore, the output power is always maximum. Since an hourly time step is used, PPV is also the energy produced per hour from the PV panels.
2.2. Battery Model
The lead acid battery model developed in [
34] will be used in this paper. This model has been shown to be adequate for simulating SAPVs. It is an electrical equivalent circuit-based model that has two elements, a voltage source (
V1) and a series resistor (
R1) as shown in
Figure 3.
It consists of two modes, the charge mode and the discharge mode. The equations for the charge mode are,
where
VCH is the charge mode source voltage,
ns is the number of battery cells in series,
SOCmax is the maximum value of the battery charge in (Wh),
SOC is the instantaneous value of the battery charge in (Wh), and
Vbat and
Ibat are the battery cell’s voltage (V) and current (A), respectively.
SOCmin is the minimum allowed state of charge in (Wh).
DOD is the maximum allowed depth of discharge percentage. Specifying this value is important as it has a great impact on the battery’s life. Greater values of
DOD lead to shorter battery life spans.
Cbat is the battery’s nominal capacity in (Wh).
The equations for the discharge mode are given below,
Ibat is positive in the charge mode and is negative in the discharge mode. The equation that updates the battery’s state of charge is given as,
where
SOCn(
t) is the instantaneous normalized (divided by
SOCmax) state of charge at simulation step
t,
SOCn(
t − 1) is
SOCn(
t) of the previous time step,
k is the charge/discharge efficiency, and
D is the self-discharge rate in (hr
−1). Finally, the hourly energy that enters or leaves the battery is given by,