Anti sway tuned control of gantry cranes

Load swaying is one of the most frequently occurring problems at production sites. The purpose of this work is to create a control system for the movement of an overhead crane with an anti-sway function. The Particle Swarm Optimization method has been used to find the controller coefficients. The crane movement with the anti-sway function should be implemented using a PLC (programmable logic controller) and have a high speed of operation. The frequency converter controls the speed of the drive that moves the crane. The main advantage of the system is its simplicity and low cost combined with the low swaying of the load. The oscillation amplitude with an angular speed regulator is two to three times less in comparison with the control system without the angular speed regulator. The presence of an angular speed regulator minimizes the impact of the load weight and the rope length. The efficiency of the simulator program for calculating angular speed has been tested and confirmed. Verification of the created mathematical model of the crane with experimental installation has been made. An efficient and low-cost anti-sway system for overhead cranes has been developed. The efficiency of the system was tested experimentally, the dependencies of the influence of factors on the sway angle were obtained. The selection of the regulator coefficients is implemented using the particle swarm optimization method coded in C++, which provides high-speed performance and the ability to integrate the algorithm into the PLC of the overhead crane control system.


Introduction
In recent times, the requirements for production efficiency have been increasing, including the efficiency of lifting operations. Load swaying is one of the most frequently occurring problems at production sites. This often entails heightened requirements for the qualifications of the crane operator.
Anti-sway control methods for overhead cranes are considered in numerous books and articles. Passivity-based closed-loop control methods are the most popular of those, as the cheapest and easiest to implement. Currently, methods based on fuzzy logic which are the most effective are used. However, the cost of such systems is relatively high for small-scale enterprises. Articles [14,20] describe popular approaches of anti-sway control, the article [16] show a control method of cranes with high-speed hoisting, articles [7,10,17,21,24,27] show a crane control method based on position and deflection angle feedback. The Systems contain sensors that are attached to a hook or rope (suspension). In the developed control system data of the ropedeflection angle are fed to the computation unit via a digital or analog interface. However, it is possible to estimate the deflection angle of the rope with a known length of the rope at a given time by the angular speed of the bogie motor, in other words, the algorithm that calculates the deflection angle of the rope from the known speed of the crane should be included in the structure of the control system. The crane PLC receives and scales the values measured by the sensor and calculates a signal proportional to the additional speed, takes the speed setting and adds to it the value of the calculated additional speed, thanks to which the compensation of the swing of the load takes place. However, quite often, the final crane position is not known in advance, and the crane operator controls the speed with the joystick. The article [15] describes the control of cranes with varying cable length. Articles [3,9] show various methods of PID control of gantry cranes, articles [5,20,26,28] shows an anti-sway control method based on negative speed and deflection angle feedback performed via PI controllers, which implement the motor torque control signal. However, frequency converters (FCs) of low-cost cranes do not support the torque control function; its operation algorithm is cut off from control, and only control by the motor rotation speed is implemented. Moreover, the installation of additional angle evaluation sensors also incurs additional costs.
An overhead crane is an under-actuated system. Article [28] discussed a control system for efficient operation of a crane with the anti-sway control system. That system uses fuzzy control and sliding mode control. The development of such systems is justified for cranes that are influenced by external factors such as wind. Many small overhead traveling cranes in small enterprises operate inside a workshop to eliminate wind impact. Moreover, small companies are interested in the low cost of the crane and its low-cost maintenance.
In articles [26,29] were presented modern control methods and control algorithms for nonlinear systems. It is suggested to design and simulate these systems using expensive software as MATLAB. For many small crane manufacturing companies, purchasing such software is not economically justified. In this paper, we suggest an algorithm implemented in C++. This significantly reduces the cost of the control system design process. This became possible thanks to the use of modern numerical methods of calculation and equations of mathematical physics.
Choosing a passive control system structural diagram is the first task [18]. Another task is the selection of controller parameters (controller coefficients). To select the parameters, transient processes are investigated and their integral indicators are determined. The lowest value of the integral quality index corresponds to the optimal values of the regulator coefficients. This is a nonlinear optimization problem. A review of existing methods for the selection of controller coefficients revealed that the stochastic methods are the most suitable ones [11]. Of those, the Particle Swarm Optimization method [6,23] is one of the most popular. However, the majority of anti-sway system manufacturers implement the algorithm through additional industrial computers, which makes the system more costly. The purpose of this work is to create a control system (hereinafter referred to as CS) for the movement of an overhead crane with an anti-sway function.
The CS also should include a built-in program for selecting the optimal coefficients of the CS regulators. These coefficients are selected in accordance with the specified parameters of the mechanical system without using the deflection angle measurement sensors (auto-tune antisway control). No additional computing devices are used. The crane movement with the anti-sway function must be implemented using a PLC (programmable logic controller) and have a high speed of operation. The frequency converter controls the speed of the drive that moves the crane. The main advantage of the system is its simplicity and low cost combined with the low swaying of the load.
The article is divided into four parts. The first part described the mathematical model of the crane. In the second, the mathematical model of the control system is presented and the derivation of equations for calculating the poles of the transfer functions is obtained. The third part is devoted to the problem of finding the optimal values of the controller coefficients using the particle swarm method, and the optimality criteria are described. In the fourth part, an experimental study of the developed control system and a comparison of the analytical model and a real crane are carried out, conclusions about efficiency and importance of the factors on the deflection angle of the load are made.

