Efficient control of a nonlinear double-pendulum overhead crane with sensorless payload motion using an improved PSO-tuned PID controller

This paper proposes an efficient proportional–integral–derivative (PID) control of a highly nonlinear double-pendulum overhead crane without the need for a payload motion feedback signal. Optimal parameters of the PID controllers are tuned by using an improved particle swarm optimization (PSO) algorithm based on vertical distance oscillations and potential energy of the crane. In contrast to a commonly used PSO algorithm based on a horizontal distance, the approach resulted in an efficient performance with a less complex controller. To test the effectiveness of the approach, extensive simulations are carried out under various crane operating conditions involving different payload masses and cable lengths. Simulation results show that the proposed controller is superior with a better trolley position response, and lower hook and payload oscillations as compared to the previously developed PSO-tuned PID controller. In addition, the controller provides a satisfactory performance without the need for a payload motion feedback signal.


Introduction
Cranes are extensively used in industries to transport heavy payloads from one place to another.
In industrial environments, a fast and accurate positioning with minimum hook and payload oscillations are desirable for an efficient and safe operation of the crane systems which can directly increase the industrial productivity (Ramli et al. 2017). Various control methods have been proposed to achieve the objectives. Most of the control methods treat the payload oscillation as a single-pendulum without considering a hook mass and an additional cable as variables. However in practice, cranes with double-pendulum dynamics are extensively used in many industrial applications, and therefore, design of an efficient control for such systems will be meaningful. The double-pendulum crane system is an under-actuated nonlinear system ) with one control input (trolley force) and three control variables (trolley position, hook and payload oscillation angles).
Research involving a double-pendulum crane started in 1998 (Singhose and Towell 1998). Since then, many researchers investigated various control techniques for the cranes and has becoming an attractive benchmark. The controllers involved linear control (Yang et al. 2009; Jaafar and Mohamed 2017), adaptive control (Zhang et al. 2016a), intelligent control (Qian et al. 2016) and other nonlinear control approaches (Tuan and Lee 2013;Alhazza et al. 2014;Zhang et al. 2016b;Sun et al. 2017a;Sun et al. 2017b;Sun et al. 2018). Controlling the double-pendulum crane is more challenging as compared to the single-pendulum crane as the dynamic is complicated and the double-pendulum system consists of two different natural frequencies that belongs to each cable (hoisting and rigging cables). Moreover, control to achieve both objectives simultaneously is difficult as a faster trolley motion leads to higher hook and payload oscillations.
The proportional-integral-derivative (PID) control is a widely used controller in a number of practical systems due to easy implementation, effective and low cost. In Maghsoudi et al. (2016), PID controllers were used to move the trolley and rail of a three dimensional crane with a reduced oscillation. Several researchers also implemented PD-type controllers to suppress the swing oscillation of a gantry crane system (Solihin et al. 2010;Jaafar et al. 2015).
In using the PID-type controllers for control of cranes, a separate PID controller was used to achieve each objective. Thus, for the case of a single-pendulum crane, two PID controllers were used in the forward path and feedback loop for the positioning and oscillation control respectively. Similarly, for a double-pendulum crane, three PID controllers are required for positioning, hook and payload oscillations control.
It is known that a properly tuned PID controller's parameters is needed for an optimal system performance. For optimisation, a particle swarm optimisation (PSO) algorithm has attracted an increasing attention from researchers and has been successfully applied to solve many design problems. The PSO worked well to solve various nonlinear systems against many other conventional optimisations (Chen et al. 2017b). In the crane control, the PSO-based PID controllers were previously used to tune optimal PID parameters of a single-pendulum crane (Jaafar et al. 2015;Maghsoudi et al. 2016). Their performance is significantly affected by a fitness function and in Maghsoudi et al. (2016), a common fitness function based on minimising a payload angle was used. In an attempt to find optimal PID parameters that yields a more accurate trolley positioning and a higher oscillation reduction, one possible approach is to define the PSO algorithm in a new way that include both the hook and payload parameters.
To the best of authors' knowledge, this approach has not been reported in literatures.
Most of the feedback controllers for crane systems were based on a full-state feedback control method where all states need to be obtained and fed back for control action. In the same approach, for a double-pendulum crane, an additional sensor for measurement of a payload motion is required as compared to a single-pendulum crane. However, in the industrial environment, adding and installing a suitable sensor for an accurate and fast measurement of payload motion of a double-pendulum crane is challenging (Ramli et al. 2017). Besides an additional cost for sensing, the payload changes in various shapes and sizes. With all these difficulties, successful design of a closed-loop control scheme with a sensorless payload motion will be an advantage.
In this paper, an efficient PID controller tuned by an improved PSO algorithm for control of a nonlinear double-pendulum overhead crane without the need for a payload motion sensor is proposed. The main contribution of this paper is in the PID tuning approach for the nonlinear system which resulted in a better system performance and a less complex PID controller. To study the effectiveness of the controller, extensive simulations under various operating conditions of the double-pendulum crane were carried out. Assessments of the controller performance were conducted in terms of trolley positioning and the levels of oscillation of the hook and payload. Performance comparisons were conducted in two aspects: (a) Between the proposed and the commonly used PSO-tuned PID controllers to show the superiority of the technique; (b) Between two PID and three PID control schemes to demonstrate the capability of the proposed technique to provide a satisfactory performance without the need for a payload motion signal.

