An Efﬁcient Adaptive Fuzzy Hierarchical Sliding Mode Control Strategy for 6 Degrees of Freedom Overhead Crane

: The paper proposes a new approach to efﬁciently control a three-dimensional overhead crane with 6 degrees of freedom (DoF). Most of the works proposing a control law for a gantry crane assume that it has ﬁve output variables, including three positions of the trolley, bridge, and pulley and two swing angles of the hoisting cable. In fact, the elasticity of the hoisting cable, which causes oscillation in the cable direction, is not fully incorporated into the model yet. Therefore, our work considers that six under-actuated outputs exist in a crane system. To design an efﬁcient controller for the 6 DoF crane, it ﬁrst employs the hierarchical sliding mode control approach, which not only guarantees stability but also minimizes the sway and oscillation of the overhead crane when it transports a payload to a desired location. Moreover, the unknown and uncertain parameters of the system caused by its actuator nonlinearity and external disturbances are adaptively estimated and inferred by utilizing the fuzzy inference rule mechanism, which results in efﬁcient operations of the crane in real time. More importantly, stabilization of the crane controlled by the proposed algorithm is theoretically proved by the use of the Lyapunov function. The proposed control approach was implemented in a synthetic environment for the extensive evaluation, where the obtained results demonstrate its effectiveness.


Introduction
Overhead crane systems have been playing a crucial role in many applications from industries or factories to transportation [1][2][3][4][5]. One of the typical characteristics of an overhead crane is that it is under-actuated: that is, in a crane system, the number of inputs is always smaller than the number of outputs [6]. Having more outputs than inputs, an overhead system is constrained by strong nonlinearities, internal and external uncertainties, and coupling properties. Hence, efficiently controlling an under-actuated overhead crane with fewer independent control signals than its 6 degrees of freedom is a fundamental but still challenging problem.
Due to its fundamentality, researchers, engineers, and the practitioners who design the control laws for under-actuated crane systems are always concerned with the robustness in the system response due to its parameter uncertainties and actuator nonlinearities. To address the concern, the sliding mode control (SMC) method has been favored for those systems [7][8][9][10]. For instance, the authors in [11][12][13] proposed the robust SMC controllers for a gantry crane, which allow the system with uncertain parameters and nonlinear actuators to robustly work under external disturbances in a working environment. Fu et al., in the work [14], designed an adaptive sliding mode tracking controller to effectively control a dual boom crane. The proposed method was verified in a laboratory system. It is noted that the challenge in designing a robust SMC scheme for an under-actuated crane system is how to formulate sliding surfaces. In the work [15][16][17], the authors proposed to compute an intermediate variable from the state errors before a second-level sliding surface is formulated. In recent works [18,19], Yang et al. proposed the adaptive controllers for multiinput multi-output (MIMO) under-actuated systems given some constraints. For instance, by exploiting elaborately constructed finite-time convergent surfaces, a new control scheme in [18] can asymptotically and stably control an MIMO system under plant uncertainties and actuator deadzones. The unknown parameters of the system are trained through a fuzzy system. In the paper [19], output and velocity constraints are simultaneously considered in the control actions.
The hierarchical SMC (HSMC) approach has also been frequently utilized in defining the sliding surface for the SMC scheme in applications using under-actuated robotic systems [12,13,20,21]. For instance, Wang et al. in their works [20] defined a first-level sliding surface for each subsystem of a a second-order under-actuated system. Then, they established the second-level sliding surface by simply adding the first-level sliding surfaces together.
Nonetheless, when developing an HSMC strategy for an overhead crane system, we have learned that if some parameters in the HSMC scheme are not properly chosen, it can severely causes vibration in the control system. Choosing an improper parameter for the HSMC controller is probably due to imprecision and imperfect information in the crane. This is very likely in practice, since the under-actuated crane systems are constrained by their highly complicated nonlinearities and uncertainties. So far, it is well-known that either fuzzy logic [22] or neural network [23] has been frequently exploited in addressing issues of inferring parameters for highly uncertain control systems. For instance, the fuzzy logic has been extensively employed in controlling under-actuated systems [24,25]. By exploiting the Takagi-Sugeno fuzzy model, the authors in [26] develop a closed-loop controller to automatically control the operations of a crane with 2 degrees of freedom (DoF).
Regarding the configuration of the cranes, to the best of our knowledge, most of the existing works consider a gantry system up to 5 DoF. For instance, in our previous work [1], a two-dimensional (2D) crane with two output variables including the trolley position and swing angle is considered. A three-dimensional (3D) overhead crane can have 5 DoF or output variables comprising positions of the trolley, bridge, and pulley and swing angles of the hoisting cable in x and y directions. In most of the considered crane systems, it is assumed that the hoisting cable is rigid. However, in practice, the hoisting cable can be elastic. That is, there exists oscillation of the hoisting cable in the cable direction, which constitutes a 6th output variable or degree of freedom of the 3D crane. This 6h output component is also required to be controlled, though it is under-actuated. It can now be seen that there are up to 6 DoF in one 3D overhead crane, where there are three under-actuated output variables including two swing angles and oscillation of the hoisting cable in x, y, and the cable directions, respectively. A 3D overhead crane with 6 DoF is the object to be controlled in this study.
Therefore, we take advantages of the HSMC approach, which guarantees robustness in the control performance, to design a controller for a 3D overhead crane with 6 DoF. In the control design, it is assumed that the parameters in the HSMC law are deterministic. Nonetheless, in fact, due to the nonlinear and uncertain properties, determining those parameters in the 6 DoF crane system is impractical. Moreover, if those parameters are not properly chosen, it can lead to severe vibration in the control system. To this end, we propose to exploit the fuzzy inference rule system to adaptively infer the parameters of the HSMC scheme over time. It is noted that the fuzzy logic can effectively estimate the parameters of a system given its imprecision and imperfect information. More importantly, the stability of the control performance in the 3D under-actuated crane obtained by the proposed approach is theoretically proved by the Lyapunov theory. Then, we extensively evaluated our algorithm in three typical scenarios in operating an overhead crane, where the obtained results are highly promising.
The remainder of the paper is arranged as follows. A model of a 3D overhead crane system with 6 DoF is introduced in Section 2. Section 3 presents how to design an HSMC law for the 6 DoF crane systems, while Section 4 discusses how to adaptively learn its parameters by the use of the fuzzy logic. The results of evaluating the proposed approach are compared and summarized in Section 5 before conclusions are drawn in Section 6. It is noted that in this work, matrices and vectors are expressed in square brackets [·] or parentheses (·), while long expressions are encapsulated in braces {·}.

