The Efficiency of an Optimized PID Controller Based on Ant Colony Algorithm (ACO-PID) for the Position Control of a Multi-articulated System

— In this article, a robot manipulator is controlled by the PID controller in a closed loop system with unit feedback. The difficulty of using the controller is parameter tuning, because the tuning parameters still use the trial and error method to find the PID parameter constants, namely Proportional Gain (K p ), Integral Gain (K i ) and Derivative Gain (K d ). In this case the Ant colony Optimization algorithm (ACO) is used to find the best gain parameters of the PID. The Ant algorithm is a method of combinatorial optimization, which utilizes the pattern of ants search for the shortest path from the nest to the place where the food is located, this concept is applied to tuning PID parameters by minimizing the objective function such that the robot manipulator has improved performance characteristics . This work uses the Matlab Simulink environment, First, after obtaining the system model, the ant colony algorithm is used to determine the proper coefficients 𝐾 p , 𝐾 i , and K d in order to minimize the trajectory errors of the two joints of the robot manipulator. Then, the parameters will implement in the robot system. According to the results of the computer simulations, the proposed method (ACO-PID) gives a system that has a good performance compared with the classical PID.


INTRODUCTION
Robot manipulators are receiving more and more attention nowadays.This is because they carry out their tasks quickly and with a high degree of precision [1] [2].
The robot manipulator is a mechanical system multiarticulated, in which each articulation is driven individually by an electric actuator is the most robot used in industry, this system needs an efficient control strategy based on the dynamic model [3][4] [5][6] [7].
The control of robots is the spine of robotics.It consists in studying how to make a robot manipulator do what it is desired to do automatically; hence, it includes in designing robot controllers.Typically, these take the form of an equation or an algorithm which is realized via specialized computer programs.Then, controllers form part of the so-called robot control system [8] [9][10] [11] [12].
The Proportional Integral derivative (PID) controllers with simple structure have been in use for many years in industries for process control applications [13][14] [15][16] [17][18].This regulator is obtained by the association of three parameters   (Proportional Constants),   (Integral Constants) and   (Derivative Constants) in designing the controllers, the goal is to get the optimal system response according to the desired design specifications [19] [20] [21] [22].But it is hard to find a proper PID controller [23][24] [25].To solve this problem, various methods have been proposed to tune the parameters of PID including the Ziegler-Nichols method [26] which is the most standard one but it is often difficult to find optimal PID parameters with this method.
In this work, Ant colony algorithm is used to determine PID controller parameters on a robot manipulator with two degrees of freedom.Ant colony optimization (ACO) is one of the most recent techniques for approximate optimization and one of the most successful examples of swarm intelligent that was introduced in the early 1990's by the Italian scholar Dorigo.The inspiring source of ant colony optimization is the foraging behavior of real ant colonies.At the core of this behavior is the indirect communication between the ants by means of chemical pheromone trails, and the first ACO algorithm was called the ant system and it was aimed to solve the travelling salesman problem, in which the goal is to find the shortest round-trip to link a series of cities [49] Several research references said that parameter optimization using the smart methods has stable results compared to the classical methods [51][52] [53][54].This paper has two main contributions.First, after system modeling, PID corrector was designed the system using the Matlab / Simulink software.Secondly, for the same system, an ACO-PID corrector has been proposed.It has been established that the latter gives a better result from the point of view of the analysis of the performance (precision and response time).
The article is organized as follows, following the introduction (section I), section II describes the multiarticulated system.Section III describes the design of the PID controller.Section IV presents the ACO-PID design using the ant colony algorithm under MATLAB/Simulink.Section V interprets the numerical results and discussions.Section VI concludes this article.

A. System Description
An industrial robot is defined by ISO as an automatically controlled, reprogrammable, multipurpose manipulator programmable in two or more axes.The field of robotics may be more practically defined as the study, design and use of robot systems for manufacturing (a top-level definition relying on the prior definition of robot).
Typical applications of robots include welding, painting, assembly, pick and place as shown in Fig. 1 (such as packaging, palletizing), product inspection, and testing; all accomplished with high endurance, speed, and precision.Motion control: for some applications, such as simple pickand-place assembly, the robot needs merely to return repeatedly to a limited number of pre-taught positions.For more sophisticated applications, such as welding and finishing (spray painting), motion must be continuously controlled to follow a path in space, with controlled orientation and velocity.

