Skip to Content
MachinesMachines
  • Article
  • Open Access

20 December 2025

16 Pages

Robust Control of Offshore Container Cranes: 3D Trajectory Tracking Under Marine Disturbances

,
,
and
1
Institute for Future, School of Automation, Qingdao University, Qingdao 266071, China
2
Department of Mechatronics, Ho Chi Minh City University of Technology, Ho Chi Minh City 700000, Vietnam
3
Institute for Industrial Artificial Intelligence, School of Mechanical Engineering, Pusan National University, Busan 46241, Republic of Korea
*
Author to whom correspondence should be addressed.

Abstract

This paper develops accurate three-dimensional trajectory tracking and anti-sway control strategies for offshore container cranes operating in an open-sea environment. A 5-DOF nonlinear dynamic model is developed that simultaneously accounts for the crane’s structural motion, trolley movement, spreader hoisting with variable rope length, and both lateral and longitudinal payload sway. The model further incorporates external disturbances induced by wave-excited ship motions. To ensure smooth, efficient, and accurate load transportation from the initial to the target position, an effective trajectory-planning scheme is proposed using a quintic polynomial trajectory refined by a ZVD shaper to suppress residual oscillations. A sliding mode control method is then designed to achieve accurate trajectory tracking and load-sway suppression under external disturbances. Numerical simulations demonstrate that the proposed trajectory planning method effectively reduces the residual oscillations and verifies the effectiveness and robustness of the proposed sliding mode control strategy.

1. Introduction

Offshore container cranes are a crucial component of modern maritime logistics, serving as essential equipment for the transfer of goods between vessels and ports. In recent years, the introduction of the “mobile harbor” concept by Hong and Ngo [1] has spurred increasing research interest in offshore container cranes. The mobile harbor is a small ship equipped with a container crane that can transfer cargo to and from large container vessels at sea [1,2]. Figure 1a illustrates the concept of loading and unloading containers at sea [3]. By enabling cargo to be loaded and unloaded from large container vessels in the open sea, the mobile harbor allows containers to be subsequently transported to nearby ports. This approach can significantly enhance the efficiency of ocean shipping operations and alleviate capacity pressure on shallow-water ports.
Figure 1. A mobile harbor operating in open sea. (a) Concept of the mobile harbor [3]; (b) Defined coordinate systems.
However, unlike land-based cranes, offshore cranes operate in highly complex and dynamically changing marine environments. Mounted on floating vessels, these systems are continuously subjected to six-degree-of-freedom (6-DOF) motions induced by ocean waves, wind, and currents, particularly in heave, roll, and pitch. These uncertain dynamic disturbances significantly degrade the positioning accuracy and operational efficiency of the crane. Moreover, they can induce severe load sway, posing serious threats to operational safety, such as potential collisions or container drops. Consequently, developing robust control strategies to achieve high-precision positioning and effective sway suppression under marine disturbances is of great theoretical and practical significance.
In recent years, numerous control methods have been developed for crane systems, including input shaping [4,5,6], sliding mode control (SMC) [7,8,9,10], optimal control [11], feedback linearization [12,13], and adaptive control [14,15,16,17]. However, traditional control strategies developed for inland crane systems often exhibit significant performance degradation in offshore operations. This degradation is mainly caused by parameter uncertainties, unmodeled dynamics, and strong external disturbances. Therefore, it is essential to develop new control models and strategies specifically for crane systems operating in marine environments.
Establishing an accurate dynamic model and selecting appropriate DOFs are essential for designing an effective offshore crane controller. Considering the ship’s heave, pitch, and roll motions, Hong and Ngo [1] introduced a plant model for mobile harbor control. For offshore boom cranes, Fang et al. [18] established a 3-DOF dynamic model consisting of the boom and a payload. Kim and Hong [19] developed a 4-DOF model that considered plant uncertainty and unknown disturbances for offshore container cranes. Tuan et al. [20] modeled the vessel as a rigid body floating on viscoelastic seawater using linear springs and dampers. However, most existing studies have focused on simplified two-dimensional models, neglecting the three-dimensional (3D) coupling effects among trolley motion, variable rope length, and the load’s lateral and longitudinal sway. It is only in recent years that significant research attention has been directed toward the 3D dynamics and control of offshore cranes [21,22]. Consequently, many existing models fail to accurately capture the full dynamic characteristics of offshore crane systems.
For offshore crane systems, SMC is widely used due to its high robustness. Ngo and Hong [2] developed an SMC method for a mobile harbor. A fuzzy SMC algorithm was proposed by Ngo et al. [23]. Kim and Hong [19] proposed an adaptive SMC (ASMC) method for offshore container cranes. Tuan et al. [20] proposed an ASMC algorithm that utilizes a radial basis function network. In addition, several advanced controllers have been proposed, including output feedback control [24], active disturbance rejection control [25], model-free control [26], nonlinear optimal control [27], and self-tuning control [28,29].
More recently, trajectory planning and tracking control have attracted increasing attention. For offshore container cranes, Ismail et al. [30] proposed a robust SMC to track an optimal trajectory obtained by a linear quadratic regulator. Lu et al. [31] developed a novel online 3D trajectory planning method for offshore boom cranes. Landsverk et al. [32] presented a physics-based trajectory tracking technique, rooted in iterative learning control, that is explicitly tailored for swing suppression. Zhang and Chen [33] developed an adaptive tracking control method for offshore cranes to address the challenge of unknown gravity parameters. Qian et al. [34] proposed an adaptive neural network-based tracking control strategy for underactuated offshore ship-to-ship crane systems. In this paper, a comprehensive approach integrating accurate modeling, trajectory planning, and robust control is proposed.
The contributions of this study are as follows.
(i) A new 5-DOF coupled model is developed for offshore container cranes, which fully integrates the 3D motion coupling among gantry translation, trolley translation, variable rope length, and both lateral and longitudinal payload sway, while simultaneously incorporating wave-induced ship motions (heave, roll, and pitch).
(ii) Based on this model, a quintic polynomial trajectory combined with a Zero Vibration Derivative (ZVD) shaper is proposed specifically for offshore disturbances, enabling smooth 3D motion while suppressing residual oscillations.
(iii) A robust sliding mode controller is designed to achieve effective and strong robustness trajectory tracking and anti-sway control.
(iv) The proposed control strategy is compared with PD control with trajectory tracking and ASMC without trajectory tracking under various conditions, verifying the effectiveness and robustness of the proposed control strategy in simulation.
This paper is organized as follows: Section 2 describes a 5-DOF model of offshore container cranes. In Section 3, a trajectory planning method and an SMC strategy are developed for trajectory tracking and anti-sway control, and the proposed method’s stability is proven using Lyapunov theory. Section 4 provides numerical simulations to demonstrate the control performance. Lastly, the conclusions are provided in Section 5.

