Working principle of photovoltaic energy storage