Active sway control of a gantry crane using hybrid input shaping and PID control schemes

This project presents investigations into the development of hybrid input-shaping and PID control schemes for active sway control of a gantry crane system. The application of positive input shaping involves a technique that can reduce the sway by creating a common signal that cancels its own vibration and used as a feed-forward control which is for controlling the sway angle of the pendulum, while the proportional integral derivative (PID) controller is used as a feedback control which is for controlling the crane position. The PID controller was tuned using Ziegler-Nichols method to get the best performance of the system. The hybrid input-shaping and PID control schemes guarantee a fast input tracking capability, precise payload positioning and very minimal sway motion. The modeling of gantry crane is used to simulate the system using MATLAB/SIMULINK software. The results of the response with the controllers are presented in time domains and frequency domains. The performances of control schemes are examined in terms of level of input tracking capability, sway angle reduction and time response specification.


Introduction
Cranes are commonly employed in the transport industry for the loading and unloading of freight, in the construction industry for the movement of materials and in the manufacturing industry for the assembly of heavy equipment. In addition, crane is important as a lifting machine, generally equipped with wire ropes or chains and sheaves, which can be used to lift and lower materials vertically and horizontally. It used one or more simple machines to create mechanical advantages and thus move loads beyond the capability of a human.
There are numerous efforts in controlling gantry cranes have been proposed. For instance, fuzzy logic controller has been proposed for controlling the gantry crane system [1][2]. Nevertheless, the fuzzy logic controller design is sophisticated in finding the membership function, satisfactory rules, fuzzification and deffuzification parameter heuristically.
Several researches based on open-loop and closed-loop control schemes have been done for controlling the gantry crane system. For example, open loop time optimal strategies were implemented to the gantry crane system [3]. Unfortunate results were found in these researches because open-loop method could not compensate for the effect of wind disturbance and sensitive to the system parameters. While, closed loop control method has also been adopted for controlling the crane system. For example, PD controllers has been proposed for both position and anti-swing controls [4]. However, the performance of the controller is not very effective in eliminating the steady state error. In this study, input shaping is implemented by convolving a sequence of impulses, an input shaper, with a desired system command to produce a shaped input that produces self-canceling command signal [5]. Input shaper is designed by generating a set of constraint equations which limit the residual vibration, maintain actuator limitations, and ensure some level of robustness to modeling errors [6]. In the input shaper, the amplitudes and time locations of the impulses are determined by solving the set of constraints [7]. On the other hand, feedback control which is well known to be less sensitive to disturbances and parameter variations is also adopted for controlling the gantry crane system [8].

Modeling of Gantry Crane System
The two-dimensional gantry crane system with its payload considered in this work is shown in figure  1, where x is the horizontal position of the cart, L is the length of the rope, θ is the sway angle of the rope, M and m is the mass of the cart and payload respectively. In this simulation, the cart and the payload can be considered as point masses and are assumed to move in two-dimensional, x-y plane. The tension force that may cause the hoisting rope is also ignored. In this study the length of the cart, L = 0.5 m, M = 2.49 kg, m = 0.5 kg and g = 9.81 m/s2 is considered. The Euler-Lagrange formulation is considered in characterizing the dynamic behavior of the crane system incorporating payload. The kinetic and potential energy of the whole system is given by Eq. (1): The potential energy can be formulated by Eq. (2): (2) Using Lagrange equation in Eq. (3-6):  (7): where M : mass of the trolley (kg) m: mass of the payload (kg) L : length of rope (m) g : gravity acceleration (m/s²) : angle of load swing (rad) ̈ : acceleration of trolley (m/s²) : angular acceleration of the load swing (rad/s²) The Eq. (7) is in nonlinear function, it can't be used easily for the purpose of analysis, design and other. In order to get a linear model, linearization must be implemented in the above model. The following condition will satisfy the aim: ̇ The linear model of the uncontrolled system can be represented in a state-space form as shown in equation by assuming the change of rope and sway angle are very small.
The state space of gantry crane is represents in Eq. (8-10).

