Real-time building smart charging system based on PV forecast and Li-Ion battery degradation