Adsorption control of a pipeline robot based on improved PSO algorithm

Particle swarm optimization (PSO) is a widely used method that can provide good parameters for the motion controller of mobile robots. In this paper, an improved PSO algorithm that optimize the control PID parameters of a specific robot have been proposed. This paper first presents a brief review of recently proposed PSO methods, and then presents a detailed analysis of the PID optimization algorithm, which uses H∞ theory to reduce the search space and fuses the information entropy to ensure the diversity of particles. Simulations in Matlab show that the algorithm can improve the convergence speed and get a better global optimization ability than the standard PSO algorithm. Experimental results present a sound effects for the control of the negative pressure adsorption motor in the power grid pipeline robot during its adsorption along the circular movements, which verifies the effectiveness of the proposed method.


Introduction
When adsorption robots carry out circular movement along the inner wall of the electric power pipeline [1], it is necessary to adjust the parameters of the adsorption motor in real time, so as to control the appropriate adsorption force, thus the robot can stably adsorb on each position of the inner wall of the pipeline under the composite action of gravity and suction [2]. In actual motion, the robot often appears adsorption instability or motion jam, due to the time delay of control parameters [3]. This problem of the control system is mainly due to the delay between the feedback and the system output. For the classical PID control algorithm used for the adsorption motor, the main problem is the optimization of key parameters, whose quality directly affects the performance of the system, and even leads to the divergence and oscillation of the control system [4]. Therefore, the parameter optimization of the controller plays an important role for this kind of time-delay system [5], and meanwhile the high-B Yanli Xu xuyanlilynn@hotmail.com 1 Northeast Forestry University, Harbin, China 2 Electric Power Research Institute of Guangdong Power Grid Co., Ltd, Guangzhou, China order and nonlinearity of the control make it very difficult to adjust the parameters [6].
The traditional PID parameter optimization methods include stable boundary method, attenuation curve method, dynamic characteristic method and Ziegler Nichols empirical method, etc. [7][8][9]. In recent years, there are many PID parameter tuning methods based on artificial intelligence technology [10], such as expert system method. The PSO PID control algorithm proposed in reference [11] has a good control effect on the process control with large time delay.
In reference [12], a chaos PSO algorithm based on chaos optimization is proposed, which can directly identify the closed-loop transfer function of the controlled object with time delay without transforming it into state equation. In reference [13], a simple method based on PSO is proposed to determine the stability of time-delay systems, where PSO is used to search the characteristic roots of quasi characteristic polynomials. In reference [14], a method of parameter estimation based on PSO is proposed to solve the problem of step response identification for low order delay systems. In reference [15], taking the linear motor servo system as the research object, a PSO PID controller parameter optimization algorithm is proposed, which optimizes the number of particles and decreases the inertia weight by sections. In ref-erence [16], the fuzzy PID control method based on PSO is applied to the design of motor controller.
In this paper, aiming at the problem that the pipeline robot moves along the pipeline due to poor control of the negative pressure adsorption motor, a PID control algorithm based on an improved particle swarm algorithm (PSO) is proposed to solve the problem of robot movement along the pipe wall. The rest of this paper is organized as follows. In section "Related work", we discuss the related work. In section "The basic idea of improved particle swarm optimization algorithm", we introduce the basic idea of improved PSO algorithm. Section "Parameter optimization of the PID based on the improved PSO algorithm" describes parameter optimization of the PID based on the improved PSO. We validate the performance of the proposed method by simulations and experiments in section "Simulations and experiments" and we conclude in section "Conclusions".

