*Proceeding Paper* **Short-Term Wind Forecasting in Adrar, Algeria, Using a Combined System †**

**Farouk Chellali 1,2**


**Abstract:** Forecasting wind speed using only one single model may not be satisfactory; however, the combination of several models may provide better results, especially in case of doubt about the best estimator (predicator). In this paper, we propose a short-term forecasting system in order predict the hourly averaged wind speed (HAWS) in the region of Adrar, Algeria. The proposed system is based on adaptive combination of two different models. The first model is an ARMA-based model, while the second model is an artificial neural network ANN-based model. To allow adaptive combination, models are associated to time varying coefficients that are updated recursively using the recursive least square algorithm (RLS). Numerical simulations have shown that for few hours in advance, the prediction error of the combined system is lower or at least equal to the best estimator.

**Keywords:** autoregressive moving average process; artificial neural networks; recursive least square method; wind speed forecasting; combined models

#### **1. Introduction**

In wind energy industry, there is always some uncertainty about the final product due to the fact that wind speed is highly variable. The ability to predict wind speed for few hours in advance will help to ensure efficient utilization of the power generated, and therefore, enhance the position of wind energy compared to other forms of energy.

Forecasting of wind speed has been the subject of a lot of studies. Statistical and artificial neural networks are the approaches the most found in literature. Based on the hourly averaged wind speed (HAWS), several models have been developed using time series methodologies. In 1984, Geerts has proposed a short-term forecasting of wind speed using ARMA models [1]. A comparison of the performances of ARMA models developed using one-year data with those of the persistent model has indicated that for more than 1 h, ARMA models provide better forecasting. This shows that models developed using several years data could provide better results than those developed using only one-year data. Daniel and Chen (1991) have used a three-year long time series to develop ARMA models [2]. Since then, several similar studies have been realized for many sites around the world. Using 12-year data, Nfaoui et al. (1996) concluded that an AR(2) model is able to simulate the wind speed data of Tangiers (Morocco) [3]. Such methodologies have been confirmed by Kamal and Jafri (1997) using data of Quetta (Pakistan) [4]. Torres et al. (2004) used data of five locations in Navarre (Spain) to identify up to 10 different ARMA models [5].

Models based on artificial neural networks have been compared with ARMA models by Sfetsos (1999) [6]. Using only data of one month (March), the author has concluded that ANN models outperform the linear models. Using ANN and ARIMA models, More et al. (2003) have forecasted daily and monthly wind speed in India. Results indicate

**Citation:** Chellali, F. Short-Term Wind Forecasting in Adrar, Algeria, Using a Combined System. *Eng. Proc.* **2023**, *29*, 11. https://doi.org/ 10.3390/engproc2023029011

Academic Editors: Abdelmadjid Recioui, Hamid Bentarzi and Fatma Zohra Dekhandji

Published: 13 January 2023

**Copyright:** © 2023 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

that performances of ANN models are better than ARIMA models [7]. Using one-month long data (January), Erasmo et al. (2009) concluded that for the particular case of La Venta (México), a model with two layers and three neurons was the best for training and forecasting [8].

In the following work, we propose HAWS forecasting systems based on adaptive combinations of two alternative (individual) models. The first model is based on ARMA approach, while the second is based on ANN approach. Adaptive combination is done by associating time-varying weights to the alternative models. The time-varying weights are adapted recursively using recursive least square algorithm (RLS). An important motive to combine forecasts from different models is the fundamental assumption that one model cannot identify the true process exactly, but different models may play a complementary role in the approximation of the data generating process, especially in case of doubt about the existence of the best estimator.

Data used in this work are measured over four years (November 2004 to October 2008) by the meteorological station situated at the airport of Adrar, Algeria (27.9◦ N, 0.3◦ W). Because of the gaps found in time series, our study is limited only for three months (January, November, and December). Data of the three first years are used to identify ARMA and train ANN models. The four-year data are used as an independent dataset to verify the forecasting ability of the obtained models.

#### **2. ARMA Modeling**

