An active swing suppression control scheme of overhead cranes based on input shaping model predictive control

An input shaper-based model predictive control scheme is proposed for an overhead crane to suppress the swing of the payload. A control-oriented mathematical model of the crane is firstly derived based on the small angle hypothesis. Furthermore, three kinds of commonly used shapers are discussed and a zero vibration derivative shaper is selected for the crane. Then, a model predictive swing suppression controller is designed for the crane based on the selected shaper. Constraints on the control input and its slew rate are respected. Besides, the constraint on the swing angle of the payload is also respected as an output constraint. The constrained solution is given in the form of standard quadratic programming. The designed control scheme combines open-loop and closed-loop control techniques, achieving accurate positioning of the trolley and good swing suppression of the payload. A series of simulation demonstrates the effectiveness and advantages of the proposed scheme.


Introduction
As a typical representative of crane systems, the overhead crane has the merits of simple structure, high load capacity and convenient operation, etc., widely used in cargo transportation in factories and ports (Ramli et al., 2017).For a specific transportation task, the control of a crane mainly includes hoisting, horizontally transporting and lowering.The hoisting and lowering are vertical operations which are easier to implement, while the horizontally transporting is the most challenging.This is because it is closely related to the positioning of the trolley and the swing of the payload.
The main objective of the horizontal transportation phase is that the trolley reaches a desired position as soon as possible while the swing angle of the payload is as small as possible.Clearly, it is a conflict between the fast positioning and the small swing angle, which needs to be considered comprehensively.However, due to physical and economic reasons, most of payloads are usually not controlled directly but dragged by trolleys, which makes crane dynamics underactuated (Aguiar et al., 2021).Not only the actuated part should be controlled, but also the underactuated part should be balanced, which puts forward high requirements for the controller design.
The control of overhead cranes has attracted the wide attention of researchers in the communities of mechatronics and control.A great quantity of techniques are available in the literature, and they can be divided into open-loop and closed-loop ones according to the use of information.Open-loop control techniques only need system model information and do not need additional measuring devices, so they are simpler and easier to implement in practice.Input shaping is the most commonly used open-loop control technique in crane swing suppression, proposed by Singer and Seering (1990).This technique fully considers the physical and vibration characteristics of a system, so that the vibration modes in the system are not excited by the input signal, thus the vibration of the system is suppressed fundamentally.
An input shaping control scheme was developed for a crane system, providing additional flexibility in selecting the manoeuvering time and choosing an arbitrary number of inputs through a new optimization technique (Alghanim et al., 2019).In order to increase the design flexibility and the operational domain, a modified zero vibration input shaping technique was presented in the work (Mohammed et al., 2020), where new parameters were introduced to optimize the system performance.
The results show that the modified shaper makes the crane system control powerful and efficient.In the work (Maghsoudi et al., 2019), a unity magnitude zero vibration shaper was improved and then applied to a three dimensional overhead crane with hoisting effects.The results show more swing reduction can be achieved due to the high adaptability of the shaper.
As is known to all, due to the lack of feedback mechanism, the performance of open-loop control systems often deteriorates in the face of uncertainties.Therefore, it is necessary to use closed-loop crane control techniques to enhance the robustness of systems.Based on the modified system output, an adaptive control law was developed to a three degree-of-freedom overhead crane in the work (Shen et al., 2021).An adaptive anti-swing control strategy was proposed for gantry cranes with desired performance, ensuring that the position error and the swing angle asymptotically converge to the origin (Huang et al., 2021).In order to enhance the robustness of systems, both moving sliding mode and fractional-order terminal sliding mode control techniques were used to design controllers for the crane systems (Cuong et al., 2021;Gu & Xu, 2022).Additionally, techniques such as fuzzy control (Aguiar et al., 2021;Sun et al., 2021), PID control (Esleman et al., 2021;Mohamed et al., 2022) and optimal control (Shi et al., 2022;Takahashi et al., 2022) were also applied in the overhead crane control.
However, many works mentioned above do not fully take into account the physical constraints of crane systems, such as amplitude and swing angle limits.Respecting system constraints is an important way to ensure the actual operation performance and the system security (Elmorshedy et al., 2021;Hu et al., 2021;Schwenzer et al., 2021).Model predictive control (MPC) has a strong ability to deal with constraints, and it can find the optimal solution of a performance function on the premise of satisfying the constraints (Gao et al., 2018;Rodriguez et al., 2021).And its receding horizon optimization and feedback correction mechanism make the closed-loop system very robust (Tang et al., 2017).Therefore, MPC is a promising technique for high-performance crane control.
The constraints in an overhead crane system can be divided into two categories, one is related to the trolley including constraints on the input, the input slew rate, the position, velocity and acceleration of the trolley; the other is related to the payload including constraints on the swing angle, the swing deflection and the velocity of the rope length change.In the work (Jolevski & Bego, 2015), the saturation function was used to deal with input constraints, but the resulting control law may not be an optimal solution.According to the recursive feasibility and the definition of input constraint tightening, the input constraint was satisfied in a crane stochastic predictive control system (Hewing & Zeilinger, 2019).For the crane motion control system with a DC motor as the actuator, constraints on the input voltage and its slew rate were respected in time optimal model predictive control (Van den Broeck et al., 2011).Besides, other constraints on the position and the velocity of the trolley could be considered in the design of model predictive controllers (Giacomelli et al., 2018;Khatamianfar & Savkin, 2014).
Using a constraint substitution, the constraint on the velocity of the rope length change was met in a realtime model predictive control framework (Käpernick & Graichen, 2013).In addition to the trolley constraints, the payload constraints have also been taken into account in the existing research.Under the generalized predictive control scheme, the payload deflection constraint was handled in the work (Smoczek & Szpytko, 2016).In order to ensure the safety of crane systems and improve their production efficiency, the swing angles were limited to a certain range by solving constrained predictive control problems (Chen et al., 2016;Wu et al., 2015).
In view of the importance of satisfying the swing angle constraint, an active swing suppression control scheme based on input shaping and model predictive control techniques is presented.To the best of the authors' knowledge, the presented work is the first time to combine the input shaping technique with the model predictive control to design a crane control system.The designed system has both open-loop and closed-loop control characteristics, the open-loop control is used to reduce the swing of the payload, and the closed-loop control is used to improve the robustness of the system.The main contributions of the work are summarized as follows.
1) The practical control performance is guaranteed.For the point-to-point horizontal motion control, constraints on the input and its slew rate are considered, as well as the constraint on the swing angle.These constraints have a great effect on the control performance, if they can be considered in the controller design stage, it is a guarantee to achieve the desired performance in practice.
2) The treatment of the swing angle constraint is progressive.Unlike the treatment in the work (Chen et al., 2016), the swing angle constraint was finally expressed as an input constraint through complex transformation which may result in a conservative solution, i.e. the obtained input constraint is not equal to the original constraint.Herein, the swing angle is regarded as a new output, and the treatment of the output constraint does not bring any conservatism.
3) The convenience of solving constrained model predictive control law is achieved.In the work (Wu et al., 2015), only the description of the crane model predictive control problem was available, which is not conducive to revealing details of the solution.The output prediction, the performance function and the constraints transformation are available in this work.The designed model predictive control law can be conveniently solved by standard quadratic programming algorithms.4) The performance of the positioning and the swing suppression is guaranteed.The proposed control scheme organically integrates open-loop and closedloop control techniques, aiming at the accurate positioning of the trolley and the swing suppression of the payload, respectively.So the comprehensive performance of the system is firmly guaranteed.
The remainder of this work is arranged as follows.Section 2 describes the overhead crane dynamics.The input shaping technology is introduced in Section 3. In Section 4, the active swing suppression control scheme is presented.Finally, a few remarks are made to conclude the work in Section 5.

