Optimisation of Control Algorithm for Hydraulic Power Take-Off System in Wave Energy Converter