Keywords

1 Introduction

The off-shore engineering industry is quickly growing and innovating to meet current societal demands. Transport of goods utilizes cranes to move containers from or to ships in off-shore fixed and floating platforms. The challenges in the logistics can be addressed by adding automated crane portals on the floating platforms.

One of the bottlenecks in the process of shipping containers is the handling rate which is why multiple ship-to-shore (STS) gantry cranes are usually used to (un)load a containership [1]. The trend in “smart” technology and automation has been adopted in port equipment design [2, 3]. Currently, some autonomous STS gantry cranes exist however, most are still operated by a high skilled operator who is responsible for minimizing container sway as this is the cause for almost half of the accidents involving containers [4, 5]. The sway angle is the rotation angle of the hanging container due to the inertia of the container and the effects of side-to-side and upward-downward motion as depicted in Fig. 1.

Fig. 1
figure 1

A schematic depiction of container sway

Sway control can result in a higher harbor efficiency due to lower handling times and improved safety. Out of the quay, on an offshore platform, the sway effects of a crane will play an even bigger role when handling containers due the motion of floating platforms and ships. This paper explores how sway control strategies for STS gantry cranes perform under stress and when they are moved on a floating platform.

In order to smartly reduce sway of STS gantry cranes, multiple control strategies currently exist [6]. However, the performance of such systems when they are disturbed with floating platform dynamics is not yet explored in detail. This research investigates two sway control strategies, PD (proportional derivative) and state feedback, on their performance under disturbances. Both feedback control strategies are known to handle disturbances well [7]. In order to do so, a nonlinear dynamic system with simultaneous hoisting and traversing is derived for the crane. Motor dynamics, sensor effects, floating platform dynamics and disturbances such as wind are taken into consideration in order to test the robustness of the proposed control strategies. These models are simulated using MATLAB Simulink environment. The results comparison is discussed in detail, leading to conclusions and future work.

2 Modelling of the General System

The proposed system is a two-dimensional scale model of a STS gantry crane. The movement space of a container is confined by a 2 × 0.5 [m] plane, with a 1.5 [kg] container. A full-sized container crane moves in a plane of up to 150 [m] × 40 [m], which can have a container weight up to 25,000 [kg]. Since the model is relatively small, it is actuated by 2 DC motors, one for traversing, (x-movement) and one for hoisting (L-movement). The system is modelled in such a way that actuators and gearboxes will be fixed to the frame, rather than to the moving cart. The following Fig. 2 shows a simplified CAD model of the crane and pulley system. Here, the angle of sway in the lower image is 8°. Therefore, if the sway is confined during movement to a maximum ±10°, safety of the scale model can be guaranteed. For a real-size STS gantry crane this value might be lower due to stricter safety and quality constraints.

Fig. 2
figure 2

Simplified 2 × 0.5 [m] CAD model of a scaled version STS gantry crane

The dynamic model of the system has two components, the crane and the DC motors. Since the actuators are non-ideal, they have certain constrains. Therefore, they need to be modelled in order to simulate a realistic actuated system.

In order to derive the crane dynamics, the Fig. 3 has been used. It can be noted that this system is a simplified overview of what is going on in the actual system. Most important is that the system represents a pendulum on a cart model with variable pendulum length.

Fig. 3
figure 3

Simplified diagram of the gantry cart including DC motors and pulleys systems

For example, the container and cart are simulated as point masses and friction as well as damping is initially assumed to be zero. This system is defined by three states, x, θ, L. To derive the equations of motion for this system, Lagrangian mechanics was used to derive Eq. 1:

$${\mathcal{L}} = \frac{1}{2}\left( {M_{g} \dot{x}^{2} + M_{h} \left( {v_{2x}^{2} + v_{2z}^{2} } \right) + M_{h} \dot{L}^{2} } \right) + M_{h} gL\cos \theta$$
(1)

where \(v_{2x}\) and \(v_{2z}\) represent the velocities of the load. When the Lagrangian process is followed, the equations of motion are derived as below.

$$\begin{aligned} \ddot{x} = & \frac{{F_{x} + F_{h} \sin \theta }}{{M_{g} }} \\ \ddot{\theta } = & - \frac{{\cos \theta \frac{{F_{x} + F_{h} \sin \theta }}{{M_{g} }} + 2\dot{L}\dot{\theta } + g\sin \theta }}{L} \\ \ddot{L} = & - \frac{{F_{h} }}{{M_{h} }} - \left( {L\dot{\theta }^{2} + g\cos \theta - \frac{{\sin \theta \left( {F_{x} + F_{h} \sin \theta } \right)}}{{M_{g} }}} \right) \\ \end{aligned}$$
(2)

