# Comparative Analysis of Neural-Network and Fuzzy Auto-Tuning Sliding Mode Controls for Overhead Cranes under Payload and Cable Variations

Authors: Muhammad A. Shehu; Ai-jun Li; Bing Huang; Yu Wang; Bojian Liu
Journal: Journal of Control Science and Engineering
 (2019)

---

## Abstract

The overhead crane is required to operate fast and precisely with minimal sway. However, high-speed operations cause undesirable load sways, hazardous to operating personnel, the payload being handled, and the crane itself. Thus, a high-quality control is required. In this work, the nonlinear model of the overhead crane was established and the sliding mode control (SMC) was proposed that ensured the existence of sliding motion in the presence of payload and hoisting height variations, and viscous frictions. To maximize the benefits derived from the proposed control method, novel sliding slope-update based on intelligent neural-network and fuzzy algorithms were developed to tune the controller, guaranteeing precise tracking of the actuated variables as well as regulation of the unactuated variables. The proposed methods adjust predetermined value of the sliding manifold’s slope in response to variations in hoisting heights. Control applications were conducted, and results based on graphical, integral absolute error (IAE), and integral time absolute error (ITAE) proved the effectiveness of the proposed algorithms. It was observed that the response of the controller with back-propagation-trained neural-network was more effective relative to that of the fuzzy algorithm.


---

## Body

## 1. Introduction

The overhead crane, the tower crane, and the boom crane are the most common types of cranes in use today. Among other crane systems, the modern overhead crane is increasingly becoming more popular due to its cost-effectiveness and ease of operation. The crane is used in the transport industry for loading and unloading freight, in the construction industry for material and equipment handling, and in shipping yards for loading and unloading cargo. Other important areas of crane application include the mining sites, power plants, warehouses, the manufacturing industry [1], and other applications where human power is not a solution.Like other crane systems, the overhead crane is required to operate precisely with high-speed, and with the absence or minimal sway for improved productivity and safety reasons. However, high-speed operations without a high-quality control strategy cause undesirable payload swings and positioning inaccuracies. The operator is able to decrease such hazardous swings by moving the cart in small increments; however, manual operation may result in increased operation time and operator workload. As a result, there is the need for automation and optimization of crane operation. The control problem is challenging due to the underactuated nature of the system. Other factors that significantly affect control quality include modeling errors, deliberately neglected nonlinearities, parametric variations, and disturbances.Among research interests, the requirement for a high-quality controller to precisely drive the crane with minimal payload swings has attracted attentions and many constructive results have been published. Broadly, the existing control strategies in literature can be categorized into three: open-loop (OL), closed-loop (CL), and hybrid control (HC) schemes. For the OL schemes, the input command shaping (ICS) [2–8], the filter control [9], the command smoothing techniques (CS) [10], and the trajectory planning (TP) techniques [11–13] had been proposed. ICS achieves sway minimization by exciting two or more transient oscillations at different instances that result in effective cancellation of the payload oscillations. For the filter technique, the infinite impulse response (IIR) filter was proposed by [9], where the effectiveness of 3rd-, 6th-, and 9th-order Butterworth low-pass and band-stop IIR filters was studied. Filtering is developed on the basis of extracting input energy around system’s natural frequencies, preprocessing the signal so that no energy at system’s natural frequency is fed into the system. The CS method was proposed in [10] for limiting vibration in crane systems by a way of smoothing the original reference command. The input command is smoothed to drive the crane without inducing payload oscillations. It has been noticed that the CS technique proposed by [10] was more robust at relatively higher frequencies compared to the ICS methods. On the other hand, the ICS methods were more robust at relatively lower frequencies compared to the CS technique. For the proposed TP techniques, energy efficiency of transportation has seldom been considered in planning trajectories. Wu and Xia [13] exploited this consideration and developed an optimal solution of trajectory planning in terms of energy efficiency for overhead cranes. It is worth pointing out that OL techniques focus only on the suppression of the acceleration-induced payload sways. Nonetheless, the merits of OL control techniques include ease of implementation and no extra feedback sensors are required. Also, for the case of robust ICS, there may be additional time delays due to delaying of the command signal. Moreover, OL techniques are sensitive to external disturbances [14].Closed-loop techniques on the other hand achieve position tracking and sway suppression using feedback information to generate the right control signal(s). Several CL solutions have been developed for control of cranes. The proportional-integral control (PID) was proposed by [15–17] and positive results were obtained. For the PID techniques, the authors used a PID controller for position control and a PD controller for sway suppression. Control techniques using optimal linear quadratic regulator (LQR) were proposed by [8] and constructive results were obtained using linearized crane model. Sun et al. [18] developed an adaptive anti-swing control strategy for uncertain double-pendulum cranes. In another work published by [19], the fuzzy logic control was proposed. Control using fuzzy logic has a strong adaptability and does not require obtaining an accurate crane model. The pole placement control was proposed by the authors in [20] where several control applications were conducted to investigate the performances of three different sets of system poles based on time response criteria. The model predictive control (MPC) was proposed by Wu et al. [21]. The SMC control (which is the focus of this work) had been studied in [1, 22–32]. SMC is a special type of variable structure control characterized by a discontinuous control structure that switches as the system crosses certain manifold in the state-space to drive the system trajectory to reach and subsequently remain on the sliding manifold within the state space [33]. In [21] the SMC controller was used to control two degrees of freedom (DOFs): cart poison and payload sway, where two sliding manifolds were designed for each DOF. The authors proposed the fuzzy logic algorithm to dynamically adjust a coupling parameter between the two manifolds. A method of combining SMC was proposed by [1]; an intermediate variable was introduced by a way of dividing system states into two groups and then defining a manifold on the basis of the intermediate variable. In this way, the number of states variables to consider for design gets reduced. Consequently, the manifold complexity also gets reduced. Simulation results proved the feasibility of the intermediate variable approach. The integral SMC for discrete-time systems was proposed by [23]. The SMC with moving sliding manifold was proposed by [24] where adaptive neurofuzzy inference system was used to generate the value of the manifold slope. The authors in [25–28, 30] proposed adaptive SMC for overhead cranes with uncertainties. The second-order SMC was proposed by [26]. The major advantage of second-order SMC is eliminating the so-called chattering effect by having a continuous control effort. Other techniques that hybridize different control schemes had also been proposed in the literature [34–36]. The interested reader may find the feedback linearization with the SMC in [34], the PID hybridized with fuzzy SMC by Hai et al. [35], and the adaptive NN SMC by Tuan et al. [36], to name a few.In this study, the effectiveness of neural-network (NN) and fuzzy auto-tuning SMC techniques designed to update predetermined value of manifold’s slope parameter are compared. Based on this “update-approach,” there would be no singularity in the controller when the tuning system fails as could be the case using the “generate-approach” of the author in [24]. To the best of the authors’ knowledge, this is the first publication where the NN-based and fuzzy-based auto-tuning SMC algorithms are compared. Studies have shown that optimizing the SMC yields improved performance [24] regarding convergence and fast vanishing of residual sway.The rest of the paper organization is as follows. Mathematical modelling of the system is presented in Section2.Section 3 is devoted to the design of the proposed control strategy, and the intelligent NN-based and fuzzy-based SMC tuning algorithms. Section 4 is devoted to the applications of the proposed control methods, as well as the performance evaluations of the proposed methods based on graphical, IAE, and ITAE criteria. Section 5 concludes the paper.