ARMA modeling for HAWS consists of three main steps: the first step is the power transformation which is done in order to carry the wind speed from Weibull distribution to Gaussian distribution [2]. The second step is the standardization step. The purpose of this step is to eliminate non-stationarity due to daily cyclical behaviors. The last step is the identification step which consists of the order determination and parameters estimation.

#### *2.1. Power Transformation*

For lot of sites over the word, it has been found that Weibull distribution (Equation (1)) fits the wind distribution the best:

$$f(v) = \frac{k}{\mathcal{c}} \left(\frac{v}{\mathcal{c}}\right)^{k-1} e^{-\left(\frac{v}{\mathcal{c}}\right)^k} \tag{1}$$

where *v* is the wind speed, *k* is the form factor, and *c* is the scale factor.

In order to fit ARMA models to the HAWS, power transformation of the observed data must be performed. The aim of the power transformation is to approximate the distribution of the wind data from a Weibull distribution to Gaussian one. The power transformation is performed by raising each value of the observed data by the same power index. For more accurate approximation, Daniel and Chen (1991) have proposed to use *x* = *k*/3.6 as a reference to obtain more accurate index *m* using skewness statistics is given as [2]:

$$S\_m = \sum\_{y=1}^{Y} \sum\_{n=1}^{N} \frac{\left[ \left( \upsilon\_{n,y}^m - m \epsilon an \left( \upsilon\_{n,y}^m \right) \right) / std(v) \right]^3}{Y.N} \tag{2}$$

where *Y* is the number of considered years and *N* is the number of samples per month. After iterative calculations using several values of *m*, the selected *m* is the one that makes distribution of *<sup>v</sup><sup>m</sup>* symmetric i.e., *Sm* <sup>≈</sup> 0. Values of Weibull parameters, of Dubey's index *x* and asymmetry index m are evaluated for the three proposed months and presented in Table 1.


**Table 1.** Estimated parameters for the Weibull distribution and ARMA models.

#### *2.2. Standarisation*

Diurnal non-stationarity can be eliminated by subtraction the hourly averaged wind speed *u*(*t*) from the transformed HAWS then dividing by the hourly standard deviation *s*(*t*) [5]. Transformed and standardized HAWS (TS-HAWS) are given as:

$$v\_{n,y}^{\*} = (v\_{n,y}^{m} - \mu(t)) / s(t) \tag{3}$$

where

$$u(t) = \frac{\sum\_{y=1}^{Y} \sum\_{i=1}^{d} \upsilon\_{y, i \ast 24 \ast t}^{m}}{Y \ast d} \tag{4}$$

and

$$s(t) = \sqrt{\frac{\sum\_{y=1}^{Y} \sum\_{i=1}^{d} \left(v\_{y,i\*24+t}^{\text{m}} - u(t)\right)^2}{Y\*d}} \tag{5}$$

It is assumed that *u*(*t*) and *s*(*t*) are periodic functions, i.e., *u*(1) = *u*(25), *u*(2) = *u*(26), *s*(1) = *s*(25), and *s*(2) = *s*(26), where d is the number days for given month.

To illustrate the effect of standardization on HAWS, periodograms of original HAWS and TS-HASW are evaluated and presented in Figure 1. It is clear that diurnal and semidiurnal harmonics present in the periodogram of HAWS in the form of peaks have been canceled from the periodogram of the TS-HAW.

**Figure 1.** Periodograms of HAWS (**a**) and TS-HAWS (**b**).

#### *2.3. ARMA Fitting*

The following section consists of fitting ARMA models to TS-HAWS. A general model is given as:

$$\begin{array}{rcl} \upsilon\_{n,y}^{\*} &=& \left(\phi\_{1}L + \phi\_{2}L^{2} + \cdots + \phi\_{p}L^{p}\right)\upsilon\_{n,y}^{\*} \\ &+ \varepsilon\_{n,y}\left(1 - \theta\_{1}L - \theta\_{2}L^{2} - \cdots - \theta\_{q}L^{q}\right) \end{array} \tag{6}$$