Overhead crane dynamics
Consider a two-dimensional overhead crane model, as shown in Figure 1.The Trolley moves along the x-axis, and the payload tied to the trolley through a cable also moves in the same direction.The trolley stops moving when it reaches the desired position, while the payload will make an attenuated swing motion due to its own inertia.Ignoring the viscous friction force of the cable and using Lagranges equations, the dynamic model of this crane system can be given (Wu et al., 2009), by.
where M, m, r, l, θ, f , F, g are the trolley mass, the payload mass, the trolley position, the cable length, the payload swing angle with respect to the vertical direction, the frictional force, the driving force and the gravity acceleration, respectively.For the friction force f between the trolley and the track, it can be written asμṙ.As described in (1), the trolley position r and the swing angle θ are coupled.Additionally, the swing angle θ is also affected by the cable changes ˙l.Herein, the focus is on the swing angle movement during point-to-point motion of the trolley, and there is no hoisting action for the payload, so giving ˙l = ¨l = 0.As a result, the system (1) can be expressed as The derived system (2) is the same as the one in the work (Giacomelli et al., 2018), but different from the ones in the works (Chen et al., 2016;Wu et al., 2015Wu et al., , 2020)).
The difference is that the frictional force f of the trolley is taken into account in (2).It seems to be more reasonable because the surface of the track is not completely smooth, and some uncertainty will be brought to the system when ignoring the friction force.Consider that the swing angle is small and generally varies within several degrees, consequently, cos(θ ) ≈ 1, sin(θ ) ≈ θ.Furthermore, θ cos θ − θ2 sin θ = d dt ( θ cos θ) ≈ d dt ( θ) = θ, So the system (2) can be simplified to.
It can be seen from the second equation in (3) that the swing angle can be adjusted by controlling the acceleration of the trolley.Therefore, the key to a controller design is to effectively reduce the acceleration of the trolley, while the acceleration is caused by the position tracking of the trolley.Define the state vector as x = [ r ṙ θ θ ] T , the control input as u = F, the output y = r, then the (3) can be rearranged in state-space form of where The objective of this work is to design a position controller to make the trolley reach the desired position from the origin as soon as possible.At the same time, the amplitude and the convergence time of the swing angle are as small as possible in the course of motion.