## 2. Mathematical Modelling

As shown in Figure1, the system under study is a two-dimensional overhead crane. The parameters and variables that describe the system are defined in Table 1. Derivation of the mathematical model for the system is based on the Euler-Lagrange method. For modelling simplicity, the following assumptions are considered.Table 1
Dynamics model parameters.
Notation Description Unit m c Mass of driving cart kg m p Mass of payload kg L Length of hoisting cable m B c Cart’s viscous damping coefficient N-s/m B p Payload’s viscous damping coefficient N-m-s/rad φ Payload sway angle rad φ ˙ Payload sway angular velocity rad/s x Driving cart’s position m x ˙ Driving cart’s linear velocity m/s F c Cart control force N r p Radius of cart’s pulley m R Motor electrical resistance Ω T m DC motor torque Nm K m DC motor torque constant Nm/A V D C Dc motor input voltage V K E DC motor electric constant V/rad/sFigure 1
System schematic diagram. The motor is assumed stopped and the payload was at an angle.Assumption 1.
Mass of hoisting cable is insignificant, all rotating joints are well lubricated, hoisting is only needed for obstacle avoidance, and all-states are available for control design.From Figure1, thex- andy-coordinates of the payload (xp,yp) and their corresponding time-derivatives can be written as(1)xp=x+Lsin⁡φ,x˙p=Vx=x˙+Lφ˙cos⁡φ,yp=-Lcos⁡φ,y˙p=Vy=Lφ˙sin⁡φ.System equations-of-motion (EOM) are obtained using Euler-Lagrange equation given by(2)ddt∂La∂qi˙-∂La∂qi=Qi-QiLost,i=1,2…,nLa=T-P,where T=KEcrane and P=PEcrane, Qi is a vector of nonconservative generalized forces acting along the direction of the generalized coordinates qi, and n is the number of independent generalized coordinates. For this study, the independent generalized coordinates in (2) are defined as q≜q1q2T=xφT, while the nonconservative generalized forces are defined as Q≜Q1Q2T=Fc0T and the lost terms as QLost=Bcx˙BpLφ˙T.The EOM for the system can be summarized in matrix form as(3)mc+mpmpLcos⁡φcos⁡φLx¨φ¨+0-mpLφ˙sin⁡φ00x˙φ˙+0gsin⁡φ=Fc-Bcx˙-Bpφ,˙.The term Bcx˙ opposes the cart force, Fc, and refers to the viscous damping of the driving cart due to friction between the cart and air. Similarly, the viscous damping term Bpφ˙ refers to the viscous damping force of the swinging payload, given by the friction between payload and air.It is evident that the EOM for the system presented as (3) are coupled in the actuated acceleration variable x¨ and the unactuated acceleration variable φ¨. The EOM can be decoupled into actuated and unactuated subsystems. Isolating φ¨ and x¨ from (3), we have (4)x¨=Fc-Bcx˙+mpgsin⁡φcos⁡φ+mpLφ˙2sin⁡φ+Bpφ˙cos⁡φmc+mp-mpcos2φ,(5)φ¨=-mc+mpmpgsin⁡φ+Bpφ˙-Fcmpcos⁡φ+mpcos⁡φBcx˙-mpLφ˙2sin⁡φmpLmc+mp-mpcos2φ.By noting that the variables notations x1=x, x2=x˙, x3=φ, and x4=φ˙ apply, the EOM for the crane system (see (4) and (5)) can be presented as(6)x˙1=x2,x˙2=f1x+g1xFc,x˙3=x4,x˙4=f2x+g2xFc,with(7)f1x=Bcx˙+mpgsin⁡φcos⁡φ+mpLφ˙2sin⁡φ+Bpφ˙cos⁡φmc+mp-mpcos2φ,g1x=1mc+mp-mpcos2φ,f2x=ΓmpLmc+mp-mpcos2φ,g2x=-mpcos⁡φmpLmc+mp-mpcos2φ,Γ=-mc+mpmpgsin⁡φ+Bpφ˙+mpcos⁡φBcx˙-mpLφ˙2sin⁡φ.In (6), the linear force, FC, that drives the cart originates from the trolley DC motor torque. Taking the effect of DC motor dynamics into account, the following equations relating the linear force FC to motor torque Tm, and motor input voltage VDC, are defined(8)Tm=rpFC=KmRmVDC-KmKERmωm,ωm=x2rpwhere rp, Km, VDC, KE, and Rm have been defined earlier in Table 1, while ωm refers to the angular velocity of the motor. From (8), one easily isolates FC as(9)FC=KmRmrpVDC-KmKERmrp2x2In Section 3, we present the design of the proposed control strategy. The following assumption is considered for control design.Assumption 2.
The nonlinear functionsg1x and g2x are assumed to be invertible ∀x.


