Text this: State of charge estimation of a lithium-ion battery for electric vehicle based on particle swarm optimization