where *p* is the order of the autoregressive part, *q* is the order of the moving part, *L* is the lag operator, and *ε* is a white Gaussian noise of zero mean and variance *σ*<sup>2</sup> *ε* .

#### 2.3.1. Order Determination

The following section consist of identifying the values of *p* and *q*. A pure MA process exhibits a cut of after *q* lags in the autocorrelation function (ACF); however, for pure AV or mixed ARMA process, the ACF deceases exponentially. Order of AV part can be determined using the partial autocorrelation function (PACF) that cut off after *p* lags for a pure AV process while it dies gradually in case of pure MA process.

Figures 2 and 3 present the ACF and PACF, respectively, evaluated for January, November, and December. While the ACFs of the three proposed months decrease exponentially, the PACFs cut almost zeros after the third order; this implies that HAWS can be modeled by a low order *ARMA*(*p*, *q*).

**Figure 2.** Autocorrelation function of HAWS for (**a**) January and (**b**) November.

**Figure 3.** Partial Autocorrelation function of HAWS for (**a**) January and (**b**) November.

ACF and PACF are used to determine an adequate group of ARMA models. Appropriate orders (*p*, *q*) are determined with the help of an additional criterion, such as Akaike information criterion [Storres].

$$AIC(p,q) = (Y.N) \cdot \ln\left(\sigma\_x^2(p,q)\right) + 2T\,\tag{7}$$

where *T* is the total number of parameters to be estimated.

2.3.2. Parameters Estimation Phase

Once *p* and *q* have been identified. The model coefficients *φ<sup>i</sup>* and *θ<sup>i</sup>* along the variance of the residuals *σ*<sup>2</sup> *<sup>ε</sup>* can be estimated. The preliminary estimation is done applying the Yule– Walker relations for *φi*, while *θ<sup>i</sup>* values are obtained using Newton–Raphson Algorithm. Final estimation of the parameters using the method of least squares error. Selected models for each month are presented in Table 1.

Note that for the three studied months, it has been found that *ARMA*(3, 0) is the best model (Table 1).

Finally, the models are validated by evaluating the ACF of the residuals. The fitted model can be accepted if the residuals are uncorrelated and normally distributed (Figure 4).

**Figure 4.** Autocorrelation function of the residues HAWS for (**a**) January and (**b**) November.

In order to validate the estimated models, we evaluated the residual autocorrelation functions (Figure 5). If the residuals are jointly independent, their autocorrelation functions cancel for a lag τ = 0. From Figure 5, we can see that the residuals are uncorrelated. Thus the models are retained.

**Figure 5.** Neural network architecture with four neurons and two layers.

#### **3. The Persistent Model**

Persistent model as defined in [5] is given as:

$$\boldsymbol{v}^{P}\_{\;t+h/t} = \boldsymbol{v}\_{t} \tag{8}$$

Equation (8) is equivalent to saying that the wind at instant *h+t* is simply the same as it was at time *t*. This model is developed by meteorologists as a comparison tool to supplement the other models. The accuracy of this model decreases rapidly with an increase of prediction lead time.

#### **4. Neural Networks**

Thus far, we have examined linear prediction with ARMA models, which constitute a mostly linear approach to data analysis. Now, we turn to the more complex neural networks. Neural networks have similar uses to linear prediction filters, and can be applied to the same general set of problems.

In general, rules to determine the number of inputs, outputs, and layers do not exist. In the following work, and based on results obtained by Sfetsos (1999) and Erasmo (2009) [9,10], it was decided to use feed-forward ANN (Figure 6). In fact, Sfetsos has found that with the Levenberg–Marquard algorithm as a training method, the feed-forward ANN is very adequate to model the wind speed.

**Figure 6.** Percentage improvement of RMSE of the ANN forecasts when TS-HAWS are used opposed to HAWS.

The response of the ANN output neuron is:

$$w\_t = f\_2\left(\sum\_{q=1}^3 w\_q f\_1\left(\sum\_{j=1}^3 w\_{q,j} v\_{t-j} + bj\right) + b\_q\right) \tag{9}$$

where *f*<sup>1</sup> and *f*<sup>2</sup> are nonlinear sigmoid activation functions.