## 3. Control System Design and Stability Analysis

The problem is to transport the payload along the desired trajectory from an initial position to the final position in short time with no or attenuated sway. These conflicting requirements coupled with the underactuated nature of the crane make the control more challenging. The SMC is proposed for the crane control problem. To optimize the performance of the proposed controller, intelligent tuning systems based on the NN and the fuzzy logic will be designed.


### 3.1. Sliding Mode Control Design and Stability Analysis

SMC is a special type of variable structure system where control law is designed to drive system trajectory to reach and remain on a designed manifold within the state-space called sliding manifold [33]. As shown in Figure 2, the error trajectory after the initialreaching phase “slides” on the manifold σe,t=0. Insensitivity to parametric and matched uncertainties and disturbance make the SMC particularly attractive in robust control.Figure 2
Attractive property of the sliding manifold.For the second-order actuated subsystem, design the sliding manifold as(10)σe,t=CTe,where e≜ee˙T=e1e2T is error vector and CT is sliding manifold parameters vector that characterizes the manifold. The position error, e1, has been defined as e1=x1-x1d, while the velocity error, e2, has been defined as e2=x2-x2d. The variables x1 and x2 represent the actual system trajectories with desired trajectories as x1d and x2d, respectively. Without loss of generality, define CT=C11T; hence, (10) and its time-derivative are, respectively, given by(11)σe,t=C1x1-x1d+x2-x2d.(12)σ˙e,t=C1x˙1-x˙2d+x˙2-x˙2d.All velocities are zero at steady state; hence, set x˙1d=x2d=x˙2d=0. Eventually, submitting the crane system given by (6) into (12) we have(13)σ˙e,t=C1x˙1+x˙2=C1x2+f1x+g1xFc.Parameter C1 is designed for the polynomial p+C1=0 to be Hurwitz, where p is a Laplace operator. Thus, it is required that C1>0. We adopt the equivalent control given by (14) where ueq and usw are known as the equivalent and the switching control, respectively.(14)Fc=ueq+usw.During thesliding phase, only ueq control is applied to maintain the trajectories sliding along σe,t=0. However, duringreaching phase, both ueq and usw make the total control law, Fc. During sliding, σ˙e,t=0 exists. Hence, considering (13), ueq is designed as(15)ueq=-C1x2+f1xg1x.We will design usw from stability analysis. Define the candidate Lyapunov function as(16)Vσ,t=12σe,t2.One may have noticed that the selection of the Lyapunov function satisfies the stability requirements that Vσ,t=0 for σ=0 and Vσ,t>0 for σ≠0  ∀t. By differentiating (16) with respect to time along (15) one arrives at(17)V˙σ,t=σe,tσ˙e,t=σe,tC1x2+f1x+g1xFc.By submitting (14) and (15) into (17) and simplifying, (17) reduces to(18)V˙σ,t=σe,tg1xusw.In (18), for the system to be asymptotically stable, it is required that V˙σ,t<0 holds. Note that the factor g1=1/(mc+mp-mpcos2φ) in (18) is strictly positive. Hence, the values that the switching law usw is set to achieve V˙σ,t≤0 are given as(19)usw>0ifσe,t<0,=0ifσe,t=0,<0ifσe,t>0,and by LaSalle’s invariance principle [37] we have V˙σ,t<0 and the crane is asymptotically stable about the origin. To meet the requirements of (19), design usw as(20)usw=-ξsign⁡σe,t,where ξ is a positive constant and the signum function sign⁡(·) is defined as(21)sign⁡σe,t≔-1ifσe,t<0,0ifσe,t=0,1ifσe,t>0.Remark 3.
To reduce the fast switching of the control law, we replacesign⁡(·) by the smoothing function [38] given by (22), where δ>0. Here δ=0.05 is selected. The smoothing function eliminates the fast switching of the control law while preserving robustness property around some neighbourhood of the sliding manifold.(22)sign⁡σe,t≈σe,tσe,t+δIn this study, the controller parameters are designed asξ=70 and C1=5.48. The closed-loop system will maintain robust stability against matched and parametric uncertainties. However, as stated earlier, high-speed operation coupled with variations in hoisting heights may affect thereaching time to σe,t=0 for sway. Linearizing (5) about φ=00, one obtains(23)φ¨+BpLmpφ˙+gLφ=-1Lx¨.Equation (23) represents a second-order system. When expressed in transfer function form, it can be easily proved that the undamped-natural frequency, ωn, of the crane is given by(24)ωn=gL.In (24), it is evident that ωn is L-dependent. Changes in L are likely to affect the swaying duration. Studies show that optimizing the SMC yields improved performance [24] regarding convergence and fast vanishing of residual sway. In this study, we compare the intelligent NN and fuzzy logic algorithms for tuning the slope parameter C1 of the controller. The approach to the SMC optimization problem in this study is to design intelligent systems to update the previously designed slope parameter C1 (here redefined as C10) according to(25)C1=C10+ΔC1It is to be noted that our approach is different from that proposed by [24] where neurofuzzy system was proposed to generate the slope parameter C1. In this work, the intelligent system updates predetermined value of C1 by an amount ΔC1 (determined by the intelligent system) rather than completely generating it. Hence, there would be no singularity in the slope parameter C1 when the intelligent system fails as may be the case using the “slope-generate” approach of [24]. Using the “slope-update” approach, the system will remain operational (although with reduced effectiveness) even when intelligent tuning system fails.


### 3.2. Intelligent Tuning Algorithms Designs

