Payload swing control of a tower crane using a neural network–based input shaper

This paper proposes an input shaping technique for efficient payload swing control of a tower crane with cable length variations. Artificial neural network is utilized to design a zero vibration derivative shaper that can be updated according to different cable lengths as the natural frequency and damping ratio of the system changes. Unlike the conventional input shapers that are designed based on a fixed frequency, the proposed technique can predict and update the optimal shaper parameters according to the new cable length and natural frequency. Performance of the proposed technique is evaluated by conducting experiments on a laboratory tower crane with cable length variations and under simultaneous tangential and radial crane motions. The shaper is shown to be robust and provides low payload oscillation with up to 40% variations in the natural frequency. With a 40% decrease in the natural frequency, the superiority of the artificial neural network–zero vibration derivative shaper is confirmed by achieving at least a 50% reduction in the overall and residual payload oscillations when compared to the robust zero vibration derivative and extra insensitive shapers designed based on the average operating frequency. It is envisaged that the proposed shaper can be further utilized for control of tower cranes with more parameter uncertainties.


Introduction
Nonlinear systems having flexible dynamics such as cranes are widely used in industries. However, controlling these systems is challenging as most of them are underactuated having lower number of actuators than degree of freedom. Cranes are frequently used in various industries such as factories, shipyards, construction sites and nuclear power plants usually for transportation of heavy loads from one place to another. 1 Among the cranes, a tower crane is widely used at construction sites particularly for high-rise buildings. To increase the production rate, the tower cranes are required to have a fast motion and with a low payload swing. Excessive swing may bring a safety issue which may be harmful to humans and environment. However, for a tower crane with simultaneous radial and tangential motions, the payload significantly swings during operations and the swing is in a circular motion. Moreover, a payload hoisting operation which is essential in payload transportation resulted in changing the cable length and affects the crane dynamics. Therefore, control of a tower crane with highly nonlinear characteristics is difficult, and an efficient control algorithm is required especially for the payload swing control.
A plenty of work has been reported for control of tower cranes which can be categorized into feedforward and feedback control approaches. The feedback control approach uses measurements or estimation of system states and changes the actuator input accordingly for control of the motions together with the payload sway. Several approaches in feedback control that have been implemented were nonlinear control, 2,3 sliding mode control, 4-6 adaptive control, 7,8 energy-based control, 9 robust control 10,11 and fuzzy logic control. 12 On the other hand, with feedforward control, various strategies have been investigated for payload swing control of tower and rotary cranes. These include input shaping, 13,14 filters 15 and command smoothing. [16][17][18] As reported in the review paper, 1 a large number of publications focused on design and implementation of the feedforward strategies on gantry and overhead cranes as compared to the tower and rotary cranes. In contrast to the gantry and overhead cranes, the effects of nonlinearities in a tower crane are more substantial due to the rotational motion. 19 The payload swing is induced by simultaneous radial and tangential motions resulting in a circular type of oscillation. Therefore, designing of feedforward controllers for the payload oscillation reduction is more challenging and further investigations are required.
Design of input shaping that involves finding amplitudes and time locations of impulses requires prior knowledge of the system's natural frequency and damping ratio. Therefore, the shaper design for effective payload swing control is highly dependent on obtaining an accurate dynamic model. One of the simplest input shaper is a zero vibration (ZV) shaper, and this shaper has been previously implemented on a tower crane. 20 However, this type of shaper is sensitive to parameter variations, and small errors in the measurement or estimation of the system parameters may lead to inefficient performance or even results in a higher oscillation. 1 To increase robustness, several shapers have been proposed and designed which include zero vibration derivative (ZVD), zero vibration derivative-derivative (ZVDD) and extra insensitive (EI). However, improvements of these shapers by increasing the number of derivatives lead to a longer shaper duration and consequently a slower response. 21 One of the main issues in designing input shapers is to include an adaptive mechanism to control oscillatory systems with changing dynamics. A conventional input shaper is unable to provide a significant oscillation reduction with different cable lengths of crane, 22 as the natural frequency is highly dependent on the cable length. In order to cater for changing natural frequency due to different cable lengths, a shaper designed based on the average operating frequency (AOF) was proposed in Singhose et al. 23 Investigations showed that the AOF-based shapers provided a better performance when compared to the conventional shaper under payload hoisting. Recently, a unity magnitude zero vibration (UMZV) shaper that can be updated based on varying cable length was designed by using the artificial neural network (ANN). 24 The approach was implemented on an overhead crane and showed promising results in reduction of payload oscillation. It will be interesting to investigate the approach on a tower crane which poses higher nonlinearities and with circular type of payload oscillation. In addition, it was found that research work on the implementation of command shaping on a tower and rotary cranes is limited.
In this paper, a ZVD shaper that can adapt to the different cable lengths is proposed for efficient payload swing control of a tower crane with changing natural frequency and damping ratio. ANN is used to predict the optimal shaper parameters based on a nonlinear input and output mapping of the crane dynamics. To investigate the real-time implementation and performance of the proposed shaper, experiments on a laboratory tower crane are carried out. The performance analyses are conducted based on the level of overall and residual payload oscillations of the crane during simultaneous translational and rotational motions with various cable lengths. To further verify the effectiveness of the shaper, performance comparisons with a robust ZVD shaper and a robust EI shaper designed based on the AOF are also performed.

