I want to implement Extended Kalmann filter for estimating State of charge in a battery pack.What can be the code for this.?
I am using arduino uno for this purpose.
You need the equations describing your system (battery pack, charger...). Then build the state transition and observation matrices. The rest is matrix math, try to find libraries for that.
But I'm not sure about the computing power, required to calculate the inverse and transposed matrices for the EKF in real time. Usually a fast controller with floating point hardware will be required, but for battery state monitoring a slow update rate may be acceptable. Also consider the amount of RAM, required to hold the matrices and vectors.