Optimal training dataset was obtained through tuning exercises for different sets of hoisting heights in the range 0.25 meters to 1.5 meters. The knowledge from the tuning exercise was used to carry out supervised training of the NN and to design the fuzzy algorithm. The control architecture is as shown in Figure3. The switch, Sw, is used to select the algorithm of choice. The outputs of the intelligent algorithms adjust controller slope for all operating conditions.Figure 3
Closed-loop system block diagram with proposed intelligent SMC tuning algorithms.


#### 3.2.1. Neural-Network Design

As shown in Figure4, the NN is a feed-forward, two-layered network with a 1-2-1 structure. The input node takes in the hoisting height data. The weighting factor linking the input node to the jth hidden-layer is denoted by w1j, while the weighting factor linking the jth hidden-layer to the output-layer is denoted by wj1. The network output is change in slope, ΔC1NN.Figure 4
Neural-network architecture.Define the instantaneous error between the desired change in slope (ΔC1d) and the NN-based change in slope (ΔC1NN) as (26)ek=ΔC1dk-ΔC1NNkSince the network’s output (ΔC1NN) can be positive, negative, or zero, the hidden- and the output-layers use thetangent hyperbolic activation function defined as(27)fh,onet=enet-e-netenet+e-net.The input gets multiplied by the weights w1j linking the input node to the hidden-layer. The summation of the product operations is the input to the hidden-layer neurons given by(28)Ij=∑w1jL.The output from the jth neuron in the hidden-layer can be expressed as(29)Oj=fh,oIj,j=1,2.The output of the jth hidden-layer neuron gets multiplied by the weight wj1. Contributions from all nodes are sent to the output-layer neuron according to (30)Io=∑wj1Oj,j=1,2.The output from the neuron in the output-layer is given by(31)ΔC1NN=fh,oIo.Adaptation of the network weights is by the steepest descent back-propagation algorithm [39]. Define the cost function (to be minimized) as mean squared of the training error given by(32)Jk=ek=12ΔC1dk-ΔC1NNk2.Generally, adjustment of each weight linking hidden-layer to output-layer can be expressed as(33)Δwj1k=-η∂Jk∂wj1+γΔwj1k-1,where η and γ are positive constants known as the learning and the momentum factor, respectively. γ is to avoid the solution from getting trapped in the so-calledlocal minima [40]. In (33), the partial derivative ∂Jk/∂wjk can be expressed based on the chain rule as (34)∂Jk∂wj1=∂Jk∂∆C1NNk·∂∆C1NNk∂Iok·∂Iok∂wj1k.Next, we define the partial derivatives in (34). From (30), it happens that(35)∂Iok∂wj1k=Ojk.Also, considering (31), the following can be obtained:(36)∂ΔC1NNk∂Iok=fh,o′net=fh,onet1-fh,onet.Similarly, considering (32), it can also be verified that(37)∂Jk∂ΔC1NNk=-ek.Putting all defined derivatives together, (34) is given by(38)∂Jk∂wj1=-ek·fh,o′net·Ojk.Finally, the update algorithm for the next output-layer weights, wj1k+1, is given by(39)wj1k+1=wj1k+Δwj1k+γΔwj1k-1By applying similar sets of calculations (see (33)-(39)) for the output-layer, the hidden-layer weights are updated according to the update rule given by(40)w1jk+1=w1jk+Δw1jk,where in this case the change in the jth hidden-layer weight has been defined as(41)Δw1jk=-η.fh,o′netek.fh,o′net.∑wj1.L+γ.Δw1jk-1.


#### 3.2.2. Fuzzy Algorithm Design

The input is hoisting height, L, while the output isΔC1Fuzzy. Triangular membership functions (MFs) are selected for the input and output variables as shown in Figures 5(a) and 5(b), respectively. The input takes the linguistic values:VS: Very Short (L is about 0.25 meters),S: Short (L is about 0.5 meters),MS: Medium Short (L is about 0.75 meters),ML: Medium Long (L is about 1 meter),L: Long (L is about 1.25 meters), andVL: Very Long (L is about 1.5 meters). The output is assumed to take the following linguistic values:NB (Negative Big),NM (Negative Medium),NS (Negative Small),ZE (zero),PS (Positive Small), andPM (Positive Medium).Figure 5
Fuzzy: (a) input MFs; (b) output MFs; (c) input-output characteristics.
(a) (b) (c)The first step is to take the crisp hoisting height input and determine its degree of belonging in each of the fuzzy sets via MFs. Since we have single input and single output system, the rule antecedent and consequent parts are simple. Theith linguistic rule set can be expressed as(42)Ri:IFLisMiTHENΔC1FuzzyisNi,i=1,2,…,nwhere Ri is the ith rule of the n rules and Mi and Ni are the corresponding MFs for L and ΔC1Fuzzy. The one-dimensional rule is given by Table 2. Defuzzification for obtaining the crisp output is based on the following simplified inference method where μMiL is the firing strength of the ith rule.(43)ΔC1Fuzzy=∑inμMiL×Ni∑inμMiL,In Figure 5(c), the near-linear relationship between the crisp cable length and the crisp output ΔC1Fuzzy is shown. The crisp output ΔC1Fuzzy is used to update the SMC slope parameter according to (25).Table 2
One-dimensional rule table for fuzzy tuning algorithm.
Input: VS S MS ML L VL  Output: NB NM NS ZE PS PM


## 3.1. Sliding Mode Control Design and Stability Analysis

