An Equivalent Model of Batteries for Electric Vehicles