Dynamic Model of a Nonlinear Double-Pendulum Crane
The most popular technique for modelling of a double-pendulum crane system was the Lagrangian method (Ramli et al. 2017). In this paper, a brief formulation for modelling of an overhead crane using the Lagrangian method is given. A schematic diagram of a doublependulum overhead crane system is illustrated in Figure 1. The crane consists of three independent generalised coordinates namely the trolley position, x, the hook angle, θ1, and the payload angle, θ2. , 1 , 2 , , 1 and 2 represent the trolley mass, the hook mass, the payload mass, the gravitational acceleration constant, the cable length between the trolley and the hook, and the cable length between the hook and the payload respectively. is an external force applied to the crane, which is the only control input for this system.
The nonlinear model can be linearised by assuming small angles during control, with sin 1 ≈ 1 , sin 2 ≈ 2 , cos 1 = cos 2 ≈ 1. The relationship between the crane outputs can thus be represented in transfer functions as: (1 − ) 1 2 4 + ( 1 + 2 ) 2 + 2 (4) . Subsequently, the transfer functions between the three outputs and the input can be derived as: where = + 1 + 2 ; = 1 + 2 and = 2 . These transfer functions are derived for investigations of the stability of the proposed control schemes presented later in this paper.

PID Control Schemes
In this work, two PID control schemes are considered: (a) Three separate PID controllers for each control variable and the position, the hook and payload oscillation signals are used as the feedback signals. The control structure is shown in Figure 2, and it is referred as 3-PID control scheme; (b) Two PID controllers utilising only the position and the hook oscillation as the feedback signals (2-PID control scheme) as shown in Figure 3. In practice, the second approach attempts to control the position, and hook and payload oscillations without using a sensor for measurement of the payload oscillation.  Kp2, Ki2 and Kd2 for PID #2; Kp3, Ki3 and Kd3 for PID #3) need to be obtained for the first approach whereas six PID parameters (Kp1, Ki1, Kd1, Kp2, Ki2 and Kd2) are needed for the second approach. As PSO has been shown to be effective in optimisations, including for nonlinear systems, the method was used to find the optimal PID gains for both approaches.
The control scheme in Figures 2 and 3 using separate PID controllers for each system state was proposed and was successfully implemented on laboratory cranes in Solihin et al.
(2010) and Maghsoudi et al. (2016). Discussion on the stability of the controller was also given in the article. By taking a similar approach, the control schemes in this work are shown to be stable with the PID gains tuned using the proposed PSO algorithm. Based on the 3-PID control scheme and equations (6)-(8), the closed-loop transfer function can be found as: ( ) = 6 6 + 5 5 + 4 4 + 3 3 + 2 2 + 1 + 0 7 + 6 6 + 5 5 + 4 4 + 3 3 + 2 2 + 1 + 0 (9) The numerator coefficients are given by: (1 − ) 1 2 and the denominator coefficients by: The closed-loop transfer function for the 2-PID control scheme can be obtained by eliminating 3 , 3 and 3 in equation (11). The denominator of the transfer function which is the closed-loop characteristic equation is essential in determining the system stability, in which all poles must lie on the left-half plane.