The proposed ANN networks are trained to predict the wind speed one step ahead. Prediction of h hours in advance is obtained iteratively, i.e., *v* (*ANN*) *<sup>t</sup>*+2/*<sup>t</sup>* is predicted using *v* (*ANN*) *<sup>t</sup>*+1/*<sup>t</sup>* , *v* (*ANN*) *<sup>t</sup>*+3/*<sup>t</sup>* is predicted using *v* (*ANN*) *<sup>t</sup>*+3/*<sup>t</sup>* , and so on.

#### **5. Forecast Combination**

When several candidate models are available to forecast single variable, we can either select the best model or combine them. Combination of forecast is very advised in case of doubt about the existence of the best model. Our purpose in the following section is to build a linear combination *vComb <sup>t</sup>*/*t*−*<sup>h</sup>* of the competing forecasts as:

$$v\_{t/t-h}^{\text{Camb}} = w\_t^{(ARMA)} v\_{t/t-h}^{(ARMA)} + w\_t^{(ANN)} v\_{t/t-h}^{(ANN)} \tag{10}$$

where *w*(*ARMA*) *<sup>t</sup>* and *<sup>w</sup>*(*ANN*) *<sup>t</sup>* are time varying coefficients that are updated recursively using recursive least square method (RLS). RLS estimation consists of minimizing the cost function given as:

$$\begin{aligned} S\_t^2(\mathbf{w}) &= \sum\_{j}^t \kappa(t,j) \left( v\_{j/j - h}^{\text{Comb}} - \mathbf{w} \cdot \mathbf{v}\_{j/j - h} \right)^2 \\ &= S\_{t-1}^2(\mathbf{w}) + \kappa(t,t) \left( v\_{t/t - h}^{\text{Comb}} - \mathbf{w} \cdot \mathbf{v}\_{t/t - h} \right)^2 \end{aligned} \tag{11}$$

where **w** = *w*(*ARMA*) *w*(*ANN*) , **<sup>v</sup>***t*/*t*−*<sup>h</sup>* = *v* (*ARMA*) *<sup>t</sup>*/*t*−*<sup>h</sup> <sup>v</sup>* (*ANN*) *t*/*t*−*h* and *κ*(*t*, *j*) is the forgetting profile. Usually, *κ*(*t*, *j*) = Π*<sup>t</sup> <sup>i</sup>*=*j*+1*λi*, where 0 ≤ *λ<sup>i</sup>* ≤ 1 is the forgetting factor [11] The forgetting profile *κ*(*t*, *j*) is the weight associated to the *j*th residual and it allows to reduce the importance of old data recursively.

According to [11], the RLS estimator of **wt** is given as:

$$\mathbf{w\_{t}} = \mathbf{w\_{t-1}} + \Gamma\_{\mathbf{t}} \mathbf{v\_{t/t-1}} a\_{t} \tag{12}$$

where *at* = *vt* − **vt**/**t**−**1wt**−**1**, which is the one step-ahead prediction error, and **<sup>Γ</sup><sup>t</sup>** is called the gain matrix or the weighted covariance matrix that can be estimated as [12]:

$$\Gamma\_{t} = \frac{1}{\lambda} \left( \Gamma\_{t-1} - \frac{\Gamma\_{t-1} \mathbf{v}\_{t/t-1} \mathbf{v}\_{t/t-1} \prime \Gamma\_{t-1}}{\lambda + \mathbf{v}\_{t/t-1} \prime \Gamma\_{t-1} \mathbf{v}\_{t/t-1}} \right) \tag{13}$$

The choice of *λ* is very important in the recursive estimation of weights. It is indicated in [13] that most applications use a constant forgetting factor typically inside 0.950 ≤ *λ* ≤ 0.999.

#### **6. Results and Discussion**

To allow a comparison of models, the evolution of the RMSE is evaluated for the persistent, ARMA, feed-forward, and combined models when forecasts are done 1–7 h in advance.