Related work
Particle swarm optimization algorithm which is proposed by Eberhart and Kennedy, is a collective optimization algorithm and a research algorithm inspired by the foraging behavior of the bird flock [17]. In PSO algorithm, every positioning particle is a potential solution to a question. Every particle has its own position and speed and produces random solution at the phase of initialization [18][19][20]. Speed stands for the rapidness and slowness of the motion and position indicates the direction of the motion. The optimal solution searched independently by each particle is called individual extremum and the optimal individual extremum in the particle swarm is taken as the global optimal solution. With the continual iteration, the speed and position are improved and the optimal solution is obtained to satisfy the terminal conditions.
The formula representing the speed and position of PSO algorithm is as follows: In which,Vid represents the velocity of the particle i in the d dimension,ω is the inertia weight,c1 and c2 are parameters for regulating the relative importance of P id and P gd , rand() is a random number between 0 and 1. Thus, the next position of the particle can be obtained: It can be seen from Eqs. (1) and (2) that the moving speed of particles is determined by three parts, its original speed Vid, the best distance to itself (P id −X id ) and the best distance to the group (P gd −X id ). And the relative importance is determined by weight coefficient ω, c 1 and c 2 respectively. The standard PSO algorithm is described as follows: Step 1 Initialize all particles, set the population size as S, and the dimension of search space is D. Give each particle an initial position Pi and initial velocity at random, and the best value in Pi is recorded as Pg; Step 2 Regenerate the speed and position of particles according to Eqs. (1) and (2). Calculate the velocity of particles to make sure the value is between [− V max , V max ]; calculate the position of particles to make sure the value is between [− X max , X max ]; Step 3 Calculate the adaptation value of each particle according to the objective function; Step 4 For each particle, compare the adaptation value calculated in step 3 with the best adaptation value Pi experienced by the individual. If it is better than Pi, make it the best place to be Pi; also compare the adaptation value with the group best adaptation value Pg. If it is better than Pg, make it the best place to be Pg; Step 5 Judge whether the termination conditions of algorithm is reached. If termination condition is achieved, output relevant results, if not, turn to step 2.
PSO algorithm reveals good effect for parameter optimization in robot control. Reference [21] presents an efficient and fast method for tuning the controller parameters of robot manipulators in constrained motion. The stability of the robotic system is proved using a Lyapunov-based impedance approach whereas the optimal design of the controller parameters are tuned, in offline, by a PSO algorithm [22,23]. Also PSO algorithm is used to design a structure-specified mixed H2/H infinity controller for control balancing of Bicyrobo, which is an unstable system associated with many sources of uncertainties due to un-model dynamics, parameter variations, and external disturbances [24]. Reference [25] considers a robot path planning problem originated from a robot factory inspection scenario for a dynamic uncertain environment, in which an improved PSO algorithm with a random positive feedback factor in velocity updating is used to optimize the path. A method based on PSO is proposed to search the unknown parameters in cartesian path planning of free-floating space robot without affected by the initial parameters [26]. A PSO-based fixed structure H infinity controller [27] is proposed to control the developed arm exoskeleton, which can avoid permanent damages to the device and user.
The basic idea of improved particle swarm optimization algorithm PSO algorithm reveals good adaptability in controlling parameter optimization and is widely applied in the scientific researches. However, the parameters in PSO algorithm must be carefully selected, such as the situation of swarm number. If the swarm is relatively small, it will cause the problem of partial optimization. And if the swarm is too large the convergence speed will slow down. Therefore, it is important to choose the system parameters according to different systems.
In view of the problems in the standard PSO algorithm, it is improved and optimized to apply into the PID parameter design. Firstly, H∞ theory is introduced to determine the initial searching range of PSO algorithm along with the information entropy to evaluate and adjust the initialized particle swarm. In this way, the initialized swarm becomes more dispersed, the convergence speed of PSO algorithm is improved, and the global searching ability is achieved. When applied in delay PID parameter design, the delay problem can be better improved.
The basic flow chart of parameter optimization using the improved PSO method is shown below:

