A Behavioral Algorithm for State of Charge Estimation

In Hybrid Electricle Vehicles (HEV), performing online energy management is an important task to be achieved to reduce emissions, fuel consumption and increase vehicle performance. For this task, estimating the State of Charge (SOC) is needed since it serves as a measure of energy that is left inside an electrochemical battery. A variety of methods to solve this estimation problem have been proposed in the literature. However, most of these methods either assume equivalent circuit models for the battery and thus lose their validity under some discharge conditions or depend heavily on the choice of parameters in the algorithm. In this paper, we use behavioral framework to avoid postulation of a specific model for a battery and develop a new and simple SOC estimation algorithm. Once the problem is formulated as the computation of a specific free response of the battery, algorithm computes this response using only terminal current and terminal voltage measurements. We demonstrate the effectiveness of the algorithm with different discharge profiles using both simulated and real data.


Introduction
Estimating the state of charge (SOC) is an important, yet challenging task, in the context of battery modeling and management.The SOC provides a measure of how much energy remains stored in a battery.For example, in hybrid electrical vehicles, SOC can be used for both driver notification and online energy management purposes.In this paper, we propose a new method to obtain the SOC in electrochemical batteries using the behavioral framework [11].There is a broad literature concerning the SOC estimation problem.In [9] and [4], an extended Kalman filter is used to estimate the parameters of an electrical circuit model for a battery.Similarly, [3] also assumes an electrical circuit but instead of trying to identify the circuit elements, it aims to compute the SOC directly from terminal voltage and terminal current.Combined with the Coulomb counting method, [12] uses online least squares regression to compute the parameters of an equivalent RC circuit.All these methods rely on electrical models to explain the battery behavior and thus have important wellknown drawbacks.Firstly, the simplified models cannot represent the behavior of the battery exactly.Secondly, the models are not universal, i.e., they may result in highly erroneous SOC estimates in certain battery types and certain discharge conditions while producing adequate results with other battery types or discharge conditions.Moreover, convergence of these algorithms depend on an initial choice of parameters which are again battery-dependent.Lastly, there are neural network based methods such as those presented in [2] and [10].The drawback of these methods, in general, is that their performance highly depends on the data used for training.
In recent work by Xiao et al. [13], a new universal SOC algorithm was introduced which, in contrast with the previous work, does not postulate the existence of a model for the battery and does not attempt to identify the parameters in such model.Our approach is inspired by this novel aspect of the work in [13].Extracting a specific response of a system, using only input and output data without constructing a model, fits perfectly into the behavioral framework proposed by Jan Willems, see [11].Hence, in this paper we investigate the adequacy of behavioral system identification methods to the SOC estimation problem.The key observation which is also pointed out in Section 3.1 is that estimating the SOC can be solved by estimating the open circuit battery voltage which amounts to compute a free response.In the same section, we also explain how behavioral methods enable us to compute a free response without a model and in Section 3.2, we describe the algorithm used for this computation.Finally in Section 4, we illustrate the performance of these algorithms in simulations using different battery types and current discharge profiles.

Background
In the literature there are two main approaches to the SOC estimation problem: Coloumb counting based and voltage based.Although Coloumb counting is a simple method, it involves the integration of current thus leading to accumulated errors.Furthermore, current integration provides an estimate of the SOC provided that the initial SOC is known, an assumption that is not satisfied in many situations.Thus, it is necessary to use the Coloumb counting based methods together with voltage based methods to prevent accumulation of errors in SOC estimates.Voltage based methods aim to estimate SOC via the computation of the open circuit voltage V oc .The open circuit voltage can be defined as the value reached by the voltage across the battery terminals when we disconnect the external load from the battery.In addition, it is known, see [4] and [1], that the SOC is approximately an affine function of the steady state value of V oc .A more detailed relationship between the SOC and V oc is discussed in [7].Given these relationships we focus in this paper on the problem of computing V oc .