A Model of 3D Overhead Crane with 6 Degrees of Freedom
Let us consider a three-dimensional (3D) overhead crane [27]. It is assumed that the trolley moves along the x direction while the bridge moves along the y direction. A pulley embedded on the trolley, as can be seen in Figure 1, plays a role of pulling a payload up and down along the z direction through a hoisting cable. Operationally, the trolley, bridge, and pulley cooperatively allow the crane to transport an object from one location to another. Let x(t) and y(t) denote displacements of the trolley and bridge, respectively. We define θ(t) as a rotation angle of the pulley. It is noted that under motions of the trolley, bridge, and pulley, a payload hooked to the hoisting cable swings around its equilibrium point. If we define O as the origin of a Cartesian coordinate, then the sway of the payload in the planes Oxz and Oyz is denoted by ξ x (t) and ξ y (t), respectively. More importantly, in this work, we consider the elasticity of the hoisting cable. In fact, in many crane systems, the hoisting cable is not rigid but elastic. Therefore, we define γ(t) as the oscillation of the hoisting cable in the cable direction due to the elasticity. It can be seen that the overhead crane system has six variables, including x(t), y(t), θ(t), ξ x (t), ξ y (t), and γ(t), presenting its 6 degrees of freedom (DoF). While x(t), y(t), and θ(t) can be directly controlled by the trolley, bridge, and pulley, there is no actuator having direct connection with ξ x (t), ξ y (t), and γ(t). That is, ξ x (t), ξ y (t), and γ(t) are considered as under-actuated states of the crane.
We denote x d (t), y d (t), and θ d (t) as desired references of the actuated states x(t), y(t), and θ(t), respectively, while the under-actuated states ξ x (t), ξ y (t), and γ(t) are expected to reach zero during the operation of the crane. Thus, For the purpose of simplicity, we let T denote a state vector of the 3D crane. Apart from the hoisting cable, it is assumed that the other components in the crane are rigid, which only depend on the holonomic internal kinematic constraints. The ratio of the pulley is set to 1, while gravity g = 9.81 m/s 2 . The masses of the bridge, payload, and trolley-pulley combination are defined by m b , m c , and m t , respectively. While the elastic coefficient of the hoisting cable is defined by ρ, we denote J and r as the inertia and radius of the pulley. Hence, the potential energy of the overhead crane is computed by −m c grcos ξ y (t) sin(ξ x (t)) + 1 2 ργ 2 + m c g(γ(t) + ∆γ) cos(ξ x (t))× × cos ξ y (t) + m c gr(θ(t) + ξ x (t)) × cos(ξ x (t)) cos ξ y (t) .
Meanwhile, the energy loss caused by frictions is given as follows.
 is a matrix of the damping coefficients. Moreover, the kinetic energy T(t) of the crane is a sum of the kinetic energy of the pulley T r (t), the kinetic energy of the bridge T b (t), the kinetic energy of the trolley T t (t), and the kinetic energy of the load T c (t). where It is noted that V cx , V cy , and V cz are velocities of the payload in the x, y, and z directions, respectively, where they can be calculated as follows.