2. Dynamic Model of Offshore Container Cranes

To provide a clear foundation for the controller design, a new 5-DOF coupled model is developed for offshore container cranes in this section, which fully integrates the 3D motion coupling among gantry translation, trolley translation, variable rope length, and both lateral and longitudinal payload sway. The ship motions (roll, pitch, and heave) caused by waves are introduced into the system as external disturbances.

2.1. Coordinate Frames

Figure 1b defines three coordinate frames to describe the motions involved in the offshore container crane system: Let {x0, y0, z0} be the inertial coordinate system; {xs, ys, zs} denote the ship coordinate system, with Os denoting the vessel’s center of gravity; and {xt, yt, zt} represent the trolley coordinate system. Table A1 lists the notations in the model. Let x represent the gantry’s displacement and y denote the trolley’s displacement in the ship-attached frame, respectively, while l represents the hoisting rope length. Let δ and θ denote the payload’s lateral and longitudinal sway angles in the inertial coordinate system. In fact, these sway angles are measured in the trolley-attached coordinate frame, and therefore δ and θ should be calculated using the coordinate transformation matrix between the inertial and the trolley coordinate systems. Let z be the vessel’s heave displacement in the inertial frame, and ϕ and ψ represent the vessel’s roll and pitch angles, respectively, in the inertial coordinate frame. Also, let mt and mp be the trolley’s and the load’s masses, respectively, and h represent the crane height. Finally, let fx and fy be the input forces to the gantry and the trolley to suppress sway motions, and let fl be the control force for hoisting the rope.

2.2. Equations of Motion

