Optimal sun-tracking of a photovoltaic system considering the electric drive losses