The working principle of battery energy storage device a complete design scheme