In order to use these equations in the final controller models, they need to be put to state space. For the PD controller they are first partly linearized under the assumptions: \(\sin \left( \theta \right) = \theta ,\cos \left( \theta \right) = 1,\dot{\theta }^{2} = 0\).

In state space form this yields the following model:

$$\begin{array}{*{20}c} {{\dot{\mathbf{q}}} = A{\mathbf{q}} + B{\mathbf{F}}} \\ {{\mathbf{y}} = C{\mathbf{q}} + D{\mathbf{F}}} \\ \end{array}$$
(3)

where \(\varvec{q} = \left[ {\dot{x} x \dot{\theta } \theta \dot{L} L} \right]^{T} \,\& \,\varvec{F} = \left[ {F_{x} F_{h} g} \right]^{T}\)

This yields

$$A = \left[ {\begin{array}{*{20}c} 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & {\frac{{ - 2\dot{L}}}{L}} & {\frac{ - g}{L}} & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{array} } \right],B = \left[ {\begin{array}{*{20}c} {\frac{1}{{M_{g} }}} & {\frac{\theta }{{M_{g} }}} & 0 \\ 0 & 0 & 0 \\ {\frac{ - 1}{{M_{g} L}}} & {\frac{ - \theta }{{M_{g} L}}} & 0 \\ 0 & 0 & 0 \\ {\frac{ - \theta }{{M_{g} }}} & {\frac{ - 1}{{M_{h} }}} & { - 1} \\ 0 & 0 & 0 \\ \end{array} } \right]$$
(4)

The C matrix becomes the identity matrix as all states can be measured, although when modelling the results, non-ideal sensors shall be taken into account. The D matrix becomes the zero matrix as there is no direct output term in the equations of motion. In order to implement the crane dynamics into a state space controller, the complete non-linear dynamics can be used.

The actuators that control the traversing and hoisting movements are simulated as armature-current controlled DC-motors. In case of such DC-motors, the field current is held constant and the current is controlled through the armature voltage [8, 9]. The transfer function from the input armature current to the resulting motor torque is, with Kt the motor torque constant.

$$\frac{{T_{m} \left( s \right)}}{I\left( s \right)} = K_{t}$$
(5)

where

$$I\left( s \right) = \frac{{U\left( s \right) - K_{e} \dot{\omega }\left( s \right)}}{R + Ls}$$
(6)

Combining these equations allows for a voltage input to result in a torque output with a certain rotational speed depending on the load attached to the motor.

To use these motors most efficiently, a gearbox was implemented into the system. The gear ratio is calculated knowing the optimal point of the motor through simulating the motor characteristics. The nominal power of the motor can be simulated for every angular velocity of the motor and by dividing this through the losses (heat generation and motor friction) an optimal point can be found. These gear ratios differ for each load applied to the motor.

Other elements that are in the system model are trolley friction (rolling resistance), pulley efficiency (rolling resistance), pendulum friction (caused by wind resistance), sensor delay, sensor errors and noise disturbances. The system model is implemented in MATLAB & Simulink and solved using a variable step method.

The floating platform dynamics implemented to check the overall robustness to oscillating disturbance, is a simplified way to simulate real waves which gives an effect of an added sway angle and translation of the cart. The waves are modelled as sinusoidal sources with addition of random oscillations smoothed out by a low-pass filter as in Eq. 7. This way, the wave source has the oscillatory, and unpredictability properties of sea waves. This is not sufficient for modelling real waves due to disregarding properties like angular momentum and drag [10], but it is suitable for exploring the robustness of the floating crane subjected to a ‘random’ oscillatory disturbance.

$$\varphi \left( t \right) = R_{LPF} \left( {\sigma ,\mu ,t} \right)\sin \left( {\omega_{R} t} \right) + \sin^{ - 1} \left( {\frac{C}{P}\left| {\sin \left( {\omega_{s} t + \varphi_{B} } \right) - \sin \left( {\omega_{s} t + \varphi_{A} } \right)} \right|} \right)$$
(7)

With \(\varphi \left( t \right)\) being the calculated wave angle and \(\varphi_{A}\) and \(\varphi_{B}\) being the initial phase angles at point A and B which are both endpoints of the floating platform. \(\omega_{R}\) and \(\omega_{s}\) are the angular frequencies of respectively the random wave and the sinusoidal wave. \(R_{LPF} \left( {\sigma ,\mu ,t} \right)\) is a low-pass filtered random number depending on the mean \(\sigma\), variance \(\mu\) and time t. The size of the platform is given by P. C is the amplitude of the sinusoidal wave.

3 Motion Controller Design