Basic principle
Input shaping is a feedforward filtering technique, which is often used to suppress the residual vibration caused by point-to-point motion of flexible structures (Huseyin Bilgic et al., 2021).An input shaper consists of a series of pulses with different amplitudes and delays.The convolution operation between the system input and the pulse sequences generates a new input to drive the system, and the basic principle of a shaper is shown in Figure 2. In which, a pulse signal with an amplitude of A 1 is the input at time t 1 = 0, and its response is represented by a solid line.In order to suppress the vibration excited by the first pulse, a pulse signal with an amplitude of A 2 is another input at time t 2 = T, and its response is represented by a dashed line.According to the superposition principle of linear systems, the current system response represented by a dash-dotted line is the sum of responses generated by the above two pulses.As long as A 1 , A 2 and T are selected properly, when t ≥ T, the responses caused by the above two pulses counteracts each other, thus achieving the purpose of vibration suppression.
Concretely, designing an input shaper requires a series of constraints (Wei et al., 2019), including the residual vibration, the robustness, the time optimization and the pulse amplitude.According to the above conditions, the constraint equations about the pulse amplitude and the action time of an input shaper can be solved, from which different shapers can be designed.

Commonly used shapers
Consider a typical second-order system as follows.
where ω n is the natural frequency and ξ is the damping ratio.Three commonly used shapers are discussed in this section to select one which is more suitable for crane swing suppression.The first one to be discussed is a zero vibration (ZV) shaper which contains two pulses and needs to satisfy the residual vibration, the time optimization and the pulse amplitude constraints (Du et al., 2019).The pulse amplitudes and the time lags can be written as where The second one to be discussed is an zero vibration derivative (ZVD) shaper which contains three pulses and needs to satisfy the residual vibration, the robustness, the time optimization and the pulse amplitude constraints (Kang et al., 2020).The pulse amplitudes and time lags can be written as The third one to be discussed is an extra insensitive (EI) shaper which contains three pulses (Huang et al., 2020).
The pulse amplitudes and time lags can be written as where V tol is a residual vibration ratio.
In order to verify the swing suppression performance of shapers discussed above, an overhead crane is selected for verification, and its parameters are M = 1.0731kg, m = 0.23kg, l = 0.64m, g = 9.8m/s 2 , μ = 0.2.According to the swing equation in (3), taking r as the input, and then the natural frequency and the damping ratio can be calculated as ω n = g l = 3.9131 and ξ = 0, respectively.It should be pointed out that the zero damping ratio is determined by the simplified equation, which is not consistent with the actual situation, although the damping ratio is very small.With reference to reference (Van den Broeck et al., 2011), the damping ratio is changed to ξ = 0.001.
The design of ZV, ZVD and EI shapers can be completed based on the equations of ( 6), ( 7) and ( 8).Setting the desired position of the trolley as r d = 0.4m, and the above shapers are applied to the overhead crane system  one by one to carry out open-loop control, and the results are shown in Figures 3 and 4. As shown in Figure 3, from the initial position to the desired position, there is no significant difference in the horizontal movements of the trolley.However, there is a big difference in the swing angle response, as shown in Figure 4.It is obvious that the amplitude of the swing angle is the smallest under the ZVD shaper, which shows that the ZVD shaper has the best suppression effect on the swing angle.Therefore, the ZVD shaper will be added to the following crane closed-loop control.
Remark 3.1: All the simulations in this paper were carried out by writing m-type files in Matlab 2010b software, in which the fourth-order Runge-Kutta method was used to solve dynamic equations.

