Current management
Input
Output
I
PWM
SoC estimation using Extended Kalman Filter
Matlab code
C code (arduino)
References
Kalman filter - Wikipedia