In order to minimize “stress” on the controller, the input is shaped using a low pass filter. The effect of this is that the input will not be a step, rather a smoothed out curve. When a step is the input, overshoot from the controller generally occurs, which is in a real-life STS gantry crane could cause damage and accidents and is therefore to be avoided. By smoothing out the input curve to the desired (reference) state, the feedback error becomes smaller initially and stays smaller throughout the movement, therefore the controller is better able to follow the reference. Which results in little to zero overshoot.

3.1 PD Control

The DC motors are controlled by the error of the desired rope length and the container location, \(x + L\sin \left( \theta \right)\). Most importantly, to be able to use PD control on this system, a separate gravity compensation is necessary. Because as the system is reaching its target location the proportional and derivative error is zero, so no voltages are supplied to the motor anymore, however the gravity is still pulling on the cable, resulting in the load to descend. Clearly the motor needs an offset minimum amount of voltage to compensate for gravity, the so called ‘holding torque’. By adding a minimum voltage (later called holding voltage) to the motor corresponding to this force so the rope length does not change. By modeling the motor model with different opposing moments, the ‘holding voltages’ linked to this torque can be found using fixed point iteration. Resulting in the following characteristic Eq. 8:

$$V_{hold} = \frac{12}{0.457}T$$
(8)

3.2 State Feedback Control

For the state feedback control, full nonlinear equations of motion can be used in the process part. In the process block, the input \(\varvec{u} = - K\varvec{q } + k_{r} \varvec{r}\) is a voltage that is applied to the motors, where \(\varvec{q}\) is the state vector and \(\varvec{r}\) is the reference signal containing the desired x-position of the gantry and the desired cable length.

$$\varvec{r} = \left[ {\begin{array}{*{20}c} {x_{ref} } & {L_{ref} } \\ \end{array} } \right]^{T}$$
(9)

The process is separated in two parts: the motor dynamics and the crane dynamics. The inputs to the motor are the voltages \(\varvec{u}\), the outputs are the forces \(\varvec{F}\) that act on the crane.

For this system, the K matrix will be of size 2 × 6, thus consisting of 12 individual values, making it impossible to tune it by hand. Instead, the method of Linear Quadratic Regulation (LQR) will be used. With LQR, the costs of errors in the states \(\varvec{q}\) are described by a 6 × 6 matrix Q matrix and the costs of usage of the inputs \(\varvec{u}\) is described by a 2 × 2 matrix R. Here each \(Q_{i}\) and \(R_{i}\) represent the cost factor associated with i. These can be varied to tune the systems behavior.

$$Q = \left[ {\begin{array}{*{20}c} {Q_{{\dot{x}}} } & 0 & 0 & 0 & 0 & 0 \\ 0 & {Q_{x} } & 0 & 0 & 0 & 0 \\ 0 & 0 & {Q_{{\dot{\theta }}} } & 0 & 0 & 0 \\ 0 & 0 & 0 & {Q_{\theta } } & 0 & 0 \\ 0 & 0 & 0 & 0 & {Q_{{\dot{L}}} } & 0 \\ 0 & 0 & 0 & 0 & 0 & {Q_{L} } \\ \end{array} } \right],R = \left[ {\begin{array}{*{20}c} {R_{x} } & 0 \\ 0 & {R_{h} } \\ \end{array} } \right]$$
(10)

To determine the controller gains, the A, B and C matrices are required [11]. To obtain these, the entire process from the voltages \(\varvec{u}\) to the states, including the motors, gearboxes, pulley efficiencies etc. must be implemented into one model. For this, the equations of motion, Eq. 2, are the starting point. A substitution for the forces needs to be found that is expressed in terms of the applied voltages. The DC motors however have nonlinear dynamics, which need to be linearized. When the sum of moments around the motor shaft is taken, a formula for the motor force \(F_{m}\) can be obtained.

In this formula, the current i can be substituted by the inverse Laplace transform of Eq. 6 (rewritten for i). The angular velocity and acceleration of a motor can be expressed in the corresponding state, using dummy q (for traversing, \(q = x\); for hoisting, \(q = L\)), with \(\dot{\omega } = \frac{{\dot{q}}}{{r_{q} G_{q} }}\) and \(\ddot{\omega } = \frac{{\ddot{q}}}{{r_{q} G_{q} }}\). On top of that, because of the pulley system with efficiency \(\eta_{p}\), the force that actually actuates the load is \(F_{load} = \eta_{p} F_{m}\). Incorporating these and translating \(F_{load}\) to \(F_{x}\) for the cart and to \(F_{h}\) for the spreader results in.