ZVD shaper-based active swing suppression control scheme
The input shaping technology is an open-loop control algorithm, so it needs to be combined with the feedback control algorithm to enhance the robustness of the closed-loop system.In the following section, two active swing suppression schemes are constructed by combining the shaping technology with PID control and model predictive control algorithms.The PID control algorithm does not need to obtain the dynamic model of a system, so it is easy to implement.While MPC algorithm needs to use the model of a system, obtaining high control performance through the receding horizon optimization and the feedback correction.

ZVD shaper-based PID swing suppression control
According to the system (3), a double-loop PID control scheme shown in Figure 5 is constructed, in which the outer loop is used for the position control of the trolley and the inner loop is used for the swing angle control of the payload.The ZVD shaper is placed at the output of the position controller.Parameters of the position controller are K p1 = 2, K i1 = 0.1, K d1 = 0.9, while parameters of the angle controller are K p2 = 5, K i2 = 10, K d1 = 4.1.Besides, comparisons between the PID-ZVD control and the ZVD shaper control, the PID control are carried out, the results are shown in Figures 6 and 7.
Remark 4.1: Unlike the general shaper-based control, where the shaper is usually connected to the reference signal R ref , the shaper is connected to the position controller.According to the input shaping principle introduced in Section 3.1, it may be more reasonable to connect the shaper to the position controller.Of course, other ways may be used to connect the shaper, such as placing it on the branch of the crane system.Remark 4.2: For the selected PID control parameters, they are determined by a large number of simulations based on the role of the parameters.Of course, they are can also be determined based on the parameter setting methods.
As shown in Figure 6, the trolley reaches the desired position under these control algorithms, and the dynamic performance is similar.The more obvious difference is the swing angle, as shown in Figure 7.It is the largest under the ZVD shaper control, it is the smallest under the PID-ZVD control, and it is between the above two cases under the PID control.A conclusion can be drawn that the combination of open-loop and closed-loop control algorithms is helpful to reduce the swing angle.However, the PID-ZVD control effort based on error generation may not be timely for the system.Moreover, this algorithm is easy to cause control input saturation when the error is large.

