Patent Publication Number: US-11397214-B2

Title: Methods and apparatus for a battery

Description:
BACKGROUND OF THE TECHNOLOGY 
     “Battery capacity” is a measure (typically in ampere-hours) of the charge stored by the battery and is determined by the mass of active material contained in the battery. The battery capacity represents the maximum amount of energy that can be extracted from the battery under certain specified conditions. The battery capacity can also be represented as a percentage and referred to as a state of charge or relative state of charge (RSOC). 
     A fuel gauge is typically provided to measure various parameters of the battery and monitor the state of charge of the battery. A current of the battery (based on the internal resistance of the battery) is typically used to determine the state of charge. However, during periods of high current, the measured current may contain errors, which may result in an inaccurate state of charge. 
     SUMMARY OF THE INVENTION 
     Various embodiments of the present technology may provide methods and apparatus for a battery. The apparatus may determine a first current according to a first technique and a second current according to a second technique. The apparatus may use a Kalman filter to compute the state of charge of the battery, wherein the Kalman filter uses one of the first current and the second current based on a comparison of the second current to a threshold current. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWING FIGURES 
       A more complete understanding of the present technology may be derived by referring to the detailed description when considered in connection with the following illustrative figures. In the following figures, like reference numbers refer to similar elements and steps throughout the figures. 
         FIG. 1  is a block diagram of a battery system in accordance with an exemplary embodiment of the present technology; 
         FIG. 2  is a simplified circuit diagram of a logic circuit in accordance with an exemplary embodiment of the present technology; 
         FIG. 3  is graph illustrating battery voltage characteristics during charging and discharging in accordance with an exemplary embodiment of the present technology; 
         FIG. 4A  is a circuit model of a battery in accordance with an exemplary embodiment of the present technology; 
         FIG. 4B  is an alternative circuit model of a battery in accordance with an exemplary embodiment of the present technology; 
         FIG. 5  is a flowchart for operating the battery system in accordance with an exemplary embodiment of the present technology; 
         FIG. 6  is an alternative flowchart for operating the battery system in accordance with an exemplary embodiment of the present technology; 
         FIG. 7  is a look-up table in accordance with an exemplary embodiment of the present technology; and 
         FIG. 8  is a block diagram of a SOC calculator in accordance with an exemplary embodiment of the present technology. 
     
    
    
     DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS 
     The present technology may be described in terms of functional block components and various processing steps. Such functional blocks may be realized by any number of components configured to perform the specified functions and achieve the various results. For example, the present technology may employ various voltage sensors, current sensors, coulomb counters, logic gates, timers, memory devices, switches, semiconductor devices, such as transistors and capacitors, and the like, which may carry out a variety of functions. In addition, the present technology may be integrated in any number of electronic systems, such as automotive, aviation, “smart devices,” portables, e-cigarettes, aroma therapy puff systems, vaping devices, and consumer electronics, and the systems described are merely exemplary applications for the technology. 
     Methods and apparatus for a battery according to various aspects of the present technology may operate in conjunction with any suitable electronic system and/or device, such as “smart devices,” wearables, battery-powered consumer electronics, portable devices, battery-powered vehicles, and the like. Referring to  FIG. 1 , an exemplary system  100  may be integrated in an electronic device (not shown), such as a vaping device or an electric vehicle, powered by a rechargeable battery  101 , such as a lithium ion battery. For example, in various embodiments, the battery  101  may operate in conjunction with a charger  105  and a fuel gauge circuit  110  to provide power to a host system  115  (i.e., a load). 
     According to an exemplary embodiment, the system  100  may comprise a switch  140  to selectively connect the charger  105  to the battery  101 . According to an exemplary embodiment, the host system  115  may operate the switch  140  according to a control signal S 1  that is pulse-width modulated. The switch  140 , in conjunction with the control signal S 1 , may control current flow from the charger  105  to the battery  101  (also referred to as a charge current I CC ), and thus control charge and discharge cycles of the battery  101 . 
     The fuel gauge circuit  110  may be configured to manage various battery operations and monitor various battery conditions. For example, the fuel gauge circuit  110  may be configured to measure a voltage V T  of the battery  101 , measure a first current I DD1  (also referred to as a load current I DD1 ), compute a remaining capacity (also expressed as a percentage and referred to as the state of charge SOC) of the battery  101 , compute a state of health (SOH) of the battery  101 , estimate a lifespan of the battery  101 , determine an energy capability of the battery, and the like. 
     In addition, the fuel gauge circuit  110  may be configured to store various battery data. For example, the fuel gauge circuit  110  may store predetermined battery characteristics, such as open circuit voltage values of the battery  101  as a function of the capacity (i.e., SOC) of the battery  101 . The fuel gauge circuit  110  may also store predetermined values, such as predetermined threshold voltage values V TH  and a predetermined current value I TH , and/or other battery characteristic data. 
     In an exemplary embodiment, the fuel gauge circuit  110  may comprise a voltage detector  120  to measure or otherwise detect the voltage V T  of the battery  101 . The voltage detector  120  may be connected to the battery  101  and may comprise any circuit and/or device suitable for measuring a voltage potential. 
     In an exemplary embodiment, the fuel gauge circuit  110  may further comprise a current sensor  125  to measure the load current I DD1  to/from the battery  101  and the host system  115 . The current sensor  125  may comprise any circuit and/or device suitable for measuring the current of the battery  101 . For example, the current sensor  125  may operate in conjunction with a sense resistor  155 , wherein the current senor  125  measures the voltage across the sense resistor  155  to determine the load current I DD1 . 
     In an exemplary embodiment, the fuel gauge circuit  110  may further comprise a memory  130  to store the known battery characteristics and/or profile data of the battery  101 , such as open circuit voltage characteristics of battery  101 . The open circuit voltage characteristics may provide open circuit voltage V OC  values as a function of the remaining capacity (RSOC) of the battery  101 . The open circuit voltage characteristics may be predetermined by testing the battery  101  under open circuit (i.e., no load) conditions and may be stored in a look-up table or any other data storage suitable for storing relational data. 
     The memory  130  may also store various previously- and currently-computed or measured variables, such as the battery voltage V T , current I DD1 , and the like. The memory  130  may also store pre-defined variables, such as the threshold voltage V TH  values according to current values. For example, the memory  130  may contain a look-up table of threshold voltages V TH  and corresponding current values (e.g., as illustrated in  FIG. 7 ), wherein a threshold voltage from the table may be selected according to a known current value. In addition, the memory  130  may contain a look-up table (not shown) of current values (referred to as second current values I DD2 ) and difference voltages V DIFF  (i.e., ΔV), wherein a second current I DD2  from the table may be selected according to a known difference voltage V DIFF .    
     In an exemplary embodiment, the memory  130  may further comprise a look-up table containing open circuit voltage values (V OC ) as a function of RSOC (relative state of charge) values (where the relative state of charge is the battery capacity represented as a percentage). 
     The memory  130  may comprise any number of storage devices, such as registers, a flash memory device, EEPROM (electrically erasable programmable read-only memory), ROM (read only memory), and RAM (random access memory), and the like.  
     In various embodiments, the fuel gauge circuit  110  may further comprise a remaining capacity calculation circuit (not shown) configured to measure the RSOC of the battery  101 . In one embodiment, the remaining capacity calculation circuit may be configured to determine the RSOC according to the voltage V T  of the battery  101 . In general, utilizing the voltage V T  of battery to determine the remaining capacity is referred to as “the voltage method.” 
     In an alternative embodiment, the remaining capacity calculation circuit may be configured to measure the in-and-out-flowing current I DD  of the battery  101  over a period of time and reporting the accumulated charge. This may be accomplished using the current sensor  125  and tracking the measured current I DD1 . In the present embodiment, the remaining capacity calculation circuit monitors the voltage across the sense resistor  1555  as the battery  101  charges and discharges as an indication of the current I DD . The current I DD1  is then integrated over some period of time and reported as the remaining capacity (in mAh or as a percentage). In general, utilizing the current I DD1  to determine the remaining capacity is referred to as “coulomb counting.” 
     In an exemplary embodiment, the fuel gauge circuit  110  may comprise the processor  135 , wherein the processor  135  may perform various computations and comparison, and determine a state of charge (SOC) of the battery  101 . For example, and as shown in  FIG. 2 , the processor  135  may comprise an arithmetic circuit  200 , a selector circuit  205 , a first comparator circuit  210 , and a multiplexer  220 . The processor  135  may be further configured to access various data from the memory  130 . 
     According to an exemplary embodiment, the arithmetic circuit  200  may be configured to perform a subtraction function. In an exemplary embodiment, and as shown in  FIG. 2 , the arithmetic circuit  200  may compute a difference voltage V DIFF  by subtracting the open circuit voltage V OC  from the battery voltage V T . The arithmetic circuit  200  may be in communication with the memory  130  and configured to receive or otherwise retrieve the open circuit voltage V OC  from the memory  130  according to the computed RSOC. The arithmetic circuit  200  may transmit the difference voltage V DIFF  to the selector circuit  205 . 
     The selector  205  may be configured to receive the difference voltage V DIFF  and select a corresponding second current I DD2 . For example, and as shown in  FIG. 2 , the selector  205  may retrieve or otherwise receive the second current I DD2  from the memory  130  based on the value of the difference voltage V DIFF . For example, if the difference voltage V DIFF  is 20 mV, then the corresponding second current I DD2  may be 0.25 A. The selector  205  may transmit the corresponding second current I DD2  to the first comparator  210 .  
     Alternatively, the system  100  may determine the second current I DD2  by directly computing it based on the difference voltage V DIFF  and a known internal battery resistance R, where I DD2 =V DIFF /R. 
     The first comparator  210  may compare the second current I DD2  to a predetermined threshold current I TH  and generate a first comparator output C OUT_1  according to the comparison. For example, the first comparator  210  may receive the second current I DD2  at a first input terminal and the threshold current I TH  at a second input terminal. If the second current I DD2  is greater than the threshold current I TH , then the first comparator  210  may generate a first output (such as a logic 1). If the second current I DD2  is less than the threshold current I TH , then the first comparator  210  may generate a second output (such as a logic 0). The first comparator  210  may transmit the first comparator output C OUT_1  to the multiplexer  220 , wherein the first comparator output CO UT _may serve as a first enable signal for the multiplexer  220 . 
     According to various embodiments, the value of the threshold current I TH  may be selected based on various specifications of the battery  101 . In one embodiment, the threshold current I TH  may be 2 A.  
     The second comparator  215  may compare the battery voltage V T  to a predetermined threshold voltage V TH  and generate a second comparator output C OUT_2  according to the comparison. For example, and as shown in  FIG. 2 , the second comparator  215  may receive the battery voltage V T  at a first input terminal and the threshold voltage V TH  at a second input terminal. If the battery voltage V T  is greater than the threshold voltage V TH , then the second comparator  215  may generate a first output (such as a logic  1 ). If the battery voltage V T  is less than the threshold voltage V TH , then the second comparator  215  may generate a second output (such as a logic  0 ). The second comparator  215  may transmit the second comparator output C OUT_2  to the multiplexer  220 , wherein the second comparator output C OUT_2  may serve as a second enable signal for the multiplexer  220 .  
     The multiplexer  220  may be configured to select and output one of the first current I DD1  and the second current I DD2  based on at least one of the first comparator output C OUT_1  and the second comparator output C OUT_2 . The output of the multiplexer  220  may be referred to generally as the selected current i, where i is I DD1  or I DD2 . 
     For example, according to a first embodiment, the multiplexer  220  may select and output the first current I DD1  if the second current I DD2  is greater than or equal to threshold current I TH . Alternatively, the multiplexer  220  may select and output the second current I DD2  if the second current I DD2  is less than the threshold current I TH .   
     According to a second embodiment, the multiplexer  220  may select and output the second current I DD2  if the second current I DD2  is greater than or equal to the threshold current I TH  and the difference voltage V DIFF  is less than the threshold voltage V TH . Alternatively, the multiplexer  220  may select and output the first current I DD1  if the second current I DD2  is less than the threshold current I TH  and the difference voltage V DIFF  is greater than the threshold voltage V TH . 
     According to various embodiments, the processor  135  may comprise any number of circuits, systems, logic gates, and/or software to perform the desired computations and/or selections, as described above. For example, the processor  135  may comprise a field programmable gate array, an application specific integrated circuit, programs and operating information, and the like. 
     In various embodiments, the processor  135  may further comprise a module and/or circuit to determine the remaining capacity (measured in ampere-hours) and/or the SOC (the remaining capacity represented as a percentage) according to the selected current i. In general, the SOC of the battery  101  may be represented according to the following: 
                       SOC   t     =       SOC     t   o       +         ∫     x   o     x     ⁢   idt       C   OCV           ,           (     Equation   ⁢           ⁢   1     )               
