Working principle of chemical energy storage system