SMC is a special type of variable structure system where control law is designed to drive system trajectory to reach and remain on a designed manifold within the state-space called sliding manifold [33]. As shown in Figure 2, the error trajectory after the initialreaching phase “slides” on the manifold σe,t=0. Insensitivity to parametric and matched uncertainties and disturbance make the SMC particularly attractive in robust control.Figure 2
Attractive property of the sliding manifold.For the second-order actuated subsystem, design the sliding manifold as(10)σe,t=CTe,where e≜ee˙T=e1e2T is error vector and CT is sliding manifold parameters vector that characterizes the manifold. The position error, e1, has been defined as e1=x1-x1d, while the velocity error, e2, has been defined as e2=x2-x2d. The variables x1 and x2 represent the actual system trajectories with desired trajectories as x1d and x2d, respectively. Without loss of generality, define CT=C11T; hence, (10) and its time-derivative are, respectively, given by(11)σe,t=C1x1-x1d+x2-x2d.(12)σ˙e,t=C1x˙1-x˙2d+x˙2-x˙2d.All velocities are zero at steady state; hence, set x˙1d=x2d=x˙2d=0. Eventually, submitting the crane system given by (6) into (12) we have(13)σ˙e,t=C1x˙1+x˙2=C1x2+f1x+g1xFc.Parameter C1 is designed for the polynomial p+C1=0 to be Hurwitz, where p is a Laplace operator. Thus, it is required that C1>0. We adopt the equivalent control given by (14) where ueq and usw are known as the equivalent and the switching control, respectively.(14)Fc=ueq+usw.During thesliding phase, only ueq control is applied to maintain the trajectories sliding along σe,t=0. However, duringreaching phase, both ueq and usw make the total control law, Fc. During sliding, σ˙e,t=0 exists. Hence, considering (13), ueq is designed as(15)ueq=-C1x2+f1xg1x.We will design usw from stability analysis. Define the candidate Lyapunov function as(16)Vσ,t=12σe,t2.One may have noticed that the selection of the Lyapunov function satisfies the stability requirements that Vσ,t=0 for σ=0 and Vσ,t>0 for σ≠0  ∀t. By differentiating (16) with respect to time along (15) one arrives at(17)V˙σ,t=σe,tσ˙e,t=σe,tC1x2+f1x+g1xFc.By submitting (14) and (15) into (17) and simplifying, (17) reduces to(18)V˙σ,t=σe,tg1xusw.In (18), for the system to be asymptotically stable, it is required that V˙σ,t<0 holds. Note that the factor g1=1/(mc+mp-mpcos2φ) in (18) is strictly positive. Hence, the values that the switching law usw is set to achieve V˙σ,t≤0 are given as(19)usw>0ifσe,t<0,=0ifσe,t=0,<0ifσe,t>0,and by LaSalle’s invariance principle [37] we have V˙σ,t<0 and the crane is asymptotically stable about the origin. To meet the requirements of (19), design usw as(20)usw=-ξsign⁡σe,t,where ξ is a positive constant and the signum function sign⁡(·) is defined as(21)sign⁡σe,t≔-1ifσe,t<0,0ifσe,t=0,1ifσe,t>0.Remark 3.
To reduce the fast switching of the control law, we replacesign⁡(·) by the smoothing function [38] given by (22), where δ>0. Here δ=0.05 is selected. The smoothing function eliminates the fast switching of the control law while preserving robustness property around some neighbourhood of the sliding manifold.(22)sign⁡σe,t≈σe,tσe,t+δIn this study, the controller parameters are designed asξ=70 and C1=5.48. The closed-loop system will maintain robust stability against matched and parametric uncertainties. However, as stated earlier, high-speed operation coupled with variations in hoisting heights may affect thereaching time to σe,t=0 for sway. Linearizing (5) about φ=00, one obtains(23)φ¨+BpLmpφ˙+gLφ=-1Lx¨.Equation (23) represents a second-order system. When expressed in transfer function form, it can be easily proved that the undamped-natural frequency, ωn, of the crane is given by(24)ωn=gL.In (24), it is evident that ωn is L-dependent. Changes in L are likely to affect the swaying duration. Studies show that optimizing the SMC yields improved performance [24] regarding convergence and fast vanishing of residual sway. In this study, we compare the intelligent NN and fuzzy logic algorithms for tuning the slope parameter C1 of the controller. The approach to the SMC optimization problem in this study is to design intelligent systems to update the previously designed slope parameter C1 (here redefined as C10) according to(25)C1=C10+ΔC1It is to be noted that our approach is different from that proposed by [24] where neurofuzzy system was proposed to generate the slope parameter C1. In this work, the intelligent system updates predetermined value of C1 by an amount ΔC1 (determined by the intelligent system) rather than completely generating it. Hence, there would be no singularity in the slope parameter C1 when the intelligent system fails as may be the case using the “slope-generate” approach of [24]. Using the “slope-update” approach, the system will remain operational (although with reduced effectiveness) even when intelligent tuning system fails.


## 3.2. Intelligent Tuning Algorithms Designs

Optimal training dataset was obtained through tuning exercises for different sets of hoisting heights in the range 0.25 meters to 1.5 meters. The knowledge from the tuning exercise was used to carry out supervised training of the NN and to design the fuzzy algorithm. The control architecture is as shown in Figure3. The switch, Sw, is used to select the algorithm of choice. The outputs of the intelligent algorithms adjust controller slope for all operating conditions.Figure 3
Closed-loop system block diagram with proposed intelligent SMC tuning algorithms.


### 3.2.1. Neural-Network Design

