Optimization ‐ Based Input ‐ Shaping Swing Control of Overhead Cranes

. Abstract: A novel swing control scheme combining optimization and input ‐ shaping techniques is proposed for overhead cranes subjected to parameter variations and modeling errors. An input shaper was ﬁ rst designed using the analytical method based on the linear swing dynamic model. Then, the particle swarm optimization algorithm was used to optimize the pulse amplitudes and time of the shaper to reduce the in ﬂ uence of modeling errors on the residual vibration. Further ‐ more, an adaptive optimization method was also used to optimize the parameters of the shaper to suppress the in ﬂ uence of the change in the payload mass and the rope length on the residual vi ‐ bration. The proposed control scheme can suppress the in ﬂ uence of uncertainties on residual vi ‐ bration and improve the anti ‐ disturbance ability of a closed ‐ loop system via o ﬄ ine and online dual optimization. Finally, the simulation results verify the e ﬀ ectiveness of the scheme.


Introduction
As important transport equipment, overhead cranes are widely used in ports, docks, large factories, reservoir areas, and other places where large goods are transported. With the improvement in intelligence, overhead cranes are developing in a faster, more efficient, and wider direction. An overhead crane is mainly composed of lifting, pitching, trolley operation, cart operation, and other mechanisms, as well as special hangers [1]. Through the coordinated control of the cart and the trolley, the payload can be moved from one place to another. However, due to the requirement of high efficiency, this leads to an increase in the payload swing and difficulty in trolley positioning. In particular, the large swing of the payload may cause safety accidents [2]. Therefore, it is of great practical significance to design a crane control system with rapid positioning and small swing.
Many control strategies, such as input shaping, sliding mode control, and machine learning, are applied to overhead cranes [3][4][5]. As a typical open-loop control method, input shaping is widely used to reduce the residual vibration of flexible systems because of its simple structure and low cost [6]. In reference [7], an extra insensitivity (EI) input shaper was designed by calculating the time-varying vibration period of a crane. The anti-swing performance was verified with experiments, but the time delay and stability of the shaper were not taken into account. Based on model feedback and partial feedback linearization, a frequency adjustment strategy for input shaping was used in reference [8]. In reference [9], an EI shaper and a closed-loop control method based on swing angle estimation were designed for a tower crane, and the results showed that the EI shaper was more effective in swing suppression. However, non-zero initial conditions and disturbances make these control systems less effective in swing suppression.
In order to solve the problem of traditional input shapers being sensitive to initial disturbances, a zero-vibration (ZV) shaper with non-zero initial conditions was proposed in reference [10]. The effectiveness of the shaper was verified with comparative experiments under different initial disturbances. To deal with the same problem, a re-parameterizing shaper method was proposed to counteract initial disturbances in reference [11]. An optimization technique was used to provide a step input acceleration function for a system acted via a shaper, which not only satisfies the system constraints and expected conditions but also reduces the sensitivity of the control system to variations in the internal parameters [12]. In reference [13], a genetic algorithm was used to determine the parameters of an input shaper, which can reduce the negative impact of the motor parameter error and obtain better output results. In addition, a method based on deep reinforcement learning was proposed in reference [14], and its swing suppression effect was verified in different situations. However, these two techniques need to be further improved in terms of optimization efficiency. In references [15,16], the particle swarm optimization (PSO) algorithm was used to optimize the parameters of the traditional unit amplitude zero-vibration shaper and the ZV shaper so that the optimized shapers could effectively restrain the payload swing under the system modeling errors. However, the PSO is not suitable for the real-time optimization of shapers because of its mechanism.
In order to further improve the real-time robustness of crane systems, some adaptive algorithms have been introduced into the parameter optimization of shapers. In [3,17], neural networks were used to realize adaptive shaping after the PSO operations. In [18], the pulse amplitude and time of a ZV shaper were iteratively updated in real time according to the constructed performance index and the measured output and control data. Moreover, an adaptive input-shaping method based on an extreme learning machine (ELM) was proposed in [19]. Specifically, the pulse response sequence of the closed-loop system was identified and fitted using an online frequency ELM algorithm, and the shaper parameters were updated in real time.
Although the above adaptive input-shaping techniques have achieved a certain performance in payload swing suppression and system robustness, they have some disadvantages, such as long optimization times and the inability to accurately optimize the parameters in some cases. Additionally, the PSO algorithm has the characteristics of a simple structure and fast optimization process and can effectively deal with the problem of modeling errors in crane swing control. However, it is limited to real-time disturbance. Based on the previous analysis and discussion, a swing control scheme based on PSO and adaptive techniques for overhead cranes is proposed in this work, and its contributions are summarized as follows: (1) Different strategies are used to deal with system uncertainty. The offline PSO method is adopted for the modeling error, and the online adaptive method is adopted for the real-time disturbance, which ensures the performance of swing control. (2) The search ability of the particle swarm optimization algorithm is ensured. A time-varying inertia weighting coefficient is used, which has a large value and a slow change rate in the early stage but has a small value and a fast change rate in the later stage. This coefficient makes the global and local search capabilities of the particle swarm optimization algorithm well balanced. (3) The method for the online optimization of the shaper parameters is unique. By adding a feedback link and setting an additional shaper, the optimization of the original shaper parameters is transformed into an adaptive iterative optimization problem of additional shaper parameters, thus avoiding the difficulties encountered in the direct optimization of the original shaper parameters.
The rest of this work is organized as follows. In Section 2, the model of an overhead crane is introduced. Section 3 states the design of the shapers using the analytical method and the optimization of the shaper parameters using the PSO algorithm. The adaptive iterative optimization of the shaper parameters is presented in Section 4. Section 5 summarizes this work.