To simplify the modeling complexities, the following practical assumptions are made: (i) The rope is assumed to be massless. (ii) Friction in the gantry and trolley mechanisms is ignored. (iii) Air resistance affecting sway motions is neglected.
The displacements of the trolley pt and the payload pl in the inertial frame can be obtained as follows.
p t = x cos ψ + y sin ϕ sin ψ + h cos ϕ sin ψ y cos ϕ − h sin ϕ z − x sin ψ + y sin ϕ cos ψ + h cos ϕ cos ψ ,
p l = x cos ψ + y sin ϕ sin ψ + h cos ϕ sin ψ − l cos θ sin δ y cos ϕ − h sin ϕ + l sin θ z − x sin ψ + y sin ϕ cos ψ + h cos ϕ cos ψ − l cos θ cos δ .
Their velocities, by differentiating (1) and (2) in time, are provided as follows.
v t = v t x v t y v t z T and     v l = v l x v l y v l z T ,
where
v t x = x ˙ cos ψ − x ψ ˙ sin ψ + y ˙ sin ψ sin ϕ + y ψ ˙ cos ψ sin ϕ + y ϕ ˙ cos ϕ sin ψ + h ψ ˙ cos ψ cos ϕ − h ϕ ˙ sin ψ sin ϕ , v t y = y ˙ cos ϕ − y ϕ ˙ sin ϕ − h ϕ ˙ cos ϕ , v t z = z ˙ − x ˙ sin ψ − x ψ ˙ cos ψ + y ˙ cos ψ sin ϕ − y ψ ˙ sin ψ sin ϕ + y ϕ ˙ cos ψ cos ϕ − h ψ ˙ sin ψ cos ϕ − h ϕ ˙ cos ψ sin ϕ , v l x = x ˙ cos ψ − x ψ ˙ sin ψ + y ˙ sin ψ sin ϕ + y ψ ˙ cos ψ sin ϕ + y ϕ ˙ sin ψ cos ϕ + h ψ ˙ cos ψ cos ϕ − h ϕ ˙ sin ψ sin ϕ − l ˙ sin δ cos θ + l θ ˙ sin δ sin θ − l δ ˙ cos δ cos θ , v l y = y ˙ cos ϕ − y ϕ ˙ sin ϕ − h ϕ ˙ cos ϕ + l ˙ sin θ + l θ ˙ cos θ , v l z = z ˙ − x ˙ sin ψ − x ψ ˙ cos ψ + y ˙ cos ψ sin ϕ − y ψ ˙ sin ψ sin ϕ + y ϕ ˙ cos ψ cos ϕ − h ψ ˙ sin ψ cos ϕ − h ϕ ˙ cos ψ sin ϕ − l ˙ cos θ cos δ + l θ ˙ sin θ cos δ + l δ ˙ cos θ sin δ .
Let q = x       y       l       δ       θ T ∈ ℝ 5 be the state vector (i.e., the gantry displacement, trolley displacement, hoisting rope length, lateral sway angle, and longitudinal sway angle). Note that the ship motions, (z, ϕ, ψ), are regarded as external disturbances in this work. Therefore, the vessel’s kinetic and potential energies are not included in the model. The kinetic and potential energies of the system are given as follows.
T = 1 2 m t v t 2 + 1 2 m p v l 2 ,
V = ( m t + m p ) g ( z − x sin ψ + y sin ϕ cos ψ + h cos ψ cos ϕ ) − m p g l cos δ cos θ ,
where g indicates the gravitational acceleration. Finally, using the Lagrange equation, the equations of motion are obtained as
M ( q ) q ¨ + C ( q , q ˙ ) q ˙ + G ( q ) = u ,
where
M ( q ) = m 11 0 m 13 m 14 m 15 0 m 22 m 23 m 24 m 25 m 31 m 32 m 33 0 0 m 41 m 42 0 m 44 0 m 51 m 52 0 0 m 55 ,     C ( q , q ˙ ) = 0 c 12 c 13 c 14 c 15 c 21 0 c 23 c 24 c 25 c 31 c 32 0 c 34 c 35 c 41 c 42 c 43 c 44 c 45 c 51 c 52 c 53 c 54 c 55 , G ( q ) = g 1 g 2 g 3 g 4 g 5 T ,     u = f x f y f l 0 0 T .
The components of these matrices are
m 11 = m 22 = m t + m p ,     m 13 = m 31 = − m p cos θ sin ( δ − ψ ) ,     m 14 = m 41 = − m p l cos θ cos ( δ − ψ ) , m 15 = m 51 = m p l sin θ sin ( δ − ψ ) ,     m 23 = m 32 = m p ( − sin ϕ cos ( δ − ψ ) cos θ + sin θ cos ϕ ) , m 24 = m 42 = m p l sin ϕ cos θ sin ( δ − ψ ) ,     m 25 = m 52 = m p l ( sin θ sin ϕ cos ( δ − ψ ) + cos θ cos ϕ ) , m 33 = m p ,     m 44 = m p l 2 cos 2 θ ,     m 55 = m p l 2 ,     c 12 = 2 ( m t + m p ) ψ ˙ sin ϕ , c 13 = m p ( θ ˙ sin θ sin ( δ − ψ ) − δ ˙ cos θ cos ( δ − ψ ) ) , c 14 = m p ( − l ˙ cos θ cos ( δ − ψ ) + l θ ˙ sin θ cos ( δ − ψ ) + l δ ˙ cos θ sin ( δ − ψ ) ) , c 15 = m p θ ˙ ( l ˙ sin θ sin ( δ − ψ ) + l θ ˙ cos θ sin ( δ − ψ ) + l δ ˙ sin θ cos ( δ − ψ ) ) , c 21 = − 2 ( m t + m p ) ψ ˙ sin ϕ , c 23 = m p ( θ ˙ sin ϕ sin θ cos ( δ − ψ ) + θ ˙ cos ϕ cos θ + δ ˙ sin ϕ cos θ sin ( δ − ψ ) ) , c 24 = m p ( l ˙ sin ϕ cos θ sin ( δ − ψ ) − l θ ˙ sin ϕ sin θ sin ( δ − ψ ) + l δ ˙ sin ϕ cos θ cos ( δ − ψ ) ) , c 25 = m p ( l ˙ sin ϕ sin θ cos ( δ − ψ ) + l ˙ cos ϕ cos θ + l θ ˙ sin ϕ cos θ cos ( δ − ψ ) − l θ ˙ cos ϕ sin θ − l δ ˙ sin ϕ sin θ sin ( δ − ψ ) ) , c 31 = 2 m p ψ ˙ cos θ cos ( δ − ψ ) , c 32 = − 2 m p ( ϕ ˙ cos ϕ cos θ cos ( δ − ψ ) + ϕ ˙ sin ϕ sin θ + ψ ˙ sin ϕ cos θ sin ( δ − ψ ) ) , c 34 = − m p l δ ˙ cos 2 θ ,     c 35 = − m p l θ ˙ ,     c 41 = − 2 m p l ψ ˙ cos θ sin ( δ − ψ ) , c 42 = 2 m p l cos θ ( ϕ ˙ cos ϕ sin ( δ − ψ ) − ψ ˙ sin ϕ cos ( δ − ψ ) ) ,     c 43 = m p l δ ˙ cos 2 θ , c 44 = m p l cos θ ( l ˙ cos θ − l θ ˙ sin θ ) ,     c 45 = − m p l 2 δ ˙ sin θ cos θ ,     c 51 = − 2 m p l ψ ˙ sin θ cos ( δ − ψ ) , c 52 = 2 m p l ( ϕ ˙ cos ϕ sin θ cos ( δ − ψ ) − ϕ ˙ sin ϕ cos θ + ψ ˙ sin ϕ sin θ sin ( δ − ψ ) ) ,     c 53 = m p l θ ˙ , c 54 = m p l 2 δ ˙ sin θ cos θ ,     c 55 = m p l l ˙ , g 1 = ( m t + m p ) ( − x ψ ˙ 2 + y ψ ¨ sin ϕ + 2 y ϕ ˙ ψ ˙ cos ϕ + h ψ ¨ cos ϕ − 2 h ϕ ˙ ψ ˙ sin ϕ − ( z ¨ + g ) sin ψ ) , g 2 = ( m t + m p ) ( − x ψ ¨ sin ϕ − h ϕ ¨ − y ψ ˙ 2 sin 2 ϕ − h ψ ˙ 2 sin ϕ cos ϕ − y ϕ ˙ 2 + ( z ¨ + g ) sin ϕ cos ψ ) , g 3 = m p ( x ψ ¨ cos θ cos ( δ − ψ ) + x ψ ˙ 2 cos θ sin ( δ − ψ ) + ( 2 h ϕ ˙ ψ ˙ − y ψ ¨ ) sin ϕ cos θ sin ( δ − ψ ) − ( 2 y ϕ ˙ ψ ˙ + h ψ ¨ ) cos ϕ cos θ sin ( δ − ψ ) + ( y ( ψ ˙ 2 + ϕ ˙ 2 ) + h ϕ ¨ ) sin ϕ cos θ cos ( δ − ψ ) + ( h ( ϕ ˙ 2 + ψ ˙ 2 ) − y ϕ ¨ ) cos ϕ cos θ cos ( δ − ψ ) + ( h ϕ ˙ 2 − y ϕ ¨ ) sin ϕ sin θ − ( y ϕ ˙ 2 + h ϕ ¨ ) cos ϕ sin θ − ( z ¨ + g ) cos θ cos δ ) , g 4 = m p l ( − x ψ ¨ cos θ sin ( δ − ψ ) + x ψ ˙ 2 cos θ cos ( δ − ψ ) + ( 2 h ϕ ˙ ψ ˙ − y ψ ¨ ) sin ϕ cos θ cos ( δ − ψ ) − ( h ψ ¨ + 2 y ϕ ˙ ψ ˙ ) cos ϕ cos θ cos ( δ − ψ ) − ( y ( ϕ ˙ 2 + ψ ˙ 2 ) + h ϕ ¨ ) sin ϕ cos θ sin ( δ − ψ ) + ( y ϕ ¨ − h ( ϕ ˙ 2 + ψ ˙ 2 ) ) cos ϕ cos θ sin ( δ − ψ ) + ( z ¨ + g ) cos θ sin δ ) , g 5 = m p l ( − x ψ ¨ sin θ cos ( δ − ψ ) − x ψ ˙ 2 sin θ sin ( δ − ψ ) + ( y ψ ¨ − 2 h ϕ ˙ ψ ˙ ) sin ϕ sin θ sin ( δ − ψ ) + ( 2 y ϕ ˙ ψ ˙ + h ψ ¨ ) cos ϕ sin θ sin ( δ − ψ ) − ( y ( ϕ ˙ 2 + ψ ˙ 2 ) + h ϕ ¨ ) sin ϕ sin θ cos ( δ − ψ ) + ( y ϕ ¨ − h ( ϕ ˙ 2 + ψ ˙ 2 ) ) cos ϕ sin θ cos ( δ − ψ ) + ( h ϕ ˙ 2 − y ϕ ¨ ) sin ϕ cos θ − ( y ϕ ˙ 2 + h ϕ ¨ ) cos ϕ cos θ + ( z ¨ + g ) sin θ cos δ ) .