Dynamic model of a tower crane
A tower crane consists of a long jib which is attached to a high vertical mast, and a trolley which is attached to a payload through an inextensible cable. The jib is capable to perform slew motion along the mist, while the trolley can traverse along the length of the jib. The radial motion of the jib with tangential motion of the trolley enables the crane operator to place a payload in a three-dimensional space within the crane dimensions. However, significant payload oscillations in a circular motion is induced during the crane motion. Figure 1 shows the schematic diagram of a tower crane with payload oscillations. The pendulation of payload is described by the in-plane angle f and out-of-plane angle u. The angle f is described by the z-axis in the xz-plane, while u is the angle that cable makes with the xz-plane.
The position of the payload with a cable length L can be expressed as where P x , P y and P z are the payload positions with respect to the x, y and z-axes. With r(t) as the distance of the trolley from the tower andx,ŷ andẑ are the unit vectors along x, y and z-axes respectively, the position of payload P(t) at any instant of time can be calculated by using equations (1), (2) and (3) as Subsequently, the velocity of the payload _ PðtÞ can be obtained as and _ g is the angular velocity of the jib. Solving equation (5) yields the payload velocity as The kinetic energy K E of the payload can be calculated as where m is the payload mass. On the other hand, the potential energy P E of the payload can be obtained as where g is the gravitational force acting on the payload. The dynamic equations of the payload pendulation can be obtained by using the Lagrange equation where L = K E À P E is the Lagrangian operator and q v (v = 1 or 2) represents the u and f angles. Assuming that the length of the cable is inextensible that is dL=dt = 0 and solving equation (10) yields the nonlinear differential equations as Equations (11) and (12) demonstrate that the payload pendulation angles are highly nonlinear and they are coupled. Therefore, payload swing control of both angles is challenging. Two inputs are required for tangential and radial motions of the tower crane to place a payload at a desired location. Designing an effective feedforward controller for reducing the payload sways will greatly help in reducing complexity of a feedback controller to achieve both accurate crane positioning together with low payload oscillation.