where SOC t0  is an initial SOC value and C OCV  is a reference capacity of the battery  101 .
 
     In a first embodiment, and referring to  FIGS. 2 and 4A , the battery  101  may be modeled according to an open circuit voltage V OC , an ohmic resistance, represented by a first resistor R 1 , voltage across the first resistor V 1 , output voltage V T , and current i. Characteristics of the present battery model may be represented according to the following:
 
 V   T   =V   OC   −V   1   =V   OC   −R 1· i   (Equation 2)
 
     In the present embodiment, the SOC calculator  225  may compute the SOC according to the following equation: 
     
       
         
           
             
               
                 
                   
                     
                       SOC 
                       t 
                     
                     = 
                     
                       
                         SOC 
                         
                           
                             t 
                             - 
                             
                               Δ 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               t 
                             
                           
                           ⁢ 
                           
                               
                           
                         
                       
                       + 
                       
                         
                           
                             i 
                             t 
                           
                           × 
                           Δ 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           t 
                         
                         
                           C 
                           OCV 
                         
                       
                     
                   
                   , 
                 
               
               
                 
                   ( 
                   
                     Equation 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     3 
                   
                   ) 
                 
               
             
           
         
       
     
     where Δt is the sampling period. 
     In an alternative embodiment, and referring to  FIGS. 4B and 8 , the SOC calculator  225  may comprise a Kalman filter  800  to determine the SOC by performing a prediction and correction algorithm using one or more battery variables, such as a current and a voltage of the battery. The Kalman filter  800  may be able to minimize, in real time, the errors between estimated and measured outputs, using a feedback that adjusts/corrects the uncertain variables of the model. With this model, the Kalman filter  800  may enable the system to observe physical parameters of the model that cannot be measured directly. 
     In general, the Kalman filter addresses the problem of trying to estimate the state x∈   n  of a discrete-time controlled process that is governed by the linear stochastic difference equation
 
 x   k   =Ax   k−1   +Bu   k−1   +w   k−1   (1.1)
 