By exploiting the Euler-Lagrange equation, the crane system can be presented in the differential form as follows. where is the Lagrange function.
T is a vector of the first-order derivative of the system states. u(t) = u 1 (t) u 2 (t) u 3 (t) 0 0 0 T is a vector of the input control signals. It is noticed that u 1 (t), u 2 (t), and u 3 (t) are the input signals to control the trolley, bridge, and pulley, respectively. The Jacobian derivatives of the Lagrange function can be computed by Therefore, the dynamic model of the 3D overhead crane with 6 DoF can be represented by T is a vector of the second-order derivatives of the system states. G χ, t = 0 0 g 1 g 2 g 3 g 4 T is the gravitational matrix. Calculation details of elements of M χ, t , C χ,χ and G χ, t can be found in Appendix A.

Hierarchical Sliding Mode Controller for 3D Overhead Crane
In this section, we will present how to design a hierarchical sliding mode control (HSMC) scheme for a 3D overhead crane with 6 DoF. It is noted that we exploit the dynamic model of the crane as introduced in Section 2.
Let us split  is the corresponding vector of the under-actuated states, respectively. Therefore,χ where The model in (16) and (17) can be represented as a state model bẏ where denote errors between the output signals (x 1 (t), x 3 (t)) and the desired references (x 1d (t),  is a vector of the desired references of the actuated states while  is a vector of the desired references of the under-actuated states. The errors can now be specified byė In order to minimize the errors in (24)- (27), the control strategy is proposed as follows.
where λ 1 , λ 2 , α 1 , α 2 ∈ R 3×3 are the symmetric, positive-definite, and constant matrices, while η 3 and η 4 are the symmetric and positive-definite matrices. The second-level sliding surface is compiled by two first-level sliding surfaces from two subsystems as follows.
Thus, two control signals for two subsystems are given by The stability of the proposed control law can be specified by the following lemma. Proof. Let us consider the first subsystem represented bẏ where its sliding surface is To obtain lim t→+∞ s 1 (t) = 0, we consider the Lyapunov function candidate of s 1 (t) as follows.
Taking the derivative of both sides of Equation (30) yieldṡ The control signal for the first subsystem includes the equivalent control law τ 1eq (t) and the switch control scheme τ 1sw (t). Hence, That is, where η 1 and η 2 are the symmetric and positive-definite matrices. If then one hasV ) ≤ 0, which guarantees stability of the first subsystem.
Likewise, the second subsystemė where its sliding surface is also holds Now, considering the whole crane system, given the condition lim t→+∞ s(t) = 0 of the second-level sliding surface the Lyapunov function candidate can be presented by In other words, If the control signal of the second subsystem is also presented by two components of τ 1eq (t) and τ 1sw (t), theṅ Therefore, the control signal for the 3D overhead crane can be specified by then it has In other words, substituting (47) into (46) completes the proof.
It is noted that in the proposed control law (28), the phenomenon of oscillation on the sliding surface may appear due to the change in sign(s(t)). To mitigate the issue, it is proposed to utilize the function sat(s(t)) rather than sign(s(t)). The function sat(s(t)) is specified by