Input shaper design
Input shaping is a feedforward control technique used to minimize the input-induced oscillations particularly in lightly damped structures. Theoretically, zero residual vibration is obtained by a constructive cancellation of two or more inputs excited transient oscillation. Input shaping is implemented on actual systems by convolving a sequence of impulses having specific delays and magnitudes with a baseline reference command. The shaped command is then excited into the system in a feedforward control structure to obtain a system response without vibration.
The simplest form of input shaper is ZV with two impulses. In order to increase the robustness of the ZV shaper, a shaper with an added constraint was proposed namely ZVD with three impulses. The amplitudes A i and the time locations t i of the ZVD shaper can be obtained using v and z are the natural frequency and damping ratio of the system. Figure 2 shows a graphical representation of the ZVD shaper with three impulses. The time for the first impulse is always at t = 0 to ensure a response without delay. The ZVD shaping process which involves convolving the impulses with an input command is as shown in Figure 3(a). The process can also be implemented by multiplying the input command with the calculated magnitude of impulses and subsequently adding delays to the second and third signals as shown in Figure 3(b). The resultant shaped command is then used in an openloop configuration as the input to the system. As the ZVD shaper is designed by using equation (13), their parameters are fixed based on the natural frequency and damping ratio. Therefore, this type of shaper is unable to handle systems with varying dynamics where the shaper parameters need to be updated. 24

ANN-based ZVD shaper
The ANN emerges as one of the prominent techniques used for controller parameterization. 25 The ANN is a combination of interconnected neurons having the functionality that resembles with the human brain. It is widely used by researchers particularly for nonlinear systems, due to its ability to map relationship between dependent and independent variables and its capability to be used for systems with unknown model and dynamics. 26 As the input shaping technique is derived based on a second-order linear system, their ability to suppress payload swing is adversely affected when used for a tower crane with significant nonlinear behavior. In addition, with different cable lengths and changing dynamics of tower crane, the shaper parameters need to be updated to ensure a similar performance in the reduction of the in-plane and out-of-plane oscillations. In this case, ANN can be utilized to obtain optimal parameters based on different cable lengths as it can provide mapping of nonlinear behavior between the input and output. The mapping is done by a training process based on collected input and output data.
In this work, the adopted ANN structure is based on the feedforward neural network which comprises of one input neuron, 10 hidden neurons and six output neurons as depicted in Figure 4. The input, hidden and output layers are denoted by indices i, j and k respectively. Outputs of the input neuron and the hidden neurons are connected to the hidden and output neurons through weights w j,i and w k,j respectively. The input to the ANN is the cable length and is distributed to all the neurons of the hidden layer. Sigmoid is used as the activation function in this neural network.   The output of the hidden layer can be calculated by where u is the number of input neurons, x i represents the output of input neuron i and w j,i is the weight of the link between the hidden layer neuron j and the input neuron i. The value of bias at jth hidden neuron is represented by b j . On the other hand, the output of the output layer neuron k can be calculated as where n represents the number of neurons in the hidden layer. The weight of connections between the output layer neuron k and the hidden layer neuron j is represented by w k,j , while x j is the output of the hidden layer neuron j and c k is the bias value at the output neuron k. The actual implementation of the ANN-ZVD shaper is shown in Figure 5, where the ANN is used to update the parameters of the two ZVD shapers based on the cable length of the crane system. To determine the optimal parameters of the ZVD shapers for different cable lengths, several observations are required for the development of ANN. Table 1 show the collected experimental data with the cable length between 0.1 to 0.6 m for the training, testing and validation of the ANN. Training of the neural network was done by using 70% of total data while 15% data  were used for each testing and validation of ANN. The weight and bias values of the ANN were calculated by using the Bayesian regularization approach due to its ability to deal with nonlinear and noisy systems.
The data were collected under the conditions that the tower crane will execute two simultaneous motions (tangential and radial motions) while the length of the cable attached to the suspended payload remains the same throughout the motion. Two separate ZVD shapers need to be designed for reduction of oscillations of both motions. It is noted from Table 1 that for both ZVD shapers, A 2 has the same magnitude for all lengths and since DT 2 is multiple of DT 1 , the ANN was used to generate three parameters for each ZVD shaper which are A 1 , A 3 and DT 1 to reduce the computational time and to improve its performance. The weights of neurons between hidden layer and input layer w j, 1 are shown in equation (18), whereas equation (19) shows the weights for w 1, j and w 6, j as examples extracted from w k, j . Table 2 shows the bias values of the hidden and output neurons, obtained through ANN training data in Table 1.

