The invention belongs to the technical field of photovoltaic cells, in particular to a photovoltaic (PV) cell parameter identification method based on an improved equilibrium optimizer algorithm.
Nowadays, serious environmental deterioration, such as deforestation and air pollution, and the rapid depletion of non-renewable resources such as traditional fossil fuels, are threatening the sustainable development of the world. In order to deal with the increasingly severe environmental problems, the long-term energy revolution and energy structure transformation has become inevitable. Among them, solar energy is regarded as one of the most promising and effective alternative energy sources, which has been widely used due to its convenient installation, abundant reserves, and pollution-free emissions. Accurate identification of electrical parameters related to PV cell models is the most important and critical step among PV system performance analysis, fault diagnosis and Maximum Power Point Tracking (MPPT). There are mainly two parameter identification methods in the prior art, namely, analysis method and deterministic method. The analysis method relies mainly on some key points on the I-V curve provided by the manufacturer, based on which a series of mathematical calculations are performed to identify the parameters of the model. This method is simple in structure, but not accurate enough in changing operating environment. Deterministic methods mainly use the convexity of P-V characteristic curve of PV system to identify parameters, which can have relatively more accurate identification results. However, this method is extremely strict on model characteristics and sensitive to initial conditions and gradient information, which make them easy to be trapped into local optimum. Therefore, how to identify the parameters of PV cell model accurately and quickly under the condition of limited measurement data has become the focus and difficulty of current research.
The technical problem to be solved by the invention: for solving the technical problems such as the existing technology cannot achieve the optimal parameter identification and is easy to be trapped into the local optimal, a photovoltaic cell parameter identification method based on the improved equilibrium optimizer algorithm is provided.
The technical scheme of the invention is as follows:
A photovoltaic (PV) cell parameter identification method based on an improved equilibrium optimizer (IEO) algorithm, comprising: step 1, establishing a PV cell model and a fitness function; step 2, based on a measured output I-V data, predicting an output data of a PV cell by a Back Propagation (BP) neural network; step 3, identifying parameters of the PV cell by using the IEO algorithm until convergence condition of the IEO algorithm is reached, and finally outputting optimal identified parameters.
Method of the step 1's establishing the PV cell model and the fitness function comprises: adopting a dual diodes PV cell model and establishing an output current-voltage characteristic equation as below:
Where IL and VL respectively indicate an output current and an output voltage of the PV cell; Ish indicates a current flowed through a parallel resistance Rsh; and the heat voltage VT is defined as:
Where T indicates a cell temperature; K=1.38×10−23 J/K indicates Boltzmann constant; q=1.6×10−19 C indicates electron charge; Iph is photogenerated current, Isd1 and Isd2 are reverse saturation current of the diode, Rs is the series resistance, Rsh is the parallel resistance, and diode ideal factors a1 and a2 are the parameters to be identified;
Selecting root mean square error (RMSE) as an objective function, and, for achieving an optimal effect, the minimum objective function is required, such that an equation of the objective function is established as below:
Where RMSE (x) is the objective function; x={Iph, Isd1, Isd2, Rs, Rsh, a1, a2} indicates a solution vector including unknown parameters to be identified; RMSE indicates the root mean square error; N indicates a number of experiments; f(VL, IL, x) is an error function which is represented as below:
Where the fitness function is designed as an extension function of RMSE, represented as an equation below:
Where Np indicates the number of predicting data.
Method of the step 2's, based on the measured output I-V data, predicting an output data of the PV cell by the neural network comprises: a main structure of the BP neural network is the same as a main structure of ordinary neural network, consisting of three parts: input layer, hidden layer and output layer; a basic process including forward propagation and back propagation; weights and biases are updated successfully based on the back propagation from the output layer to the input layer; and repeating the foregoing processes until a final iteration criterion is met.
Method of predicting the output data of the PV cell by the BP neural network further comprises: in the forward propagation, for jth neuron in ith layer, an input zjl is described as:
Where n indicates the number of the neurons of (l−1)th layer; wijl indicates a weight of ith neuron of (l−1)th layer pointing to jth neuron of (l−1)th layer; bjl indicates a bias of jth neuron of lth layer; ail−1 indicates value of zjl calculated based on sigmoid function
represented as:
αil=F(zjl);
In the back propagation, an error Lm of a single sample is defined as:
L
m
=L({circumflex over (y)}m−ym)
Where L is loss function, ŷm is output value of a positive sample propagation; ym is sample value; according to a chain rule, for a single sample m, a partial derivative of a weight ∇ωjkl+1 from the jth neuron of the hidden layer to kth neuron of the output layer is:
∇ωjkl+1=L′({circumflex over (y)}m)·F′(zkl+1)·αil
And a partial derivative of a bias bf is calculated by the equation below:
∇bjl+1=L′({circumflex over (y)}m)·F′(zkl+1)
By defining learning rate as μ, a weight matrix and a bias matrix are updated as below:
ωl=ωl−μ∇ωl
b
l
=b
l
−μ∇b
l
Where ωl and ∇ωl respectively indicate a weight matrix from (l−1)th hidden layer to lth hidden layer and a bias of the weight matrix ωl; bl and ∇bl indicated a bias matrix from (l+1)th hidden layer to lth hidden layer and a bias of the bias matrix b1; the weights and the biases are updated successfully based on the back propagation from the output layer to the input layer, and the foregoing processes needed to be repeated until a final iteration criterion is met.
Method of the step 3's identifying parameters of the PV cell by using the IEO algorithm until the convergence condition of the IEO algorithm is reached, and finally outputting the optimal identified parameters comprises: step 3.1, an initialization step, performed according to following equation:
C
i
initial
=C
min
+r
i(Cmax−Cmin), i=1, 2, . . . , n
Where Ciinitial represents an initial concentration of ith particle; Cmax, Cmin represent maximum dimension value and minimum dimension value; ri represents a random vector between 0 and 1; n represents the number of particles, and setting the number of iterations k=0.
Step 3.2, solution vector of each PV cell is regarded as optimization variable of the IEO; PV cell parameters are distributed within a certain range and thus the optimization variables are limited within an upper limit and a lower limit, as presented by equation below:
xhmin≤xh≤xhmax,hϵH
Where xh represents hth optimization variable which is hth PV cell parameter; xhmax and xhmin represent the upper limit and the lower limit of the hth optimization variable; H represents a set of the optimization variables.
Step 3.3, calculating fitness values of all particles according to the fitness function; step 3.4, constructing an equilibrium pool according to the fitness values of all particles; step 3.5, calculating selection probabilities of all candidate equilibrium particles; step 3.6, selecting a candidate equilibrium individual from the current equilibrium pool based on selection probabilities; step 3.7, calculating exponential terms of the particles; step 3.8, calculating generating rates of the particles; step 3.9, updating solutions of the particles, the solutions of the particles are updated by equation below:
Step 3.10, updating iteration count by k=k+1; and step 3.11, determining whether the IEO stops iteration and being convergent.
Method of the step 3.4's constructing the equilibrium pool according to the fitness values of all particles comprises: determining that final convergent state as an equilibrium state, consisting of four best particles so far and another individual particle, which are defined as the candidate equilibrium particles, from which one equilibrium pool is generated:
eq,pool={eq(1), eq(2), eq(3), eq(4), eq(ave)}.
Method of the step 3.5's calculating the selection probabilities of all candidate equilibrium particles comprises: instead of randomly selecting equilibrium candidates from the equilibrium pool, the IEO assigns different selection probabilities to all equilibrium candidates, and the fitness values of all equilibrium candidates are normalized within a range of 0 to 1, such that the selection probabilities are determined by the following equation:
Where Pmax and Pmin respectively represent the maximum selection probability and minimum selection probability; p represents mth selection probability of the equilibrium candidates; and Ep represents a set of the equilibrium candidates.
Method of the step 3.7's calculating exponential terms of the particles comprises: during a concentration updating process, the exponential terms (F) can be presented by equation below:
=(t−t
Where represents a random vector between 0 to 1, time t is an iteration function presented as following equation:
Where iter and itermax respectively represent current iteration counts and maximum iteration counts; a2 is a constant used in a local searching adjustment; for avoiding premature convergence, a following equation is added:
Where al represents a constant value proportional to a global searching ability; sign(−0.5) determines a direction of the global searching and the local searching; represents a random vector between 0 and 1.
Method of the step 3.8's calculating generating rates of the particles comprises: the generating rates (G) is calculated based on equations below:
Where is an initial value; r1 and r2 are random values between 0 and 1 respectively; GCP is defined as a control parameter of generating rate; GP represents a generation probability, indicating a proportion of particles performing state updating by using generation.
Method of the step 3.11's determining whether the IEO stops the iteration and being convergent comprises: if k>kmax, finishing the iteration of the IEO, the algorithm is convergent, and an optimal solution is outputted, and the outputted optimal solution is a result of the identified parameters; else if k<kmax, back to the step 3.2.
The beneficial effect of the invention:
1. The IEO algorithm adopted in the invention predicts and expands the output I-V data samples through data prediction based on BP neural network, so as to establish a more reliable fitness function to effectively improve the quality of solution.
2. The invention uses the IEO algorithm to allocate different selection probabilities to different equilibrium candidates according to their fitness values, so as to realize a deeper search and improve the overall optimization efficiency.
3. The actual performance of the IEO is comprehensively verified by using the dual-diode PV cell model. The case study shows that compared with Grey Wolf optimization (GWO) algorithm, the IEO algorithm of the invention can effectively improve the optimization accuracy and efficiency. Solving technical problems of the existing technology such as, cannot reach the optimal parameter identification, and being easy to be trapped into the local optimal.
In order to solve the problem that parameters are difficult to be identified accurately in the process of PV cell modeling, so as to affect the accurate modeling, the invention provides a PV cell parameter identification method based on the IEO algorithm. With fast convergence speed and high search accuracy, this algorithm can realize efficient and accurate parameter identification in PV cell modeling and simulation, thus a reliable PV cell modeling can be realized.
The object of the invention is realized through the following technical scheme: First, establishing a PV cell model; secondly, predicting output data of PV cells by using Back Propagation (BP) neural network, and establishing more reliable fitness function. Then, identifying the PV cell parameters using the IEO algorithm until a convergence condition of IEO algorithm is reached, and finally outputting optimal parameters.
Specific steps are:
Establishing PV cell model (see
where IL and VL respectively indicate an output current and an output voltage of the PV cell; Ish indicates a current flowed through a parallel resistance Rsh; and the heat voltage VT is defined as:
where T indicates a cell temperature; K=1.38×10−23J/K indicates Boltzmann constant; q=1.6×10−19C indicates electron charge; Iph is photogenerated current, Isd1 and Isd2 are reverse saturation current of the diode, Rs is the series resistance, Rsh is the parallel resistance, and diode ideal factors a1 and a2 are the parameters to be identified.
The main goal of parameter identification is to search for appropriate parameters to effectively reduce errors between the experimental data and the simulated data, which can be quantitatively evaluated by an objective function.
Here, a root mean square error (RMSE) is selected as the objective function, and, for achieving an optimal effect, the minimum objective function is required, such that an equation of the objective function is established as below:
Where RMSE (x) is the objective function; x={Iph, Isd1, Isd2, Rs, Rsh, a1, a2} indicates a solution vector including unknown parameters to be identified; RMSE indicates the root mean square error; N indicates the number of experiments; f(VL, IL, x) is an error function which is represented as below:
Since all solutions can satisfy the constraint condition (3), the objective function is directly selected as the fitness function in IEO. Based on predicted output data of the BP neural network, the fitness function can be designed as an extension function of RMSE, represented as an equation below:
Where Np indicates the number of predicting data.
Steps of predicting an output data of the PV cell by the neural network based on the measured output I-V data includes:
A main structure of the BP neural network is the same as a main structure of ordinary neural network, consisting of three parts, illustrated by
(1) the forward propagation, for jth neuron in ith layer, an input zjl is described as:
z
j
l=(Σ1nωijlαil−1)+bjl (6)
Where n indicates the number of the neurons of (l−1)th layer; ωijl indicates a weight of ith neuron of (l−1)th layer pointing to jth neuron of (l−1)th layer; bjl indicates a bias of jth neuron of lth layer; αil−1 indicates value of zjl calculated based on sigmoid function
represented as:
αil=F(zjl) (7)
L
m
=L({circumflex over (y)}m−ym) (8)
Where L is loss function, ŷm is output value of a positive sample propagation; ym is sample value; according to a chain rule, for a single sample m, a partial derivative of a weight ∇ωjkl+1 from the jth neuron of the hidden layer to kth neuron of the output layer is:
∇ωjkl+1=L′({circumflex over (y)}m)·F′(zkl+1)·αil (9)
And a partial derivative of a bias bj is calculated by the equation below:
∇bjl+1L =L′({circumflex over (y)}m)·F′(zkl+1) (10)
By defining learning rate as μ, a weight matrix and a bias matrix are updated as below:
ωl=ωl−μ∇ωl (11)
b
l
=b
l
−μ∇b
l (12)
Where ωl and ∇ωl respectively indicate a weight matrix from (l−1)th hidden layer to lth hidden layer and a bias of the weight matrix ωl; b1 and ∇bl indicate a bias matrix from (l−1)th hidden layer to lth hidden layer and a bias of the bias matrix b1.
Thus, the weights and the biases are updated successfully based on the back propagation from the output layer to the input layer, and the foregoing processes needed to be repeated until a final iteration criterion is met.
Steps of identifying parameters of the PV cell by using the IEO algorithm including:
(1) Initialization.
An initialization step, performed according to following equation:
C
i
initial
=C
min
+r
i(Cmax−Cmin),i=1, 2, . . . , n (13)
Where Ciinitial represents an initial concentration of ith particle; Cmax, Cmin represent maximum dimension value and minimum dimension value; ri represents a random vector between 0 and 1; n represents the number of particles, and setting the number of iterations k=0.
(2) Optimization variable.
Solution vector of each PV cell is regarded as optimization variable of the IEO. In fact, PV cell parameters are distributed within a certain range and thus the optimization variables are limited within an upper limit and a lower limit, as presented by equation below:
xhmin≤xh≤xhmax,hϵH (14)
Where xh represents hth optimization variable which is hth PV cell parameter; xhmax and xhmin represent the upper limit and the lower limit of the hth optimization variable; H represents a set of the optimization variables.
(3) Calculating fitness values of all particles according to the fitness function (equation (5)).
(4) Constructing an equilibrium pool according to the fitness values of all particles.
Determining that final convergent state as an equilibrium state, consisting of four best particles so far and another individual particle, which are defined as the candidate equilibrium particles, from which one equilibrium pool is generated:
eq,pool={eq(1), eq(2), eq(3), eq(4), eq(ave)} (15)
(5) Calculating selection probabilities of all candidate equilibrium particles.
Instead of randomly selecting equilibrium candidates from the equilibrium pool, the IEO assigns different selection probabilities to all equilibrium candidates. For example, an equilibrium candidate with smaller fitness value has higher selection probability (probability to be selected). It should be noted, the fitness values of all equilibrium candidates are normalized within a range of 0 to 1, such that the selection probabilities are determined by the following equation:
Where pmax and pmin respectively represent the maximum selection probability and minimum selection probability; p represents mth selection probability of the equilibrium candidates; and Ep represents a set of the equilibrium candidates.
(6) Selecting a candidate equilibrium individual from the current equilibrium pool based on selection probabilities.
(7) Calculating exponential terms of the particles.
During a concentration updating process, the exponential terms (F) can be presented by equation below:
=(t−t
Where represents a random vector between 0 to 1, time t is an iteration function presented as following equation:
Where iter and itermax respectively represent current iteration counts and maximum iteration counts; a2 is a constant used in a local searching adjustment.
For avoiding premature convergence, a following equation is concerned:
Where a1 represents a constant value proportional to a global searching ability; sign(−0.5) determines a direction of the global searching and the local searching; represents a random vector between 0 and 1.
(8) Calculating generating rates of the particles.
The generating rates (G) is calculated based on equations below:
Where is an initial value; r1 and r2 are random values between 0 and 1 respectively; GCP is defined as a control parameter of generating rate; GP represents a generation probability, indicating a proportion of particles performing state updating by using generation.
(9) Updating solutions of the particles, the solutions of the particles are updated by equation below.
The solutions of the particles are updated by equation below:
(10) Updating iteration count by k=k+1.
(11) Determining whether the IEO stops iteration and being convergent.
If k≥kmax , finishing the iteration of the IEO, the algorithm is convergent, and an optimal solution is outputted, and the outputted optimal solution is a result of the identified parameters; else, back to the step (2).
The present invention is further explained in combination with specific examples.
The IEO algorithm and the traditional GWO algorithm are respectively used to identify parameters under the dual diode PV cell model. A total of 26 sets of measured I-V data were extracted from a 57 mm R.T.C. France solar cell for simulation under weather conditions (light intensity G=1000 W/m2 and temperature T=33° C). In order to verify the optimization performance of the algorithm in the case of insufficient measured data, data acquisition gradients of 50%, 60%, 70%, 80%, 90% and 100% were randomly set from 26 pairs of measured data. Here, only IEO uses predictive data, while other systems use raw measurements.
In order to make a fair comparison, the maximum number of iterations and population size of IEO and GWO algorithms are the same, with 100 iterations and 50 population size. Each algorithm was independently run 100 times in the PV cell model. The experimental results are shown below:
Embodiments: As shown by diagram (a) to (d) in
The above (in combination with the attached drawings) gives a detailed description of the specific embodiments of the invention, but the invention is not limited to the above embodiments, and various modifications can be made within the scope of knowledge possessed by the ordinary person skilled in the art without deviating from the purpose of the invention.
Number | Date | Country | Kind |
---|---|---|---|
202011239017.4 | Nov 2020 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2020/141889 | 12/31/2020 | WO |