This thesis presents a heave compensation system for offshore crane when it gets unexpected disturbances and external force. The dynamic model consists of crane assumed to be the rigid body, hydraulic driven winch, elastic rope and payload. To keep the payload from moving up and down, PD control is applied by using linearization. For better performance, sliding mode control and nonlinear generalized predictive control algorithm is applied due to the time-delay. As a result, the oscillating amplitude of the payload is reduced by using the control algorithm. Considering the time-delay assumed one second involved in the system, nonlinear generalized predictive controller with robust controller is suitable control algorithm for this heave compensation system because it makes the position of payload reach the desired position with least error. In the end of thesis, it shows the control algorithm using the robust control and its simulation results.