A powertrain for a vehicle includes a wye wound electric machine and a controller. The electric machine is coupled with an inverter. The controller is configured to, in response to an electrical connection between the vehicle and an AC grid, couple a capacitor between a neutral terminal of the electric machine and a negative terminal of the inverter to absorb reactive power from the AC grid.