Automatic parameter selection ZVD shaping algorithm for crane vibration suppression based on particle swarm optimisation


 This work introduces the foundation of a new class of input shaping algorithm, designed based on the particle swarm optimisation. This algorithm is utilised to control the residual vibrations in the crane system. The motivation is the development of simple algorithms and architecture for controlling the motion in under-actuated nonlinear systems with minimal modelling effort. By recording the payload swing signal of the crane only once, the approach can automatically calculate the optimisation amplitude and time locations of the impulses required by a common zero-vibration-derivative (ZVD) technique. In this work, we use this algorithm to design a ZVD shaper for controlling the motion of an under-actuated nonlinear crane model system. We validate the approach using experiments. If this algorithm is implanted into the embedded system and applied to the actual crane, which will solve the problem of the traditional ZVD parameter adjustment and improve the vibration suppression effect of the ZVD Algorithm.


Introduction
Cranes have been a critical component of many industries. There have been dramatic improvements in crane payload capacity during their history [1], but one major problem is shared between today's cranes and the cranes of centuries ago: payload oscillation. To solve the problem, some efficient vibration suppression algorithms have been developed. As one of the most efficient algorithms, input shaping had been used for vibration suppression of crane from 2000s [2,3]. The algorithm was proposed to reduce vibration by slightly modifying the reference command through convolution of it with a series of impulses. Until the early 1990s, Signer et al. improved the robustness of this method, which allowed the algorithm to be applied. After that, Singhose, Seering and Singer proposed an extremely insensitive method to improve the robustness of the system [2]. Since then, input shaping has gradually formed a variety of methods. These include negative unity-magnitude (UM) shaping, specifiednegative-amplitude (SNA) shaping, negative zero-vibration (ZV)shaping [4], negative zero-vibration-derivative (ZVD) [5] and shaping and negative zero-vibration-derivative-derivative (ZVDD) shaping.
Input shaping has been applied to a wide variety of cranes [6,7], including bridge, tower and boom crane [8,9]. As an open-loop algorithm, the input shaping algorithm is simple and efficient, and no additional sensors (or estimation algorithms) are needed. But the parameters of input shaping are difficult to determine. For example, there are five parameters to be determined in the algorithm of ZVD shaping, and they are coupled with each other. The best way to find the parameters of ZVD shaping is to build the model of crane system [10,11]. But as an under-actuated system, the dynamics are highly nonlinear and complex [12]. Especially in the actual hoisting, the payload parameters and states are therefore difficult to measure. As a result the difficulty in measuring the payload parameters becomes an even larger problem.
In order to decrease the difficulty of parameter selection, many scholars focus on improving the robustness of input shaping algorithm [13,14]. The robustness of the algorithm is increased by adding constraints, such as ZVDD. However, by contrast, the sensitivity of the algorithm is reduced and the dynamic performance of the system is sacrificed. Therefore, it is more important to find the parameters accurately than to improve the robustness of the input shaping algorithm. Recently, scholars have paid attention to the method of parameter selection of ZVD shaping [10,15]. For instance, Vaughan J. proposed a method of designing input shaping based on the length of suspension cable only, and studied the accuracy of these estimates by simulation and experiment. Ha M. estimated the effect of the natural frequency error for residual vibration of flexible beam in ZV, ZVD and ZVDD shaping. Nonetheless so far, no efficient and accurate method has been proposed.
In this work we use an under-actuated nonlinear crane as the model system, and propose an automatic parameter selection ZVD (APS-ZVD) shaping algorithm based on particle swarm optimisation (PSO). Then, we verified the effectiveness of this algorithm by experiments, where the vibration has been suppressed by 89.85%. The vibration suppression frequency calculated by the APS-ZVD shaping algorithm agreed very well with the resonant frequency of the model system. The APS-ZVD shaping algorithm is simple and efficient, no modelling is required and it is easy to be implemented in engineering.

