Optimization of the PID-PD parameters of the overhead crane control system by using PSO algorithm

The development of combination of proportional-integral-derivative and proportionalderivative (PID-PD) controller for overhead crane is presented. Due to the pendulum-like settings, the swinging of load has caused many difficulties while operating the overhead crane. Swinging of the load causes unnecessary tension to the cable and structure of the overhead crane, which will compromise the safety of operator and other workers. Overhead cranes should have the ability to move the load to desired point as fast as possible while minimizing the load swing and maintaining the accuracy. Proportional-integral-derivative (PID) controller is used for overhead crane positioning and proportional-derivative (PD) controller for load oscillation. New time-domain performance criterion function is used in particle swarm optimization (PSO) algorithm for the tuning of the PID-PD controller rather than the general performance criteria using error of the system. This performance criterion function monitors the performance in terms of rise time, overshoot, settling time and steady state error of the overhead crane system. The performance of the optimised PID-PD controller is verified with simulation in MATLAB. The PSO optimized PID-PD controllers with new performance criterion are shown effective in improving the step response of the overhead crane position as well as controlled the load oscillation.


Introduction
Overhead cranes are commonly used in industrial fields such as harbour and factories. An overhead crane can be used for loading or unloading raw materials in warehouse, lifting heavy parts or components in production lines, or feeding materials in manufacturing plant.
An overhead crane is normally operated by trained operator [1]. During operations, the load of an overhead crane is free to swing like a pendulum. To increase productivity, modern cranes are operated at higher speed which can lead to dangerous situations and failure of the crane mechanism [2]. The precise positioning by an operator using only visual feedback is difficult due to the pendulum-like swinging motion exhibited by the load [3].
Problems of overhead cranes have driven many researchers to develop control algorithms to automate the operations of overhead cranes. Investigations show that the performance of the implementing controller in crane system is satisfactory in minimizing the swinging of the load [4].
In order to achieve fast and accurate load positioning, researchers have proposed several controls for overhead crane system. Fang et al. proposed simple PD controller to asymptotically control the overhead crane dynamics and two nonlinear controller that increase the coupling between the load and the gantry position [3]. The increased in coupling between the gantry and payload shows an improved in transient response [3]. In 2016, Albert and Aswin also proposed control systems of PID controller and fuzzy logic controller to eliminate the swing problem of overhead cranes [5]. There are also researches and studies on hybrid controllers for optimization of overhead crane. Hai et al. proposed an anti-sway tracking control, PID-Fuzzy Sliding Mode control (PID-FSMC) algorithm for two dimensional crane system [6].
There are many control algorithms have been developed to optimized the controller in term of swing, travel time and precision control of overhead cranes.
Smoczek and Szpytko proposed a controller based on Particle Swarm Optimization (PSO) to solve the problem of the load swing [7]. Another PSO based PID controller also introduced to obtain the optimal parameters according to the priority of time response [8]. GA-based PID+PD controller was proposed by Solihin et al. for automatic gantry crane system where PID controller for positioning control and PD controller for swing damping [9]. In 2010, Petrenko and Alavi proposed an improved fuzzy logic controller that based on genetic algorithm to estimate parameters and generate the fuzzy rules [10].
In the following topics, a brief discussion about PID controller and performance criteria are presented. Next, PSO algorithm is showed in detail. Further, the methodology of developing overhead crane system and implementation of PSO-PID controller are discussed. Finally, the results and its discussion based on the accuracy and travel time in term of maximum overshoot, steady state error, rise time and settling time of the system are well described and followed by the conclusion of this paper.

PID controller and its performance criteria
Even though many new control techniques based on optimisation procedures have been proposed, PID controller is still using in industrial applications [11]. PID controller has a simple structure which is easy to be understood and tuned by anyone with some basic knowledge in control engineering [12,13]. But the tuning of the controller parameters, which are proportional gain P K , integral gain I K , and derivative gain D K need to be done appropriately for satisfactory control performances [11]. One of the main research about PID controller is the tuning rules. Many methods have been emerged to determine the PID controller parameters in the past decades [11]. PID controller is used to improve the dynamic response as well as to reduce or eliminate the steady-state error. The derivative controller adds a finite zero to the open-loop plant transfer function and improves the transient response. The integral controller adds a pole at the origin, thus increasing system type by one and reducing the steady state-error due to a step function to zero [14]. , is given generally as [15]: The design of controller is to minimise the system error by anticipating the inputs, where the error of the system is the difference between desired response and actual input. The measure of the system error is used as the performance criteria. In general, the performance criteria of PID controller design is listed as in Table 1 below. Table 1. Performance criteria of PID controller [16].