2.3. Model Decoupling

In this work, the offshore container crane has five states (x, y, l, δ, θ) and three inputs (fx, fy, fl). Thus, the system is underactuated. The states can be divided into actuated states q a = x y l T and underactuated states q u = δ θ T . Now, (6) can be rewritten as follows.
M 11 ( q ) q ¨ a + M 12 ( q ) q ¨ u + C 11 ( q , q ˙ ) q ˙ a + C 12 ( q , q ˙ ) q ˙ u + G 1 ( q ) = u ,
M 21 ( q ) q ¨ a + M 22 ( q ) q ¨ u + C 21 ( q , q ˙ ) q ˙ a + C 22 ( q , q ˙ ) q ˙ u + G 2 ( q ) = 0 ,
where
M 11 ( q ) = m 11 0 m 13 0 m 22 m 23 m 31 m 32 m 33 ,     M 12 ( q ) = m 14 m 15 m 24 m 25 0 0 , M 21 ( q ) = m 41 m 42 0 m 51 m 52 0 ,     M 22 ( q ) = m 44 0 0 m 55 , C 11 ( q ) = 0 c 12 c 13 c 21 0 c 23 c 31 c 32 0 ,     C 12 ( q ) = c 14 c 15 c 24 c 25 c 34 c 35 , C 21 ( q ) = c 41 c 42 c 43 c 51 c 52 c 53 ,     C 22 ( q ) = c 44 c 45 c 54 c 55 , G 1 ( q ) = g 1 g 2 g 3 T ,     G 2 ( q ) = g 4 g 5 T .
Since M22 is symmetric and positive definite, the underactuated dynamics (8) can be expressed as follows
q ¨ u = M 22 − 1 ( q ) ( − M 21 ( q ) q ¨ a − C 21 ( q , q ˙ ) q ˙ a − C 22 ( q , q ˙ ) q ˙ u − G 2 ( q ) ) .
Substituting (9) into (7) yields
q ¨ a = M ¯ − 1 ( q ) ( u − C ¯ 1 ( q , q ˙ ) q ˙ a − C ¯ 2 ( q , q ˙ ) q ˙ u − G ¯ ( q ) ) ,
where M ¯ ( q ) is positive definite, and
M ¯ ( q ) = M 11 ( q ) − M 12 ( q ) M 22 − 1 ( q ) M 21 ( q ) , C ¯ 1 ( q , q ˙ ) = C 11 ( q , q ˙ ) − M 12 ( q ) M 22 − 1 ( q ) C 21 ( q , q ˙ ) , C ¯ 2 ( q , q ˙ ) = C 12 ( q , q ˙ ) − M 12 ( q ) M 22 − 1 ( q ) C 22 ( q , q ˙ ) , G ¯ ( q ) = G 1 ( q ) − M 12 ( q ) M 22 − 1 ( q ) G 2 ( q ) .

3. Control Design

3.1. Trajectory Planning