EI shaper
Design of a ZVD shaper to improve the robustness of ZV shaper results in a longer shaper duration by 0.5 vibration period and produces a slower response. To address this issue, another shaper was proposed in Singhose et al., 27 in which a constraint is applied to limit the vibration instead of forcing the system to achieve ZV. This shaper provides extra robustness against the error in estimating natural frequency and damping ratio. This type of shaper with a single hump is called EI shaper and has the same duration as that of the ZVD shaper but with added robustness. The EI shaper is implemented by using three impulses having the same time locations as the ZVD shaper but with different amplitudes. The values of amplitude and time location of impulses can be obtained as 28 where V tol is the tolerable vibration level and is usually considered as 5% or 0.05. The EI shaper has an advantage over the ZVD and ZV shapers that it has the same impulse duration as that of ZVD but is more insensitive to parameter variation. 29,30 The shaper has been implemented for vibration reduction of various flexible systems and has been shown to provide a higher robustness when compared with the ZV and ZVD shapers. 31  ZVD parameters for tangential motion ZVD parameters for radial motion

Implementation
This section presents real-time implementations of the proposed ANN-ZVD, AOF-EI and AOF-ZVD shapers. The performance of each shaper was investigated and compared in terms of the overall and residual payload oscillations, in the x and y-axes with simultaneous tangential and radial motions. Figure 6 shows a laboratory tower crane used for the experimental verification of the proposed controller. The main components of the tower crane are shown including the mast, trolley, jib, cable and payload. The dimensions of the length, height and width of the tower crane are 1.2 m 3 1.2 m 3 1.5 m, and the payload mass is 300 g. The motions of the jib, trolley and payload are actuated through three DC motors. The crane is equipped with five encoders, in which two encoders are used to measure the trolley and jib positions in the polar plane, two encoders for measuring the payload oscillation angles and one encoder for measuring the length of the cable attach to a payload. The measuring encoders have the resolution of 4096 pulses per rotation that enable it to measure the payload oscillation with a high accuracy of 0.0015 rad. Data from all encoders are transmitted online to a computer through the Peripheral Component Interconnect (PCI) card, and the real-time control is realized through MATLAB and Simulink. Due to the limitation of the tower crane, cable lengths between 0.1 to 0.6 m were considered in this work. Based on several experiments and by using the logarithmic decrement approach, it was found that within this range, the natural frequency of the payload along the x and y-axes were between 6.1 to 3.59 rad/s and 5.98 to 3.63 rad/s respectively. Therefore, the AOFs for the crane were 4.85 and 4.81 rad/s which correspond to the cable length of 0.25 m.
Two inputs are used to excite the tangential and radial movements of the crane system. As the input shaping technique is only used to control the payload oscillation, appropriate inputs are required to achieve acceptable crane motions for the purpose of performance investigations of the controllers. Based on the physical limitation of the tower crane, as well as the requirement for simultaneous motions of the trolley displacement and jib rotation, pulse inputs with magnitude of 0.5 Nm and periods of 2.5 and 2 s for the tangential and radial motions respectively were used in this work. With a cable length of 0.25 m, the trolley moved to 0.363 m along the jib with the jib angular rotation of 48 degrees as shown in Figure 7. Payload pendulations in the x and y-axes resulting from the motions is shown in Figure 8. These are later considered as the responses to the unshaped input. It is revealed that the crane suffers from significant payload oscillations during the motions with the maximum oscillations of 6.5 and 10 degrees along x and y-axes respectively. The oscillation frequencies were obtained as 4.85 and 4.81 rad/s with L = 0:25 m.
In this work, performances of the shaping techniques were analyzed in terms of overall and residual payload oscillations in both directions. In this case, the mean square error (MSE) was used as the performance index to demonstrate the amount of oscillations in which a lower MSE is desirable as this indicates low oscillation. The MSE for 10 s was calculated for the overall oscillation, whereas the MSE for the response after 9 s is used for the residual swing.
The average frequencies (4.85 and 4.81 rad/s) were used in designing the robust AOF-EI and AOF-ZVD shapers. For the EI shaper, V tol of 5% was chosen in this work. Figure 9 shows the open-loop configuration for the implementation of these shapers for payload oscillation reduction of the tower crane. To verify the robust performance of the shapers, experiments were conducted under three scenarios with different cable   lengths. The considered lengths were 0.14, 0.375 and 0.56 m which correspond to 20% increase, 20% decrease and 40% decrease in the natural frequency respectively, when compared to the nominal length of 0.25 m. For the ANN-ZVD shaper, the optimal ZVD parameters for the considered lengths were obtained with the ANN, by using the weight values described in equations (18) and (19) and bias values in Table 2. The process is also shown in Figure 5.

