Optimising machine processes for increased energy efficiency