As shown in Figure4, the NN is a feed-forward, two-layered network with a 1-2-1 structure. The input node takes in the hoisting height data. The weighting factor linking the input node to the jth hidden-layer is denoted by w1j, while the weighting factor linking the jth hidden-layer to the output-layer is denoted by wj1. The network output is change in slope, ΔC1NN.Figure 4
Neural-network architecture.Define the instantaneous error between the desired change in slope (ΔC1d) and the NN-based change in slope (ΔC1NN) as (26)ek=ΔC1dk-ΔC1NNkSince the network’s output (ΔC1NN) can be positive, negative, or zero, the hidden- and the output-layers use thetangent hyperbolic activation function defined as(27)fh,onet=enet-e-netenet+e-net.The input gets multiplied by the weights w1j linking the input node to the hidden-layer. The summation of the product operations is the input to the hidden-layer neurons given by(28)Ij=∑w1jL.The output from the jth neuron in the hidden-layer can be expressed as(29)Oj=fh,oIj,j=1,2.The output of the jth hidden-layer neuron gets multiplied by the weight wj1. Contributions from all nodes are sent to the output-layer neuron according to (30)Io=∑wj1Oj,j=1,2.The output from the neuron in the output-layer is given by(31)ΔC1NN=fh,oIo.Adaptation of the network weights is by the steepest descent back-propagation algorithm [39]. Define the cost function (to be minimized) as mean squared of the training error given by(32)Jk=ek=12ΔC1dk-ΔC1NNk2.Generally, adjustment of each weight linking hidden-layer to output-layer can be expressed as(33)Δwj1k=-η∂Jk∂wj1+γΔwj1k-1,where η and γ are positive constants known as the learning and the momentum factor, respectively. γ is to avoid the solution from getting trapped in the so-calledlocal minima [40]. In (33), the partial derivative ∂Jk/∂wjk can be expressed based on the chain rule as (34)∂Jk∂wj1=∂Jk∂∆C1NNk·∂∆C1NNk∂Iok·∂Iok∂wj1k.Next, we define the partial derivatives in (34). From (30), it happens that(35)∂Iok∂wj1k=Ojk.Also, considering (31), the following can be obtained:(36)∂ΔC1NNk∂Iok=fh,o′net=fh,onet1-fh,onet.Similarly, considering (32), it can also be verified that(37)∂Jk∂ΔC1NNk=-ek.Putting all defined derivatives together, (34) is given by(38)∂Jk∂wj1=-ek·fh,o′net·Ojk.Finally, the update algorithm for the next output-layer weights, wj1k+1, is given by(39)wj1k+1=wj1k+Δwj1k+γΔwj1k-1By applying similar sets of calculations (see (33)-(39)) for the output-layer, the hidden-layer weights are updated according to the update rule given by(40)w1jk+1=w1jk+Δw1jk,where in this case the change in the jth hidden-layer weight has been defined as(41)Δw1jk=-η.fh,o′netek.fh,o′net.∑wj1.L+γ.Δw1jk-1.


### 3.2.2. Fuzzy Algorithm Design

The input is hoisting height, L, while the output isΔC1Fuzzy. Triangular membership functions (MFs) are selected for the input and output variables as shown in Figures 5(a) and 5(b), respectively. The input takes the linguistic values:VS: Very Short (L is about 0.25 meters),S: Short (L is about 0.5 meters),MS: Medium Short (L is about 0.75 meters),ML: Medium Long (L is about 1 meter),L: Long (L is about 1.25 meters), andVL: Very Long (L is about 1.5 meters). The output is assumed to take the following linguistic values:NB (Negative Big),NM (Negative Medium),NS (Negative Small),ZE (zero),PS (Positive Small), andPM (Positive Medium).Figure 5
Fuzzy: (a) input MFs; (b) output MFs; (c) input-output characteristics.
(a) (b) (c)The first step is to take the crisp hoisting height input and determine its degree of belonging in each of the fuzzy sets via MFs. Since we have single input and single output system, the rule antecedent and consequent parts are simple. Theith linguistic rule set can be expressed as(42)Ri:IFLisMiTHENΔC1FuzzyisNi,i=1,2,…,nwhere Ri is the ith rule of the n rules and Mi and Ni are the corresponding MFs for L and ΔC1Fuzzy. The one-dimensional rule is given by Table 2. Defuzzification for obtaining the crisp output is based on the following simplified inference method where μMiL is the firing strength of the ith rule.(43)ΔC1Fuzzy=∑inμMiL×Ni∑inμMiL,In Figure 5(c), the near-linear relationship between the crisp cable length and the crisp output ΔC1Fuzzy is shown. The crisp output ΔC1Fuzzy is used to update the SMC slope parameter according to (25).Table 2
One-dimensional rule table for fuzzy tuning algorithm.
Input: VS S MS ML L VL  Output: NB NM NS ZE PS PM


## 3.2.1. Neural-Network Design

As shown in Figure4, the NN is a feed-forward, two-layered network with a 1-2-1 structure. The input node takes in the hoisting height data. The weighting factor linking the input node to the jth hidden-layer is denoted by w1j, while the weighting factor linking the jth hidden-layer to the output-layer is denoted by wj1. The network output is change in slope, ΔC1NN.Figure 4
Neural-network architecture.Define the instantaneous error between the desired change in slope (ΔC1d) and the NN-based change in slope (ΔC1NN) as (26)ek=ΔC1dk-ΔC1NNkSince the network’s output (ΔC1NN) can be positive, negative, or zero, the hidden- and the output-layers use thetangent hyperbolic activation function defined as(27)fh,onet=enet-e-netenet+e-net.The input gets multiplied by the weights w1j linking the input node to the hidden-layer. The summation of the product operations is the input to the hidden-layer neurons given by(28)Ij=∑w1jL.The output from the jth neuron in the hidden-layer can be expressed as(29)Oj=fh,oIj,j=1,2.The output of the jth hidden-layer neuron gets multiplied by the weight wj1. Contributions from all nodes are sent to the output-layer neuron according to (30)Io=∑wj1Oj,j=1,2.The output from the neuron in the output-layer is given by(31)ΔC1NN=fh,oIo.Adaptation of the network weights is by the steepest descent back-propagation algorithm [39]. Define the cost function (to be minimized) as mean squared of the training error given by(32)Jk=ek=12ΔC1dk-ΔC1NNk2.Generally, adjustment of each weight linking hidden-layer to output-layer can be expressed as(33)Δwj1k=-η∂Jk∂wj1+γΔwj1k-1,where η and γ are positive constants known as the learning and the momentum factor, respectively. γ is to avoid the solution from getting trapped in the so-calledlocal minima [40]. In (33), the partial derivative ∂Jk/∂wjk can be expressed based on the chain rule as (34)∂Jk∂wj1=∂Jk∂∆C1NNk·∂∆C1NNk∂Iok·∂Iok∂wj1k.Next, we define the partial derivatives in (34). From (30), it happens that(35)∂Iok∂wj1k=Ojk.Also, considering (31), the following can be obtained:(36)∂ΔC1NNk∂Iok=fh,o′net=fh,onet1-fh,onet.Similarly, considering (32), it can also be verified that(37)∂Jk∂ΔC1NNk=-ek.Putting all defined derivatives together, (34) is given by(38)∂Jk∂wj1=-ek·fh,o′net·Ojk.Finally, the update algorithm for the next output-layer weights, wj1k+1, is given by(39)wj1k+1=wj1k+Δwj1k+γΔwj1k-1By applying similar sets of calculations (see (33)-(39)) for the output-layer, the hidden-layer weights are updated according to the update rule given by(40)w1jk+1=w1jk+Δw1jk,where in this case the change in the jth hidden-layer weight has been defined as(41)Δw1jk=-η.fh,o′netek.fh,o′net.∑wj1.L+γ.Δw1jk-1.


