Impact of distributed photovoltaic generation and customer loads on power quality of a distribution system