B. Robot dynamic modeling
The analysis and control strategy design of robots generally includes kinematics analysis and dynamics analysis based on dynamic models.The dynamics model reflects the mathematical relationship between the motion of the robot, the driving torque and load [56].
The dynamical equation of manipulator robot of n solids articulated between us is given by equation (1) the following Lagrange method [57].
where,  is array of ( × 1) of all efforts applied on actuators () is the inertial matrix of ( × ), (, ̇) present the array of ( × 1) of all Coriolis and centrifugal forces, () is the array of ( × 1) of all gravitational references and , ̇, ̈ are: position, speed and acceleration of each articulation.
In this work the multi-articulated system retained is a robot manipulator with two degrees of freedom.The model dynamic of the system is defined by (2).
These matrices are defined by: where, Finally, the gravity matrix is given by: where, where, The system can be represented by the state-space mathematical model: where, the model obtained as (3), and the output given by: Finally from the equation ( 3), where, The Table I presents the robot manipulator parameters.The torque applied on actuators for each articulation

III. DESIGN OF PID CONTROLLER
A PID controller is the most widely used controller on an industrial scale, it has a simple structure [58] • It provides a control signal taking into account the evolution of the output signal in relation to the setpoint.
• It eliminates the static error due to the term integrator.
• It anticipates the variations of the output thanks to the derivative term.
The command structure of the PID controller is given by the Fig. 2. The output () of PID controller is given by (4).
where,   ,   ,   are respectively the gain proportional, integral and derive and () is the difference between the reference signal and the output.

A. Proportional term
An output value is produced by the proportional term that is proportional to the current error value.By multiplying a constant   that can be adjusted by the proportional response, the proportional term reduces the error response.The equation of this parameter is given by equation (5).
where,   is the proportional part of controller output,   is the proportional gain, and () is error term.

B. Integral term
Integral term   contributes as it proportions to the error duration and also the magnitude of error.It is the sum of the instantaneous error over time that gives the accumulated offset values which are previously corrected.This term given by equation ( 6) eliminates the steady-state error.
where,   is the integral part of controller output,   is reset time or integral time,   is the integral gain, and () is error term.

C. Derivative term
By determining the error slope over time and multiplying the derivative gain,   with this rate of change, the process error derivative can be calculated.The equation of the derivative gain   that dampens the dynamic response and improves the system stability as (7).
where,   is the derivative part of controller output,   is the derivative time,   is the derivative gain, and () is error term.
The independent effect of increasing parameters value in PID control is shown in Table II [41].The mathematical description of the PID controller applied to the control input of the manipulator arm  is described by equation (8).
According to equation ( 2) we can have (9). where, and The inputs of the torques applied to the arm are given by : And the error signals are given by : So, the general equation of the manipulator arm by introducing parameters PID controller would be equation (10). with, The Fig. 3 shows the multi-articulated system classical PID Control Some of these classical tuning approaches, such as Ziegler-Nichols tuning method, Cohen-Coon tuning method, and Gain and Phase method are centered on making some assumptions about system model and necessary output [68] [69] [70].

b) Optimization Techniques:
These methods entail the use of data modeling and cost function optimization techniques to adjust PID parameters.Among these are the evolutionary algorithms, swarm intelligence algorithms, and fuzzy logic algorithms.

IV. ANT COLONY ALGORITHM
The ant colony optimization (ACO) algorithm is a metaheuristic approach, it was first proposed by Marco Dorigo in 1992 in his Ph.D thesis.The principle of this method is based on the behavior of ants in real world, which are known to be able to find the shortest path from their nest to a food source.Ants accomplish this by depositing a substance called a pheromone as they move.This chemical trail can be detected by other ants, which are probabilistically more likely to follow a path rich in pheromone.This trail information can be utilized to adapt to sudden unexpected changes to the terrain, such as when an obstruction blocks a previously used part of the path [76]  After each move, an ant leaves a pheromone trail on the connecting path to be collected by other ants to compute the transition probabilities.Starting from the initial session i, an explorer ant m chooses probabilistically session j to observe next using the transition rule, as shown in equation (11).

Multiarticulated System
where, (, ) is the intensity measure of the pheromone deposited by each ant on the path (i,j).The intensity changes during the run of the program. is the intensity control parameter.(, ) is the visibility measure of the quality of the path (i,j).This visibility, which remains constant during the run of the program. is the visibility control parameter.
And   () is the set of sessions that remain to be observed by ant m positioned at session i.
Equation (11) shows that the quality of the path (i,j) is proportional to its shortness and to the highest amount of pheromone deposited on it (i.e., the selection probability is proportional to path quality).
Ants change the pheromone level on the paths between sessions using the following updating rule in equation (12). (,) ←  ⋅  (,) +  (,) (12) where,  is the trail evaporation parameter and (, ) is the pheromone level.
In this work, we apply the ant colony algorithm in the aim of tuning the optimum solution of the PID controllers (  ,   , and   ) by minimizin the objective function such that the multi-articulated system has improved performance characteristics.

