A simulator for hybrid electrical energy storage systems