$$F_{x} = - \eta_{px} \frac{{K_{t}^{2} + bR}}{{r_{x}^{2} G_{x} R}}\dot{x} - \frac{{\eta_{px} J}}{{r_{x}^{2} G_{x} }}\ddot{x} + \frac{{\eta_{px} K_{t} }}{{r_{x} R}}U_{x} - \frac{{\eta_{px} K_{t} L_{i} }}{{r_{x} R}}i_{x}^{ '}$$
(11)
$$F_{h} = - \eta_{ph} \frac{{K_{t}^{2} + bR}}{{r_{h}^{2} G_{h} R}}\dot{L} - \frac{{\eta_{ph} J}}{{r_{h}^{2} G_{h} }}\ddot{L} + \frac{{\eta_{ph} K_{t} }}{{r_{h} R}}U_{h} - \frac{{\eta_{ph} K_{t} L_{i} }}{{r_{h} R}}i_{h}^{ '}$$
(12)

These can then be plugged into the equations of motion. The resulting equations have to be linearized further. To solve this, four measures are taken:

  • The motor inertia \(J\) is relatively small, and therefore set to zero.

  • The controller gains are calculated for a constant L (and therefore also \(\dot{L} = 0\)). The negative effect of this is reduced by the use of gain scheduling (explained later).

  • The controller gains are calculated for a zero degree sway angle (and therefore also \(\dot{\theta } = 0\)). This is not considered to be a problem since the desired maximum sway angle is 8°. Which in radians is just 0.14 rad. Furthermore, this is only maximum, and most of the time it will be lower.

The voltages receive priority to be taken into the state vector. In cases where θ, \(\dot{\theta }\), L or \(\dot{L}\) can be taken into the state vector, this should be done instead of setting them constant/to zero. When these measures are all applied, the equations of motion can be converted to state space.

$$A = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} { - \eta_{px} \frac{{K_{t}^{2} + bR}}{{M_{g} r_{x}^{2} G_{x} R}}} & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 \\ {\eta_{px} \frac{{K_{t}^{2} + bR}}{{M_{g} r_{x}^{2} G_{x} RL}}} & 0 & { - \zeta \dot{\theta }} & { - \frac{g}{L}} & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & {\eta_{ph} \frac{{K_{t}^{2} + bR}}{{M_{g} r_{h}^{2} G_{h} R}}} & {\frac{g}{L}} \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{array} } \\ \end{array} } \right]$$
(13)
$$B = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\frac{{\eta_{px} K_{t} }}{{M_{g} r_{x} R}}} & 0 \\ 0 & 0 \\ { - \frac{{\eta_{px} K_{t} }}{{M_{g} r_{x} RL}}} & 0 \\ 0 & 0 \\ 0 & { - \frac{{\eta_{ph} K_{t} }}{{M_{g} r_{h} R}}} \\ 0 & 0 \\ \end{array} } \\ \end{array} } \right]$$
(14)

The C matrix needs to be of a 2 × 6 size, and is taken to give \(\varvec{y} = \left[ {\begin{array}{*{20}c} x & L \\ \end{array} } \right]^{T}\), thus becomes

$$C = \left[ {\begin{array}{*{20}c} 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 \\ \end{array} } \right]$$
(15)

As said in section earlier, the cable length L is taken to be constant. However, in the real world, the cable length is variant and never zero during operation. Choosing a single value for L is thus improper. Therefore, controller gains have been calculated for the following cable lengths.

$$L = \left\{ {\begin{array}{*{20}c} {0.10} & {0.15} & {0.20} & \ldots & {0.95} & {1.00} \\ \end{array} } \right\}$$
(16)

During operation, the gain scheduler monitors the current cable length using sensors and applies the controller gain corresponding to the ones calculated for the cable length closest to the current length.

4 Simulation Results and Discussion

To obtain useful results, tests have been performed where the task is to do one full cycle of container transshipment. This has been tested both on a stationary and on a floating platform with the PD controller and the state feedback controller. Each test includes a random external disturbance on the actuator forces with a maximum magnitude of 10% of the highest possible actuator force as seen in Fig. 4.

Fig. 4
figure 4

The 10% random disturbance size plotted against time

A full cycle can be divided in four steps:

  • Step 1: The traversing from the crane center to the container pickup location on the ship.

  • Step 2: The hoisting and traversing with the container.

  • Step 3: The descending and traversing with the container and

  • Step 4: The hoisting and traversing without the container.

