Comparison of Intelligent Methods of SOC Estimation for Battery of Photovoltaic System

It is essential to estimate the state of charge (SOC) of lead-acid batteries to improve the stability and reliability of photovoltaic systems. In this paper, we propose SOC estimation methods for a lead-acid battery using a feed-forward neural network (FFNN) and a recurrent neural network (RNN) with a gradient descent (GD), a levenberg–marquardt (LM), and a scaled conjugate gradient (SCG). Additionally, an adaptive neuro-fuzzy inference system (ANFIS) with a hybrid method was proposed. The voltage and current are used as input data of neural networks to estimate the battery SOC. Experimental results show that the RNN with LM has the best performance for the mean squared error, but the ANFIS has the highest convergence speed. Keywords—Lead-acid battery; SOC; FFNN; RNN; ANFIS; gradient descent; levenberg-marquardt; scaled conjugate gradient


I. INTRODUCTION
Today, several environmental issues exist, including the depletion of fossil fuels and the dangers of nuclear power generation.For these reasons, the application of renewable energy has increased, and research on solar power has been actively conducted.Photovoltaic (PV) systems can be categorized into grid-connected systems and stand-alone power systems, depending on whether the system is connected to an electrical power-generation system.In particular, in the stand-alone power system, the demand for solar streetlights is urgently increasing, including low-power light-emitting diode (LED) lamps that are used to replace conventional halogen security lighting [1].The solar streetlight system consists of solar-panel modules that convert solar energy into electricity, a secondary battery that stores the developed power, and a stand-alone (off-grid) system.The stand-alone system has the following advantages: 1) it does not require electric power installation, because the commercial power is not connected, and 2) it has a CO 2 -reduction effect because it is operated by PV power generation.
The operation time of the solar streetlight only depends on a secondary battery.Days when sunshine time is less than 0.1 hour are considered sunless days, and solar streetlights should be guaranteed to operate for more than three sunless days.
It is essential to estimate the state of charge (SOC) of leadacid batteries in real time for the following reasons.First, we must avoid reliance on the initial SOC of the battery.This allows more effective control of the power consumption of LED lamps.Second, the lead-acid battery is the most commonly used energy-storage device for PV systems.According to some researchers, lead-acid batteries will survive in the future.
A battery is a device that generates electrical energy through a chemical reaction, and it has nonlinear characteristics in response to parameters such as the ambient temperature, internal resistance, and capacitance.For these reasons, it is very difficult to estimate the SOC of a battery correctly.
There are many methods for estimating battery SOC [2].The internal-impedance method estimates the SOC by measuring the internal-impedance change according to the charging and discharging of the battery.However, it is difficult to apply in a state where the cell is reacting, because it is very sensitive.The kalman-filter method is difficult to apply because of the complexity of the parameters and algorithms.The current-integration (CI) method [3] involves subtracting the initial SOC value by integrating the actual charge and discharge current.However, this method cannot estimate the initial SOC, and because of the accumulated errors of the leakage current and current sensing over time, accurate SOC estimation is impossible.The open-circuit voltage (OCV) [4] method involves measuring the voltage in the no-load state.However, this method is difficult to apply to real-time systems because it uses the measured OCV at the chemical equilibrium inside the battery.
Neural networks have proven to be a promising paradigm for intelligent systems.They have been trained to perform complex functions in various fields, such as pattern recognition, identification, and classification [5].Their ability to learn complex nonlinear input/output relationships, their use of sequential training procedures, and their adaptability to data are three outstanding characteristics of neural networks.Some popular modules of neural networks have shown abilities of associative memory and learning [6][7][8].To allow the network to perform a specific classification and clustering task efficiently, the learning process comprises updating the network architecture and modifying the weights between the neurons.The neural network can efficiently model a variety of input and output relationships.Compared with procedural models, it has the advantage of a shorter execution time [9,10].
In this paper, SOC estimation methods for a lead-acid battery using a feed-forward neural network (FFNN), a *Corresponding Author.www.ijacsa.thesai.orgrecurrent neural network (RNN), and an adaptive neuro-fuzzy inference system (ANFIS) were proposed.The FFNN and RNN models were applied with three different training methods: gradient descent (GD), scaled conjugate gradient (SCG), and levenberg-marquardt (LM), under the same network configuration.The ANFIS model was applied with a hybrid training method.Also, we compared the performance of the different networks.
In Section II, research on battery SOC estimation is introduced.In Section III, neural network based battery SOC estimation methods were proposed.In Section IV, experimental results for the FFNN, RNN, and ANFIS models were proposed.Finally, the paper is concluded in Section V.

