Detailed explanation of the principle of energy storage system