Optimal shade distribution technique to mitigate partial shading effects in photovoltaic systems