Voltage and reactive power regulation by photovoltaics in distribution systems