Input Shaping Control Schemes
The design objective of input shaping is to determine the amplitude and time locations of the impulses in order to reduce the detrimental effects of system flexibility. These parameters are obtained from the natural frequencies and damping ratios of the system [9]. Figure 2 shows summarized of positive input shaping techniques. The corresponding design relations for achieving a zero residual single-mode sway of a system and to ensure that the shaped command input produces the same rigid body motion as the unshaped command yields a two-impulse sequence namely positive zero-sway (PZS) with parameter as shown in Eq. (11). , where √ √ √ ( ) and ζ representing the natural frequency and damping ratio respectively and tj and Aj are the time location and amplitude of impulse j respectively. This yields a three-impulse and four-impulse sequence namely Positive zero-sway-derivative (PZSD) and positive zero sway-derivative-derivative (PZSDD) with parameter as shown in equations (12)

PID Control Schemes
Proportional Integrated Derivative (PID) control is the most popular feedback controller used within the process industries involved in controlling the crane position. PID also provides a constant system output at a specified set point. The desired closed loop dynamics is obtained by adjusting the three parameters such as Proportional gain (K P ), Integral time (T i ) and Derivative time (T d ), often iteratively by "tuning" and without specific knowledge of a plant model. Stability can often be ensured using only the proportional term. The integral term permits the rejection of a step disturbance. The derivative term is used to provide damping or shaping of the response. The PID control scheme is named after its three correcting terms, whose sum constitutes the manipulated variable (MV) as shown in figure 3. For the Ziegler-Nichols Frequency Response Method, the critical gain, Kcr and the critical period, Pcr have to be determined first by setting the Ki = and Kd = 0. Increase the value of Kp from 0 to a critical value, adjust gain to make the oscillations continue with a constant amplitude as shown in figure 3, the value of Kcr is at which the output first exhibits sustained oscillation. Table 1 shows the formula of PID controller tuning parameters for the second method of Ziegler-Nichols. Block diagram of hybrid input shaping and PID control scheme is shown in figure 5.

Figure 4.
Step Response for Critical Period.

Results and Discussion
In this investigation, hybrid input shaping and PID control schemes are implemented on gantry crane system and the corresponding results are presented. The bang-bang input voltage of ±1.5V is applied to the gantry crane system. To study the effectiveness of sway suppression, PZS, PZSD and PZSDD shapers with PID controller are designed based on the sway frequencies and damping ratios of the gantry crane system. The first mode, sway of the system is considered, as these dominate the dynamic of the system. The responses of the gantry crane system to the unshaped input were analyzed in timedomain and frequency domain (spectral density). These results were considered as the system response to the unshaped input and will be used to evaluate the performance of the input shaping schemes.   Figure 7 shows the comparison of sway angle of the pendulum between hybrid PID control schemes with PZS, PZSD and PZSDD shaper. It is noted that the level of sway angle was significantly reduced with the increasing of positive input shaping derivative order. Based on the result, highest levels of sway reduction were obtained using PZSDD shaper followed by PZSD and PZS shaper scheme. This is evidenced in the pendulum sway angle responses. The magnitude of sway angle was achieved as rad, rad and rad for the hybrid PID control schemes with PZS, PZSD and PZSDD shaper respectively.   By comparing the result presented in table 2, it is noted the highest performance in the reduction of the sway of the system is achieved using hybrid input shaping and PID control schemes. The result shows that, highest level of sway reduction is achieved using PZSDD with PID control schemes followed by PZSD and PZS.   The time response specifications of rise time, settling time and overshoot of the cart position for hybrid input shaping and PID control schemes are depicted in Table 3. For comparative assessment, it shows that the speed of the system response can be improved by using a lower number of impulses compared to the highest number of impulses. It is noted that the combination of feed-forward and feedback controllers are capable of reducing the system sway and at the same time maintaining the steady state position of cart.

Conclusion
At the end of this project, active sway control of gantry crane by using hybrid input shaping and PID control schemes has been presented. The main objective in this project which is to reduce the sway of the gantry crane system had been implemented. The effects of the difference derivative order of the positive input shaping in term of a level of sway reduction and time response specification have been studied. Moreover, the hybrid PID controller and input shaping schemes with higher number of impulses provide a high level of sway reduction. However, in terms of speed of the responses, the input shaping with a low number of impulses, results in a higher speed of tracking response. In overall, the combination feed-forward and feedback controller based on hybrid input shaping and PID control schemes provide better performance in sway reduction as compared to the uncontrolled techniques in the overall.