Adaptive Fuzzy Learning Scheme
It can be seen in the analysis of Section 3 that if the parameters α 1 , α 2 , λ 1 , and λ 2 of the control strategy in (28) are fixed, it causes vibration in the sliding mode control system. In order to address the issue, in this work, we propose to adaptively learn these parameters over time by the use of a fuzzy system. To simplify the learning process, it is proposed to learn α 1 only. The other parameters are adapted through α 1 accordingly as follows.
where A i is a predefined diagonal positive matrix. It is noted that varying A i leads to a change of the sliding surfaces. If A i is properly chosen, the control system states move on the sliding surfaces to converge to zero, which effectively minimizes the chattering phenomena in the under-actuated crane systems.
We now investigate how to learn the matrix α 1 . Let us assume α 1 has the following form.
where a, b, and c are the parameters that will be adaptively learned by using the fuzzy inference rule system. The parameters a, b, and c are learned through a fuzzy logic system given the input language variables e x = x − x d andė x , e y = y − y d andė y , e θ = θ − θ d andė θ , respectively. It is noted that each input language variable consists of a three-triangular fuzzy set −1 0 1 . The continuous functions of the input language variables are shown in Figure 2 Table 1. The table is designed based on the error e and its derivativeė. Given the output variables, there are nine possible outputs in Table 1. For instance, when e = 1 andė = 1, the error in the control signal is positive and increasing. That is, reducing and negatingė are required. This can be done by setting the output of the fuzzy logic system to the variable −2. However, when e = 1 andė = 0, although the error in the control signal is positive, it is not increasing. In that case, only reducingė is required by setting the output of the fuzzy logic system to the variable −1. In a perfect scenario when e = 0 andė = 0, no control is required, and the output of the fuzzy logic system is set to the variable 0.  Parameter (a, b, c) e i −1 0 1 Therefore, the structure of the hierarchical sliding mode control system for the 3D overhead crane given the adaptive fuzzy learning scheme is now depicted in Figure 3.

Results and Discussions
In order to demonstrate effectiveness of our proposed approach, the adaptive fuzzy hierarchical sliding mode controller (FuzzyHSMC), in controlling the 3D overhead crane with 6 DoF, we conducted the experiments in the synthetic simulation environment. The obtained results are presented in this section. It is noticed that the control performance is measured by how effectively the crane can move to a desired location given the proposed control algorithm. In other words, it is expected that the positions of the trolley, bridge, and pulley can reach the reference values while the swing angles of the hoisting cable around a vertical line as well as the oscillation of the hoisting cable in the cable direction due to the elasticity are minimized in a reasonable time frame.
It is noted that in the experiments, the overhead crane was expected to transport a heavy payload of 500 kg. The parameters of the crane system are summarized in Table 2.
The parameters of the controllers are also encapsulated in Table 3. For comparison purposes, there were two controllers including HSMC, as presented in Section 3 and the proposed FuzzyHSMC implemented in the experiments. It is noticed that the HSMC is a deterministic control scheme where all the parameters of the controller are required to be known. However, in practice, the control parameters are unknown and uncertain, which makes the HSMC impractical. In our proposed control approach, the parameters of the FuzzyHSMC are adaptively learned over time by the use of the inference fuzzy system, as presented in Section 4. The learning scheme allows the proposed controller to well adapt to the nonlinearity and uncertainty of the real-world crane systems.  To demonstrate that the proposed approach can efficiently control a 3D overhead crane with 6 DoF in a variety of scenarios, we conducted three typical experiments. In the first, the reference levels were set to be constant, while in the second, the desired positions of the trolley, bridge, and pulley were changed during the crane's operation. In the third scenario, we considered the influence of external disturbances on the control quality of the crane system and how the proposed control law could address the disturbance issues.

