Anti-swing control of gantry and tower cranes using fuzzy and time-delayed feedback with friction compensation

We designed a feedback controller to automate crane operations by controlling the load position and its swing. First, a PD tracking controller is designed to follow a prescribed trajectory. Then, another controller is added to the control loop to damp the load swing. The anti-swing controller is designed based on two techniques: a time-delayed feedback of the load swing angle and an anti-swing fuzzy logic controller (FLC). The rules of the FLC are generated by mapping the performance of the time-delayed feedback controller. The same mapping method used for generating the rules can be applied to mimic the performance of an expert operator. The control algorithms were designed for gantry cranes and then extended to tower cranes by considering the coupling between the translational and rotational motions. Experimental results show that the controller is effective in reducing load oscillations and transferring the load in a reasonable time. To experimentally validate the theory, we had to compensate for friction. To this end, we estimated the friction and then applied a control action to cancel it. The friction force was estimated by assuming a mathematical model and then estimating the model coefficients using an off-line identification technique, the method of least squares (LS).


Introduction
Cranes are widely used to transport heavy loads and hazardous materials in shipyards, factories, nuclear installations, and high-building construction.Gantry cranes are commonly used in factories.This type of cranes incorporates a trolley, which translates in a horizontal plane.The payload is attached to the trolley by a cable, whose length can be varied by a hoisting mechanism.The load with the cable is treated as a one-dimensional pendulum with one-degree-of-freedom sway.There is another version of these cranes, which can move also horizontally but in two perpendicular directions.The analysis is almost the same for all of them because the two-direction motions could be divided into two uncoupled one-direction motions.
Rotary cranes can be divided into two types: boom cranes which are commonly used in shipyards, and tower cranes which are used in construction, Fig. 1.In these cranes, the load-line attachment point undergoes rotation.Another degree of freedom may exist for this point.For boom cranes, this point moves vertically, whereas it moves horizontally in tower cranes.Beside these motions, the cable can be lowered or raised.The cable and the load are treated as a spherical pendulum with two-degree-of-freedom sway.The function of cranes is to move a load from point to point in the minimum time such that the load reaches its destination without swinging.Usually a skillful operator is responsible for this task.During the operation, the load is free to swing in a pendulum-like motion.If the swing exceeds a critical limit, it must be damped or the operation must be stopped until the swing dies out.Either option consumes time, which reduces the facility availability.These problems have motivated many researchers to develop control algorithms to automate crane operations.However, most of the existing schemes are not suitable for practical implementation.Therefore, most industrial cranes are not automated and still depend on operators, who sometimes fail to compensate for the swing.This failure may subject the load and the environment to danger.Another difficulty of crane automation is the nature of the crane environment, which is often unstructured in shipyards and factory floors.The control algorithm should be able to cope with these conditions.Abdel-Rahman et al. [1] and Omar and Nayfeh [2] presented a detailed survey of crane control approaches.In the following, we present briefly the general techniques for crane control.
Since the load swing is affected by the acceleration of the motion, many researchers have concentrated on generating trajectories, which deliver the load in the shortest possible time and at the same time minimize the swing.These trajectories are obtained generally by using optimization techniques.The objective function can be either the transfer time [3], or the control action [4], or the swing angle [5].Another important method of generating trajectories is input shaping, which consists of a sequence of acceleration and deceleration pulses.These sequences are generated such that there is no residual swing at the end of the transfer operation [6].The resulting controller is open-loop, which makes it sensitive to external disturbances and to parameter variations.In addition, the required control action is bang-bang, which is discontinuous.
Feedback control is well-known to be less sensitive to disturbances and parameter variations.Hence, it is an attractive method for crane control design.Ridout [7] developed a controller, which feeds back the trolley position and speed and the load swing angle.The feedback gains are calculated by trial and error based on the root-locus technique.Hurteau and Desantis [8] developed a linear feedback controller using full-state feedback.The controller gains are tuned according to the cable length.However, if the cable length changes in an unqualified way, degradation of the system performance occurs.In addition, the tuning algorithm was not tested experimentally.Omar and Nayfeh [2] developed and tested successfully a gain-scheduling controller, which is able to transfer the load within one oscillation cycle of the load and without inducing overshoot in the trolley position.The transfer time is closer to the optimal time with small load swing angles during the transfer process.The reference of these controllers is usually a step input, which makes them more suitable for short distances.Another concern about these controllers is the high control action at the beginning of the motion, which may excite the rigid-body modes of the load.
As aforementioned, the objective of the crane control is to move the load from point to point and at the same time minimize the load swing.Usually, the controller is designed to achieve these two tasks simultaneously, as in the aforementioned controllers.However, in another approach used extensively, the two tasks are treated separately by designing two feedback controllers.The first is an anti-swing controller.It controls the swing damping by a proper feedback of the swing angle and its rate.The second is a tracking controller designed to make the trolley follow a reference trajectory.The trolley position and velocity are used for tracking feedback.The position trajectory is generally the classical velocity pattern, which is obtained from open-loop optimal control or input shaping techniques.The tracking controller can be either a classical Proportional-Derivative (PD) controller [9] or a Fuzzy Logic Controller (FLC) [10][11][12][13].Similarly, the anti-swing controller is designed by different methods.Masoud and coworkers [9,[14][15][16][17] used delayed-position feedback, whereas Nalley and Trabia [12], Yang et al. [13], and Al-Moussa et al. [10] used FLC.Separation of the control tasks, anti-swing and tracking, enables the designer to handle different trajectories according to the work environment.Generally, the cable length is considered in the design of the anti-swing controller, and the effect of the load mass is neglected in the design of the tracking controller.
Raising the load during transfer (hoisting) is needed only to avoid obstacles.This motion is slow, and hence variations in the cable length can be considered as a disturbance to the system.Then, the effect of variations in the cable length is investigated through simulation to make sure that the performance does not deteriorate.However, there are few studies that include hoisting in the design of controllers [18].
The effect of the load weight on the dynamics is usually ignored.However, Lee et al. [11] and Omar and Nayfeh [19] consider it in the design of controllers for gantry and tower cranes.From these studies, we find that, for very heavy loads compared to the trolley weight, the system performance deteriorates if the load weight is not included in the controller design.
Most of the controllers are designed for gantry cranes and a few are designed for tower cranes.Furthermore, a considerable proportion of tower-crane controllers are based on an open-loop method [20], which are not suitable for practical applications.Those who considered feedback control [21] ignored the effect of parameter variations.The developed controllers are slow and the coupling between the rotational and translational motions of the tower crane are not well handled.Most of the previous work is based on the assumption of a frictionless system [20].In real systems, friction has a strong impact on the system performance, and it should be included in the controller design.
Following the spirit of the work done by Masoud and coworkers [9,[14][15][16][17], we propose another time-delayed feedback controller with different control configuration loop.The new proposed controller has higher damping ratio and small time delay.The transfer and swing equations are treated in a unified way.The cable length and the load mass are also included in the controller design.The mechanical friction is considered in the control loop by proposing a friction compensation algorithm.In order to further improve the performance of the designed time-delayed feedback controller, we introduce an anti-swing FLC.The rules of the FLC are generated by mapping the performance of the anti-swing time-delayed feedback controller.The same approach used for mapping can be also used to mimic the performance of other controllers or a skilful operator.The mapping process produces a fuzzy controller that is nearly identical to the delay controller.However, the flexibility of FLC structure enables us to further improve the generated controller by using optimization techniques to tune the fuzzy membership functions.In one design, the load swing angle is filtered before using it in the controller implementation.The filtering process adds a delay to the signal.This extra delay if not considered in the controller design may lead to poor performance.In addition the cable length and the load mass are also included in the controller design.Moreover, the FLC is well known for its robustness to system parameters variations and its ability for noise rejection [22].

Friction compensation
Friction within mechanical systems is unavoidable.The friction characteristics of rigid bodies moving relative to each other at substantial speed is fairly linear.When the bodies in contact are at rest, there is an opposing friction force equal to the applied force on the bodies.This sticking force will prevent motion until the applied force exceeds the maximum stiction level inherent between the materials in contact.It has been experimentally determined that immediately after motion occurs, friction decreases rapidly in magnitude until it reaches a critical value (Stribeck effect) after which it increases linearly with velocity.Moreover, friction has nonsymmetric characteristics, such as dependance of the position and motion direction.For a more comprehensive discussion of the phenomenological nature of friction, we refer the reader to Armstrong [23] and Canudas et al. [24].
There are several methods to overcome friction effects.The first uses high-feedback-gain controllers, which may reduce the effect of the friction nonlinearities.However, this approach has severe limitations because the nonlinearities dominate any compensation for small errors.Limit cycles may appear as a consequence of the dynamic interaction between the friction forces and the controller, especially when the controller contains integral terms.The second uses high-frequency bias signal injection.Although it may alleviate friction effects, it may also excite high-frequency harmonics in the system.The third uses friction compensation, which aims to remove the effect of friction completely.
The third method has an advantage over the other methods because the system becomes linear after compensation.So, control algorithms based on the linear model can be applied directly.The compensation is done by estimating the friction of the system, and then applying a action to cancel it.The compensation can be done on-line to track the friction variations, which may occur due to changes in the environment and mechanical wear.Many researchers developed adaptive friction compensation for various applications using different adaptation techniques and models [25,26].However, to obtain a good estimate of the friction using the adaptive approach, one needs to persistently excite the system [27].In our system, the input signals do not have this characteristic.Moreover, the friction can be assumed to be constant during the operation without affecting the system performance.This enables estimation of the friction off-line using an appropriate persistent excitation.
The estimation process requires a model of friction.Friction models have been extensively discussed in the literature [23,28].It is well established that friction is a function of the velocity; however, there is disagreement about the relationship between them.Among these models, we choose the one proposed by Canudas et al. [25] because of its simplicity and because it represents most of the friction phenomena.This model consists of constant viscous and Coulomb terms.These constants change with the motion direction.

Modeling of tower cranes
We use the Lagrangian approach to derive the equations governing the nonlinear motion of tower cranes, Fig. 2. For analysis and control design, we simplify them, but we use the full nonlinear equations for simulation.We assume small swing angles, neglect the cable length variations, assume that the rates of change of x and γ are the same order of magnitude as the swing angles and their rates [2], and obtain where J o is the moment of inertia of the tower and the jib about the z-axis, K mx and K mγ are the gains of the translational and rotational motors, respectively, and V x and V γ are the inputs.Equations ( 1) and ( 2) represent the translational motion, and Eqs ( 3) and ( 4) represent the rotational motion.
To make the designed controller valid for all cable lengths and load weights, we start by normalizing the equations of motion Eqs (1) and ( 4) using the cable length L and the load oscillation period T .The normalized equations become where the prime indicates the derivative with respect to the nondimensional time τ and To make the rotational equations similar to the translational equations, we replace the rotation angle γ by a new variable y where To simplify the analysis, we assume x to be constant and hence reduce the rotational equations to where Vy = −x Vγ , which are similar to the translational equations.Therefore, we design the controllers for only the translational motion.After determining the control actions Vx and Vy , we determine the actual voltages to be sent to the motors from

Friction estimation and compensation
The friction model in Fig. 3 can be expressed in the form where c and b are the Coulomb and viscous friction coefficients, respectively, the positive and negative signs refer to the positive and negative directions of the velocity, and F fs is the stiction friction at zero-velocity.The stiction friction theoretically appears at zero velocity and opposes the motion until the control action exceeds it.It depends on the direction of the motion.Cancelling it by reversing the control action after it passes zero velocity generates limit cycles, resulting in an oscillatory system response, which is unacceptable.To avoid this problem, we assume the stiction to be a continuous function of the control action with a sharp slope; that is, where f s and A are the magnitude and slope of the friction and V is the control action determined from the linear model.A shift f sh is introduced to account for asymmetric characteristics of the friction.Due to the error resulting from the numerical computation and differentiation, we define the zero velocity as an interval instead of a crisp value by introducing the parameters ξ and η defined as where d s is the upper limit of the zero-velocity interval.
The Coulomb and viscous friction coefficients are determined using the method of least squares, while the stictionfriction parameters are determined experimentally to be equal to the control action at which the motor starts to move.Then, the estimated friction force F f is added to the control action to linearize the model as follows: The actual control action is where K m is the motor constant, which is a known parameter.Following a procedure similar to that given by Omar [29], we write the regression form of Eq. ( 21) with a sampling frequency T s as where and define the discrete acceleration and velocity as Using the method of least squares, we calculate the unknown parameter vector Θ from where and n is the number of samples.
To apply the estimation technique, we stabilize the system using a PD controller.Then, a persistent excited reference is applied.The output is filtered and then used to estimate the unknown parameters using Eq.(25).

Controller design
The block diagram of the anti-swing controller for the translational motion is shown in Fig. 4. The controller consists of two parts: a tracking controller and an anti-swing controller.The function of the tracking controller is to make the trolley follow a prescribed trajectory, while the anti-swing controller function is to damp the load swing.The tracking controller gains are first chosen to obtain good tracking, and then the anti-swing controller gains are determined to obtain good load-swing damping, thereby ensuring the stability of the system.The system stability is determined from the characteristic equation The design of the tracking controller is based on the position Eq.( 6).We choose to use a PD controller for its simplicity.The control action determined by this controller is where e represents the position error, which is determined from ē = x ref − x.The corresponding transfer function is given by The controller gains K px and K dx are chosen to achieve good tracking of the trajectory without inducing an overshoot (i.e., critically damped system).The tracking accuracy increases as K px increases.For a critically damped system, the derivative gain is related to the proportional gain by In the following analysis, we use K px = 100 and K dx = 20.

Trajectory design
The trajectory can be designed using an input shaping technique, which takes into account load-swing suppression.However, the resulting trajectory requires longer time [6].We rely on the anti-swing controller to suppress the load oscillations and design the trajectory to achieve optimal time.The optimal-time solution of a rigid-body motion subjected to acceleration and velocity constraints is a rectangular "bang-bang" input.For sufficiently long motion, such that the maximum velocity can be reached, the acceleration input and velocity profiles are shown in Fig. 5.The final time to travel a distance Z is computed as

Anti-swing controller
The objective of the anti-swing controller is to damp the load oscillations described by the swing equation which has no damping.A damping term can be added by a proper feedback of the swing angle and its rate using many techniques, such as classical, fuzzy, and delay control.

Time-delayed feedback
Instead of using the swing angle and its rate in the feedback, a delayed swing angle alone can do the same task.In this case, the anti-swing controller is given by The characteristic equation of the system can be written as To calculate the damping as a function of the controller parameters K del and τ del , we use the Pade approximation This approximation improves as l increases; l = 20 was found to be adequate.The damping ratio is determined from the dominant complex poles.Figure 6 shows the damping ratio as a function of the delay-controller parameters.It is found that the maximum damping ratio obtained from this controller is nearly 0.45, which occurs at K del = −90 and τ del = 0.1.The delayed feedback controller can be applied in another configuration, as shown in Fig. 7 [9].The output from the anti-swing controller in this case represents a correction to the position trajectory.The characteristic equation of this system is given by Following a procedure similar to that used above, we show the damping ratio map for this controller in Fig. 8.The maximum damping ratio obtained from this controller is nearly 0.3, which occurs at K del = 0.33 and τ del = 0.31.The PD controller can be used instead of the delay controller for controlling the swing.The damping ratios obtained using the PD controller are nearly the same as those obtained using the first delay controller, which are higher than those obtained using the second delay controller [29].The delay controller has an advantage over the PD controller in that the swing rate is not to implement the controller.

Fuzzy logic controller
Fuzzy control can also be used to design the anti-swing controller.The fuzzy controller consists of a set of linguistic rules [22].To implement these rules, we fuzzify the control inputs (φ, φ) according to fuzzy membership functions, Fig. 9.Then, the output of this process is used by an inference system to determine the control output according to fuzzy rules.This process gives a control action in a fuzzy form, which is then converted to a crisp value suitable for operating the actuator by a process called defuzzification.Figure 10 shows the configuration of the fuzzy controller.Usually, the fuzzy variables (φ, φ, V s ) are normalized using the scaling factors (K φ , K φ, K V ), respectively.
The question now is how to construct the rule set.The rules can be obtained from an expert operator or by using engineering sense [30].In this work, we use an alternate approach to determine the rules.We map the performance of the anti-swing delay controller proposed by Omar [29]; that is,  The maximum damping obtained from this controller is found to be at K del = −90 and τ del = 0.1.The same procedure can be used for mapping other controllers or the performance of a skilful operator.
To generate the rules, we need to choose the scaling factors.If we consider φ max = 10 o = 0.174 rad is the maximum swing angle, the scaling factors determined from the delay controller are We run the system using the delay controller with the initial swing, say φ o = 10 o , and obtain the input and output from the anti-swing controller.These data are normalized using the scaling factors by multiplying the inputs by K φ and K φ and dividing the output by K v .The normalized data are denoted by x 1 , x 2 , and y, respectively.During this mapping process, we use the membership functions shown in Fig. 9 with a = 1/3 and b = 2/3 for all variables.For each data sample x 1 (i), x 2 (i), and y(i), we determine the degrees of membership in different regions.For example, x 1 = 0.2 has 0.4 degree in ZO, 0.6 degree in PS, and zero degree in all other regions.Similarly, x 2 = −0.6 has 0.8 degree in NM, and 0.2 degree in NS, and y = 0.9 has 0.3 degree in PM and 0.7 degree in PB.For each data pair, we can construct a maximum of four rules.
Since there are many data pairs and each pair may generate four rules, it is highly probable that there will be some conflicting rules; that is, rules that have the same 'if part' but a different 'then part'.One way to resolve this conflict is to assign a degree to every rule generated from data pairs and accept only the rule from the conflicting group that has maximum degree.The degree D(Rule) of each rule can be determined from the product of the degrees of membership.For example, the degree of the rule (if x 1 is ZO and x 2 is NM then y is PB) is The above steps are repeated for different initial swing angles and transfer distances Z x to completely fill the fuzzy-rule table.The generated fuzzy rules and the corresponding degree of membership of each rule are shown  in Table 1.We can add another step in designing the FLC to improve its performance by a proper tuning of the parameters of the membership functions (i.e., a and b).Optimization techniques can be used to obtain the optimum values for these parameters.We found good agreement between the numerical simulations and the experimental results.Therefore, we show only the experimental results in the following section.

Experiment
To validate the designed controllers, a tower-crane model as shown in Fig. 11 was built at Virginia Tech.The control algorithms are implemented on a PC using C++.An interfacing board (IB) is used to link the computer with the tower-crane system, as shown in the experimental setup diagram in Fig. 12.The tower crane is composed of a trolley assembly moving horizontally on a leadscrew, which is driven by a brushless servomotor.The leadscrew has a pitch p = 0.5 in/rev.The jib assembly rotates on a rotating table with gear ratio n = 45.A servomotor drives the rotating table.Each motor has an optical encoder with a resolution of 2000 lines/rev.These encoders measure the positions of the motor, which in turn are sent to the IB.The load-swing angles are measured by two optical encoders with a resolution of 6000 lines/rev.A sampling frequency of 100 Hz is used.

Friction coefficients estimation
To estimate the friction coefficients of the translational motion, we command the trolley to follow the reference signal We use a PD controller to stabilize the system [2].The estimated friction parameters are b To reduce the effect of the trolley on the rotational motion, we placed it near the rotation axis of the crane.Then, the crane was commanded to rotate and follow a trajectory given by Following a procedure similar to that used in the translational motion, we estimated the following friction parameters:

Anti-swing fuzzy-logic controller
To validate the anti-swing controller and the friction-compensation algorithm, we used three maneuvers.First, a gantry crane was considered, where the trolley was commanded to transfer a load to a certain position without rotating the jib.In the second maneuver, the trolley was placed at a certain position, while the crane was commanded to rotate to a certain angle.The third maneuver combined both of the translational and rotational motions.The response due to the translational motion only using a trajectory given by with and without friction compensation is shown in Fig. 13.The responses of the fuzzy and the delay controllers are nearly similar.This similarity is expected because the fuzzy controller is a mapping of the delay controller.
In contrast with the delay controller, the fuzzy controller does not have any delay.Both controllers successfully transferred the load to its final destination without residual oscillations.Although we designed the final time of the trajectory to be equal to only one period of the load swing, the real final time approaches three periods due to the effect of the load-swing control.For the same reason, the system response exhibits an overshoot.This overshoot increases with increasing trajectory acceleration.The maximum acceleration should be chosen properly.Otherwise using high acceleration would lead to an increase in the overshoot and the swing angles while system settling time would remain the same [29].Without friction compensation, the system would have a high steady-state error and a high load swing, and hence it would take a long time to damp.When friction compensation was turned on, the system reached its destination nearly without steady-state error and the load swing was suppressed successfully.The residual oscillations in the swing angles were very small and they would hardly be observed in reality.These oscillations do not appear in the computer simulations and they are mainly due to the residual friction which could not be removed completely by the friction compensation.The response of the system for the second maneuver for a trajectory given by Z γ = 90 deg, ∆t γ = T 2 , t fγ = 2T ⇒ V maxγ = 1.0435/2, a maxγ = 2.0796/4 (44) is shown in Fig. 14.The deterioration effect of friction was higher in the translational motion than in the rotational motion.However, friction compensation allowed the system to reach its final destination accurately without load swing.Although we only commanded the crane to rotate, the translational motion was excited due to the coupling between the two motions.The residual swing angles were smaller when using the fuzzy controller while the settling time was nearly the same when using the delay controller.The offset in the swing angles is due to the initialization of the incremental encoders used in the experiment.This small offset may affect slightly the steady-state error in the trolley and tower positions.This problem can be solved by using absolute encoders.The response of the system for the third maneuver using the trajectories given by Eqs (43) and ( 44) is shown in Fig. 15.The delay controller with friction compensation successfully transferred the load to its final destination, while the swing was completely suppressed.We note that the swing angles and the overshoots are higher in this maneuvers compared with the previous maneuver due to interaction between the translational and rotational motions.The maximum acceleration of the trajectories could be reduced to make the swing angles and the overshoots within acceptable limits.

Summary
The designed anti-swing controllers with the tracking controller reduce the swing angles in tower cranes for a wide range of cable lengths and loads.The controller is closed-loop, and hence it is suitable for disturbance rejection and is insensitive to changes in the system parameters.The mapping method used for generating the rules can be applied to automatically mimic the performance of an expert operator.The experimental results show that the controller is effective in reducing load oscillations and transferring the load in a reasonable time.The reference-trajectory parameters should be chosen properly to minimize the load oscillation and the transfer time.The proposed frictioncompensation technique is an effective approach for reducing the effect of friction in mechanical systems.Moreover, control algorithms based on frictionless systems can be applied practically without modifications.The anti-swing fuzzy-controller performance can be improved by a proper tuning of the parameters of the membership functions.Optimization techniques can be used to obtain the optimum values for these parameters, which will be the topic of future research.

Fig. 6 .
Fig. 6.The damping map of the first delay controller.

Fig. 11 .
Fig. 11.The tower-crane model used in the experiment.

Table 1
The generated fuzzy rules