A Behavioral Algorithm
3.1 V oc estimation as the computation of a free response Although electrochemical batteries are commonly considered as slowly time varying nonlinear systems, in sufficiently short time windows, they can be seen as linear time invariant (LTI) systems.Hence, when describing our algorithm, we assume that the battery behaves exactly as an LTI system whose (minimal) state-space equations: 1) require at most n max states, i.e., x ∈ R nmax .We call x the state, u the input, and y the output.In this paper u models the current entering or leaving the battery and y models the voltage across the battery terminals.Note that we do not know A, B, C, and D and that we will not attempt to determine these matrices.The open circuit voltage at time t 0 can now be seen as: where I : [t 0 , +∞[→ R is the terminal current and V (t, t 0 , I) is the terminal voltage of an electrochemical battery at time t when we start feeding I at time t 0 .The output generated by a linear system when the input is zero is called a free response.If we consider I as the input and V as the output of our system, by equation (3.2) we can say that to find the V oc , it is sufficient to compute the free response of the system.In this paper, our objective is to compute the free response directly from measured data without attempting to construct the state x or the matrices A, B, C, D. We now explain how to compute a free response in a behavioral setting.We start with a few definitions.

Definition 3.1 (Behavior)
The behavior B of the LTI system (3.1) is the set of all possible input-output trajectory pairs w = (u, y) ∈ (R m+p ) N that obey equations (3.1).When trajectories are restricted to be T samples long, we denote the behavior as B| [1,T ] .
The behavior B of the LTI system (3.1)inherits both linearity as well as time-invariance.Linearity of B amounts to requiring B to be a vector subspace of (R m+p ) N .Time invariance can be expressed as shift invariance.

Definition 3.2 (Shift operator)
The shift operator σ : (R m+p ) N → (R m+p ) N is defined by: We also define σ k as the k-fold composition of σ with itself.
Shift invariance can now be formalized as σ(w) ∈ B for every w ∈ B.
The computation of free responses requires the manipulation of Hankel matrices.

Definition 3.3 (Block Hankel Matrix)
The L-deep block Hankel matrix of a behavior w = (u, y) ∈ B| [1,T ] is denoted by H L (w) and defined as follows: EVS26 International Battery, Hybrid and Fuel Cell Electric Vehicle Symposium We note that H L (w) can also be understood as a matrix having w| [1,L] in its first block column and having shifted versions of w| [1,L] in the following columns: By shift invariance, every block column of H L (w) belongs to B| [1,L] and since the behavior is a vector space, linear combinations of the block columns of H L (w) also belong to B| [1,L] .
Let us now divide the columns of H L (u) and H L (y) into past and future: where c = T −L+1.In order to compute the output that a system would generate if a zero input is applied at time t = T + 1 one needs to determine what is the linear combination of the block columns of H L (w), represented by the matrix G, so that the following equations are satisfied: If such matrix G is found, it explains what the output is when the input is switched to zero at time t = T + 1.Such output is given by Y f G. Sufficient conditions ensuring solvability of (3.4) and the uniqueness of the free response computed as Y f G are given in [5].When we are dealing with real data, due to the presence of noise, a solution to (3.4) always exists when number of columns of  is much larger than the number of its rows, i.e.T − L + 1 L + n max .The solvability not being an issue, uniqueness of solutions is.Different G's that satisfy (3.4) may yield to computation of different Y 0 's that will lead to different errors in estimates.However, as our objective is to study the adequacy of behavioral methods to SOC estimation, we pick a sparse solution and leave for future work the study of other solutions of (3.4).An algorithm for the computation of the free response is presented in the next section.

A behavioral algorithm
Given a T samples behavior w = (u, y) ∈ B [1,T ] obtained by recording input current and terminal voltage, Algorithm 1 computes the ∆ samples long free response of a system with the initial state being the state at time t = T + 1.The Algorithm 1: Algorithm for the computation of a ∆ samples long free response.algorithm computes l samples of free response in each iteration with the assumption that the data is coming from a single input-single output LTI system which has a minimal state space representation with at most n max states.We do not prove correctness of Algorithm 1 since the proof follows the same lines of the proof of Algorithm 8.9 in [5].This reference should also be consulted for further information about the computation of free responses and corresponding algorithms.We also note that in [6], a more general version of the Algorithm 1 is presented.

Simulation Results
In this section, we illustrate the performance of our V oc estimation algorithm by presenting various test results and comparisons with the algorithm introduced in [13].We implemented Algorithm 1 where T is now the window length.We shift this window at each sampling instant when we get new current and voltage data.We use two sources for battery data: a real electrochemical battery and the Dualfoil battery simulator [8] with the default parameters given for a lithium ion battery.We note that the advantage of using Dualfoil is that given a current profile, it provides the V oc of the battery at every time instant.The first test case is generated via Dualfoil by using the realistic current trajectory depicted in Figure 1.This current profile was obtained from an electric golf-cart.We set the window length T to 450, ∆ to 80 and n max to 8. The top of Figure 2 illustrates the V oc estimation of Dualfoil, of our algorithm and of the algorithm in [13], while the bottom of Figure 2 shows the percent relative V oc error defined as V oc,estimated − V oc,simulated V oc,simulated × 100 (4.1) for both algorithms.Clearly, behavioral algorithm shows less variation than the algorithm in [13] and consequently leads to smaller errors except the intervals where the average energy extracted from the battery is small.In these intervals, it would take less time for terminal voltage to settle down to current V oc value.Hence, computing fewer samples of the free response would be enough to estimate the V oc and that would lead to better results.We will investigate the effect of adjusting the number of samples of free response computed based on the current profile observed as future work.Figure 4, shows the performance of our algorithm in another test case generated by Dualfoil where the power delivered is kept constant at 50W/m 2 during the discharge of the battery.The corresponding current profile can be seen in Figure 3. Here, we set the window length T to 8500, ∆ to 50 and n max to 2. The degradation in the performance is due to the fact that the current is not changing as much as it was in the previous case.When the current changes slowly, the least squares problem solved in Algorithm 1 becomes more sensitive to discrepancies in the data resulting from nonlinearities of the battery.Lastly, in Figure 5 we present the performance of our algorithm on real current and real voltage data (see Figure 6) collected from a electrical golf-cart in a typical driving cycle.In this case, unfortunately, we do not have real V oc data to analyze the accuracy of the estimates.Instead, we only compare the estimates of the algorithm in [13] with ours and show that both yield similar estimates with ours having less fluctuations.

Discussion
In this paper, we proposed a behavioral algorithm to compute the open circuit voltage of a battery based on terminal voltage and terminal current measurements.The proposed algorithm does not postulate a model for the battery neither it tries to identify a model from data.As we illustrated with simulations, whenever the current profile is sufficiently diverse (changes fast), the results are comparable with the results from [13] and show less variability in the V oc estimate.Due to the nonlinearities of the batteries, the performance of the algorithm depends on the choice of parameters T and ∆ that must be adjusted in order to get good estimates.The results are promising enough to suggest further study of behavioral algorithms in the context of state of charge estimation.In particular, more sophisticated ap-  [8] John Newman.

Figure 1 :
Figure 1: Current profile during the normal operation of an electric golf cart.

Figure 2 :
Figure 2: Comparison of the algorithms and simulated data.

Figure 3 :
Figure 3: Current profile obtained when constant power 50W/m 2 is delivered

Figure 4 :Figure 5 :Figure 6 :
Figure 4: Comparison of the algorithms and simulated data when constant power of 50W/m 2 is delivered Min Gao received his B.E. Degree in power engineering and automation from Nanjing University of Technology, Nanjing, China.He is now pursuing M.S. Degree in electrical engineering from University of California, Los Angeles.His research interests include electric vehicle modeling and smart grid transmission, distribution and control strategy.Paulo Tabuada is an associate professor of electrical engineering at UCLA and vice-chair for graduate affairs.His research has been recognized by several awards including the 2009 Donald P. Eckman award from the American Automatic Control Council and the 2011 George S. Axelby award from the IEEE Control Systems Society.His research interests include modeling, analysis, and control of cyberphysical systems, geometric control theory, and mathematical systems theory.Dr. Lei He is a professor at UCLA Henry Samueli School of Engineering,the founding director of clean energy research center, Los Angeles, and aguest chair professor at Fudan University, China.He was a faculty memberat University of Wisconsin, Madison, held visiting or consulting positionswith Cisco, Cadence Design Systems, Hewlett-Package, Intel, and Synopsys, andhas been a technical advisory board member for Apache Design Solutions(acquired by Ansoft in 2011), Rio Design Automation (acquired by MagmaDesign Automation in 2006), Empyrean Software, Pride Power Systems, andDB New Energy.His research interests include information technology and energy systems.