with a measurement Z∈   m  that is
 
 z   k   =Hx   k   +v   k   (1.2)
 
     The random variables w k  and v k  represent the process and measurement noise (respectively). They are assumed to be independent (of each other), and with normal probability distributions:
 
 p ( w )˜ N (0, Q )  (1.3)
 
 p ( v )˜ N (0, R )  (1.4)
 
     In practice, the process noise covariance Q and measurement noise covariance R matrices might change with each time step or measurement, however it is assumed they are constant. 
     The n×n matrix A in the difference equation (1.1) relates the state at the previous time step k−1 to the state at the current step k, in the absence of either a driving function or process noise. Note that in practice A might change with each time step, but here it is assumed it is constant. 
     The n×l matrix B relates the optional control input u∈   l  to the state x. 
     The m×n matrix H in the measurement equation (1.2) relates the state to the measurement z k . In practice H might change with each time step or measurement, but here it is assumed it is constant. 
     The expression {circumflex over (x)} k   − ∈   n  (note the “super minus”) is defined as the a priori state estimate at step k given knowledge of process prior to step k, and the expression {circumflex over (x)} k ∈   n  is defined as the a posteriori state estimate at step k given measurement z k . 
     Therefore, the a priori and a posteriori estimate errors are defined as:
 
 e   k   −   ≡x   k   −{circumflex over (x)}   k   − , and
 
 e   k   ≡x   k   −{circumflex over (x)}   k  
 
     The a priori estimate error covariance is given by
 
 P   k   −   =E [ e   k   −   e   k   −T ]  (1.5),
 
     and the a posteriori estimate error covariance is given by
 
 P   k   =E [ e   k   e   k   T ]  (1.6),
 
     In deriving the equations for the Kalman filter, the goal is to find an equation that computes an a posteriori state estimate {circumflex over (x)} k  as a linear combination of an a priori estimate {circumflex over (x)} k   −  and a weighted difference between an actual measurement z k  and a measurement prediction H{circumflex over (x)} k   −  as shown below in (1.7). 
     Some justification for (1.7) is given in “The Probabilistic Origins of the Filter” found below.
 
 {circumflex over (x)}   k   ={circumflex over (x)}   k   −   +K ( z   k   −H{circumflex over (x)}   k   − )  (1.7)
 