Constant Input
In the first scenario, it was expected for the overhead crane to transport the 500 kg payload from an initial position [0 0 0 0 0 0] to a desired location where the final positions for the trolley, bridge, and pulley are x d = 5 m, y d = 10 m, and θ d = 5 rad, respectively. The results obtained by two control algorithms, HSMC and FuzzyHSMC, on the control performances of six controlled variables including x(t), y(t), θ(t), ξ x (t), ξ y (t), and γ(t) are depicted in Figures 4 and 5. It can be seen that all the controlled variables could reach 95% of the reference levels within approximately 6 s. More importantly, there is no overshoot in the actuated states while the overshoots in the under-actuated states are relatively small. Under our proposed approach, the overshoots of the sway angles are smaller than 0.1 and 0.3 degrees for ξ x (t) and ξ y (t), respectively, while the oscillation of the hoisting cable is less than 0.2 cm. Overall, while the results obtained by both the controllers in the actuated states are comparable, the proposed control law FuzzyHSMC outperforms the HSMC in the under-actuated components, as can be seen in Figure 5.

Step Input
In the second scenario, the desired positions of the trolley, bridge, and pulley were first set to x d = 2 m, y d = 6 m, and θ d = 2 rad, respectively. Nonetheless, at 10 s from the beginning, the final position of the pulley was then set to θ d = 6 rad. Likewise, at 15 s, the final position of the trolley was set to x d = 5 m, and at 20 s, the final position of the bridge was set back to y d = 3 m. Although there were changes of the reference levels during the operation of the crane, the control algorithms adapted very well in efficiently controlling the motions of the trolley, bridge, and pulley, as demonstrated in Figure 6. Moreover, the changes in the control inputs are also reflected in the responses of the underactuated components, as illustrated in Figure 7. For instance, although the sway angles and oscillation of the hoisting cable were suppressed almost to zero after about 6 s, they reemerged at the time there were the changes in the control inputs. However, the maximum amplitudes of these unexpected swings and oscillation are minor at about 0.1 degrees with respect to ξ x (t) and ξ y (t) and 0.05 cm with respect to γ(t). Then, the under-actuated states went down to zero again after a few seconds, as can be seen in Figure 7.

Noisy Input
In fact, there are always external disturbances influencing the operations of the realworld crane systems. Hence, in the third experiment, we simulated the external disturbances in the form of pulses injecting into the crane at different times. For instance, at 10 s from the beginning, a 2 s width pulse with an amplitude of −500 N·m considered as a noise was injected into the pulley. In a similar fashion, at 15 and 25 s, two 5 s width pulses with amplitudes of 1000 N and 2000 N were injected into the trolley and bridge, respectively. The external disturbances are depicted in Figure 8.
It is noted that in this third experiment, the final positions of the trolley, bridge, and pulley were also set to x d = 5 m, y d = 10 m, and θ d = 5 rad. The obtained results presenting the control performances are illustrated in Figures 9 and 10. Undoubtedly, it can be seen that the external disturbances caused deterioration of the control performances at the time the disturbances were injected into the crane. However, the controllers quickly steered both the actuated and under-actuated states back to the desired positions. More importantly, as can be seen in Figure 10, given our control technique, the influence caused by the external disturbances on the under-actuated components is insignificant.
Given the results in all three scenarios, it can be seen that since the proposed control algorithm FuzzyHSMC can adaptively learn its parameters over time, it outperforms the deterministic control scheme HSMC.

Conclusions
A 3D overhead crane with 6 DoF has been considered in this paper, where the elasticity of its hoisting cable is taken into account. Oscillation caused by the cable elasticity constitutes the 6th under-actuated output in the crane system. In order to design a controller to effectively control the 6 DoF overhead crane, the HSMC technique is exploited. Moreover, the parameters of the HSMC scheme are proposed to be adaptively learned by utilizing the fuzzy inference rule mechanism, where the proposed controller is then called FuzzyHSMC. More importantly, the stability of the crane controlled by the proposed algorithm is theoretically proved by the use of the Lyapunov function, which guarantees the effectiveness of the proposed method. Then, the algorithm was extensively evaluated, where the obtained results are highly promising.
One limitation of the work is that the proposed method has not been verified in a physical system. In future work, we will implement the algorithm in an actual gantry crane.

Conflicts of Interest:
The authors declare no conflict of interest.