To ensure smooth cargo transport and suppress vibrations in offshore container crane systems, trajectory planning plays a crucial role in achieving anti-sway control. The trajectory can be mathematically described by a function of time-dependent state variables. For each actuated state, the reference trajectory is described by a quintic polynomial function as follows.
q r e f 0 ( t ) = a 0 + a 1 t + a 2 t 2 + a 3 t 3 + a 4 t 4 + a 5 t 5 ,
where
q r e f 0 ( t ) = x r e f ( t ) y r e f ( t ) l r e f ( t ) T ,     a i = a i x a i y a i l T ,   i = 1 , 2 , ⋯ , 5 .
represent the state vector and the coefficient vector of the polynomial, respectively. Then, the corresponding velocity and acceleration trajectories are obtained by successive differentiation as follows.
q ˙ r e f 0 ( t ) = a 1 + 2 a 2 t + 3 a 3 t 2 + 4 a 4 t 3 + 5 a 5 t 4 ,
q ¨ r e f 0 ( t ) = 2 a 2 + 6 a 3 t + 12 a 4 t 2 + 20 a 5 t 3 .
Each motion component is constrained by the position, velocity, and acceleration boundary conditions at the initial and final times as follows.
q ( 0 ) = q 0 ,   q ˙ ( 0 ) = 0 ,   q ¨ ( 0 ) = 0 ,   q ( T ) = q d ,   q ˙ ( T ) = 0 ,   and   q ¨ ( T ) = 0 .
Let q 0 = x 0 y 0 l 0 T and q d = x d y d l d T denote the initial and final positions of the load, and let T be the transfer time.
Substituting (14) into (11), (12), and (13), the coefficients are obtained as follows.
a 0 = q 0 , a 1 = a 2 = 0 , a 3 = 10 ( q d − q 0 ) T 3 , a 4 = − 15 ( q d − q 0 ) T 4 , a 5 = 6 ( q d − q 0 ) T 5 .
Although the smooth quintic trajectory reduces dynamic excitation, the inherent pendulum motion characteristics of the load still cause residual oscillations. To address this issue, the Zero Vibration Derivative (ZVD) shaper is introduced to refine the reference trajectory to suppress payload sway. Despite the nonlinear and strongly coupled crane dynamics, the dominant sway motion can still be approximated as a lightly damped oscillatory mode, which the ZVD shaper can effectively suppress by smoothing the command and preventing abrupt excitation. Furthermore, although the natural frequency varies during hoisting due to changes in rope length, the ZVD shaper remains effective because its zero-sensitivity property provides robustness to moderate frequency variations. The smooth quintic trajectory also limits the rate of change in the natural frequency, ensuring that it does not vary abruptly within the shaping interval. As a result, the ZVD input shaper offers reliable vibration suppression even under nonlinear and time-varying crane dynamics.
The suspended load of offshore container cranes can be considered a pendulum system with a natural frequency, which is given as
ω n ( t ) = g l ( t ) .
For a ZVD shaper [35], the parameters are given by
A 1 = 1 1 + 2 K + K 2 A 2 = 2 K 1 + 2 K + K 2 A 3 = K 2 1 + 2 K + K 2 ,
T 1 = 0 , T 2 = π ω n , T 3 = 2 π ω n ,
where K = e − ζ π / 1 − ζ 2 , and ζ is the damping ratio. Then, the shaped trajectories can be expressed as
q r e f ( t ) = ∑ i = 1 3 A i q r e f 0 ( t − T i ) .

3.2. Sliding Mode Control

The control objectives of this paper are to ensure that the payload is accurately transported to the target location and to suppress load sway under external disturbances. The block diagram of the SMC with trajectory planning (TP-SMC) is shown in Figure 2. The tracking error vector is defined as
e a ( t ) = q a ( t ) − q r e f ( t ) = e x ( t ) e y ( t ) e l ( t ) T ,
where q a ( t ) = x ( t ) y ( t ) l ( t ) T denotes the actual motion of the crane system. Then, a sliding surface s is designed as follows.
s = e ˙ a + λ e a + k e u ,
where e u = q u ( t ) − 0 = δ ( t ) θ ( t ) T , λ = diag ( λ 1 , λ 2 , λ 3 ) is the control gain matrix, and k ∈ R 3 × 2 denotes the coupling coefficients between the corresponding motion direction and sway motions.
k = k 1 0 0 0 k 2 0 .
The derivative of the sliding surface s is
s ˙ = e ¨ a + λ e ˙ a + k e ˙ u .
Figure 2. Block diagram of the SMC with trajectory planning.
Note that the 5-DOF crane dynamics contain significant coupling effects, which arise primarily from (i) the Coriolis and centrifugal interactions between the trolley/gantry motion and the payload swing, and (ii) the time-varying inertia introduced by the hoisting motion. These coupling terms are explicitly retained in the model and are incorporated into the proposed sliding mode control framework. In particular, the modified inertia matrix M ¯ ( q ) in (10) and the sliding surface defined in (21) enable the equivalent control term to compensate for these coupling forces.
Substituting (10) into (22) and letting s ˙ = 0 , the equivalent control law is obtained as follows.
u e q = M ¯ ( q ¨ r e f − λ ( q ˙ a − q ˙ r e f ) − k q ˙ u ) + C ¯ 1 q ˙ a + C ¯ 2 q ˙ u + G ¯ .
To eliminate chattering caused by the switching term in traditional SMC laws, -Ksgn(s), the switching term is replaced with a continuous saturation function:
u s w = − K ⋅ sat ( s , μ ) ,
where K = diag(K1, K2, K3) > 0 is the switching gain, and μ > 0 defines the boundary layer thickness around the sliding surface. The saturation function is defined as
sat ( s , μ ) = s / μ , s ≤ μ , sgn ( s ) , s > μ .
Therefore, the control law can be expressed as follows
u = u e q + u s w = M ¯ ( q ¨ r e f − λ ( q ˙ a − q ˙ r e f ) − k q ˙ u ) + C ¯ 1 q ˙ a + C ¯ 2 q ˙ u + G ¯ − K ⋅ sat ( s , μ ) .
To ensure the stability of the system, consider a Lyapunov candidate function as follows
V = 1 2 s T s .
Differentiating (27) in time
V ˙ = − s T s ˙ ,
Substituting (22) into (28) yields
V ˙ = s T ( e ¨ a + λ e ˙ a + k e ˙ u ) = s T ( q ¨ a − q ¨ r e f + λ ( q ˙ a − q ˙ r e f ) + k q ˙ u ) ,
Substituting (10) into (29) yields
V ˙ = s T ( M ¯ − 1 ( q ) ( u − C ¯ 1 ( q , q ˙ ) q ˙ a − C ¯ 2 ( q , q ˙ ) q ˙ u − G ¯ ( q ) ) − q ¨ r e f + λ ( q ˙ a − q ˙ r e f ) + k q ˙ u ) ,
Substituting the control law (26) into (30) and simplifying, the following is obtained:
V ˙ = − s T M ¯ − 1 ( q ) ( K ⋅ sat ( s , μ ) ) ≤ 0 .
That is, the derivative of the Lyapunov function is negative semi-definite, which guarantees that the sliding surface s(t) converges to a small neighborhood of the origin in finite time. Due to the definition of the sliding surface, this implies that the tracking error dynamics are exponentially stable. Therefore, the tracking error e(t) and its derivative remain bounded and converge asymptotically to a neighborhood of zero, whose size is determined by the boundary layer thickness. As a result, the proposed controller achieves practical asymptotic trajectory tracking and effective anti-sway control under the full nonlinear dynamics and external disturbances.

4. Simulation Results