The difference (z k −H{circumflex over (x)} k   − ) in (1.7) is called the measurement innovation, or the residual.
 
     The residual reflects the discrepancy between the predicted measurement H{circumflex over (x)} k   −  and the actual measurement z k . A residual of zero means that the two are in complete agreement. 
     The n×m matrix K in (1.7) is chosen to be the gain or blending factor that minimizes the a posteriori error covariance (1.6). This minimization can be accomplished by first substituting (1.7) into the above definition for e k , substituting that into (1.6), performing the indicated expectations, taking the derivative of the trace of the result with respect to K, setting that result equal to zero, and then solving for K. 
     One form of the resulting K that minimizes (1.6) is given by 
     
       
         
           
             
               
                 
                   
                     K 
                     k 
                   
                   = 
                   
                     
                       
                         P 
                         k 
                         - 
                       
                       ⁢ 
                       
                         
                           
                             H 
                             T 
                           
                           ⁡ 
                           
                             ( 
                             
                               
                                 
                                   HP 
                                   k 
                                   - 
                                 
                                 ⁢ 
                                 
                                   H 
                                   T 
                                 
                               
                               + 
                               R 
                             
                             ) 
                           
                         
                         
                           - 
                           1 
                         
                       
                     
                     = 
                     
                       
                         
                           P 
                           k 
                           - 
                         
                         ⁢ 
                         
                           H 
                           T 
                         
                       
                       
                         
                           
                             HP 
                             k 
                             - 
                           
                           ⁢ 
                           
                             H 
                             T 
                           
                         
                         + 
                         R 
                       
                     
                   
                 
               
               
                 
                   ( 
                   1.8 
                   ) 
                 
               
             
           
         
       
     
     Looking at (1.8) it is observed that as the measurement error covariance R approaches zero, the gain K weights the residual more heavily. Specifically, 
     
       
         
           
             
               
                 lim 
                 
                   
                     R 
                     k 
                   
                   → 
                   0 
                 
               
               ⁢ 
               
                 K 
                 k 
               
             
             = 
             
               H 
               
                 - 
                 1 
               
             
           
         
       
     
     On the other hand, as the a priori estimate error covariance P k   −  approaches zero, the gain K weights the residual less heavily. Specifically, 
     
       
         
           
             
               
                 lim 
                 
                   
                     P 
                     k 
                     - 
                   
                   → 
                   0 
                 
               
               ⁢ 
               
                 K 
                 k 
               
             
             = 
             0 
           
         
       
     
     Another way of thinking about the weighting by K is that as the measurement error covariance R approaches zero, the actual measurement z k  is “trusted” more and more, while the predicted measurement H{circumflex over (x)} k   −  is trusted less and less. On the other hand, as the a priori estimate error covariance P k   −  approaches zero the actual measurement z k  is trusted less and less, while the predicted measurement H{circumflex over (x)} k   −  is trusted more and more. 
     The justification for (1.7) is rooted in the probability of the a priori estimate {circumflex over (x)} k   −  conditioned on all prior measurements z k . For now, let it suffice to point out that the Kalman filter maintains the first two moments of the state distribution,
 
 E [ x   k ]= {circumflex over (x)}   k  
 
 E [( x   k   −{circumflex over (x)}   k )( x   k   −{circumflex over (x)}   k ) T ]= P   k  
 
     The a posteriori state estimate (1.7) reflects the mean (the first moment) of the state distribution—it is normally distributed if the conditions of (1.3) and (1.4) are met. The a posteriori estimate error covariance (1.6) reflects the variance of the state distribution (the second non-central moment). In other words,
 
 p ( x   k   |z   k )˜ N ( E [ x   k ], E [( x   k   −{circumflex over (x)}   k )( x   k   −{circumflex over (x)}   k ) T ])= N ( {circumflex over (x)}   k   ,P   k )
 
     In general, the Kalman filter estimates a process by using a form of feedback control: the filter estimates the process state at some time and then obtains feedback in the form of (noisy) measurements. As such, the equations for the Kalman filter fall into two groups: time update equations and measurement update equations. The time update equations are responsible for projecting forward (in time) the current state and error covariance estimates to obtain the a priori estimates for the next time step. The measurement update equations are responsible for the feedback—i.e. for incorporating a new measurement into the a priori estimate to obtain an improved a posteriori estimate. 
     The time update equations can also be thought of as predictor equations, while the measurement update equations can be thought of as corrector equations. Indeed the final estimation algorithm resembles that of a predictor-corrector algorithm for solving numerical problems. 
     The specific equations for the time and measurement updates are presented below as “time update equations” (1.9 and 1.10) and “measurement update equations” (1.11, 1.12, and 1.13).
 
 {circumflex over (x)}   k   −   =A{circumflex over (x)}   k−1   +Bu   k−1   (1.9)
 
 P   k   −   =AP   k−1   A   T   +Q   (1.10)
 
     The time update equations project the state and covariance estimates forward from time step k−1 to step k. A and B are from (1.1), while Q is from (1.3). Initial conditions for the filter are discussed in the earlier references.
 
 K   k   =P   k   −   H   T ( HP   k   −   H   T   ±R ) −1   (1.11)
 
 {circumflex over (x)}   k   ={circumflex over (x)}   k   −   +K   k ( z   k   −H{circumflex over (x)}   k   − )  (1.12)
 
 P   k =( I−K   k   H ) P   k   −   (1.13)
 
     The first task during the measurement update is to compute the Kalman gain, K k . Notice that the equation given here as (1.11) is the same as (1.8). The next step is to actually measure the process to obtain z k , and then to generate an a posteriori state estimate by incorporating the measurement as in (1.12). Again (1.12) is simply (1.7) repeated here for completeness. The final step is to obtain an a posteriori error covariance estimate via (1.13). After each time and measurement update pair, the process is repeated with the previous a posteriori estimates used to project or predict the new a priori estimates. 
     In the actual implementation of the filter, the measurement noise covariance R is usually measured prior to operation of the filter. Measuring the measurement error covariance R is may be done by taking off-line sample measurements in order to determine the variance of the measurement noise. 
     The determination of the process noise covariance Q is generally more difficult as there is no ability to directly observe it. Sometimes a relatively simple process model can produce acceptable results if one “injects” enough uncertainty into the process via the selection of Q. Often times, superior filter performance (statistically speaking) can be obtained by tuning the filter parameters Q and R. The tuning is usually performed off-line, frequently with the help of another (distinct) Kalman filter in a process generally referred to as system identification. 
     The correction is weighted by a gain vector K that allows correction of the real-time estimates and the performance of the filter. The gain is calculated at each iteration from error predictions and uncertainties (noise) on states and measurements. The filter dynamic control is then based on the initialization of the noise matrices of states Q and measurements R, as well as through the initialization of the matrix of error covariance P. In general, the Kalman filter algorithm may comprise two phases: the first concerns the initialization of the matrices P, Q, and R, and the second concerns the observation which is composed of two steps at each sampling interval. First, the algorithm predicts the value of the present state, output, and error covariance. Second, by using a measurement of the physical system output, it corrects the state estimate and error covariance. 
     In the present case, the battery  101  may be modeled according to an open circuit voltage V OC , an ohmic resistance, represented by a first resistor R 1 , voltage across the first resistor V 1 , a polarization resistance, represented by a second resistor R 2 , a polarization capacitance, represented by capacitor C 2 , the voltage across the parallel-connected capacitor and resistor V 2 , output voltage V T , and current i. Characteristics of the present battery model may be represented according to the following: 
                       V   T     =         V   OC     -     V   1     -     V   2       =       V   OC     -     R   ⁢           ⁢     1   ·   i       -     V   2           ,           (     Equation   ⁢           ⁢   4     )                     dV   2     dt     =         V   .     2     =       i     C   ⁢           ⁢   2       -       V   2       C   ⁢           ⁢     2   ·   R     ⁢           ⁢   2             ,           (     Equation   ⁢           ⁢   5     )                     dV   OC     dt     =       V   OC   *     =     i     C   OCV           ,           (     Equation   ⁢           ⁢   6     )                     d   ⁡     (   SOC   )       dt     =       SOC   .     =     i     μ   ⁢           ⁢     C   OCV             ,           (     Equation   ⁢           ⁢   7     )                   [           SOC   .                 V   .     2           ]     =     [           i     μ   ⁢           ⁢     C   OCV                       -     1     R   ⁢           ⁢     2   ·   C     ⁢           ⁢   2         ⁢     V   2       +     i     C   ⁢           ⁢   2               ]       ,           (     Equation   ⁢           ⁢   8     )               