ZVD shaping algorithm
The principle of the traditional ZVD [16], [17] shaping algorithm is shown in Figure 1. In this algorithm, the speed commands are shaped through convolution of it with three different impulses. The amplitude of these three impulses are defined as A 1 , A 2 , and A 3 , and the time location of these three impulses are defined as t 1 , t 2 , and t 3 , which are shown in Equations 1-7.
where ξ is the damping ratio of the system, and ω is the resonance frequency of the system. Thus, the traditional ZVD shaping algorithm C (t) can be achieved by Equation 7.
The parameters are coupled to each other and all of them are related to ξ and ω of the system. As we know that the system parameter damping ratio ξ is difficult to determine, if the parameters cannot be accurately selected, the vibration suppression effect will be difficult to achieve. Therefore, the key point to solve the problem of vibration suppression of crane is to find a simple and accurate method to select the parameters of traditional ZVD shaping algorithm.

APS-ZVD shaping design
According to the difficulty of parameters selection in the traditional ZVD shaping algorithm, we proposed an APS-ZVD shaping algorithm for crane vibration suppression based on particle swarm optimisation. The APS-ZVD shaping algorithm comprises three parts: signal acquisition, evaluation and particle swarm optimisation, as shown in Figure 1. This algorithm comprises the following steps: 2. A(t) is entered to the transfer function of ZVD input shaper C(t), and output as the suppressed pendulum angles s i (t); 3. The suppressed pendulum angles s i (t) are subtracted by the expected pendulum angle s e (t) (assigned to 0), and the results are denoted as e(t); 4. The e(t) are evaluated by transfer function of evaluation E(t); 5. The evaluated results are feedback to the PSO as the fitness values; 6. According to the fitness values, PSO adjusts the parameters (A i , t i ) of C(t); 7. Repeat steps 2-6 to find the optimal parameters of C(t); 8. Finally, the optimal C(t) is used in front of G(t) with the selected parameters;

Online signal acquisition
We input a square-wave speed signal to the system to let the trolley move for a short time, and collect the pendulum angle during the movement. The speed and acceleration of the trolley's movement should be as large as possible so as to do not damage the system. Because a short-time motion with a large acceleration contains enormous low-frequency vibration energy, under this circumstance the low-order resonance frequency of the system can be fully stimulated. In this way, the pendulum angle can be used to translate the characteristics more accurately.

Offline parameters selection and range determination
As shown in Equations (1-6), there are five parameters to be optimised, A 1 , A 2 , A 3 , t 2 and t 3 . We assume that K = e − ξ π √ 1−ξ 2 and T = π ω √ 1−ξ 2 and then the optimal solution of ZVD input shaper can be obtained by optimising parameters T and K. Determination of parameter ranges significantly influences the speed and accuracy of parameter selection. Since the crane model is a second-order system (no zero poles cancellation), we know that the vibration of the second-order system is determined by pole distribution. The key parameter which determines the distribution of poles is the damping ratio ξ . In the case of ξ = 0, the second-order system is in an underdamped status and the pendulum keeps oscillating. While, when , ξ = 1the second-order system is in a critical damping status, the pendulum does not swing. The swing of the pendulum is an attenuated oscillation, so 0 < <ξ 1. Therefore, the range of parameter K is [0, 1]. Since T = 2π ω , ω = g/l, the swing frequency can be estimated roughly according to the pendulum length. The range of T can be assigned to [0, 2π √ l √ g ].

Evaluation function design
The evaluation function should be able to evaluate the impact of adjustment time, amplitude and overshooting on the crane system. Considering the above factors, the design evaluation function can be written as Equation 8: where, s i (t) is the value of the input signal at time t, s e (t) is the expected value of the signal at t, e (t) is the error between the input signal and the expected signal at time t, M p is the maximum error between the input signal and the expected signal, η 1 and η 2 are the weighted values, and J (t) is the final value of the evaluation function. The integral of e (t) is used to describe the time and average amplitude of adjustment. isM p used to reflect the maximum magnitude of the amplitude. The penalty factors η 1 and η 2 are used to reflect the relation between e (t) and M p . The overshoot can be reduced by increasing η 2 , but the response time will be extended.

