Automatic control in desalination and the oil industry