Simulation and testing of a hydraulic winch