A. Open Circuit Voltage Method
The open circuit voltage (OCV) method is widely known as a battery SOC estimation method.The OCV method is very accurate in estimating the SOC when the lead-acid battery reaches the stabilization phase.In addition, data must be constructed through SOC-OCV relationship experiments.Although estimating the SOC from a battery is one of the most effective methods for estimating the SOC using OCV, this method requires a condition in which the circuit is opened or no current flows, and it takes time to wait for the battery to stabilize internally.For this reason, this method is difficult to use in real-time estimation.

B. Current Integration Mehtod
The current integration (CI) method is a real-time battery SOC estimation method based on CI.The SOC at time  is shown in (1), and the basic principle of the CI method is to add all the charges flowing into and out of the battery in terms of ampere-hours [11].The CI method requires determining the initial SOC and performing accurate current measurement.Although the initial SOC can be estimated via the CI method using the OCV-SOC data sheet, the OCV-SOC data sheet becomes inaccurate as the battery ages.Thus, It is needed to renew the data sheet to perform accurate battery SOC estimation.In addition, there is the disadvantage of accumulated errors over time.
Where,  is the initial time,  is the battery current, and is the nominal capacity of the battery.

III. PROPOSED SOC ESTIMATION METHODS BASED ON NEURAL NETWORK
In this paper, we propose methods for estimating the leadacid battery SOC using an FFNN, an RNN, and an ANFIS.To perform lead-acid battery SOC estimation through the neural networks, we selected the voltage and the current as input parameters for these models.The reason for using these two parameters is that they can be measured easily, and have important relationships with the battery SOC.A schematic diagram of the lead-acid battery SOC estimation methods based on the proposed neural networks is shown in Fig. 1.Also, SOC at time  is defined as shown in (2) by us, to set the battery SOC range as 0% to 100% [12].
Where,  is the initial time,  is the battery current, and is the measured capacity of the battery.