For ANN models, it has been found that forecasting wind speed using TS-HAWS instead of HAWS data yields better performances. As indicated in Table 2, only in one case, forecasting with HAWS has provided lower RMSE (1 h ahead in November). Improvement of forecasting with TS-HAWS over HAWS is presented in Figure 6. Maximum improvement of 15% has been obtained in January when forecasting 7 h ahead.


**Table 2.** Prediction performances comparison between transformed and non-transformed data.

For all the studied cases, we have found that the RMSE of the persistence models are greater than the RMSE of the other models (Table 3). These results are similar to those obtained by Torres [5] and Sfetsos [6], which indicated that ARMA- and ANN-based models provide better forecasts than the persistence models.

**Table 3.** Prediction performances for January.


In 66.67% of the studied cases, it has been found that ARMA models provide relatively lower RMSE than ANN models (Tables 3 and 4). Evaluation of the forecasting improvement of ARMA models over ANN models varies between −0.61% and 03.49%. These results differ from that obtained by Strores (1999), who has found that ANN models can achieve lower RMSE than ARMA models.


**Table 4.** Prediction performances for November.

Combined models provide relatively better performances than the ARMA and the ANN models a few hours in advance (1–4 h); however, for long-term forecasting, individual models can provide lower RMSE than the combined models (Table 3).

To better understand the role of individual models in the final combination, we have presented in Figure 7 the variation of the combination coefficients when real wind is measured for November and December 2007. The first 100 wind speed values have been used to initialize coefficients and the covariance matrix. Figure 7a shows that the coefficient of the ARMA model is greater than the one of the ANN model, which means that the ARMA model is providing lower error for November 2007. In December 2007, and as indicated in Figure 7b, the ANN model forecasts the wind speed better than ARMA models.

**Figure 7.** Evolution of the combination coefficient for November and December.

#### **7. Conclusions**

In this study, models based on ARMA methodology as well as ANN theory have been proposed to forecast the hourly wind speed. The obtained results have indicated that both ARMA and ANN models are capable to predict wind speed for few hours in advance. Performances comparison between ARMA and ANN models has indicated that their performances are very close.

An adaptive combination of the two proposed approaches has proposed to improve the forecasting performances. The obtained results have indicated that for a few hours in advance, the combined model outperform the individual models.

For ANN modeling, it has been found in this work that the use of the transformed and standardized TS-HAWS provides better results than HAWS.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data sharing not applicable. No new data were created or analyzed in this study. Data sharing is not applicable to this article.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

## *Proceeding Paper* **Implementation of Battery Characterization System †**

**Abdelaziz Zermout, Hadjira Belaidi \* and Ahmed Maache**

Signals and Systems Laboratory, Institute of Electrical and Electronic Engineering,

University M'hamed Bougara of Boumerdes, Boumerdes 35000, Algeria

**\*** Correspondence: ha.belaidi@univ-boumerdes.dz or hadjira983@yahoo.fr † Presented at the 2nd International Conference on Computational Engineering and Intelligent Systems, Online, 18–20 November 2022.

**Abstract:** The successful transfer toward green renewable energy depends heavily on good, reliable Energy Storage Systems (ESS). Lithium-ion batteries are the preferred choice for many applications; however, they need careful management, especially an accurate State-Of-Charge (SOC) estimation. Hence, in this paper an overview of some SOC estimation methods is briefly described; then, an automated battery cell test system prototype that will enable further improvement is designed and implemented. Some tests are conducted on an aged lithium-ion cell and the obtained results are satisfactory and accurate with an error of around 0.5 <sup>×</sup> <sup>10</sup>−<sup>3</sup> (V or A), thus validating the proposed prototype.

**Keywords:** Energy Storage Systems (ESS); State-Of-Charge (SOC); state-of-health; lithium-ion battery; Battery Management System (BMS); battery test; battery characterization prototype

#### **1. Introduction**