where Equation 8 is derived from Equations 5 and 7.
 
     The system input is defined as: u(t)=i, and the system output is defined as: y(t)=V T . 
     Above, Equation 8 and Equation 4 are state equations and observation equation for a lithium ion battery model, discretization for continuous equation, and SOC calculation. 
     Kalman filtering algorithm can be divided into two parts as described previously: 1) predict system status, system output, and error; and 2) correct the current state estimate value based on system output value. 
     According to Equation 8 and Equation 4, the system state equation can be written as:
 
 X =[ X   1   ,X   2 ] T   (Equation 9),
 
where X 1 (t)=SOC, X 2 (t)=V 2 .
 
     Therefore, the battery model can be written as:
 
 {circumflex over (x)}=f ( x,u )+ w   (Equation 10),
 
 y=g ( x,u )+ v   (Equation 11),
 
where w and v represent error, and
 
                       f   ⁡     (     x   ,   u     )       =     [           u     μ   ⁢           ⁢     C   OCV                       -     1     R   ⁢           ⁢     2   ·   C     ⁢           ⁢   2         ⁢     x   2       +       1     C   ⁢           ⁢   2       ⁢   u             ]       ,           (     Equation   ⁢           ⁢   12     )                   g   ⁡     (     x   ,   u     )       =       μ   ⁢           ⁢     x   1       -     x   2     -     R   ⁢           ⁢   1   ⁢   u     +   c       ,           (     Equation   ⁢           ⁢   13     )               