Name of criterion Formula
Integral A disadvantage of IAE and ISE criteria in minimisation is they weights all errors equally independent of time which results in response with relatively small overshoot but long settling time. Even with ITSE criteria weighting errors with time, the analytical formula with derivative processes are complex and time consuming. ITAE is simpler and consume lesser time than ITSE with results in conservative settings. Without discriminating large initial error in the response following step demand, the ITAE is a popular performance criteria. But ITAE penalize smaller errors at a later time [16,17].
Therefore, a new performance criterion by Gaing in the time domain is to evaluate the PID-PD controller parameters is used in this paper [14]. A set of good control parameters new performance criterion is defined as follows [14]: where  weighing factor K array consisting P K , I K and D K : Weighing factor,  can be set to be larger than 0.7 to reduce the overshoot and steady-state error or smaller than 0.7 to reduce the rise time and settling time. By setting the value,  can be used to satisfy the requirements of designer. In this paper,  is set to 0.7.
To evaluate the performance criteria of each individual in the population, evaluation function given in equation (6) is used for each individual in every  (4). The value of the function indicates that the smaller the value of individual, the higher the evaluation value.

PSO algorithm
Particle swarm optimization (PSO) is an optimization method by Shi and Eberhart [19]. It is developed based on flock movement behaviour of bird and fish [20]. PSO was proposed for computational intelligence by exploiting simple social interaction rather than mere cognitive abilities [18]. Bai stated that PSO is an optimization algorithm, a heuristic global optimization method [20]. PSO is widely used for its easy implementation and the requirement of few particles to be tuned [20]. Shi and Eberhart also stated that the few parameters adjustment of PSO makes it widely used for optimizations [21]. Since the introduction of particle swarm algorithm in 1995, it was evaluated with promising future application areas such as human tremor analysis, product mix optimization, and power system load stabilization [21]. PSO is derived from the social-psychological theory, and has been found to be perform well in complex systems. PSO is an excellent optimization methodology and shows promising performance for obtaining optimal PID controller parameters [14]. With new parameter called inertia weight, w is added by Shi and Eberhart, this modified version has become the commonly used PSO where the inertia weight decreases linearly along with the iterations [19].
Each particle in PSO represents a potential solution to a problem in g -dimensional search space. The coordinate which linked to the best evaluation value of the particles has achieved so far is keep tracked and this value is called pbest . Another value that is being tracked is called gbest . gbest is the overall best value and location of any particle, obtained in the group [14,17].
Each particle in PSO adjusts its "flying" in the gdimensional search space according to its own and companion's "flying" experience with its own velocity. At each time step (iteration), the particles change their velocities and "fly" toward the pbest and gbest values. The particles updates their location at every time step as they "fly" in the search space [19,22].
The changing of the velocity of each particle toward its pbest and gbest locations at each iteration according to the following equation: With the velocity updated, the position of each particle will be modified according to the following equation: where m number of members in a particle; x , current position of particle j at iteration t ; g j pbest , pbest of particle j , member g ; g gbest gbest of the group.

Model of overhead crane
The model of the overhead crane is first developed with schematic diagram and later the equation of the model is formulated. Schematic diagram of overhead crane model is shown in Figure 1 below. In the Figure 1,  and F are payload mass, trolley mass, cable length, horizontal position of trolley, swing angle, torque and driving force. Nonlinear model of the gantry crane system is modelled based on [23]. The equation of motion of the overhead crane model is: With the overhead crane driven by DC motor, the dynamic of the DC motor is considered and the complete nonlinear differential equation of the overhead crane is obtained as follow: , 0 The structure of the overhead crane with PID and PD controller is shown in Figure 2 below.