To verify the performance and robustness of the proposed method, numerical simulations were conducted using MATLAB/Simulink R2024a. In this study, ship motion induced by irregular waves is considered an external disturbance, and the irregular waves are generated using the Marine Systems Simulator Toolbox [36]. Table 1 illustrates the parameter values used in simulations. Note that a shorter transport time can generate excessive acceleration, potentially causing significant payload oscillations; therefore, to balance operational efficiency and safety, T = 15 s was selected as the transportation time.
Table 1. Parameter values used in simulation.
When there are no ocean disturbances, the system can be regarded as a traditional inland crane. In this case, an open-loop simulation without feedback control is conducted in which both the unshaped quintic and shaped trajectories are applied as inputs for comparison. Figure 3 shows the simulation results. Compared with the unshaped trajectory, the shaped trajectory slightly delays motion completion but significantly reduces oscillations, even in the absence of feedback control.
Figure 3. Comparison without disturbances: (a) Gantry movement; (b) trolley movement; (c) rope length; (d) lateral sway angle; (e) longitudinal sway angle.
Next, to evaluate the performance of the proposed scheme, its results are compared with a PD controller incorporating trajectory planning (TP-PD) and an ASMC without trajectory planning. The control law of the TP-PD control is as follows
u p d = − k p e a − k d e ˙ a + k u e u ,
where kp = diag(kp1, kp2, kp3) and kd = diag(kd1, kd2, kd3) are the proportional and derivative gains, respectively, and
k u = k u 1 0 0 0 k u 2 0 .
Without trajectory planning, the sliding surface becomes
s = q ˙ a + λ ( q a − q d ) + k q u .
Therefore, the control law of the ASMC is as follows
u = M ¯ ( − λ q ˙ a − k q ˙ u ) + C ¯ 1 q ˙ a + C ¯ 2 q ˙ u + G ¯ − K ^ ( t ) ⋅ sat ( s , μ ) ,
where K ^ ( t ) is defined as follows [37]
  • If s > ε , K ^ ( t ) is tuned as
K ^ ( t ) = γ s ,
where γ = [γ1, γ2, γ3] > 0, and K ^ ( 0 ) > 0
  • If s ≤ ε , K ^ ( t ) is given by
K ^ ( t ) = α η ,
where α > 0 and η is the average of sgn(s) obtained through a low-pass filter as follows [38]
σ η ˙ + η = sgn ( s ) , σ > 0 .
First, a simulation comparison was conducted under Sea State III conditions. Figure 4 shows the ship motions in Sea State III. The control gains for both the ASMC and PD controllers are listed in Table 2, and the corresponding comparison results are presented in Figure 5. For a more intuitive comparison, Table 3 lists the root mean square error (RMSE) values of gantry and trolley positions, the maximum lateral and longitudinal sway angles, and the maximum control forces. The results indicated that when trajectory planning is incorporated, both SMC and PD control effectively suppress load sway. In contrast, the ASMC exhibits larger position errors and sway angles. Moreover, the proposed control method achieves the smallest load sway among the three approaches, demonstrating its superior performance.
Figure 4. Ship motions in Sea State III: (a) Roll angle; (b) pitch angle; (c) heave displacement.
Table 2. Control gains.
Figure 5. Comparison in Sea State III: (a) Gantry movement; (b) trolley movement; (c) rope length; (d) lateral sway angle; (e) longitudinal sway angle.
Table 3. Performance comparison of three control methods under Sea State III.
Then, to evaluate the robustness of the proposed strategy, simulations are performed under the following three conditions.
(i) Condition 1 (unknown disturbances): An impact force (e.g., gust or collision) is applied to the payload at 20 s.
(ii) Condition 2 (parametric uncertainty): The cargo mass is reduced to 5000 kg, the target rope length is reduced to 5 m, and the initial lateral sway angle is increased from zero to 0.07 rad.
(iii) Condition 3 (Sea State IV): The wave disturbance is increased. The system is operating under Sea State IV.
Figure 6, Figure 7 and Figure 8 show the comparison results. In Figure 6, under the action of sudden force, both the lateral and longitudinal sway of the load showed significant changes, but the angle of change for TP-SMC was significantly smaller than that for ASMC and TP-PD. Furthermore, compared to other methods, TP-SMC can suppress the induced oscillations more quickly. In Figure 7, the proposed TP-SMC still ensured stable and accurate trajectory tracking. And the load sway angle suppression effect was still superior to TP-PD and ASMC. In Figure 8, despite a decrease in control performance under greater wave disturbances, the tracking error and sway angles of the TP-SMC were still smaller than those of the ASMC and TP-PD. Thus, the proposed control strategy preserves stability and effectively suppresses load sway under unknown disturbances, parameter variations, and stronger wave disturbances, confirming its strong robustness.
Figure 6. Comparison in Condition 1: (a) Gantry movement; (b) trolley movement; (c) rope length; (d) lateral sway angle; (e) longitudinal sway angle.
Figure 7. Comparison in Condition 2: (a) Gantry movement; (b) trolley movement; (c) rope length; (d) lateral sway angle; (e) longitudinal sway angle.
Figure 8. Comparison in Condition 3: (a) Gantry movement; (b) trolley movement; (c) rope length; (d) lateral sway angle; (e) longitudinal sway angle.
In summary, the simulations demonstrate that the proposed method achieves accurate trajectory tracking and effectively suppresses load sway under various conditions. The input-shaped trajectory reduces residual oscillations compared with the conventional quintic trajectory, and the proposed sliding mode controller outperforms both PD control with trajectory planning and ASMC without trajectory planning. Moreover, robustness tests confirm that the proposed method maintains stable performance under unknown disturbances, parameter variations, and stronger wave disturbances.

5. Conclusions