V. DESIGN ACO-PID FOR À MULTI-ARTICULATED SYSTEM
To achieve good performance, a PID tuning approach based on ant colony optimization is created.This method optimizes the PID parameters for the position control of the robot.
The ant colony optimization (ACO) algorithm is a distinct method inspired by insect swarm behavior and was designed for combinatorial issues at first.ACO is a stochastic based metaheuristic method for solving combinatorial optimization issues that employs artificial ants.ACO's goal is to find shorter routes from their nests to food sources.
Choosing the optimization criteria that are used to assess fitness is the first stage in applying the optimization process.
The most frequently utilized PID controller indexes for measuring transient response performance are: • IAE : Integral of the absolute value of error in equation (13).
• ISE : Integral of the square value of error in equation (14).
• ITAE : Integral of the time weighted absolute value of the error can be seen in (15).
• ITSE : Integral of the time weighted square of the error as shown in (16).
In this paper, we present the optimization of the PID controller using the Ant colony algorithm for the position control of the robot.The goal now is to find the proper coefficients   ,   , and   in order to minimize the trajectory errors of the two joints of the robot manipulator.The control strategy is based on the dynamically response of the robotic system.The block structure is shown in Fig. 5.To solve the problem of the design of the PID controller with the ACO algorithm, this may be described as a network problem.The graphical representation of the optimized problem is shown in Fig. 6.The steps of PID optimization with ACO are given in the algorithm of ACO presented below:

Begin
Step1: Initialize the algorithm parameters.Initialize randomly a potential solution of the parameters of PIDi (  ,   ,   ) Step 2: Run the process model and evaluate the cost function Step 3: choose the successive node with probability by using Equation (9).
Step 4: Calculate the optimum values of   ,     Step 5: Use pheromone evaporation to avoid unlimited increase of pheromone trails and allow the forgetfulness of bad choices.
Step 6: Globally update the pheromone according to the optimum solution.Iterate from step 2 until the maximum of iteration is reached.
Step 7: choose the path of the maximum pheromone and optimum values of  ,     .End.

VI. NUMERICAL RESULTS AND ANALYSIS
In this paper design and implementation of Single Input and Single Output (SISO) control based on the proposed Optimized PID Controller (ACO-PID) and the classical PID model were tested to a reference signal (Fig. 7).This simulation applied to two degrees of freedom robot arm was implemented in Matlab/Simulink.Trajectory performance and position error are compared in these controllers.The flowchart for ant colony is as shown in Fig. 8.In this work, we have used the following parameters values for the ACO for PID which is step in the Table III.❖ The trajectory performances: The Fig. 9, Fig. 10, Fig. 11, and Fig. 12 are show tracking performance for first and second link with PID and ACO-PID for the reference trajectory.By comparing the input signal with PID and ACO-PID: For the first link (joint) controlled by PID, the output does not coincide with the reference (Fig. 9) but by the ACO-PID they coincident as shown in Fig. 10, the overshoot PID's higher than ACO-PID.For the second link controlled by PID, the output does not attaint the reference signal (Fig. 11) but by the ACO-PID they coincident as shown in Fig. 12.According to the results of the computer simulations, the ACO-PID controller better than the traditional PID.

CONCLUSION
In this work a multi-articulated system with two degree of freedom was controlled using two types of controls strategies, a control based on classical control PID, and optimized PID using Ant colony algorithm, this last one is used to determine the proper coefficients   ,   , and   in order to minimize the trajectory errors of the two joints of the robot manipulator.
From the results of research and discussion, it can be concluded that the control process with a control parameter tuning system PID with Ant colony algorithm present maximum control structure of our control model and give more and more efficiency for the robot model with more position stability and good dynamical performances so industrials would take into account the efficiency of the developing control model for the futures robot design considerations such to solving the inverse kinematics problem and analysis the workspace of a robotic arm.
[50].Fatima Zahra Baghli, The Efficiency of an Optimized PID Controller Based on Ant Colony Algorithm (ACO-PID) for the Position Control of a Multi-articulated System

Fatima
Zahra Baghli, The Efficiency of an Optimized PID Controller Based on Ant Colony Algorithm (ACO-PID) for the Position Control of a Multi-articulated System

Fig. 4 .
Fig. 4. The behavior of ant between Nest and Food

Fig. 7 .
Fig. 7.The reference signal , The Efficiency of an Optimized PID Controller Based on Ant Colony Algorithm (ACO-PID) for the Position Control of a Multi-articulated System

Fig. 13 .Position error of joint 1 F
Fig. 13.PID1 for the first link position error

TABLE I .
THE ROBOT MANIPULATOR PARAMETERS

TABLE II .
RESULTS EFFECT OF INDEPENDENT P, I, AND D TUNING

TABLE III .
ANT COLONY PARAMETERS Fig. 8. Graphical The flowchart for ant colony The Table IV displays the various PID parameter values tuned using the ACO technique.

TABLE IV .
RESULTS OF TUNING OF PID CONTROLLER BY ANT COLONY