SOC Estimator (Coulomb Counting)
Libraries:
      Simscape / 
      Battery / 
      BMS / 
      Estimators
   
Description
The SOC Estimator (Coulomb Counting) block implements an estimator that calculates the state of charge (SOC) of a battery by using the Coulomb counting method.
The SOC is the ratio of the released capacity Creleasable to the rated capacity Crated. Manufacturers provide the value of the rated capacity of each battery, which represents the maximum amount of charge in the battery:
This block supports single-precision and double-precision floating-point simulation.
Note
To enable inherited single-precision floating-point simulation, the data type of all
            inputs and parameters, except for the Sample time (-1 for
                inherited) parameter, must be single.
You can switch between continuous and discrete implementations of the block by using the
				Sample time (-1 for inherited) parameter. To configure the
			block for continuous time, set the Sample time (-1 for
				inherited) parameter to 0. To configure the block for
			discrete time, set the Sample time (-1 for inherited)
			parameter to a positive, nonzero value, or to -1 to inherit the
			sample time from an upstream block.
Note
Continuous-time implementation of this block works only in a double-precision floating-point simulation. If you provide single-precision floating-point parameters and inputs, this block casts them to double-precision floating-point values to prevent errors.
This diagram shows the structure of the block:

Equations
To compute the SOC of the battery, the SOC Estimator (Coulomb Counting) block counts the Ampere hour and current integration:
where Crated is the nominal battery capacity and Ibatt is the battery current.
Examples
Assumptions and Limitations
The nominal capacity of the battery does not consider aging.



