An electrical substation that transforms AC voltage to DC voltage is configurable between a current-source mode for charging batteries of a stationary work machine and a voltage-source mode for powering motors of a moving work machine. The substation receives medium-voltage AC power from a grid and…