Understanding and managing the participation of batteries in reserve electricity markets