Parameter optimisation based on particle swarm optimisation
The particle swarm optimisation algorithm is described as: v k+1 id = ωv k id + c 1 r 1 p k id − x k id + c 2 r 2 p k gd − x k id (9) x k+1 id = x k id + v k+1 id (10) where v k+1 id is the velocity of each particle in the next iteration, v k id is its current velocity, p k id is the personal best particle, and p k gd is the global best particle. Furthermore, x k+1 id represents the new location of the particle, ω represents the inertial weight, which is the effect of the current velocity on the next iteration, and c 1 and c 2 are study factors that represent the information exchange between each particle in the whole population; r 1 and r 2 are acceleration coefficients, which are random numbers that are uniformly distributed in the range of [0,1] and are used to increase the randomness of particle movement. Equation 17 is the fitness function of the PSO. By finding the minimum value of Equation 17, the optimal values of K and T can be reached, and then by putting them back into Equations 7-12, the optimal Ai and ti can be obtained. Finally, the ZVD shaper C(t) can be structured by the optimised Ai and ti, and then be put behind the speed command to suppress vibration by shaping the speed command.
4 Experimental results

Experiment platform
In order to simulate the real crane structure, an experimental platform was built, as shown in Figure 8. The platform comprises a servo motor, a pendulum (14.5 mm) and a payload (0.05 kg). The encoder records the swing angle of the pendulum.  The recorded swing angles of pendulum were input to APS-ZVD (as described in Figure 2). The key parameters of APS-ZVD algorithm K and T are automatically optimised by the PSO algorithm. The initial parameters of PSO are as shown in Table 1. η 2 1 Figure 5 shows the fitness curve of PSO. After 10 iterations, the final fitness value stabilised at 26.68. Compared with 44.6 in the first iteration, the fitness value decreased by 40.17%.
The optimisation curves of parameter K and T are shown in Figure 7. After 18 iterations, K and T are gradually tending to stable, and finally reached to K = 0.8952, T = 0.3626.

Verification of the accuracy of parameters
We put the achieved C(t) in front of the model system to verify the effect of APS-ZVD, the swing angles of pendulum with APS-ZVD and without APS-ZVD as shown in Figure 8. With APS-ZVD, the time to stop swinging is shortened from 7.9 s to 1.26 s, and the maximum swing angle is decreased from 35 • to 6.6 • .
We next quantified the swing energy of the pendulum with and without the APS-ZVD using Equation 13: where e (t) is the difference between the actual swing angle of pendulum and expected swing angle (zero). The results show that the swing energy of pendulum has been decreased from 262.06 to 26.60 with the APS-ZVD. The amplitude of attenuation is 89.85%. We did the Fourier transform for the swing of the pendulum and found the resonance frequency to be 1.4 Hz (shown in Figure 9, blue). We also detected the sensitivity curve of APS-ZVD (shown in Figure 9, green), and found the optimal frequency of the suppression is 1.38 Hz, which is matched very well with the resonance frequency of the pendulum. The Fourier transform for the swing of the pendulum with APS-ZVD is also plotted in Figure 7, shown in the red, where the swing amplitude has been sharply reduced by the order of three.

Verification of the robustness of parameters
In the actual hoisting, usually the position of trolley and the length of cable are changed frequently, which affects the vibration suppression effect. Thus, we changed the pendulum length to detect the suppression effect of optimal parameter found by APS-ZVD, and the results are as shown in Table 2. In Table 2, Pendulum 1 is the original one which is used to generate the optimal parameters. The length of Pendulum 2 is extended by 6.9% compared to 1, and the length of Pendulum 3 is shortened by 13.8% compared to 1. The parameters found by   In the case of Pendulum 3, the pendulum length changed by 13.8% compared to 1; the damping percentage of APS-ZVD shaper can still achieve 62%, and the peak swing angle and the adjusting time of residual vibration did not change significantly. The comparison shows that the robustness of the selected parameters can be ensured by our designed APS-ZVD algorithm.

Conclusions
In this work, an APS-ZVD shaper based on particle swarm optimization algorithm has been put forward.
The key advantage of this algorithm is that by collecting the swing angle of the crane system once, the algorithm can calculate the ZVD parameters automatically. The experimental results show that the central suppression frequency of APS-ZVD matched very well with the resonance frequency of the model crane system, and vibration suppression effect was obtained and the maximum reduction can reach 89.85%. The accuracy and robustness of the selected parameters of the APS-ZVD algorithm have been verified in both time and frequency domains. We believe the proposed APS-ZVD algorithm will provide a new idea for the application of ZVD shaper in the crane industry.