Optimisation and control of a hydraulic power take-off unit for a wave energy converter in irregular waves