Intelligent switching mechanism for power distribution in photovoltaic-fed battery electric vehicles