Model Description of Overhead Crane
A two-dimensional schematic diagram of the motion of an overhead crane is shown in Figure 1. Before modeling, the following assumptions need to be made: (1) the mass of the rope is ignored; (2) the rope is regarded as rigid; and (3) the friction between the actuator and the rope connection is ignored. Based on [20], the dynamic model of the overhead crane is established using Lagrange equations as shown in (1) where M and m are the mass of the trolley and the payload, respectively.  is the angle between the payload and the vertical direction, l is the length of the rope, F is the thrust of the trolley, and x is the displacement of the trolley in the horizontal direction. Additionally, the sliding friction force f x    , and  is the sliding friction coefficient. b is the equivalent damping coefficient acting on the payload. Usually, the payload swing angle  is not large within the safe operating range, which makes sin   , and cos 1   . At the same time, there is also an approximate equivalent transformation Hence, (1) can be simplified as: Under zero initial conditions, with F as the input and x and  as the output, the transfer function of system (2) can be expressed as:  Figure 1. Schematic diagram of motion of overhead crane.
It can be seen in (2) that x and  are highly coupled, and the acceleration x  acts directly on the swing angle system. Therefore, how to design a suitable controller based on the simplified system (3) so that the trolley can reach the desired position quickly, and the swing angle of the payload is as small as possible, is an important objective of overhead crane control. This work focuses on the swing control of the payload using input shaping and optimization techniques.

Design of Input Shaper
As a typical open-loop control technique, input shaping has obvious advantages in the elimination of residual vibration. Its principle is to convolve the pulse sequence with the input signal to generate a new input signal driving the system. A two-pulse input shaping schematic is shown in Figure 2. It can be seen in Figure 2 that the control input after shaping changes from a single-action moment to a multi-action moment, and the superposition of the system responses at different moments achieves the purpose of eliminating or suppressing vibration.

Design of Shaper Based on Analytical Method
Let a typical second-order system where D , j A , and j t represent the number of pulses, the amplitude, and the time of the th j pulse. The following constraints need to be met to design a shaper [21].

(a) Constraint of residual vibration
In order to make the system response stable, the residual vibration of a system should converge to zero in a limited time.

(b) Constraint of pulse amplitude
In order to ensure that the system displacement and other parameters do not change, the input signal of the system is required to have the same steady state value before and after shaping, that is, the sum of the amplitudes is equal to 1, as shown in (5): In order to minimize the delay of the system response, the first pulse time is usually zero, as shown in (6): Through the above constraints, the pulse amplitudes and times of different shapers can be obtained by selecting different numbers of pulses, such as ZV and ZVD shapers, and they can be expressed as (7) and (8) [22,23]: (2), the swing angle dynamics can be transformed into a typical second-order system, as shown in (9): where a x   is the control input. In the meantime, it can be derived from (9)