Lithium-ion cells can be considered the backbone of many Battery Energy Storage Systems (BESS). They have many relative advantages when compared to other cells, such as power density, power throughput, high lifecycle, and low self-discharge; however, they need careful management. Lithium-ion cells are available in numerous types and brands with different characteristics. By connecting them in series and/or parallel, these cells are used to construct batteries of different voltages and capacities, from a few watt hours to hundreds of Megawatt-hours. These are widely used in various applications, such as electric vehicles (EVs), storage of renewable energy, power banks, electric yachts, bikes, scooters, laptops, smartphones, and many other applications. In each application, lithiumion batteries are used in different ways and in different conditions. In order to manage and run them effectively and securely, many parameters should be taken into consideration. One of the important parameters that should be known and monitored in real time is the state of charge (SOC), which represents the amount of capacity left in the battery (in Ah) as a percentage of its maximum capacity. In addition, it is important to estimate the state of health (SOH) of a battery, which represents the total amount of energy that the battery can hold and deliver compared to a fresh battery [1–3].

Because of the global transfer toward renewable green energy, and increasing demand of BESS-based systems like EVs and smart grids, many developments have been undertaken to BMS (Battery Management System) technology to become more efficient and reliable. Moreover, to provide good management of the batteries, particularly SOC and SOH estimations, many techniques have been proposed by researchers and developers for SOC estimation. Some of the approaches are enhancing the existing techniques and some of them are more recent, such as Data-Driven Model-based methods using Machine Learning (ML) that show very interesting results [1,4,5]. However, although the noticed improvements in SOC estimation methods are important, there is as yet no universal solution for SOC estimation sufficiently accurate for every battery in any condition; therefore, more research and development are still to be done in this field.

**Citation:** Zermout, A.; Belaidi, H.; Maache, A. Implementation of Battery Characterization System. *Eng. Proc.* **2023**, *29*, 12. https:// doi.org/10.3390/engproc2023029012

Academic Editors: Abdelmadjid Recioui, Hamid Bentarzi and Fatma Zohra Dekhandji

Published: 16 January 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Wrong estimation of lithium-ion batteries' SOC can lead to sudden failure or complete shutdown of any BESS-based system, and rapid degradation of the batteries' ability to store and deliver energy due to overcharge or discharge that can occur, potentially causing an unsafe situation. The estimation of SOC is not a direct measurement, but is a tricky operation and depends on many other parameters like voltage, current, temperature, and aging. There are various methods used to estimate the SOC. The criteria to choose the best method for a certain application is that it should be an online method without affecting the performance of the batteries, and with less computational complexity and high estimating accuracy [2,6]. Hence, this paper presents a prototype battery characterization system that will be used as a low-cost laboratory test bed in order to develop and test advanced estimation techniques for SOC and SOH estimations.

#### **2. State of Charge Estimating Methods Overview**

Due to the recent increased need for BESS-dependent systems such as EVs and renewable ESS, several research works and ongoing development have been undertaken to improve the performance and the reliability of such systems, by making battery management systems more sophisticated and more accurate. One of the main tasks of the battery management system is to accurately control SOC and SOH as much as possible in real time to prevent any unwanted scenarios. Thus, many methods have been developed to estimate the SOC, and each of them can be more suitable than the others for certain applications.

#### *2.1. Open Circuit Voltage (OCV)*

Open circuit voltage is getting the SOC of the battery by converting its open circuit voltage to its state of charge using a predefined look-up table that maps the OCV to SOC. This method is quite precise; however, it is not too practical in real applications. In fact, the battery should be at rest for a large amount of time until the stabilization of its electrochemistry; then, the OCV measurement can be performed and compared to the look-up table. The drawback of this method is that one look-up table cannot be used for all batteries; mostly, it is affected by the battery itself, its type, and its aging [7,8].

#### *2.2. Coulomb Counting*

This method is very common and simple. It depends on counting the amount of the charge flow in or out of the battery in (*Ah*) by integrating the current in time. This method can be expressed by Equation (1) where *I* is the current entering the battery, *SOC* (*t* = 0) is the initial estimated SOC, and *C* max is the maximum capacity that the battery is able to store and deliver.

$$\text{SOC}(t) = \text{SOC}(t=0) + \frac{1}{\mathbb{C}\max} \int\_{t=0}^{t} I dt \tag{1}$$