Experimental results
This section presents experimental results with the shapers for the three scenarios of cable lengths. With the same inputs as in the ''Implementation'' section, Figures 10 and 11 show the payload pendulations using the shapers along the x and y-axes with a cable length of 0.14 m (20% increase in the natural frequency) respectively. Similarly, Figures 12 and 13 show the     payload pendulations with 20% decrease, and Figures  14 and 15 show the results with 40% decrease in the natural frequency. The oscillation responses in both directions demonstrate that the proposed ANN-ZVD provided the highest oscillation reduction when compared to the AOF-ZVD and AOF-EI shapers. In addition, the ANN-ZVD shaper resulted in the lowest residual swing and converged to less than one degree in all scenarios.
The MSE values for the overall oscillations in the x and y-axes are summarized in Table 3. It can be revealed that the ANN-ZVD has the highest robustness, as the shaper provided the lowest oscillations when the natural frequency was reduced up to 40%. The percentage improvements obtained with the proposed shaper as compared to the AOF-ZVD and AOF-EI shapers are presented in Figure 16. For the extreme case of 40% decrease, the ANN-ZVD provided    improvements of 49.82% and 70.75% in x-axis and 66.52% and 71.62% in y-axis oscillations as compared to the AOF-EI and AOF-ZVD respectively. Moreover, except for the case with 20% increase in y-axis, all the improvements under the three scenarios were between 35% to 70%.
The MSE values for the residual swing are summarized in Table 4. It is clearly noted that the ANN-ZVD provided the lowest values when compared to other shapers in both directions, indicating the highest robustness of the proposed shaper as shown in Figure  17. For the case with 40% decrease in the natural frequency, the residual swing was improved by 78.92% and 82.27% in x-axis and by 90.18% and 92.71% in y-axis as compared to the AOF-EI and AOF-ZVD shapers respectively. In addition of the highest robustness obtained with the ANN-ZVD shaper, the improvements are quite identical for the three scenarios within the range of 50%-100%.
With the simultaneous tangential and radial motions, payload oscillations having both x and y-axes components can also be analyzed for all shapers. In this case, a circular type motion is obtained, and it is desirable to achieve a small oscillation area as this indicates low oscillation in both directions. Figure 18 shows the payload oscillations after 9 s, which is the case used in analyzing the residual swing. It can be clearly shown that the ANN-ZVD shaper provided the smallest area of oscillation. The largest diameters for the circular motions were obtained as 1.06, 4.87 and 5.82 degrees for ANN-ZVD, AOF-EI and AOF-ZVD respectively. These indicate improvements of 78.23% and 81.78% with ANN-ZVD when compared to the AOF-EI and AOF-ZVD shapers.

Conclusion
In this work, an improved ZVD shaper was devised using the ANN for suppressing the payload oscillation of a tower crane with different cable lengths and with simultaneous tangential and radial motions. Through the nonlinear mapping, the proposed ANN-ZVD shaper can predict and update the shaper parameters under different cable lengths, resulting a robust performance.