Particle Swarm Optimisation
PSO was invented by Kennedy and Eberhart (Kennedy and Eberhart 1995) and is still being used to solve various engineering problems. Two initial parameters namely position, and velocity, of the particles are introduced in the optimisation process. The new velocity, +1 of the particles are depended on the current , local best, and global best, values.
The new position, +1 will be updated accordingly based on the new velocity as: where is the number of iterations ( = 1, 2, 3, … … , ). 1 and 2 are positive learning factors that control the strength of cognitive and social acceleration coefficients while 1 and 2 represent random function values, 1 , 2 ϵ U(0,1). and are defined as personal best position and best position among respectively. is inertia weight (decrease from 0.9 to 0.4 during iterations) that influence particle for exploration and exploitation.
Each individual particle is assessed by a fitness function. All particles try to replicate their historical success and in the same time try to follow the success of the best agent. It means that and are updated at each ℎ iteration if the particle has a minimum fitness value compared to the current and until the maximum number of iteration, is reached.

An improved PSO algorithm for the crane system
In order to obtain higher oscillation reductions for both hook and payload, and without the use of the payload oscillation signal, a PSO algorithm derived by considering the relationship between physical parameters of both the hook and payload to the oscillation is proposed. This strategy is based on the potential energy, = ℎ where a vertical distance, ∆ℎ = ℎ 1 + ℎ 2 is considered as shown in Figure 4. This is in contrast to the previously developed PSO algorithm designed using the angles or the horizontal distance to represent the oscillations. ℎ 1 and ℎ 2 represent the differences in heights of the hook and payload with respect to a reference height without oscillation respectively. Higher values of ℎ 1 and ℎ 2 indicate high hook and payload oscillations, and directly increase the potential energy of the system. It is worth mentioning that a high potential energy might bring the system to an unstable condition, and thus, should be kept minimum to attain a maximum stability.

Figure 4. Vertical distance of hook and payload movements
Using ∆ℎ, the improved PSO algorithm is proposed with a fitness function as: and a complete function as: where represents the desired position of trolley movement, and 1 and 2 represent reference angles (zero angle) of the hook and payload respectively. The fitness function in equation (15) is used in the PSO algorithm to obtain optimal PID gains for the cases with three and two PID controllers shown in Figures 2 and 3 respectively. With the fitness function, the hook and payload masses are also considered in finding the optimal parameters.
The fitness function in equation (15) is obtained by using the relationships between ∆ℎ and the hook and payload angles. Therefore for implementation of the improved 3-PID control scheme, the fitness function can be solved by using measured hook and payload angles ( 1 , 2 ) similar to the commonly used technique, and measurements of ℎ 1 and ℎ 2 are not needed.
Besides, for the implementation of the 2-PID control scheme which is without measurement of the payload angle, the fitness function is solved by using a measured hook angle and an estimated payload angle obtained by analysing the dynamic behaviour of both angles. This is further described in Section 5.