This paper presented a comprehensive modeling, trajectory-planning, and robust control framework for offshore container cranes operating under complex marine disturbances. A new 5-DOF coupled dynamic model was developed to capture the essential interactions among gantry motion, trolley translation, variable rope length, and both lateral and longitudinal payload sway, while explicitly incorporating wave-induced ship motions as external disturbances. To ensure smooth and efficient load transportation, a quintic-polynomial trajectory was refined using a ZVD input shaper, which significantly reduced the residual oscillations associated with the crane’s pendulum-like dynamics. A sliding mode controller was designed to guarantee accurate tracking of the reference trajectory and anti-sway control. Numerical simulations under various marine conditions, including Sea State III and IV waves, impact disturbances, and parameter uncertainties, verified the effectiveness and robustness of the proposed control strategy. Compared with conventional PD control and ASMC without trajectory planning, the integrated TP-SMC scheme achieved superior performance and strong robustness. Overall, the results demonstrate that the proposed approach can maintain stable and high-precision performance under marine disturbances, providing a practical and reliable control solution for offshore container crane operations. Future work will incorporate actuator dynamics, friction, and time delays to improve model fidelity, explore adaptive or learning-based methods to handle time-varying uncertainties and marine disturbances, and extend validation using measured ship-motion disturbance data.

Author Contributions

Conceptualization, K.-S.H.; Methodology, A.L.; Validation, A.L., S.L., P.-T.P. and K.-S.H.; Writing—original draft preparation, A.L.; Writing—review and editing, K.-S.H.; Supervision, K.-S.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Research Foundation of Korea, under the Ministry of Science and ICT, Republic of Korea (grant no. IRIS-2023-00207954).

Data Availability Statement

The results of this study are based solely on the models, parameters, and simulation conditions described in the manuscript. No additional data are required to reproduce the findings.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
3DThree dimensional
DOFDegree of freedom
SMCSliding mode control
ASMCAdaptive sliding mode control
PDProportional derivative
TP-SMCSliding mode control with trajectory planning
TP-PDProportional derivative control with trajectory planning
RMSERoot mean square error

Appendix A

Table A1. List of notations in the model.