A. Feed-Forward Neural Network
The feed-forward neural network (FFNN) is a multilayer neural network with one or more hidden layers.The basic structure is composed of an input layer, a hidden layer, and an output layer, as shown in Fig. 2. Each layer is composed of nodes (neurons) and the weights connected between each neuron.The input pattern is multiplied by the weights between the input layer and the hidden layer, and it passes through the activation function of the hidden layer.The output of node j in the hidden layer at epoch and output of node k in the output layer at epoch , as given by ( 3) and (4).
Where, is the number of input samples, and is the activation function of the hidden node .
Where, is the number of hidden nodes, is the activation function of the output node .
The error of the output pattern for the target pattern at output node k at epoch is defined by (5).The error is calculated and the weight is modified again through the backpropagation method.As this process repeats, it is corrected to the optimal weight to obtain the target output pattern using the input pattern.If this model is generalized well, we can obtain the target pattern for un-learned input patterns. ( Where, is the target value, and is the output value at output node k at epoch .

B. Recurrent Neural Network
The recurrent neural network (RNN) is a representative model for processing sequence data.It differs from the generalization model of the existing FFNN structure, as shown Fig. 3.The most important feature of an RNN is that it has the state of the hidden layer at time , as shown in (6).Where,  represents the activation values of the hidden layer at time  , which are replicated at time  and accumulate past information, is the activation function of the hidden layer,  is the input at time , is the weight matrix between  and  , and is the connection matrix between  and  .The output at time  as shown in (7).
Where, is the activation function of the output layer, and is the weight matrix between  and y  .

C. Adaptive Neuro Fuzzy Inference System
In the adaptive nuero fuzzy inference system (ANFIS) model [13], the sugeno fuzzy model is a systematic method for generating fuzzy rules from the input data and the output data sets.It uses a hybrid learning method, which combines the least-squares estimator and the GD method.The hybrid learning method has the advantage of converging quickly [14].
As shown in Fig. 4, the ANFIS is divided into six layers: the input layer, fuzzification layer, rule layer, normalization layer, defuzzification layer, and summation neuron layer.Term represents the input values, and are fuzzy sets, is the output function, and y is the output at epoch , as shown in (8).
Where, , , and are the sets of arguments for rule .In the ANFIS learning algorithm, each epoch is composed of a forward calculation and a backward calculation.In the forward calculation, the training set of the input pattern is input to the ANFIS, the neuron output is calculated for each layer, and the rule consequent factor is obtained via leastsquares estimation.

1) GD training method:
The gradient descent (GD) method minimizes the error between the target output and the output value by adjusting weights.The error gradient is transmitted in the reverse direction at the th output node at epoch and is expressed as ( 9) Where, and ̇ is the derivative of the activation function of output node k at epoch .
The slope and the weight ( of the cost function for the weight between the hidden layer and the output layer are improved at the th epoch to (11).
Where, ∆ is the weight improvement amount between the th hidden node and the th output node at epoch , and  is the learning rate.
Similarly, the error signal at the th hidden node and the adjustment of the weight ( ) between the input layer and the hidden layer at the th epoch is as follows ( 12), (13), and (14). ∆ Where, ∆ is the weight improvement amount between the th input node and the th hidden node, and is the error gradient that is reversed from the hidden layer to the input layer at epoch .

2) SCG training method:
The scaled conjugate gradient (SCG) training method is known to be effective for large problems.It uses the second-order information, without the line-search process.Thus, amount of using memory can be reduced by reducing the amount of computation of gradient information.The final SCG algorithm is detailed below [15].① Choose the weight vector ̃ and scalars 0< σ ≤ 0 −4 , 0< λ ≤ 0 −6 , λ ̅ 0. ⑨ If the steepest descent direction ̃ 0 ̃ set p = p + 1 and go to ②; else, terminate and return ̃+ as the desired minimum.

3) LM training method:
The levenberg-marquardt (LM) training method [16] is a deformation of the Newton method.The algorithm has a faster convergence of second orders, fewer iterations, and does not need to compute the Hessian matrix.For some network models with few parameters, the training speed of the algorithm is higher [17].Let N be the vector of the weight and bias of each layer in the iterative training is given by (15).The delta N is the adjustment www.ijacsa.thesai.orgquantity of N, and adjusting N means the regulation of the weights and thresholds of each layer in the network; finally, the goal of training the network is achieved.Where, E(N) is expressed as , constituent vectors, J(N) is the Jacobian matrix given by ( 19), and S(N) is the error function given by (20).
Because the LM algorithm is an improved form of the Gauss Newton method, ∆ is given as shown in (21).
Where, I is the unit matrix, and  0 is a constant.
When  = 0 is used for the Gauss Newton method, when larger, LM approaches the small-step GD method.For training, the modification factor is changed from  to .If the training fails,  is increase or, decrease it.The solution of     − always exists, because of it is positive value.Thus, the LM algorithm is superior to the Gauss Newton method.The LM algorithm steps are as follows.
① The allowable values, coefficients, thresholds, weights of error training, and k = 0 (k is the number of iterations) are initialized.
② Calculate the output of network and the expression function P(N) and Jacobian matrix J(N).
④ If P(N) < , the end; otherwise, use N + ∆ as the weights and thresholds to recalculate the expression function P(N).When P(N) is less than the P(N) of ②, set  / and p = p + 1, and return to ②; otherwise, set   and return to ③.

A. Data-Acquisition Environment
We set up the experimental environment to obtain the real data required for lead-acid battery SOC estimation, as shown in Fig. 5.The experimental environment composed of a lead-acid battery, an electronic load, a power supply, a battery controller, and a PC.Further, by connecting the battery controller and the PC in series, the real-time battery data are monitored and collected by the PC.The power supply performs battery charging, and the electronic load performs battery discharging.The battery controller includes a protection function for over-charge or over-discharge of the battery and monitoring of the current and voltage of the battery in real time.The detailed specifications of the experimental equipment are shown in TABLE I. Where, and are the maximum and minimum values of x from the data that we collected.
A solar controller was used to prevent over-charging and over-discharging when the data were acquired.The battery was discharged at a constant load from the fully charged state to the discharge end voltage.The battery voltage range was 11.1 ~ 12.9.A graph of the battery discharge is shown in Fig. 6.