ZVD shaper-based model predictive swing suppression control
In order to further reduce the residual swing of the payload, a combination of ZVD input shaping technology and model predictive control method is adopted.On the basis of (4), the adopted control structure is shown in Figure 8.This structure is constructed based on three elements of predictive control, i.e. prediction model, receding horizon optimization and feedback correction.Supposing the control sequence u(k), . . ., u(k + H p − 1), the model output prediction sequence y(k + 1), . . ., y(k + H p ) is obtained by performing iterative calculation on the prediction model.The error prediction sequence e(k + 1), . . ., e(k + H p ) is generated by the e(k) that equals the difference between the model output y(k) and the actual output y act (k).The corrected model output prediction sequence y c (k + 1), . . ., y c (k + H p ) equals the sum of the model output prediction sequence and the error prediction sequence.The desired output sequence c(k + 1), . . ., c(k + H p ) and the corrected model output prediction sequence are substituted into the performance function, and the control sequence is obtained by optimization.Finally, through control extraction and shaping, the control u s (k) applied to the crane system is obtained.
With the rapid development of computer control systems, discrete-time controllers are more suitable for engineering practice.So the system (4) should be discretized at first.Assuming that T s denotes the sampling period, then the discrete form of the system (4) is. where . By performing iterative computations on the state equation in ( 9), the state prediction can be expressed as where . . .
, H p is the prediction horizon.And then the output prediction can be    obtained as with In order to find an optimal control sequence U(k), select a quadratic performance function as in which e(k + i) is the output prediction compensation term determined by the error between the actual output and the model output at time k (Tang et al., 2017), c(k + i) is the desired output signal, w q (i), w r (j) are the weighting matrices.Furthermore, the (12) can be described in a 2norm form, as where ] T .Perform an expansion on (13) to get with The next is to turn constraints into the form of U(k) so that the minimum of ( 14) can be solved by standard quadratic programming methods.Firstly, consider constraints on input levels, given by.
where u min , u max are limits and positive constants.For the (15), it can be rewritten by the matrix inequality, as and then get.
in which d = −d, d is the last column of D. Secondly, consider constraints on slew rates of the input, expressed by where u min , u max are also limits and positive constants.Likewise, the (18) can be written as where , v is the last column of V .Finally, consider constraints on swing angle ranges, given by where θ min , θ max are also limits and positive constants.As shown in (4), the swing angle is one of the system states.
If it is directly treated as a state constraint, the constraint matrix like D or V will have all zero rows, which brings inconvenience to the solution.On the contrary, this situation can be avoided if it is regarded as the output of the  system.To do this, Change the output equation in (9) to with C θ = 0 0 1 0 .The output prediction is correspondingly changed to Based on the change of ( 22), the (21) can be rewritten as Similarly, the (24) can be written as  with . Denote N as the form of where Since the variable ξ(k) has nothing to do with U(k), the optimization of ( 14) about U(k) is equivalent to.subject to Obviously, the optimal solution to ( 27) is a standard quadratic programming (QP) problem, and many algorithms are available for its solution, such as active set methods (Stomberg et al., 2021) and interior point methods (Lin et al., 2021).After acquiring the control sequence U(k), its first element is taken out and convoluted with the  ZVD shaper and then the result is applied to the plant, i.e.
where * represents the convolution operation, N l is the closest integer to t i T s (take the lesser integer if t i T s has two equally close integers).Herein, the nearest sampling time discrete method to approximate the continuoustime input shaper, which has been proved to be feasible (Baumgart & Pao, 2007).
Remark 4.3: In contrast to the treatment of the swing angle constraint using a system dynamics method in the work (Chen et al., 2016), the adopted one using the output change technique is more direct and simple.More importantly, it can overcome the conservatism of the system dynamics method.
Remark 4.4: As shown in ( 27) and ( 28), the standard quadratic programming solution form of a constrained problem is available, rather than its description form in the work (Wu et al., 2015).This standard form not only helps to select an appropriate solving algorithm, but also helps to understand the mechanism of predictive control constraint handling.
Parameters of the predictive controller are selected as The above MPC-ZVD algorithm is applied to the crane system, and results are shown in Figures 9-11.As can be seen from Figure 9, the trolley runs from the origin to the desired position without overshoot.Compared with the one of PID-ZVD control, its settling time is about 2 s longer.This is because the required control effort under MPC-ZVD is smaller than that under PID-ZVD, as shown in Figure 11.And the smaller control effort helps to reduce the swing range, as depicted in Figure 10.Concretely, the maximum value of offset zero is 0.034 rad under the control of PID-ZVD, while the maximum value of offset zero is 0.012 rad under the control of MPC-ZVD.In addition, all the constraints are satisfied.In summary, the MPC-ZVD control algorithm has certain advantages in reducing the swing angle.
In order to further highlight the advantages of the proposed control strategy, it is compared with the guaranteed MPC algorithm in the work (Chen et al., 2016).To this end, the friction force μ in ( 2) is set to zero to ensure the consistency of the plant, and the crane system parameters are changed to M = 6.5kg, m = 1kg, l = 0.75m.Additionally, the constraints are |u| ≤ 5N and |θ| ≤ 2 • , the desired position is r d = 0.6m.
From the position response, these two MPC algorithms can make the trolley reach the desired position, and the control performance is almost the same, as shown in Figure 12.However, the swing response is different.Specifically, the maximum swing angle of the payload is smaller when the trolley is under the control of MPC-ZVD, as shown in Figure 13, which shows that the input shaper ZVD plays an active role in suppressing swing.Concretely, the maximum value of offset zero is 1.98°u nder the control of Chen's MPC, while the maximum value of offset zero is 1.61°under the control of MPC-ZVD.The Figure 14 describes the required control efforts, and they all reach the maximum limit.Nevertheless, the maximum lasts longer under the control of MPC-ZVD, the reason for this is the trolley reach the desired position faster.Through comparison, it can be seen that the MPC algorithms can effectively deal with constraint problems, and the MPC-ZVD algorithm can further reduce the swing angle of the payload.
In order to test the robustness of the close-loop system, a wind disturbance d = 0.5N is added to the system control channel at t = 5 ∼ 6s, and results are shown in Figures 15-17.Compared with the case without disturbance, as shown in Figure 9, the position response in the case of disturbance has a slight overshoot, as shown in Figure 15, but the overshoot can be eliminated quickly.This indicates that the closed-loop system has strong antidisturbance ability, which is beneficial to ensure the control performance in practice.Figures 16 and 17 depict the swing angel and the control input, and they all vary within the allowable ranges.

Conclusions
A novel swing suppression scheme is presented for overhead cranes based on model predictive control combining with input shaping technology.It can be concluded from theoretical analysis and simulation results: (1) The ZVD shaper is a good open-loop control technique for overhead cranes, combined with a closed-loop control PID algorithm to help reduce the swing of payloads; (2) The constraint treatment is more intuitive, and compared with the conventional model predictive control and the PID-ZVD control algorithms, the proposed algorithm is more obvious to suppress the swing of payloads and (3) The proposed closed-loop system has a certain robustness to uncertainty.The next work will consider the control design in the presence of hoisting and heavy disturbances.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Figure 3 .
Figure 3. Position response of the trolley.

Figure 4 .
Figure 4. Swing response of the payload.

Figure 5 .
Figure 5. Structure of ZVD shaper-based PID control for the crane.

Figure 6 .
Figure 6.Position response under the different control algorithms.

Figure 7 .
Figure 7. Swing response under the different control algorithms.

Figure 12 .
Figure 12.Position response under the MPC algorithms.

Figure 13 .
Figure 13.Swing response under the MPC algorithms.

Figure 14 .
Figure 14.Control inputs under the MPC algorithms.