References

  1. Hong, K.-S.; Ngo, Q.H. Dynamics of the container crane on a mobile harbor. Ocean Eng. 2012, 53, 16–24. [Google Scholar] [CrossRef] [Scilit]
  2. Ngo, Q.H.; Hong, K.-S. Sliding-mode antisway control of an offshore container crane. IEEE/ASME Trans. Mechatron. 2012, 17, 201–209. [Google Scholar] [CrossRef] [Scilit]
  3. Kim, E.H.; Jung, Y.S.; Yu, Y.; Kwon, S.; Ju, H.; Kim, S.; Kwak, B.M.; Jang, I.G.; Kim, K.-S. An advanced cargo handling system operating at sea. Int. J. Control Autom. Syst. 2014, 12, 852–860. [Google Scholar] [CrossRef] [Scilit]
  4. Singhose, W.; Kim, D.; Kenison, M. Input shaping control of double-pendulum bridge crane oscillations. ASME J. Dyn. Sys. Meas. Control 2008, 130, 034504. [Google Scholar] [CrossRef] [Scilit]
  5. Singhose, W.; Porter, L.; Kenison, M.; Kriikku, E. Effects of hoisting on the input shaping control of gantry cranes. Control Eng. Pract. 2000, 8, 1159–1165. [Google Scholar] [CrossRef] [Scilit]
  6. Garrido, S.; Abderrahim, M.; Gimenez, A.; Diez, R.; Balaguer, C. Anti-swinging input shaping control of an automatic construction crane. IEEE Trans. Autom. Sci. Eng. 2008, 5, 549–557. [Google Scholar] [CrossRef] [Scilit]
  7. Lee, H.-H.; Liang, Y.; Segura, D. A sliding-mode antiswing trajectory control for overhead cranes with high-speed load hoisting. ASME J. Dyn. Sys. Meas. Control 2006, 128, 842–845. [Google Scholar] [CrossRef] [Scilit]
  8. Wang, Q.; Wang, X.; Ji, Z.; Liu, W.; Fang, Y.; Hou, J.; Liu, X.; Wen, H. Evaluation of Operational Energy Efficiency for Bridge Cranes Based on an Improved Multi-Strategy Fusion RRT Algorithm. Machines 2025, 13, 924. [Google Scholar] [CrossRef] [Scilit]
  9. Nguyen, N.P.; Oh, H.; Moon, J. Continuous integral-type sliding mode tracking control of under-actuated cranes: Theory and experiments. Nonlinear Dyn. 2024, 112, 16295–16313. [Google Scholar] [CrossRef] [Scilit]
  10. Liu, Z.; Ma, X. Piecewise time polynomials-based control methods for obstacle avoidance and precision positioning of tower crane systems with varying cable lengths. Machines 2024, 12, 775. [Google Scholar] [CrossRef] [Scilit]
  11. Terashima, K.; Shen, Y.; Yano, K. Modeling and optimal control of a rotary crane using the straight transfer transformation method. Control Eng. Pract. 2007, 15, 1179–1192. [Google Scholar] [CrossRef] [Scilit]
  12. Park, H.; Chwa, D.; Hong, K.-S. A feedback linearization control of container cranes: Varying rope length. Int. J. Control Autom. Syst. 2007, 5, 379–387. [Google Scholar]
  13. Hamdy, M.; Shalaby, R.; Sallam, M. A hybrid partial feedback linearization and deadbeat control scheme for a nonlinear gantry crane. J. Frankl. Inst. 2018, 355, 6286–6299. [Google Scholar] [CrossRef] [Scilit]
  14. Yang, J.H.; Shen, S.H. Novel approach for adaptive tracking Control of a 3-D overhead crane system. J. Intell. Robot. Syst. 2011, 62, 59–80. [Google Scholar] [CrossRef] [Scilit]
  15. Sun, N.; Yang, T.; Chen, H.; Fang, Y.; Qian, Y. Adaptive anti-swing and positioning control for 4-DOF rotary cranes subject to uncertain/unknown parameters with hardware experiments. IEEE Trans. Syst. Man Cybern. Syst. 2017, 49, 1309–1321. [Google Scholar] [CrossRef] [Scilit]
  16. Li, J.; Dong, Q.; Xu, G.; Zuo, Y.; Jiang, L. A development method for load adaptive matching digital twin system of bridge cranes. Machines 2025, 13, 745. [Google Scholar] [CrossRef] [Scilit]
  17. Kim, G.-H.; Yoon, M.; Jeon, J.Y.; Hong, K.-S. Data-driven modeling and adaptive predictive anti-swing control of overhead cranes. Int. J. Control Autom. Syst. 2022, 20, 2712–2723. [Google Scholar] [CrossRef] [Scilit]
  18. Fang, Y.; Wang, P.; Sun, N.; Zhang, Y. Dynamics analysis and nonlinear control of an offshore boom crane. IEEE Trans. Ind. Electron. 2013, 61, 414–427. [Google Scholar] [CrossRef] [Scilit]
  19. Kim, G.-H.; Hong, K.-S. Adaptive sliding-mode control of an offshore container crane with unknown disturbances. IEEE/ASME Trans. Mechatron. 2019, 24, 2850–2861. [Google Scholar] [CrossRef] [Scilit]
  20. Tuan, L.A.; Cuong, H.M.; Trieu, P.V.; Nho, L.C.; Thuan, V.D.; Anh, L.V. Adaptive neural network sliding mode control of shipboard container cranes considering actuator backlash. Mech. Syst. Signal Proc. 2018, 112, 233–250. [Google Scholar] [CrossRef] [Scilit]
  21. Chang, Z.; Zhang, B.; Li, W.; Ni, P.; Li, J.; Tang, C.; Zhang, Y.; Wang, H. Development of a marine 3-DOF folding jib crane for wave compensation. J. Mech. Sci. Technol. 2025, 39, 2223–2233. [Google Scholar] [CrossRef] [Scilit]
  22. Yang, L.; Li, G.; Ma, X. Neural network-based nonlinear stabilizing control for 3-D offshore crane with double-pendulum effect. IEEE Trans. Autom. Sci. Eng. 2025, 22, 10084–10094. [Google Scholar] [CrossRef] [Scilit]
  23. Ngo, Q.H.; Nguyen, N.P.; Nguyen, C.N.; Tran, T.H.; Ha, Q.P. Fuzzy sliding mode control of an offshore container crane. Ocean Eng. 2017, 140, 125–134. [Google Scholar] [CrossRef] [Scilit]
  24. Chen, H.; Sun, N. An output feedback approach for regulation of 5-DOF offshore cranes with ship yaw and roll perturbations. IEEE Trans. Ind. Electron. 2022, 69, 1705–1716. [Google Scholar] [CrossRef] [Scilit]
  25. Li, Z.; Chen, H.; Che, L. Antiswing control of offshore cranes under ship rolling disturbances: An active disturbance rejection control based approach. Nonlinear Dyn. 2024, 112, 21097–21116. [Google Scholar] [CrossRef] [Scilit]
  26. Ren, Z.; Verma, A.S.; Ataei, B.; Halse, K.H.; Hildre, H.P. Model-free anti-swing control of complex-shaped payload with offshore floating cranes and a large number of lift wires. Ocean Eng. 2021, 228, 108868. [Google Scholar] [CrossRef] [Scilit]
  27. Rigatos, G. A nonlinear optimal control approach for underactuated offshore cranes. Ships Offshore Struct. 2024, 19, 159–172. [Google Scholar] [CrossRef] [Scilit]
  28. Martin, I.A.; Irani, R.A. Dynamic modeling and self-tuning anti-sway control of a seven degree of freedom shipboard knuckle boom crane. Mech. Syst. Signal Proc. 2021, 153, 107441. [Google Scholar] [CrossRef] [Scilit]
  29. Martin, I.A.; Irani, R.A. Self-tuning anti-sway control for shipboard cranes providing combined world and deck-frame compensation. Ocean Eng. 2022, 251, 110957. [Google Scholar] [CrossRef] [Scilit]
  30. Ismail, R.R.; That, N.D.; Ha, Q.P. Modelling and robust trajectory following for offshore container crane systems. Autom. Constr. 2015, 59, 179–187. [Google Scholar] [CrossRef] [Scilit]
  31. Lu, B.; Lin, J.; Fang, Y.; Hao, Y.; Cao, H. Online trajectory planning for three-dimensional offshore boom cranes. Autom. Constr. 2022, 140, 104372. [Google Scholar] [CrossRef] [Scilit]
  32. Landsverk, R.; Zhou, J.; Hagen, D. Antiswing control and trajectory planning for offshore cranes: Design and experiments. Model. Identif. Control 2024, 45, 115–126. [Google Scholar] [CrossRef] [Scilit]
  33. Zhang, R.; Chen, H. An adaptive tracking control method for offshore cranes with unknown gravity parameters. Ocean Eng. 2022, 260, 111809. [Google Scholar] [CrossRef] [Scilit]
  34. Qian, Y.; Hu, D.; Chen, Y.; Fang, Y.; Hu, Y. Adaptive neural network-based tracking control of underactuated offshore ship-to-ship crane systems subject to unknown wave motions disturbances. IEEE Trans. Syst. Man Cybern. Syst. 2022, 52, 3626–3637. [Google Scholar] [CrossRef] [Scilit]
  35. Singer, N.C.; Seering, W.P. Preshaping command inputs to reduce system vibration. J. Dyn. Syst. Meas. Control 1990, 112, 76–82. [Google Scholar] [CrossRef] [Scilit]
  36. Fossen, T.I.; Perez, T. Marine Systems Simulator (MSS), Version 2.0; Norwegian University of Science and Technology: Trondheim, Norway, 2025. Available online: http://www.marinecontrol.org (accessed on 29 September 2025).
  37. Ngo, Q.H.; Nguyen, N.P.; Nguyen, C.N.; Tran, T.H.; Bui, V.H. Payload pendulation and position control systems for an offshore container crane with adaptive-gain sliding mode control. Asian J. Control 2020, 22, 2119–2128. [Google Scholar] [CrossRef] [Scilit]
  38. Plestan, F.; Shtessel, Y.; Brégeault, V.; Poznyak, A. New methodologies for adaptive sliding mode control. Int. J. Control 2010, 83, 1907–1919. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.