Initializing methods of information entropy based on H∞ theory
In 1981, Zames proposed H∞ theory and widely applied in the field of controlling. While applied in the PID parameter design, H∞ theory can reduce the initial searching radius, but its random sorting does not suit the situation of the diversity of particles. Shann put forward a concept of information entropy, which well solved the problem of information measurement and maintained the uncertainty of the system. The feature of uncertainty can be utilized to deal with the problem of low degree of disorder at the stage of swarm initialization. Information entropy represents the degree of disorder to optimize the initial swarm of PSO algorithm, and improve the searching speed, convergence and the global optimization ability of searching space.
The concrete implementation procedures of PSO algorithm with initialization function are shown as follows: Step 1 Modify the initialization parameters of PSO algorithm: swarm number N, searching space dimension D, maximum iteration number iter_max, lower limit and higher limit of searching space [L d , H d ], minimum and maximum of flight velocity [v min , v max ], learning factor c l ,c 2 , weight coefficient w iter , entropy threshold of inter-particle similarity E ps and entropy threshold of internal parameter E kp , E ki, E kd , etc.. Step 2 Identify the searching range of particle swarm based on H∞ theory, and initialize the particles randomly with information entropy theory x i ,1 ≤ i ≤ N.
Step 3 Calculate the similarity entropy between particles S ps , internal parameter entropy S kp , S ki and S kd . Judge whether they are within the threshold range. If within the range, enter step 4. If not step 2 is resumed.
Step 4 Calculate the adaptation value of each particle according to the selected adaptative function and compare the individual extremum pbest and global extremum gbest of particle swarm.
Step 5 Regenerate the speed and position of particles according to Eqs. (1) and (2). Calculate the renewal adaptation value of particles.
Step 6 Judge whether the termination conditions of algorithm is reached. If maximum iteration number is achieved, calculation accuracy is less than ε or the maximum stopping pace of optimal solution is Δt, turn to step7.
Step 7 Discriminate optimization again. If necessary, redefine the particle searching space range with the aid of the present optimization results and return step 1. If not, stop the optimization (Fig. 1).

Delay PID parameter design based on the improved PSO algorithm
Aiming at solving the problems of great searching extent, poor searching abilities and failure in convergence in the process of designing big delay PID control parameter by PSO algorithm, PID design based on the improved particle swarm algorithm is put forward. It is applied to adsorb the robot's main motor control system and the parameters K P ,K I , K D

Improved PSO algorithm
Controller G C (s) Fig. 2 Diagram of PID control system based on the improved PSO algorithm are set and adjusted. The diagram of control system of PID parameter design based on the improved PSO algorithm is shown in Fig. 2.

Evaluation function selection
The three parameters K p , K i , K d are optimized by the real coding of PSO, and the particle coding strings [K p , K i , K d ] of PSO algorithm are formed by these parameters. The optimization of the control parameters aims at leading the controlling deviation of the step response to zero, enabling rapid response speed and less and even no overshooting. Performance index of error absolute value time integration is adopted as the minimum target function of parameter selection and the quadratic term of controlling input is added to the target function to limit the excess controlling energy. The following formula is used as the optimal index of parameter selection [11].
In the formula, e (t) indicates system deviation, u(t) is the controller output, t u is the rising time, and w 1 , w 2 , w 3 are correlation weights. The emphasis points of performance are adjusted with the setting of the weights.
Punitive function is used to avoid overshooting. That is, if overshooting occurs, its value is taken as one of the optimal index. And the optimal index at the moment is: (4) In this formula, w 4 is set much larger than w 1 , and ey (t) y out (t) − y out (t − 1), y out (t) as the controlled object output. The minimum value of target function derived by the algorithm corresponds to the optimization results of PID parameters. The design objective of PID is to minimize the index function J of system performance. And the conditions of minimum phase and gain margin must be satisfied to keep the robustness of the system.

