Accurate maximum power tracking in photovoltaic systems affected by partial shading