B. Configuration of Network
The neural network models are implemented and tested by using MATLAB.The configuration of the FFNN and RNN model is as follows: the input nodes are 2, the output node is 1, the hidden nodes are 30, the learning rate is 0.01, and the training error goal is 0.0005.We used the hyperbolic tangent sigmoid function as the activation function of the hidden layer, and the linear transfer function as the activation function of the output layer.The initial weights were random values.The cost function was the mean squared error (MSE) and is given by (23).Training is performed until the root-mean-square error (RMSE) reaches the error tolerance 0.01, and the RMSE is given by (24).

𝐸 √ ∑ 𝑝 (24)
Where, is the number of training sets, and and are the target value and output value at epoch .

C. SOC Estimation Results
We used the data obtained from the experimental setup presented in Section 4.1 and compared the proposed methods for estimation of the lead-acid battery SOC.First, the FFNN model was tested by applying three training modes, and the SOC estimation results are shown in Fig. 7, Fig. 8, and Fig. 9.
The FFNN-GD method passed 100,000 epochs to converge to the desired MSE during training, and the test MSE was 2.11.FFNN-SCG recorded 1,401 epochs, and the MSE was 2.03, which was better than that of FFNN-GD.FFNN-LM converged on 35 epochs, and the MSE was 1.78 as the test data.Thus, the MSE and epochs were superior to those of the other two training methods.

V. EXPERIMENT RESULTS
Three intelligent models (FFNN, RNN, and ANFIS) for estimating the lead-acid battery SOC in PV systems were presented.Additionally, we compared the proposed methods with regard to the MSE and epochs.
The experimental results are as follows.For the FFNN and RNN, we used three training methods and found that FFNN-LM (MSE of 1.78, 35 epochs) and RNN-LM (MSE of 1.08, 6 epochs) demonstrated excellent performance.The ANFIS www.ijacsa.thesai.orgused the hybrid learning method with GD, and according to the least-squares method, the MSE was 1.82, with 1 epoch.Moreover, the convergence speed was the highest among all the models.In summary, RNN-LM can learn at a high speed and is the most accurate among all the methods; thus, the RNN-LM method is suitable for estimating the lead-acid battery SOC because it can be generalized to the greatest extent.In a future study, the proposed methods will be applied to a lithium battery.

Fig. 1 .
Fig. 1.Schematic Diagram of the Neural Network-based Lead-Acid Battery SOC Estimation.

Fig. 5 .
Fig. 5. Experimental Setup.TABLE I. SPECIFICATIONS OF EXPERIMENTAL EQUIPMENT Item Specification Quantity Power supply
the number of training sets, is the th target value, and is the output at output node k at epoch .The configuration of the ANFIS model is as follows: the input nodes are 2, the output node is 1, the membership functions are Gaussian, and the number of rule neurons is 25.

Fig. 9 .
Fig. 9. SOC Estimation using FFNN-LM: (a) SOC and (b) SOC Error.Second, the RNN model was tested by applying the same three training modes, and the SOC estimation results are shown in Fig.10, Fig.11, and Fig.12.The RNN-GD method passed 100,000 epochs to converge to the desired MSE during training, and the test MSE was 1.67.The RNN-SCG recorded 764 epochs, and the MSE was 1.19, which was better than that of the RNN-GD method.RNN-LM converged to epochs.The MSE of 1.08 was better than those of RNN-GD and RNN-SCG.

Finally,
SOC estimation was performed with ANFIS using a hybrid training method, and the results are shown in Fig. 13.The training was completed in only one epoch, and the MSE was 1.82 as a result of the SOC estimation with test samples.All the experimental results are comprehensively compared in Fig. 14 andTABLE II.

TABLE II .
COMPARISON OF TRAINING EPOCHS AND MSE