Algorithm realization
The calculation procedures of PID controller parameter design are shown as follows: Step 1 According to K p , K i , K d parameter design, modify the initialization parameters of swarm algorithm: swarm number is set as N 30, searching space dimension is D 3, maximum iteration number is iter_max 100, lower limit and higher limit of searching space are L d , and H d respectively, among which L d K min , learning factor is c l c 2 2, weight coefficient decrease linearly, i. e. w iter 0.9−0.4t/iter_max, entropy threshold of inter-particle similarity E ps and entropy threshold of internal parameter E kp , E ki, E kd , etc.
Step 2 Identify the searching range of particle swarm based on H∞ theory, and initialize the particle swarm objectively with information entropy theory Step 3 Calculate the similarity entropy between particles S ps , internal parameter entropy S kp , S ki and S kd . Judge whether they are within the threshold range. If within the range, enter step 4. If not step 2 is resumed.
Step 4 Calculate the adaptation value of each particle according to the selected adaptative function and compare the individual extremum pbest and global extremum gbest of particle swarm.
Step 5 Regenerate the speed and position of particles according to Eqs. (1) and (2). Calculate the renewal adaptation value of particles.
Step 6 Judge whether the termination conditions of algorithm is reached. If maximum iteration number is achieved, calculation accuracy is less than ε or the maximum stopping pace of optimal solution is Δt, turn to step7.
Step 7 Discriminate optimization again. If necessary, redefine the particle searching space range with the aid of the present optimization results and return step 1. If not, stop the optimization.

Simulations and experiments
In order to verify the effectiveness of the PID parameter optimization method based on the improved PSO algorithm described above, this paper selects a typical second-order inertial time-delay controlled object of the adsorption robot main motor, and performs optimization and calculation of PID parameters. The experiment uses Intel Core i7-6700 2.6 GHz CPU, 8GRAM PC, Windows 10 64-bit operating system, and Matlab software to implement the algorithm in this paper.

G(s)
400 In order to facilitate the simulation operation, the input signal of the model is set as a unit step signal, and the sampling period is 2 ms. We use the improved PSO algorithm and the standard PSO algorithm of this paper to tune the PID controller parameters of the controlled object, and the respective step response control effects are compared.
In the process of optimizing PID parameters, the search spaces of K P , K I , and K D are [0, 60], [0, 1], and [0, 1], respectively. The number of individuals (particles) in the initial population is N 30, and the number of optimization iterations is G 100. The parameters of the evaluation function are w 1 0.999,w 2 0.001, w 4 100, and w 3 2.0. After 100 iterations of the algorithm, the optimal solution is shown in Table 1. Figure 3 shows the convergence trend of the evaluation function values of two different algorithms to optimize the PID parameters, and Fig. 4 is a comparison chart of the unit step response of the system after PID parameter tuning.
From the convergence trend curve of the evaluation function in Fig. 3, it can be concluded that the convergence speed and search ability of the tuning PID controller parameters improved by the improved PSO algorithm are superior to the traditional PSO algorithm. The iteration time can be quickly reduces for 30 to 10. From the comparison of the results in Fig. 4 and Table 1, it can be seen that the improved PSO algorithm PID controller is superior to the traditional particle swarm algorithm PID controller in terms of system response adjustment time and rise time indicators. As a whole, the step response control of the improved particle swarm controller is better than the basic PSO algorithm controller, and it has a good control effect.
The algorithm is transplanted to a controller based on the ARM architecture, and the robot is controlled to walk along the pipeline from 0°to 360°. Experiments show that the algorithm can meet the speed control of the brushless DC motor during the adsorption process of the robot from stationary to upside down. The effect of experimental adsorption is shown in Fig. 5.

Conclusion
Aiming at the problem that the pipeline robot moves along the pipeline due to poor control of the negative pressure adsorption motor, a PID control algorithm based on an improved particle swarm algorithm (PSO) is proposed to solve the problem of robot movement along the pipe wall. The improved algorithm uses H∞ theory to reduce the search space and fuses the information entropy to ensure the diversity of particles. A PSO algorithm with initial optimization is proposed. The parameters obtained are used to control the speed of the motor in the PID parameter tuning. After simulation in Matlab, experiments show that the algorithm can improve the convergence speed and have a better global optimization ability than the standard PSO algorithm. At the same time, the algorithm can be used to effectively solve the problem of robot motion freeze when it is applied to a power grid pipeline detection robot. Also, this parameter optimization method by Improved PSO Algorithm is believed to be effective in the similar dynamic motion control.