An accurate estimation of this method depends directly on high-precision measurement of the current and knowing the exact initial state of charge *SOC* (*t* = 0) and the state of health SOH. Therefore, any slight errors that will occur even with high-precision measurements will cause an accumulated error over time; in the process, it will cause a large deviation in the SOC estimation [2,3,9].

#### *2.3. Voltage Method*

This depends on the different existing discharging curves that are generated experimentally for certain batteries. It is not computationally complex and suitable for constant current applications and constant conditions in general; however, when the current or temperature is fluctuating, its accuracy will decline and it will no longer be practical. Thus, it is not very practical for real applications [1,2].

#### *2.4. Kalman Filter*

Kalman filter is an algorithm that can estimate the inner state of many systems; as well as this, it can be used for SOC estimation of a battery with a suitable model. It is based on the current, voltage, and temperature measurements to estimate the state of charge [1]. EKF (extended Kalman Filter) compares the cell voltage that was actually measured to the cell voltage that a battery model predicted to estimate the battery SOC after corrections [10].

#### *2.5. Equivalent Circuit Model (ECM)*

This technique presents the battery as an electric equivalent circuit model by choosing the right circuit and the right values of its components, so that it can predict the parameters of the battery in real time. Some circuit models are shown in Figures 1 and 2. This method has acceptable results, it is simple and computationally less complex; however, after the battery aging, the model chosen can no longer fit the battery behavior [1,11].

**Figure 1.** Rint model circuit diagram [11].

**Figure 2.** RC model circuit diagram [11].

#### *2.6. Impedance Spectroscopy*

The internal impedance spectroscopy of lithium-ion batteries can reflect the SOC with a high accuracy. By analyzing the impedance of the battery at different frequencies from 40 Hz to 20 kHz, the phase and the modulus is measured and compared to predefined impedance spectroscopy to get the SOC. Conversely, it is implemented using expansive hardware; as well as interrupting the battery performance, the external condition and aging my affect its precision [1,12].

#### *2.7. Data-Driven Model*

This method does not depend on any physical model but relies on using artificial intelligence (AI), where a suitable neural network can be implemented and trained with sufficient related data of the battery behavior. This technique gained the advantage with the recent improvement in computational power of the hardware and the massive data that is generated from different applications like EVs and other BESS systems. However, this method is computationally complex and has an over-fitting problem [1,4,13].

#### **3. Problematic**

Our state-of-the-art overview of the existing SOC estimation methods led us to summarize the advantages and drawbacks of each technique in Table 1.


**Table 1.** Advantages/drawbacks of SOC estimation methods.

Therefore, due to the diversity of the types and brands of Lithium-ion cells that are existing today and the different conditions and applications where they can be used; there is a need for further investigation and improvement of SOC estimating methods. Many tests should be conducted in regulated conditions, and a lot of data should be generated. Thus, an affordable Battery cell test system is needed. This article deals with the designing, implementation, and demonstration of a low-cost prototype battery cell test system that can perform several types of testing with pretty accurate results. At the same time, it offers good flexibility and ergonomic use; thus, this will provide more accessibility for more experiments and tests to be done.

#### **4. Design and Implementation**

Lithium-ion cell is not a simple component that has characteristics that can be known or predicted easily; as well, these characteristics are not linearly correlated. This is due to its complex electrochemistry behavior in different conditions, and because of the different types of batteries that already exist and keep emerging every day. Consequently, many tests should be conducted in a controlled environment to classify and understand more about the characteristics of the batteries. These tests can include capacity tests, lifecycle tests, aging, internal resistance, the best temperature for different operations, optimum charging and discharging current, and testing of the maximum safe limits of the battery operation in controlled conditions to ensure safe operation in the real world. Thus, these tests are essential for battery manufacturers, developers, and researchers. The battery can be in different states: charging, discharging, or at rest (no current flow). At the same time, the temperature can be varying, and other parameters can be included too. In order to test the battery in the mentioned states, the battery tester should be automated and consist of at least: a control unit, data acquisition unit, controlled variable load unit, controlled charging unit, and possibly adding thermal management unit [14,15] as demonstrated in Figure 3.