where c is a constant and μ is a coefficient.
 
     Taylor series expansion may be used to linearize Equation 10 and Equation 11. The model after linearization is:
 
 {dot over (x)}=A   t   ·x+B   t   ·u+w,  
 
 {dot over (y)}=C   t   ·x+D   t   ·u+v,  
 
where:
 
     
       
         
           
             
               
                 A 
                 t 
               
               = 
               
                 
                   
                     ∂ 
                     
                       f 
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           u 
                         
                         ) 
                       
                     
                   
                   
                     ∂ 
                     x 
                   
                 
                 ❘ 
                 
                   x 
                   ⁡ 
                   
                     ( 
                     t 
                     ) 
                   
                 
               
             
             , 
             
               
                 u 
                 ⁡ 
                 
                   ( 
                   t 
                   ) 
                 
               
               = 
               
                 [ 
                 
                   
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       0 
                     
                     
                       
                         - 
                         
                           i 
                           
                             R 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               2 
                               · 
                               C 
                             
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             2 
                           
                         
                       
                     
                   
                 
                 ] 
               
             
           
         
       
       
         
           
             
               
                 B 
                 t 
               
               = 
               
                 
                   
                     ∂ 
                     
                       f 
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           u 
                         
                         ) 
                       
                     
                   
                   
                     ∂ 
                     u 
                   
                 
                 ❘ 
                 
                   x 
                   ⁢ 
                   
                     ( 
                     t 
                     ) 
                   
                 
               
             
             , 
             
               
                 u 
                 ⁡ 
                 
                   ( 
                   t 
                   ) 
                 
               
               = 
               
                 [ 
                 
                   
                     
                       
                         1 
                         
                           μ 
                           · 
                           
                             C 
                             OCV 
                           
                         
                       
                     
                   
                   
                     
                       
                         1 
                         
                           C 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           2 
                         
                       
                     
                   
                 
                 ] 
               
             
           
         
       
       
         
           
             
               
                 C 
                 t 
               
               = 
               
                 
                   
                     ∂ 
                     
                       g 
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           u 
                         
                         ) 
                       
                     
                   
                   
                     ∂ 
                     x 
                   
                 
                 ❘ 
                 
                   x 
                   ⁢ 
                   
                     ( 
                     t 
                     ) 
                   
                 
               
             
             , 
             
               
                 u 
                 ⁡ 
                 
                   ( 
                   t 
                   ) 
                 
               
               = 
               
                 [ 
                 
                   
                     
                       μ 
                     
                     
                       1 
                     
                   
                 
                 ] 
               
             
           
         
       
       
         
           
             
               
                 D 
                 t 
               
               = 
               
                 
                   
                     ∂ 
                     
                       g 
                       ⁡ 
                       
                         ( 
                         
                           x 
                           , 
                           u 
                         
                         ) 
                       
                     
                   
                   
                     ∂ 
                     u 
                   
                 
                 ❘ 
                 
                   x 
                   ⁢ 
                   
                     ( 
                     t 
                     ) 
                   
                 
               
             
             , 
             
               
                 u 
                 ⁡ 
                 
                   ( 
                   t 
                   ) 
                 
               
               = 
               
                 R 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 1 
               
             
           
         
       
     
     After discretization, the model can be expressed as:
 
 x   k+1   =A   k   ·x   k   +B   k   ·u   k   +w   k ,
 
 y   k   =C   k   ·x   k   +D   k   ·u   k   +v   k ,
 