Optimization of Shaper Based on PSO Algorithm
The shaper parameters obtained using the above analytical method may not be optimal based on (9), and this is because the system (9) is a simplified model of a practical crane. In order to achieve better swing suppression, these parameters need to be optimized. Herein, the PSO algorithm is used to optimize these parameters, and the ZVD shaper is taken as an example to illustrate the optimization process.
There are five parameters ( 1 A , 2 A , 3 A , 2 t , and 3 t ) that need to be optimized, corresponding to the components in the position vector i P and the velocity vector i V of a particle, i.e., 1  2  3  4  5 , , , , , 1,2, ,

 
    1  2  3  4  5 , , , , , 1,2, , where n is the number of particles. Suppose that the optimal parameters searched by the ith particle so far are defined as individual optimal values, and the optimal parame-ters searched by the whole particle swarm so far are global optimal values, denoted by (12) and (13) , , , , best g g g g g  g (13) Based on [16], the updates for i P and i V are carried out according to (14) and (15), respectively. The right side of (14) consists of three parts: representing the trend of particles to maintain their previous changes; the "cognition" part, representing the trend of particles to approach the optimal parameter values searched in their own history; and resenting the trend of particles to approach the optimal parameter values searched via the group history.
where  is the inertia weighting coefficient, and 1 c and 2 c are the learning factors of the individual and group, respectively. These two factors represent the influence of the optimal position on the current speed. Additionally, 1 r and 2 r are variables with a uniform distribution on the interval of [0, 1]. It is worth noting that the inertia weighting coefficient  has a great influence on the search ability [24]. Increasing the  helps to enhance the global search ability, while decreasing the  helps to enhance the local search ability. In general, the  takes a large, fixed value, which makes the later stage of the multi-parameter optimization have problems such as large fluctuations, a long duration, and inaccuracy. To this end, a cosine adjustment method is proposed for the weighting coefficient, as shown in (16). And the PSO with (16) is named as improved weighting coefficient PSO (IWCPSO). It can be seen from (16) that the coefficient value is larger, and the change rate is slower in the early stage, and the value is smaller, and the change rate is faster in the later stage.
where max  and min  are the maximum and minimum inertia weighting coefficients, respectively. 3 r is a variable with a uniform distribution on the interval of [0, 1], and 1 h is the adjustment variable expressed as The complete PSO optimization process includes initialization, the calculation of the fitness function, position and speed update, and so on. The use of IWCPSO in ZVD parameter optimization is summarized below.
Step 1: Initialization of particle swarm parameters. The related parameters are 10 n  , Step 2: Calculation of fitness function. Running the crane system under the action of the ZVD shaper, the fitness values of the pulse amplitude and time corresponding to the current dimension of each particle are calculated according to (17 , it is updated as the optimal parameter of the group, that is, best i  g p . Step 4: Update of the position and the velocity. According to (14) Step 5: End judgment and output. Check whether the maximum number of iterations is reached. If it is not reached, return to Step 2; otherwise, the optimization ends, and the output is best g . 1 g , 2 g , 3 g , 4 g , and 5 g in best g are the optimal pulse amplitudes 1 A , 2 A , and 3 A and the optimal pulse times 2 t and 3 t of the ZVD shaper, respectively. It should be noted that the selection of these control parameters should consider both the dynamic characteristics of the crane and the mechanism of these algorithms. The relationships between the global and local, and the individual and population, need to be balanced in order to achieve a better optimization performance. Additionally, the other parameters are 1 6s T  and 0.01s s T  . In order to make the evaluation more comprehensive, the motion of the trolley is divided into three stages, acceleration, uniform speed, and deceleration, and the acceler-     . It can be seen from Figure 5 that the optimized ZVD shaper is better than the unoptimized one in terms of swing angle elimination, while the PSO with improved weight is better than the PSO with fixed weight in eliminating residual vibration. The reason for this is that the PSO with improved weight can compromise both global and local search capabilities. It can be concluded that time-varying weight can improve the performance of the PSO algorithm.  Figure 6 shows the curves of the pulse amplitudes of the shapers. IWCPSO-ZVD is faster than PSO-ZVD in terms of amplitude convergence speed, which is due to the fact that the weight  of the PSO always maintains a large value and makes its local search ability poor. It is precisely this reason that makes the pulse time convergence processes of the shapers very different, and the steady-state values are also slightly different, as shown in Figure 7. Different values lead to different swing angle suppression, as shown in Figure 5. Table 1 shows the steady-state values of these parameters calculated with PSO and IWCPSO, which more accurately illustrates the differences between these two algorithms. At the same time, the IWCPSO particle fitness function converges faster, and the steady-state value is smaller, as shown in Figure 8. This proves that IWCPSO can better balance the global and local search abilities of parameters and improve the speed and accuracy of parameter optimization.     (17), which can only reflect the overall swing angle performance of the whole system motion. Therefore, these two algorithms can only be used to deal with fixed disturbance that does not change with the motion process, be-longing to offline optimization [3]. Thus, it is necessary to introduce other techniques to improve the systemʹs robustness against real-time disturbances.

Design of Adaptive Input Shaper
An adaptive technique is used to update the pulse amplitudes and time of the shapers, and the structure of the adaptive control system is shown in Figure 9. On the basis of the original input shaper H , a feedback link is added and an adaptive shaper ' H is set. According to the output  , the control input u of the system, a selected performance index, and the pulse amplitude and time of the original shaper H are adjusted in real time.

Adaptive Adjustment of Shaper Parameters
Assume that the original output shaper H is a sequence of , and the corresponding time is an integral multiple of the sampling time s T . Among these pulses, there are only D nonzero pulses, denoted as . Hence, the discrete expression of H can be expressed as (19): Let the transfer function of the swing dynamics be As shown in Figure 9, the shaper ' H shapes the output  to obtain In (27), N Q , N Y , and N U can be measured, while 0 f cannot be measured, so the following deformation needs to be performed: It can be seen that re Z can be measured, so the following performance indicator function can be selected: where N W , N B , and N C can be obtained via the following iterative calculations of (34)-(36) based on the control u and output y of the system.
So far, the parameter optimization of shaper H can be divided into the following two steps, where one is to solve the optimal pulse amplitude and the other is to solve the optimal pulse time.
is considered, and the iterative relation of the optimal pulse amplitude is expressed as (37).
, and 0  C I . Two sets of parameter variations are used to verify the effectiveness of the proposed algorithm, as shown in Table 2.  It can be observed from Figure 10 that the payload has a large residual vibration under the action of IWCPSO-ZV, and the residual vibration of the payload can be greatly reduced under the action of adaptive IWCPSO-ZV or adaptive IWCPSO-ZVD. The latter can almost achieve zero residual vibration. The adaptive shapers are better than the conventional shapers in suppressing real-time disturbances. The amplitude optimization process of the adaptive IWCPSO-ZV and adaptive IWCPSO-ZVD shapers is described in Figures 11 and 12. It can be seen from the figures that the amplitudes are optimized in real time and can quickly converge to the optimal values, and the settling time is no more than 1 s. The time optimization process of the adaptive IWCPSO-ZV and adaptive IWCPSO-ZVD shapers is described in Figures 13 and  14. As described in the figures, the time can also quickly converge to steady-state values after a series of adjustments. It is precisely because of the continuous adjustments of these parameters that the shapers work in optimal states in the presence of parameter variations so that they achieve a good disturbance rejection performance.    (II) Results of Group 2 As shown in Figure 15, the residual vibration of the payload cannot be eliminated when the parameter variations are large. Concretely, the maximum residual vibration exceeds 0.02 rad under the action of the IWCPSO-ZV shaper, and it approaches 0.01 rad under the action of the adaptive IWCPSO-ZV shaper. However, the IWCPSO-ZVD shaper with the adaptive mechanism can control the residual vibration in a small range (of less than 0.003 rad). The reason for this is that the ZVD shaper has three pulses, with one more pulse adjustment than the ZV shaper during real-time optimization, which makes it more robust. Therefore, the number of pulses is closely related to the robustness of a system for adaptive shapers. Table 3 lists the swing angle suppression performance under the control of these three algorithms, in which the bold numbers represent the optimal values. As can be seen from Table 3, the adaptive IWCPSO-ZVD algorithm achieves the best performance, which strongly proves its advantages.

Conclusions
A novel input-shaping control strategy based on offline and online optimization techniques was proposed for overhead cranes. Considering the theoretical analysis and simulation results, one can draw the following conclusions. An input-shaping swing control system optimized using the PSO algorithm can effectively reduce the influence of fixed disturbances on the residual vibration. The PSO algorithm with a time-varying weighting coefficient has more advantages in residual vibration suppression than the PSO algorithm with a fixed weighting coefficient in input-shaping swing control. For real-time disturbances, it is necessary to optimize the input-shaping swing control system online to achieve better residual vibration suppression. In the optimized input-shaping swing control system, the number of pulses has an impact on the residual vibration suppression. More pulses may be helpful to improve the residual vibration suppression effect.