These points are shown as dots in the results. All tests include sensors that have a delay of 10 ms and an error of 2%. The load sensor has an error of 5%. In the tuning process of both control strategies the intention is to reach the target position as fast as possible while keeping the maximum sway angle within ±10°. On top of that, oscillating behavior has to be kept to a minimum. In addition, an animation of the system in real-time was made as seen in Fig. 5. This is for the case of a crane with PD controller on a stationary platform with 2.5% disturbances. To show how well the performance is, the containers are on a moving ship, as they would in real life. The pulley corresponding pulley efficiency (ηp) have been roughly estimated at 75 and 86% for the hoisting cable and respectively for the translation of the cart. The rolling resistance of the cart (steel wheels on steel rails) is estimated to be 0.0020. The pendulum damping factor of the rope is estimated to be 0.02.

Fig. 5
figure 5

The animation of the simulated crane system with PD control

In this paper, only the results of the case of the crane on a floating platform are shown. From the results of the case of the crane on a stationary platform it became evident that both systems performed very well and kept the sway angles within 10°. However the state feedback executed the tasks slightly faster, with less shocks and less oscillations. Therefore it is regarded as the better performer when the crane is stationary.

Figures 6 and 7 show results for the case for a crane on a floating platform with the PD controller and the state feedback controller respectively. The systems work with input shaping, but in the graphs this is not shown.

Fig. 6
figure 6

The results of the PD controller with floating platform dynamics

Fig. 7
figure 7

The results of the state feedback controller with floating platform dynamics

For the crane on a floating platform, the PD control gives really good results. Execution of tasks is fast and the sway induced by the waves is successfully counteracted. Also, the sway angles are still suppressed within ±10°, though there is a lot of oscillation. The state feedback also performs well, but has more trouble. Performance is about 10 s faster, but the waves cannot seem to be counteracted. Rather, as can be seen in the cable angle plot, the exact wave pattern is present. Still, when looking at the container location plot, the accuracy of the state feedback is pretty good. Yet, the accuracy of the PD is even better, almost the same as for the case of the crane on a stationary platform. Therefore, it seems like the PD is more able to adapt to the waves, and therefore more robust than the state feedback.

The performance of the control strategy is highly related to how the system is tuned. This is iterative work for both the PD and state feedback, though it can be concluded that the state feedback is easier to tune. This is due to being able to assign more importance to certain states and/or actuators, which is much more intuitive than tuning a PD.

The system in this research is modelled as a load hanging with a single infinitely rigid cable, whereas in a full-size STS gantry crane this would be with multiple elastic cables. However, it is expected that the spreader would be less prone to swaying in such a model. Assuming elastic cables do not make a big difference, modelling the system with a single cable may therefore be regarded as a worst-case scenario.

The noise and disturbance in the model is made by a random generator, whereas in real life this may not be such randomly distributed. However again, the randomness may be regarded as a worst-case scenario, as this is the furthest away from monotony behavior.

The PD uses a partly linearized system model. Therefore, if the linearisations are not justified, the simulation results may not represent what would happen in reality.

Since the sway angles always stay within ±10°, the linearisations \(\sin \left( \theta \right) \to \theta\) and \(\cos \left( \theta \right) \to 1\) are acceptable. On the other hand, the linearisation \(\dot{\theta }^{2} \to 0\) is not justified, as the highest angular velocity is 0.8 rad. However for about 95% of the trajectory, it does not exceed 0.5 rad. The state feedback controller does not contain linearisations.

The system is a scale model of a crane. Due to scale-effects, the results could be somewhat different for a real size crane. Nevertheless, these results show the overall robustness of a floating crane, which should be at the same level for real size crane.

5 Conclusion

This research resulted in a scale model of a ship-to-shore gantry crane system. Crane and motor dynamics, frictional forces, external disturbances, sensor effects, pulley efficiencies as well as any physical constraints such as maximum motor voltages were all implemented. Next, this model was simulated and controlled by two different motion controllers, a PD controller and a state feedback controller. Multiple tests are performed with both controllers.

From the tests done for cases with the crane on a stationary platform it can be concluded that both controllers handled the tasks well, however the state feedback performed slightly better than PD.

From the tests done for cases with the crane on a floating platform it can be concluded that still both controllers fulfilled the tasks, however the state feedback had more trouble to compensate for the waves than the PD. Therefore, the PD seems to be more robust than the PD. Still, more research has to be done to be able to conclude which is better.

Naturally, to draw conclusions for a real life and full scale gantry crane, more research and testing has to be done. To this end, topics that could be investigated in a follow up research could include: other types of input shaping as this noticeably influences controller responses, a full-scale model incorporating elastic behavior, third dimension effects and safety measures such as collision prevention. More research in optimal trajectory determination should also be done for increased efficiency. The implemented floating platform dynamics were simplified and therefore, more realistic floating platform dynamics should be researched in the future as well.