and the general Kalman filtering algorithm calculation steps are complete.
 
     According to an exemplary embodiment, the Kalman filter  800  may be connected to an output terminal of the multiplexer  220  and configured to receive the selected current i from the multiplexer  220  and compute the SOC according to equations 4-13. The Kalman filter  800  may comprise a conventional Kalman filter  800  suitable for performing predictions and corrections based on known and theoretical variables and may be implemented in hardware, software, or a combination thereof. 
     The host system  115  may be configured to generate the control signal S 1  and control the duty cycle of the control signal S 1 , which controls the switch  140 , and thus control the flow of the charge current from the charger  105  to the battery  101 . The control signal S 1  may be a pulse-width modulated signal and referred to a charge pulse. 
     The host system  115  may further comprise any circuit and/or system suitable for generating a pulse-width modulated signal, such as a PMW controller (not shown), a timer (not shown), a waveform generator, flip flops, and the like.  
     In an exemplary operation, and referring to  FIGS. 1, 2, and 5 , the system  100  may determine or otherwise compute a SOC comprising detecting a first current I DD1  ( 500 ), for example using the current sensor  125 . Determining the SOC may further comprise measuring a battery voltage V T  ( 505 ), for example using the voltage detector  120 . According to an exemplary embodiment, measuring the battery voltage V T  may occur at the end of a charge pulse when the battery voltage peaks. Determining the SOC may further comprise computing a difference voltage V DIFF , where the difference voltage V DIFF  is the difference between the battery voltage V T  and the open circuit voltage V OC  ( 510 ). For example, the fuel gauge  110  may utilize the arithmetic circuit  200  to perform a subtraction function. Determining the SOC may further comprise determining a second current I DD2  ( 515 ), for example, by extracting the second current I DD2  from the memory  130  according to the voltage difference V DIFF . Determining the SOC may further comprise comparing the second current I DD2  to a threshold current I TH  to determine if the second current is less than the threshold current I TH  ( 520 ). For example, the fuel gauge  110  may utilize the first comparator  210  to compare the second current I DD2  to the threshold current I TH  and generate the first comparator output C OUT_1  according to the comparison. If the second current I DD2  is less than the threshold current I TH , then the SOC may be calculated using the second current I DD2 . If the second current is not less than the threshold current, then the SOC may be calculated using the first current I DD1 . For example, the multiplexer  220  may and selectively transmit one of the first current I DD1  and the second current I DD2  to the SOC calculator  225  according to the first comparator output C OUT_1 , wherein the SOC calculator  225  uses the selected current in the prediction and correction algorithm, as described above. The present method may assume that if the second current I DD2  is greater than the threshold current I TH , then the battery voltage V T  is experiencing hysteresis (as illustrated in  FIG. 3 ), and therefore, the second current I DD2  value has errors and the first current I DD1  may be more suitable for yielding more accurate predictions of the SOC.  
     In an alternative operation, and referring to  FIGS. 1, 2, and 6 , the system  100  may determine or otherwise compute a SOC comprising detecting a first current I DD1  ( 600 ), for example using the current sensor  125 . Determining the SOC may further comprise measuring a battery voltage V T  ( 605 ), for example using the voltage detector  120 . According to an exemplary embodiment, measuring the battery voltage V T  may occur at the end of a charge pulse when the battery voltage peaks. Determining the SOC may further comprise computing a difference voltage V DIFF , where the difference voltage V DIFF  is the difference between the battery voltage V T  and the open circuit voltage V OC  ( 610 ). For example, the fuel gauge  110  may utilize the arithmetic circuit  200  to perform a subtraction function. Determining the SOC may further comprise determining a second current I DD2  ( 615 ), for example, by extracting the second current I DD2  from the memory  130  according to the voltage difference V DIFF . Determining the SOC may further comprise comparing the second current I DD2  to a threshold current I TH  to determine if the second current is less than the threshold current I TH  ( 620 ). For example, the fuel gauge  110  may utilize the first comparator  210  to compare the second current I DD2  to the threshold current I TH  and generate the first comparator output C OUT_1  according to the comparison. Determining the SOC may further comprise comparing the difference voltage V DIFF  to a threshold voltage V TH  to determine if the difference voltage V DIFF  is greater than the threshold voltage V TH  ( 625 ). For example, the fuel gauge  110  may utilize the second comparator  215  to compare the difference voltage V DIFF  to the threshold voltage V TH  and generate the second comparator output C OUT_2  according to the comparison.  
     If the second current I DD2  is less than the threshold current I TH , and the difference voltage is greater than the threshold voltage, then the SOC may be calculated using the first current I DD1  ( 630 ). Alternatively, if the second current I DD2  is not less than the threshold current I TH  or the difference voltage V DIFF  is less than the threshold voltage V TH , then the SOC may be calculated using the second current I DD2  ( 635 ). For example, the multiplexer  220  may selectively transmit one of the first current I DD1  and the second current I DD2  to the SOC calculator  225  according to the first comparator output C OUT_1  and the second comparator output C OUT_2 , wherein the SOC calculator  225  uses the selected current in the prediction and correction algorithm, as described above. The present method used both current and voltage parameters to determine if the battery is experiencing hysteresis. In general, if the second current I DD2  is greater than or equal to the threshold current I TH , or the difference voltage V DIFF  is less than the threshold voltage, then the battery voltage V T  is not experiencing hysteresis and the system may use second current I DD2  to determine the SOC. However, if the second current I DD2  is less than the threshold current I TH , but the difference voltage V DIFF  is greater than the threshold voltage V TH , then the battery voltage V T  may be experiencing hysteresis (as illustrated in  FIG. 3 ), and therefore, the second current I DD2  value has errors and the first current I DD1  may be more suitable for yielding more accurate predictions of the SOC.  
     According to various embodiments, the threshold voltage V TH  may be selected based on the second current I DD2  value. For example, and referring to  FIG. 7 , if the second current I DD2  is 0.1 A, then the threshold voltage V TH  is 13 mV. However, if the second current I DD2  is 2 A, then the threshold voltage V TH  is 250 mV. 
     In general, and referring to  FIG. 3 , battery voltage hysteresis is a phenomenon in which the output voltage of the battery during a non-charging period does not return to the open circuit voltage V OC , and as charging continues, the difference between the output voltage and the open circuit voltage V OC  increases with each charge cycle. For example, at the end of the first charge cycle, the difference between the battery voltage and the open circuit voltage is given by V T_LOW_1 , at the end of the second charge cycle, the difference between the battery voltage and the open circuit voltage is given by V T_LOW_2 , at the end of the third charge cycle, the difference between the battery voltage and open circuit voltage is given by V T_LOW_3 , and at the end of the fourth charge cycle, the difference between the battery voltage and the open circuit voltage is given by V T_LOW_4 , where V T_LOW_1 &lt;V T_LOW_2 &lt;V T_LOW_3 &lt;V T_LOW_4 . In addition, the difference between peak voltage values and the open circuit voltage V OC  (i.e., ΔV) also increases with each charge cycle. 
     Similarly, the same phenomenon of battery voltage hysteresis can be observed when the battery is discharging. In such a case, the output voltage of the battery during a discharging period does not return to the open circuit voltage V OC , and as discharging continues, the difference between the output voltage and the open circuit voltage V OC  increases with each discharge cycle. 
     In the foregoing description, the technology has been described with reference to specific exemplary embodiments. The particular implementations shown and described are illustrative of the technology and its best mode and are not intended to otherwise limit the scope of the present technology in any way. Indeed, for the sake of brevity, conventional manufacturing, connection, preparation, and other functional aspects of the method and system may not be described in detail. Furthermore, the connecting lines shown in the various figures are intended to represent exemplary functional relationships and/or steps between the various elements. Many alternative or additional functional relationships or physical connections may be present in a practical system. 
     The technology has been described with reference to specific exemplary embodiments. Various modifications and changes, however, may be made without departing from the scope of the present technology. The description and figures are to be regarded in an illustrative manner, rather than a restrictive one and all such modifications are intended to be included within the scope of the present technology. Accordingly, the scope of the technology should be determined by the generic embodiments described and their legal equivalents rather than by merely the specific examples described above. For example, the steps recited in any method or process embodiment may be executed in any order, unless otherwise expressly specified, and are not limited to the explicit order presented in the specific examples. Additionally, the components and/or elements recited in any apparatus embodiment may be assembled or otherwise operationally configured in a variety of permutations to produce substantially the same result as the present technology and are accordingly not limited to the specific configuration recited in the specific examples. 
     Benefits, other advantages and solutions to problems have been described above with regard to particular embodiments. Any benefit, advantage, solution to problems or any element that may cause any particular benefit, advantage or solution to occur or to become more pronounced, however, is not to be construed as a critical, required or essential feature or component. 
     The terms “comprises”, “comprising”, or any variation thereof, are intended to reference a non-exclusive inclusion, such that a process, method, article, composition or apparatus that comprises a list of elements does not include only those elements recited, but may also include other elements not expressly listed or inherent to such process, method, article, composition or apparatus. Other combinations and/or modifications of the above-described structures, arrangements, applications, proportions, elements, materials or components used in the practice of the present technology, in addition to those not specifically recited, may be varied or otherwise particularly adapted to specific environments, manufacturing specifications, design parameters or other operating requirements without departing from the general principles of the same. 
     The present technology has been described above with reference to an exemplary embodiment. However, changes and modifications may be made to the exemplary embodiment without departing from the scope of the present technology. These and other changes or modifications are intended to be included within the scope of the present technology, as expressed in the following claims.