**Figure 3.** Overall diagram of a battery test system.

The designed system block diagram is shown in Figure 4. It consists of different components. ESP32 is the main control unit that controls the system. It has an 80 MHz processor, and 38 IO pins. It communicates with the ADS1115 and controls the LCD screen, the relays, discharging MOSFET, and charging PNP Transistor using PWM. ADS1115 is a 16-bit ADC that converts the analog signal to 16-bit 2 s complement format. It senses voltage 1, which is the voltage of the battery, and the difference between voltage 1 and voltage 2 that will be divided by the shunt resistor to get the current. The LCD display and push buttons will be the main user interface, especially when a computer is not connected. The MicroSD card will be used for data storage, as well as the test instructions that can be saved and executed without the need for a computer. For the temperature-controlled chamber, it has not yet been completely implemented. It will consist of two temperature sensors–one for the chamber, and one for the battery surface. The implemented system is shown in Figure 5; the components used are outlined in Table 2.

**Figure 4.** The diagram of the designed battery test system. The LCD is 16 \* 2 i.e., 16 columns by 2 rows so it can display 16 × 2 = 32 characters in total.

**Figure 5.** The implemented hardware. The numbers refer to the different used components which are outlined in Table 2.


**Table 2.** The used component referred in Figure 5.

#### **5. Results and Discussion**

A number of tests were performed on an aged lithium-ion cell at room temperature (around 24 ◦C) with the characteristics described in Table 3.

**Table 3.** Characteristics of the lithium-ion battery used in our tests.


A Multistage Constant Current (MSCC) charging protocol was applied to the lithiumion cell. The results are shown in Figure 6, which resemble the results obtained by the study in [16] and are illustrated in Figure 7. During this test, the battery was charged with a constant current of 1 A until it reached 4.35 V; then, the current was stepped down to a less constant current. Thus, the voltage of the battery drops down; it is kept until it reaches 4.35 V again. The same steps were repeated until the current is less than or equal to 100 mA; then, the charging process was stopped.

**Figure 6.** Charging with MSCC protocol.

**Figure 7.** MSCC charging protocol [16].

Figure 8 shows the discharging curve. The battery is discharged with 1 A constant current until the voltage reached the cutoff voltage of 3.0 V. The *x*-axis represents the total capacity discharged in (mAh). Figures 9 and 10 represent the voltage response of the battery to discharging pulse and charging pulse respectively, with the negative current denoting the discharging current.

Table 4 shows the performance characteristics of the implemented hardware. As illustrated in the results, the voltage and current resolution is less than 2 m (V or A) with a sampling rate of 35 samples/s. This led to satisfactory outcomes with a very small reading error of approximately 0.5 m (A or V). Thus, the implemented hardware can be used for some battery characterization purpose.

**Table 4.** Performance characteristics of the implemented hardware.


**Figure 8.** Discharging curve with 1 A at 24 ◦C.

**Figure 9.** Voltage response of the battery to discharging current pulse.

**Figure 10.** Voltage response of the battery to charging current pulse.

#### **6. Conclusions**

This work reported the progress of designing and implementing an automated battery test system. The tests performed generated acceptable results compared to results reported in the literature. The reading voltage and current error were around 0.5 m, which validates the work and makes the obtained results encouraging to carry on the implementation of a customized battery characterization system. However, work is still needed to complete the temperature-controlled chamber and the software running the overall system. In addition, the discharging and charging circuit need to be improved for more stability, better performance, and accuracy in general.

**Author Contributions:** Conceptualization, A.Z., H.B. and A.M.; methodology, A.Z. and H.B.; software, A.Z.; validation, H.B., A.Z. and A.M.; formal analysis, A.Z.; investigation, A.Z. and H.B.; resources, A.Z. and H.B.; data curation, A.Z.; writing—original draft preparation, A.Z. and H.B.; writing—review and editing, A.Z., H.B. and A.M.; visualization, H.B. and A.M.; supervision, H.B. and A.M.; project administration, H.B.; funding acquisition, A.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data is unavailable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