PSO-PID-PD tuning
To control the position of the overhead crane, PID controller is implemented while for load oscillation control, PD controller is used. To tune the parameters, PSO algorithm is used. "Individual" is used to represent the "particle". The PID and PD controller parameters To evaluate the performance criteria of each individual in the population, evaluation function given in equation (14) is used in every population in the algorithm. The evaluation function consists of the performance criteria from PID and PD controllers of the overhead crane system for position and load oscillation.
The performance criteria for the evaluation function are defined as below:  The steps of the search of PSO-PID-PD is as follow [14,17]: Step 1: Specify the number populations and iterations.
Generate random number for members in particles K with dimension of 5  n , where n is the number of population and Step 2: Use Routh-Hurwitz criterion to test the closedloop system stability for each particle K .
Step Step 4: Evaluate the performance criteria of each particle in the population using evaluation value, f as shown in equation (14).
Step 5: Compare the evaluation value of each particle and set as pbest . The maximum value among pbest is then denoted as gbest .
Step 6: Calculate new velocity, v of each particle K using equation (17) below: Table 3. Particles velocity boundaries.

Parameters Value
Step 8: Update and modify the position of each member in particle K using equation (21) and check for boundary violation according to values in Table  4.
where max 1 , Table 4. PSO algorithm PID-PD controller parameters boundaries. The lower boundaries are set to negative values so that PSO algorithm can explore a wider range of values for more optimum PID-PD controller parameters.

Parameters Value
Step 9: Repeat Step 3 to Step 9 if the number of maximum iteration is not met. Otherwise, go to Step 10.
Step 10: The individuals of the latest gbest is the optimal PID-PD controller parameter.

Results and discussion
The simulation of the overhead crane system with PID-PD controllers was done in MATLAB R2014a and Simulink using Intel Core i5-3230M Processor, 2.60GHz, 8GB RAM. PSO algorithm with new time-domain performance criterion, equation (4) is used to tune and obtain the five optimal parameters of PID and PD controllers, where the function is evaluated using equation (14). In this simulation, 50 particles are used with 100 iterations. By default, 1 c and 2 c are set to 2. The initial value of w is 0.9 and linearly decreased to 0.4 with iterations. Table 5 shows the optimal PID and PD gain parameters obtained using the PSO algorithm with new time-domain performance criterion. The upper and lower boundary of the PID controller gains' parameters of PSO algorithm used in the simulation are shown in Table 3. The lower boundaries are set to negative values so that PSO algorithm can explore a wider range of values for more optimum PID and PD controller parameters.
The simulation of the overhead crane system with PSO tuned PID-PD controller implemented is conducted in MATLAB and the performance of the position and swing angle with nominal values  1 m 1.0 kg and  l 2.0 m is obtained and shown in Figure 3 with values shown in Table 6. The PID-PD parameters obtained from PSO algorithm is shown in Table 5. Later, the overhead crane system is conducted with various reference positions and load masses. The performances are shown in Figure 4 and Figure 5, and the values are tabulated in Table 7 and  Table 8.  To test the robustness of the PID-PD parameters, performance of the overhead system is tested with various reference position and load mass. The performance with reference position of 1.5 m and 2.0 m are tested, while 5.0 kg and 20.0 kg of load masses are tested for load oscillation.
From Figure 4 (a), the step responses of various reference positions are similar with same overshoot. The settling time for overhead crane positions are around 5.7 seconds and slightly decreases from 5.740 seconds to 5.726 seconds as the reference position increases from 1.0 m to 2.0 m. This shows that the overhead crane trolley can achieve higher velocity with greater acceleration as the reference position increases.
As for the load oscillation, the maximum angle increases from 0.1938 radians (11.1039º) to 0.3876 radians (22.2078º). The settling time (0.01 s) of the load oscillation increases from 7.708 seconds to 9.145 seconds as the reference position increases. The increase in maximum angle can be caused by the greater acceleration of the trolley as it travel.   From Figure 5 (a), the step responses of various loads are similar with different overshoot. The overshoot increases from 9.341% to 14.368% as the loads increases from 1.0 kg to 20.0 kg. The settling time for overhead crane position slightly decreases from 5.740 seconds to 5.628 seconds as the load increases. This shows that it is harder to control the trolley with a greater load.
As for the load oscillation, the maximum angle increases from 0.1938 radians (11.1039º) to 0.2336 radians (3.3843º). The settling time (0.01 s) of the load oscillation decreases from 7.708 seconds to 7.156 seconds as the load increases. Simulation results with higher load show greater maximum swing angle but the time required to settle down is much lesser.

Conclusion
The optimisation of the overhead crane control system using PSO tuned PID-PD controller is presented. With