Characterisation of batteries by electrochemical impedance spectroscopy