Mathematical model of the electromechanical system
with the trolley is driven by two geared motors operating synchronously. Braking occurs on the account of changing the engine torque. The trolley can also move laterally along the end girders. The principle of movement is the same.
In this article, we use a linear mathematical model of the crane: the masses of the hook and the rope are equal to zero, the movement occurs in one plane. Using the Lagrange equations, we obtain a system of differential equations.
The first two equations describe the movement of the system's elements under the impact of an external force, the third one describes the relationship between the torque on the engine and the force acting on the trolley and the bridge.
We assume the length of the rope is constant and equal to l; the deflection angles are small. Considering sin ≈ , cos ≈ 1, sin 2 = 0 the system of equations in linearized form is as follows: where, m 0 is the load weight, m 1 is the weight of the trolley and the bridge, b is the trolley dissipation coefficient, b 1 is the pendulum dissipation coefficient, g is the gravity acceleration, D is the roller diameter, n is the number of gear motors, i is the gear ratio reducer, coefficient of efficiency of the motor. Figure 1 shows the longitudinal motion diagram with an indication of the positive directions of the axes.
The elastic deformation of the component is not included in the model. We have a system of ordinary differential equations. We will use the operational calculus to solve this system [8].
The resulting system of equations in operator form, with the use of the Laplace transformation (d∕dt = s) , where X, , F are the desired function images, comes to the following: The system of equations contains three unknown functions. The main task of the future control system is to generate such a signal convertible into a force, in which the movement of the trolley will meet the stated requirements for acceleration, while the load oscillation amplitude will tend to zero.

Mathematical model of the control system
The designed CS structure is shown in the Fig. 2.
The CS operates as follows: the sum of three signals; the actual speed signal with the reverse sign, the signal of the angular speed of the cargo rope that has passed through the PI controller, and the signal of the speed setting goes to the PI controller and then to the asynchronous motor, presented as a first-order aperiodic factor. The motor generates torque and force at a given signal. The L-transform of the force is as follows:  where, v* is the signal of the speed, F r is the resistance force, k iv , k pv , k i , k p are the coefficients of the controllers, T is the time constant of the system. The controlled parameters are the crane speed and rope angular speed. The angular speed of the rope is calculated from the mathematical model of the crane. Since the sampling rate of the encoders is small and equal to t ≈ 1ms , we can use the Riemann sum numerical integration method [4].
Let us consider the initial system of equations without dissipation.
We will solve the second equation in Eq. (4) numerically: The solution to the system of first-order differential equations we will seek in the following form: where ẋ -is the instantaneous speed given by the encoder.
The presented algorithm for calculating the deflection angle of the rope allows to effectively replace the direct measurement.
The final system of equations in the operator form looks as follows: Let us present the system of linear algebraic equations in matrix form: This system of equations Eq. (8) is equivalent to the following: Solving the system of equations by the Cramer method we receive: In Eq. 10, DetA is the main nonzero determinant of the matrix of the system A, DetA i -is the determinant with vector B in place of the i th column of A.
The stability of a linear system for a set of controller coefficients can be verified by Routh-Hurwitz stability criterion [1,25].
As a result, we have got transfer functions of the speed of the crane, the rope deflection angle, and the force acting on the crane. To find the originals of the functions, we will use the inverse Laplace transform according to the residue theory: where s k are the poles of order n.
Poles of the transfer function are the roots of the seventh-degree polynomial, the transfer function of the (7) (m 0 + m 1 )s 2 X + bsX + m 0 ls − (Ts + 1)F + F r s = 0, Vol.:(0123456789) SN Applied Sciences (2021) 3:729 | https://doi.org/10.1007/s42452-021-04719-w Research Article deflection angle, and the ninth degree for the transfer function of force and speed. However, for the considered system of equations, the denominators of the speed and force transfer functions are equal. The denominator of the transfer function of the deflection angle is the quotient of the speed transfer function denominator and s 2 . To find the originals of the functions, it is necessary and sufficient to find the poles of the transfer function of the deflection angle. In the transfer function of speed and force, we have poles of the third order.
To find the roots of the seventh-degree polynomial, we use the Aberth method [2].
We set the initial approximations using the distribution of quasi-random numbers in the interval (0 … 50) , for example, by the Halton [12] or Sobol [22] method.
We performed numerical integration using the Newton-Cotes formulas. The Simpson rule is easy to implement and quite efficient for this class of functions.
For transfer functions with the denominator in the form of the fourth-or lower-degree polynomial, it is no less efficient to use the following equations:

Calculation of the optimal parameters of the control system
The requirements for a control system design are: -Acceleration of the crane to a specified speed with a maximum relative speed error of 10% should be done during the time t. Time, t, is determined according to the technical specification for the crane or in accordance with regulatory documents. In this work, the time t = 5 s is selected based on technical specifications for overhead cranes, which were received by OOO "Troitsk Crane Plant" company. -The process of acceleration and deceleration should be asymptotically stable.
s k = s k−1 + s k , -The maximum motor power should not exceed the permissible values. The maximum motor power is added as an additional condition in the coefficient selection program and protects the motor from overload. -Oscillations of the load should be asymptotically stable [25]. The selection of optimal values was carried out using the integral control quality index [30]. For oscillatory transient processes, such integral estimates are used, the alternation of the integrand of which has been eliminated in one way or another.
The choice of optimal values of coefficients is carried out using the integral control quality index [30]. For oscillatory transient processes, such integral estimates are used, the variability of the sub-integral function of which has been eliminated one way or another. This is a complex multidimensional optimization problem. The objective function is selected to minimize the deflection angle, acceleration time (a function of the absolute speed error), and the consumed motor power, and has the form: where P is a function of the motor power, is a deflection angle function, v is a function of speed, v* is the desired speed (required speed), is the relative speed error. In this work, coefficients were selected empirically. Ratios of the velocity integral of the error and the integral of the deflection angle were approximately equal.
The sub-integral function of four variables is calculated only numerically. The function also has plenty of local minima.
The simplest numerical optimization method, the Monte Carlo method (shooting method), is not appropriate due to the multidimensionality of the problem and the large tolerance region of coefficients. It requires a large number of iterations to calculate a complex integral.
The Particle Swarm Optimization method was used to find the optimal values of regulators [6,13,19,23]. The developed control system consists of two PI controllers. Four values are required: -Ti is the integration time of the speed controller, -kp is the coefficient of proportionality of the speed regulator, -ki 1 is the coefficient of integration of the angular rate regulator, -kp 1 is the coefficient of proportionality of the angular velocity regulator. In the problem under consideration, one particle takes the values of regulator coefficients; it is a vector of four values. For each particle with its set of four coefficients, the objective function value is calculated. Vector pbest corresponds to the minimum function value for a particular particle. At each iteration, the function value is compared with its value at pbest; when the condition is met, the pbest value is reassigned. A similar algorithm is performed for the gbest vector. As a result of solving the optimization problem, we get a vector of four controller values for which the objective function is minimal.
The accuracy of the method increases with the number of particles and the number of iterations.
The current state of a particle is characterized by coordinates (in our case, it is a vector of coefficient values) in the solution space (values of the target function), as well as by the displacement speed vector. Both these parameters are selected randomly at the initialization stage. Besides, each particle stores the coordinates of the best solution found by it, as well as the best solution passed by all the particles.
To increase the speed of calculation, an inertia coefficient is applied, which decreases at each next iteration.
At each iteration of the algorithm, the direction and length of the speed vector of each of the particles change in accordance with the information on the found optimal values. As applied to our problem, the equations take the form:

Experimental investigation
For the experimental investigation of the anti-sway CS, a test bench was developed; it is shown in Fig. 3 and has the following parameters: A signal rising linearly up to a given constant was fed to the frequency converter input. A three-factor experiment was developed to study the anti-sway CS. The regulator coefficients were selected according to the developed algorithm coded in C++.
A series of experiments have been carried out to study the effectiveness of the control system. The experimental design was based on a linear mathematical model, factors varied at two levels. Independent variable factors included preset crane speed, load weight, suspension length. For the three selected factors, 8 series of experiments were carried out for three sets of controller coefficients. Each series consisted of three iterations. The duration of the signal to the motor from the frequency converter was 5 s, the signal was linearly increasing to a given constant. The graph of the speed function reference signal is shown in the Fig. 4.
Three sets of coefficients selected by the program: The speed controller coefficients Ti = 144 ms, kp = 4 were selected once. These coefficients were used in the PI controller of the frequency converter. For the mass of the load m = 15 kg, l = 1.2 m, v = 0.3 m/s, we have the following diagrams: Fig. 5 shows the angular velocity of the rope, and Fig. 6 shows the velocity of the crane.
Fo r a s e t o f c o e f f i c i e n t s Ti = 144 m s , kp = 4, ki 1 = 6.82, kp 1 = 0.26 we have the following diagrams: Fig. 7 shows the angular velocity of the rope, Fig. 8 shows the velocity of the crane.
For the mass of the load m = 15 kg, l = 1.2 m, v = 0.3 m/s, we have the following diagrams: Fig. 9 shows the angular velocity of the rope, Fig. 10 shows the velocity of the crane.
The regression equations for the dependence of the maximum swaying angle on changes in load weight, suspension length, and crane speed were compiled based on the experiment results. According to the criteria of significance, it was estimated that only the crane speed makes a significant contribution to the swaying, while the variation of other parameters has a limited impact on the load swaying. The presence of an angular speed regulator minimizes the influence of the weight of the load and the length of the rope.
Selection of coefficients is rational to perform only for different crane target speeds; at that, it is important to additionally check motion stability for a set of possible parameters of the crane. It is recommended to limit the range of values of all coefficients to a positive range.
The correlation of the mathematical model and the bench has been confirmed. The real function of the crane speed has several extrema, which in its turn affects the angular speed function. The difference in the experimental investigation and mathematical modeling does not exceed 30 percent.

Discussion
Nowadays, there is a large amount of research in the field of control systems with anti-sway functions. Many of them [7,10,16,17,20,21,24,[26][27][28] use adaptive control methods based on fuzzy logic, sliding mode. They use various feedback sensors: gyroscopes, optical sensors, inclinometers. However, the practical implementation of the considered methods by small manufacturers of overhead cranes is difficult due to the high cost of the necessary software, the necessity to install additional equipment on the crane. The developed control system uses standard equipment that is included in the basic crane kit. Additional functionality is implemented only through the software part. The software part is implemented in the PLC, which controls the frequency converter. The selection of the controller coefficients for the angular velocity in the PLC and the controller coefficients for the speed in the frequency converter is implemented using the particle swarm method in C++. It provides speed and the ability to integrate the algorithm into the PLC of the overhead crane control system. All above-mentioned features allow us to develop a simple, but quite effective control system for overhead and gantry cranes.

Conclusions
A qualitative check of the control system operation with the anti-swaying function was made. The oscillation amplitude with an angular speed regulator is two to three times less in comparison with the control system without the angular speed regulator. It has been experimentally determined that only the crane speed makes a significant contribution to the swaying, while the variation of the remaining parameters has a limited impact on the load swaying. The presence of an angular speed regulator minimizes the impact of the load weight and the rope length. The efficiency of the simulator program for calculating angular speed was tested and confirmed. Verification of the created mathematical crane model with experimental installation was made. Discrepancies do not exceed 30% . For the specification of the model, it is necessary to conduct research on the crane acceleration process and operation of the frequency converter operation. A redesign of the speed reference function is recommended. For small rope lengths, discrepancy increases as the load size become proportional to the suspension length; the point mass must be replaced by a distributed one, and a complete rope model is also required. As future work, we plan to conduct a similar experiment on a real crane.

Conflict of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.