A PSO algorithm based on a horizontal distance
For a comparative assessment, a PSO algorithm with a fitness function based on a horizontal distance to represent the hook and payload oscillations was also considered in finding the PID parameters. This strategy was implemented in Maghsoudi et al. (2016) for a single-pendulum crane and the algorithm was extended to suit with a double-pendulum crane system. Figure 5 shows the horizontal distances, 1 and 2 of the hook and payload respectively where less 1 and 2 indicate low oscillations. The horizontal distances were commonly used as they were directly related to the oscillation angles. Utilising ∆ = 1 + 2 and to achieve a satisfactory input tracking with low oscillation, the fitness function can be obtained as: and can be expanded as: By reducing ∆ , the hook and payload oscillations can be minimised to achieve a maximum stability for the system.

Implementations and Results
The effectiveness of the controllers in achieving the control objectives were investigated within the simulation environment of a double-pendulum overhead crane. The capability of the controller to suppress the oscillations without using the payload motion signal was also studied.
Simulink and MATLAB were used as a simulation platform and the exercises were conducted with Intel Core i7-5500U Processor, 2.4 GHz and 12 GB RAM. The double-pendulum overhead crane as used in Sun et al. (2017a) was considered with = 6.5 kg, 1 = 2 kg, 2 = 0.6 kg, 1 = 0.53 m, 2 = 0.4 m and = 9.8 m/s 2 . The nonlinear model of the system can be obtained by substituting the parameters into equations (1)-(3).
The fitness functions computed at each iteration were utilised to obtain the nine optimal control parameters for the case with the 3-PID control scheme. For a fair comparison between both approaches, the PSO parameters were set to the same values. The population size of particle was 20 with maximum iterations of 100, and the cognitive and social coefficients ( 1 and 2 ) values were set as 2. The initial value, was 0.9 and linearly decreased to 0.4 at some stages in the iteration for global and local searching. This is to reduce the risk of trapping into the local optimum and to enhance the convergence speed. The nine optimal PID parameters obtained using the PSO with the two fitness functions are listed in Table 1. It can be shown that the parameters for PID #2 and PID #3 for both approaches were significantly difference, in contrast to PID #1. This is due to the use of the vertical and horizontal distances in the fitness functions of the PSO algorithms.  The first investigation was to study the performance of the improved PSO-tuned PID control as compared to the other approach. The 3-PID control scheme was implemented with the obtained optimal parameters as shown in Table 1. To investigate the controller stability, the closed-loop poles with PID gains were observed. Figure 8 shows the pole-zero map of the closed-loop system, where all poles lie on the left-half plane indicating a stable system. The poles were located at 1 = −380, 2 = −1.66, 3 = −0.00036, 4,5 = −1.302 ± 2.437 and 6,7 = −1.630 ± 3.605.

Figure 8. Pole-zero map of the improved 3-PID control scheme
The aim is to move the trolley to a desired position of 0.6 m with low oscillation. Figure   9 shows the trolley position, hook and payload oscillations respectively with the control scheme. Table 2 Figure 9, the proposed approach provided a better performance with a less and a faster . It can be seen in Table 2 Table 2 where the proposed approach provided up to 29.7% and 42.6% reductions in the hook and payload oscillations respectively, as compared to the other approach. The faster settling time achieved with the proposed PSO algorithm is not directly related to the fast convergence solution shown in Figures 6 and 7, as the nine optimal gains, which also provided higher oscillation reductions.  The next investigation was to study the effectiveness of the proposed approach for the case without a payload motion sensor and thus, without feedback of the signal, 2 . This resulted in a less complex controller with a reduce control variable, as PID #3 in Figure 2 is not required.
This corresponds to the 2-PID control scheme as shown in Figure 3. However, to ensure a satisfactory system performance, the optimal PID parameters are obtained by considering the payload oscillation in the fitness functions. By analysing the hook and payload oscillations in Figures 9(b) and (c), it was found that 2 < 2 1 . In this work without the payload motion sensor, the extreme case with 2 = 2 1 was considered in solving the fitness functions in poles lie on the left-half plane indicating a stable system. The poles were located at 1 = −272, 2 = −6.066, 3 = −0.00006, 4,5 = −1.507 ± 1.245 and 6,7 = −0.565 ± 3.390. Figure 11 shows the trolley position, and hook and payload oscillation responses using the PID controllers, and Table 4 summarises the overall performance of the controllers.  were reduced about two-fold whereas both maximum oscillations were reduced by at least 20.9%. In addition, the overall oscillations were reduced by 28.6% and 47.7% for 1 and 2 respectively. However, by comparing Tables 2 and 4, it was noted that the improved 3-PID control scheme still provided a better system performance. This was expected as all the states were used for the control action. Nevertheless, although without the payload oscillation signal, the improved 2-PID controller demonstrated a superior performance as compared to the control PSO-Tuned 2-PID Improved PSO-Tuned 2-PID scheme with 3-PID controller tuned using the previous PSO algorithm. Despite a slightly lower performance as compared to the improved 3-PID control scheme, the proposed 2-PID control approach provided an acceptable performance and can be more desirable as a less complex controller is used and a sensor for measurement of the payload motion is not required.