## 3.2.2. Fuzzy Algorithm Design

The input is hoisting height, L, while the output isΔC1Fuzzy. Triangular membership functions (MFs) are selected for the input and output variables as shown in Figures 5(a) and 5(b), respectively. The input takes the linguistic values:VS: Very Short (L is about 0.25 meters),S: Short (L is about 0.5 meters),MS: Medium Short (L is about 0.75 meters),ML: Medium Long (L is about 1 meter),L: Long (L is about 1.25 meters), andVL: Very Long (L is about 1.5 meters). The output is assumed to take the following linguistic values:NB (Negative Big),NM (Negative Medium),NS (Negative Small),ZE (zero),PS (Positive Small), andPM (Positive Medium).Figure 5
Fuzzy: (a) input MFs; (b) output MFs; (c) input-output characteristics.
(a) (b) (c)The first step is to take the crisp hoisting height input and determine its degree of belonging in each of the fuzzy sets via MFs. Since we have single input and single output system, the rule antecedent and consequent parts are simple. Theith linguistic rule set can be expressed as(42)Ri:IFLisMiTHENΔC1FuzzyisNi,i=1,2,…,nwhere Ri is the ith rule of the n rules and Mi and Ni are the corresponding MFs for L and ΔC1Fuzzy. The one-dimensional rule is given by Table 2. Defuzzification for obtaining the crisp output is based on the following simplified inference method where μMiL is the firing strength of the ith rule.(43)ΔC1Fuzzy=∑inμMiL×Ni∑inμMiL,In Figure 5(c), the near-linear relationship between the crisp cable length and the crisp output ΔC1Fuzzy is shown. The crisp output ΔC1Fuzzy is used to update the SMC slope parameter according to (25).Table 2
One-dimensional rule table for fuzzy tuning algorithm.
Input: VS S MS ML L VL  Output: NB NM NS ZE PS PM


## 4. Applications of the Designed Control Algorithms

