A system including a rotary isobaric pressure exchanger (IPX) configured to exchange pressures between a first fluid and a second fluid, and a motor system coupled to the hydraulic energy transfer system and configured to power the hydraulic energy transfer system.