Varying payloads
To further evaluate the effectiveness of the controller, the double-pendulum overhead crane under various operating conditions were simulated. In industries, the hook is constant, but the payload, 2 may change for several applications. In this work, cases where 2 = 1 = 2 kg and 2 is twice of 1 ( 2 = 2 1 = 4 kg) were considered. Using the proposed PSO algorithm, optimal PID gains for both control schemes are obtained as shown in Table 5.  Figure 12 shows the hook and payload oscillations using both control schemes, in which the optimal solution obtained by using the proposed approach provided almost similar crane performances. With a similar mass ( 2 = 1 ), the differences in the maximum of both hook and payload oscillations were small between 0.5-2.5%. With 2 = 2 1 , the differences in the maximum and overall oscillations using both control schemes were also small, which were between 3-6%. Table 6 summarises the simulation results with difference control schemes and payload masses.

Varying cable lengths
In normal practices, initially the cable length, 1 is longer than 2 (Sun et al. 2017a). However, 1 is subjected to changes during hoisting where a payload needs to be lifted up and down to be placed at a desired location. It was reported in Mar et al. (2017) that if the two cable lengths are equal or ratio of both cable lengths near unity, the contribution of the second mode increases and significantly affects the payload oscillation performances of the crane. To investigate the performance of the controller under this special condition, analyses with 1 = 0.2 m < 2 = 0.4 m and 1 = 2 = 0.4 m were conducted. New optimal PID gains based on the improved PSO algorithm using both control schemes are shown in Table 7. Figure 13 shows the hook and payload oscillations with the two control schemes for both cases of cable lengths. The proposed PSO-tuned PID controllers were shown to be able to control the hook and payload oscillations for the extreme case ( 1 = 2 ) and the case with 1 < 2 . Similarly, the 2-PID control scheme provided almost similar performances for the maximum and overall oscillations with only small differences between 2-6% as compared to the 3-PID control scheme. Table 8 summarises the simulation results with difference control schemes and various cable lengths of 1 and 2 .   In the future, the effectiveness of the control scheme for a double-pendulum crane with payload hoisting can be investigated. During this operation, the system oscillation frequencies and damping ratios change and resulted in a more challenging control system. Several intelligent methods including neural networks and fuzzy logic (Wang et al. 2017a;Wang et al. 2017b) could be explored to enhance the PID control scheme.

Conclusion
An efficient PID control of a nonlinear double-pendulum overhead crane tuned by using an improved PSO algorithm based on the vertical distance of oscillations and the system's potential energy was proposed. Using the proposed algorithm, optimal PID gains can be obtained within a shorter processing time and with a lower fitness value. Simulation results showed that the proposed PID controller was superior with a better performance in the trolley position response and lower hook and payload oscillations, as compared to the commonly used approach. In addition, the proposed controller without a payload motion feedback signal provided almost a similar performance as compared to the case with a full-state feedback. This is useful in avoiding the need for measurement for the payload motion in practice. Extended simulations with different hook and payload masses, and different cable lengths further demonstrated the advantage of the PID control with the improved PSO algorithm.