The parameters of the model are accepted as in Table3. Payload changes according to the mass of the load to be transported. The hoisting height also changes during loading and unloading and when avoiding obstacles. The natural frequency of the system changes as cable length changes; thus the sway characteristic of the system changes. Changes in hoisting height are likely to cause deterioration in sway suppression. For these reasons, control applications were repeated by varying payload and hoisting height to demonstrate the effectiveness of the proposed control strategy with the designed intelligent tuning algorithms.Table 3
Numerical values for the simulation model parameters.
Parameter: m c[kg] B c[Ns/m] B p[Nms/rad] r p[m] R[Ω] K m[Nm/A] K E[V/rad/s  Value: 25 0.25 0.1 0.07 3.35 0.24 0.24In Figure6, the performances of the SMC controller without intelligent tuning algorithms for hoisting heights of 1 m and 1.25 m are investigated. A 5 kg load is assumed to be transported to a target position of 1 m. As expected, examining the responses revealed that the payload sways as hoisting height increased from 1 m to 1.25 m. The sway lingers due to the decrease in the crane’s ωn (see (24)). In order to improve the effectiveness of the controller for all operating conditions, fine-tuning of controller is required.Figure 6
Responses without intelligent tuning algorithms. (a) Cart position. (b) Payload sway. (c) Control effort. (d) Cart velocity. (e) Sway angular velocity. (f) Sliding manifold.
(a) (b) (c) (d) (e) (f)Figure7 shows the responses obtained when the performance of the controller with intelligent tuning algorithms was investigated. For the purpose of comparison, the same parameters are used as in the previous case (Figure 6). One can see from the responses that the sway has been effectively suppressed despite the changes in hoisting height. Also, the responses of the fuzzy-tuned SMC (FZ-SMC) and the neural-network-tuned SMC (NN-SMC) are overlapping. However, for a quantitative comparison of the performances of the two control strategies, we employ the IAE (see (44)) and the ITAE (see (45)) as criteria. The IAE and ITAE values for Figure 7 correspond to case ID 1 in Table 4 and are for the case when the hoisting height was set to 1.25m. Based on Table 4, the performance of the NN-SMC is only slightly better relative to that of the FZ-SMC in terms of sway attenuation.Table 4
Fuzzy-SMC and neural network-SMC comparisons based on IAE and ITAE.
System Configuration IAE ITAE Case ID Cart ref. [m] Cable [m] Payload [kg] FZ-SMC NN-SMC FZ-SMC NN-SMC 1 1 1.25 5 0.1745 0.1744 0.2249 0.2245 2 2 1→1.5→0.5 10 0.4118 0.4115 1.5060 1.5010 3 1→2→3 1 20 0.7418 0.7416 9.7370 9.7330 4 1→2→3 1→1.5→0.5 20 0.7769 0.7754 10.8100 10.7700 5 1 1.7 15 0.5489 0.1653 4.6300 0.3695Figure 7
Responses with intelligent tuning algorithms. (a) Cart position. (b) Payload sway. (c) Control effort. (d) Cart velocity. (e) Sway angular velocity. (f) Sliding manifold.
(a) (b) (c) (d) (e) (f)IAE and ITAE are, respectively, defined by (44) and (45), wherein here eτ refers to the τth sway regulation error.(44)IAE=∫0teτdτ,(45)ITAE=∫0tτeτdτ.Figure 8 shows the case when a payload of 10 kg is transported to a 2 m position from the reference. For the first 10 seconds of operation, it was assumed that the required hoisting height is 1m, and between 10 and 20 seconds the height changed to 1.5 m, while between 20 and 30 seconds the required hoisting height is 0.5 m for obstacle avoidance along the trajectory of the payload. Examining the responses, the performances of the two controllers are effective based on position tracking, minimal acceleration-induced sway, and residual sway suppression capabilities. Furthermore, the control efforts (Figure 8(e)) revealed that the control efforts have attenuated chattering and σe,t=0 attained in about 4 seconds (see Figure 8(c)). The IAE and ITAE values for the case studied in Figure 8 correspond to study Case ID 2 in Table 4. Like in the previous control application, the performance of the NN-SMC is only slightly better relative to that of the FZ-SMC in terms of sway attenuation (see Table 4, case ID 2).Figure 8
Responses of the FZ-SMC and NN-SMC controllers; (a) cart position, (b) payload sway, (c) sliding manifold, (d) cart velocity, (e) control effort, and (f) manifold slope.
(a) (b) (c) (d) (e) (f)Two other control applications were performed (Case ID 3 and 4) to investigate the performances of the proposed control strategies (FZ-SMC and NN-SMC). For brevity, only the IAE and ITAE values for cases are shown in Table4. Case ID 3 corresponds to the study case when a payload of 20 kg is transported at a fixed hoisting height of 1 m. During the first 10 seconds of operation, the target position is 1 m, and between 10 and 20 seconds of operation the cart is given command to move to the 2 m position, while between 20 and 30 seconds the target position is 3 m. Based on the IAE and ITAE values Case ID 3, the performance of the NN-SMC is slightly better than that of the FZ-SMC like in the previous control applications. On the other hand, Case ID 4 refers to the application when payload of 20 kg is transported. Position tracking for this case is the same as previous control application (Case ID 3). However, for this case, during the first 10 seconds of operation the cable length is 1 m, and between 10 and 20 seconds the length changed to 1.5 m, while between 20 and 30 seconds the length changed to 0.5 m for obstacle avoidance along the trajectory of the payload. From Table 4, the performance of the NN-SMC is slightly better as compared to that obtained using the FZ-SMC.Remark 4.
In this study, one can argue that both control strategies (FZ-SMC and NN-SMC) are equally effective in dealing with position tracking and sway suppression. However, it is worth noting that the effectiveness of the intelligent algorithms relies heavily on the proper design and training of these algorithms.So far, we only investigate the effectiveness of the proposed algorithms within the range of the training dataset (0.25 m to 1.5 m). The responses shown in Figure9 are those obtained for a hoisting height of 1.7 m (i.e., 0.2 m above dataset upper bound). Payload is accepted as 15 kg and target position is 1m. Examining the responses, the NN-SMC remains robust in terms of sway suppression, while the effectiveness of the FZ-SMC deteriorates. This is because the training of the NN based on the back-propagation learning and adaptation algorithm enables it to learn and establish an appropriate functional relationship between training sets. Consequently, the network can effectively predict the optimal values of “slope-updates” for those inputs outside the range of the training dataset. On the other hand, the accuracy of the fuzzy-based tuning algorithm relies heavily on the defined universe of discourse for the input variable as well as the values returned when the MFs are read. In order words, the design of the fuzzy does not account for a hoisting height of 1.7 m. Hence, the fuzzy-based algorithm could not accurately predict the corresponding change in slope for Case ID 5.Figure 9
Responses for a hoisting height of 1.7m. (a) Cart position. (b) Payload sway. (c) Sliding manifold. (d) Cart velocity. (e) Control effort. (f) Manifold slope.
(a) (b) (c) (d) (e) (f)Remark 5.
For practical cranes, there exists control input saturation problem. Also, the inclusion of integral term in the control law can reduce final positioning errors due to parametric uncertainties or unmodelled dynamics. These two problems might arise in practice and are not considered here. In fact, there is already an effective solution to these problems in [41] that can be applied to practical cranes to solve the problems.


## 5. Conclusion and Future Work

Payload mass and hoisting height take different values during crane operation. Hence, high-quality control requires robustness against parametric uncertainties. The invariance property of the SMC against matched uncertainty makes it particularly attractive in control engineering. In this work, the SMC strategy was designed to address the crane control requirements for high-speed of operation, accurate positioning, and minimal sway. To improve the robustness of the proposed SMC strategy, intelligent tuning algorithms based on fuzzy and the NN algorithms were designed to optimize the proposed SMC performance. Controls were repeated by varying payload, position set-point, and hoisting heights in order to demonstrate the quality of the proposed control algorithms to parametric variations. Analyses of performances based on graphical, IAE, and ITAE criteria showed the effectiveness of the proposed methods. However, it was observed based on IAE and ITAE criteria that the NN-SMC strategy was slightly more effective as compared to the FZ-SMC strategy. It was also observed that, for the case of the NN-SMC strategy, there might not be the need for complete redesign of the tuning algorithm in the case where the system requires expansion to cover for higher hoisting heights not considered during control design. Furthermore, attenuated chattering and fast convergence of the sliding variable were observed.To verify the practical performance of the proposed controllers, experiments can be conducted on an industrial crane. Our next work will be to investigate the effectiveness of the proposed algorithms from practical perspective.



---

*Source: 1480732-2019-01-03.xml*