Optimal Design of PID Controller for the Speed Control of DC Motor by Using Metaheuristic Techniques

DC motors are used in numerous industrial applications like servo systems and speed control applications. For such systems, the Proportional+Integral+Derivative (PID) controller is usually the controller of choice due to its ease of implementation, ruggedness, and easy tuning. All the classical methods for PID controller design and tuning provide initial workable values for Kp, Ki, and Kd which are further manually fine-tuned for achieving desired performance.Themanual fine tuning of the PID controller parameters is an arduous jobwhich demands expertise and comprehensive knowledge of the domain. In this researchwork, somemetaheuristic algorithms are explored for designing PID controller and a comprehensive comparison is made between these algorithms and classical techniques as well for the purpose of selecting the best technique for PID controller design and parameters tuning.


Introduction
In this modern industrial age, there is hardly any industrial application in which DC motors are not being used [1,2].This is so because of ease of control, low cost maintenance especially of brushless DC motor type, low price, and ruggedness of DC motor over a wide range of applications.Some industrial applications, which are worth mentioning, in which DC motors are being used widely are machine tools, paper mills, textile industry, electric traction, and robotics.The flexibility in controller design of DC motors is due to the fact that armature winding and field winding could be controlled separately [3].In most of the applications of speed control of DC motors, the current in field winding is kept constant and the current in armature winding is varied or vice versa which gives excellent speed control performance over a wide range of desired values.In these applications, the purpose is to track the speed command by keeping output speed at desired level and to achieve desire speed or position control in minimum time without having large overshoots and settling times [4,5].
There are different types of controllers like lead, lag, LQR (linear quadratic regulator), PID, and sliding-mode control that could be incorporated in control applications [6][7][8].Among the few mentioned types of controllers, PID controller is one of the earliest and best understood controllers which is incorporated in almost every industrial control application due to its efficiency and ease of implementation [9].Although there are many classical techniques for designing and tuning PID controller parameters (  ,   ,   ) which are widely understood and easily applied, one of the main disadvantages of these classical techniques is that, for tuning PID controller through these techniques, expertise and experience are required.This is so because these methods provide a starting point and achieving desired performance fine tuning of parameters through hit-and-trial method is required.However, metaheuristic techniques may be a good choice to its dynamic nature.
Over the years, many metaheuristic and stochastic optimization techniques have been developed which are being applied in every discipline of life [10][11][12].These techniques are nature inspired depending upon the swarm intelligence, evolutionary, or foraging behavior of different species.Some of the widely used techniques are genetic algorithm (GA), particle swarm optimization (PSO), and simulated annealing (SA).These metaheuristic algorithms have been successfully  applied also in various fields of control systems and results obtained through these techniques have proven their supremacy over the classical techniques [13][14][15][16][17][18].
There have been previously many attempts for the nature inspired PID controller tuning; however, according to the best of our knowledge there has been a little work done in exploiting the power of hybrid techniques for the PID controller tuning.In this work, a PID controller design for speed control of DC motor is presented.First, the design through classical techniques like Zeigler-Nichols and Cohen-Coon methods is presented for establishing a base line.Then, six metaheuristic optimization algorithms are used to find the best possible parameters of PID controller subjected to minimization of a cost function and among these three of the hybrid techniques are used to establish the superiority of hybrid metaheuristic techniques over the others.A comprehensive comparison is made between the classical techniques and the metaheuristic techniques to show the strength, stability, and efficiency of these methods over the classical techniques.Although some stochastic algorithms have been used [13,16] previously for design of PID controller for different applications, this study presents some hybrid techniques by combining the global and local search techniques of swarm intelligence and evolutionary algorithms for PID controller design and it could provide a framework of PID controller tuning by considering the hybrid nature of metaheuristic techniques.
The organization of the rest of the paper is as follows.In Section 2, mathematical model of DC motor is derived.In Section 3, overview of classical techniques for PID tuning is presented.In Section 4, an overview of GA, PSO, SA, and Nelder-Mead (NM) is presented.In Section 5, results and simulations are discussed.In Section 6, conclusions about the present study are presented.

Mathematical Model of DC Motor
The dynamic behavior of DC motor is given by following set of relations [19] and its block diagram is shown in Figure 1.A simplified linear model is presented for this work ignoring the nonlinearities like the backlash and dead zones to simplify the application of metaheuristic techniques.Consider The parameters selected for DC motor simulation are listed in Table 1 [20].
The open loop step response of DC motor without PID controller is shown in Figure 2 and output values of response are provided in Table 2.

Classical Techniques
The response of DC motor is calculated by Ziegler-Nichols (Z-N) and Cohen-Coon (C-C) methods, respectively, in order to validate the proposed scheme.

Ziegler-Nichols (Z-N) Method.
Ziegler and Nichols proposed a rule for design and tuning of PID controller.From the and dc gain is According to Ziegler-Nichols rule the following relations could be used for determining PID controller parameters: where By using ( 5) to (11) we get the values of   ,   , and   listed in Table 3.

Cohen-Coon (C-C) Method.
Cohen and Coon also proposed a method for design and tuning of PID controller.Based on this method, PID controller parameters could be determined as follows [20]: By using (12) and also from ( 8) to (11) the following values of   ,   , and   have been obtained and listed in Table 4. (ii) GA uses population of solution for finding the optimum solution; (iii) it uses the fitness function rather than derivatives for evaluation purpose; (iv) it uses the probabilistic transition operators whereas other techniques use deterministic transition operators.
The general steps in GA algorithm are as follows.
Step 1 (create a random initial population).An initial population is created from a random selection of solution.
Step 2 (evaluate fitness).Each candidate solution is evaluated against a fitness function.
Step 3 (reproduction).The chromosomes with higher value of fitness value are more likely to reproduce offspring.
Step 4 (next generation).If the new generation contains desired solution, then problem has been solved, and if it is not the case, then the new population will go through the same process as described above.
Step 5. Termination based on number of iterations or required fitness value was achieved.
In our design method PID controller parameters (  ,   ,   ) are viewed as individuals and each parameter value is coded by a real number.

Particle Swarm Optimization (PSO).
The particle swarm optimization algorithm was proposed by Kennedy and Eberhart in 1995 [22].This algorithm is based on the social Advances in Artificial Neural Systems behavior of swarm such as bird flocking and fish schooling.Here, each individual bird is called the particle, and in our case each individual particle has three attributes which are   ,   , and   .
Each particle in PSO flies in the whole search space with a certain velocity which is dynamically adjusted according to its own flying experience and the knowledge gain by the velocities of its peers.Each particle is treated as particle in -dimensional search space.
The change in velocity and position of each particle is governed by the following relations: where  is inertia weight factor,  best is local best,  best is global best, V is velocity of the particle,  is the position of the particle,  1 [ best − (old)] is individual intelligence, and  2 [ best − (old)] is collective intelligence.

Simulated Annealing (SA).
The simulated annealing was originally inspired by the crystal formation process when solids are cooled down from some high temperature [21].The slower the cooling is, the more perfect crystal is formed.In cooling process, we ultimately converge towards minimal and stable energy state.The system movement towards stability is random, but the probability to stay in any particular configuration directly depends on the energy of the system and on its temperature.The said probability is given by the following Gibbs relation: where  is the energy in different energy states,  is the Boltzmann constant, and  is the temperature.In 1970, Kirkpatrick formed the simulated annealing algorithm by using the above said analogy.The SA behaves like hill climbing algorithm, but it avoids the local minimum and it usually gives good results.As in stochastic hill climbing algorithm, in each iteration of SA a new solution in the neighborhood of actual solution is randomly chosen.If the fitness value of the new solution is better than the previous value, then the new solution is accepted as the new current solution.If the fitness function is not improved, then the new solution is retained with a probability where ()−() is the difference of fitness function between the new and the old solutions.

Nelder-Mead (NM) Method.
Nelder-Mead method is a simplex method which is used to find the local minimum of a function of several variables [23].For the two variables function simplex is a triangle of three vertices and the method is a pattern search.At the worst vertex the function value is the largest and this worst vertex is replaced with new

Results and Discussions
Using the classical methods of PID tuning, Ziegler-Nichols and Cohen-Coon, PID controller was tuned by keeping the objective that settling time   and rise time   should be minimum and there should be no overshoots; that is, maximum percent over shoot   should be zero.The PID controller parameters obtained by these classical methods are given in Table 5.By using the above values of   ,   , and   , PID controller was designed and the closed loop response of this controller with the plant is shown in Figure 3 and also the output values of   ,   ,   and steady state error   are shown in Table 6.
It is apparent from Figure 3 and Table 6 that the settling time and maximum percent overshoot are very large and PID controller designed by these methods will not provide desired performance.So these techniques are not helpful in tuning the PID controllers for the systems in which the parameters of   ,   , and   are critical.
The same problem is also solved by six metaheuristic algorithms, namely, GA, PSO, SA, GA-NM, PSO-NM, and SA-NM, for designing and tuning of PID controller.Not only the global search but also the hybrid searching techniques using the Nelder-Mead algorithm as the local minimization search technique are also applied.The purpose is to study the optimization capabilities of these metaheuristic algorithms and to demonstrate that by using these techniques PID controller design and tuning give the more accurate and better results.There might be many possible objective functions like integral of time-absolute-error (ITAE), integral of absoluteerror (IAE), integral of time-weighted-squared-error (ITSE), and integral of squared-error (ISE), but the objective function used in these algorithms for the minimization is defined as follows [24]: One can change the value of , which is the weighting factor, in three steps, that is,  = 0.5,  = 1.0, and  = 1.5,  and see the effect of change of  on   ,   , and   .The lower and upper bounds on the values of   ,   , and   are given in Table 7 [25], while the parameters settings or values used in the simulations of various solvers are provided in Table 8.
The fitness function  values obtained by using these algorithms are shown in Tables 9-11.
As shown in Tables 9-11 and also in Figures 4, 5, and 6 the minimum objective function fitness value is found by SA-NM.The objective function contains the exponential factor and also the SA algorithm is governed by the Boltzmann distribution of the energies in different energies states which is also in the form of exponential function.So it is the reason that, for this particular problem, when we combined the SA with the local search method of NM it gave the best results even better than PSO and GA alone.So if the problem landscape and the algorithm which is being used match, then best results would be obtained.Also from Tables 8-10, it could be seen that the standard deviation for the SA-NM is small, which is a measure of convergence speed, and it could be inferred that SA-NM converges fast as compared to other algorithms used in this research work.
The step response for the mean values of   ,   , and   tuned by SA-NM is shown in Figure 7 and also values of   ,   , and   are given in Table 12.The step response in Figure 7 shows marked improvement over the previous step response of Figure 3 when PID controller was tuned by using classical techniques.
A multiple setpoint command is applied to the system tuned by SA-NM, Z-N, and C-C.The response to multiple setpoint is also shown in Figures 8 and 9.It is quite obvious from Figure 9 that the multiple setpoint tracking is excellent when PID controller is tuned using SA-NM.In this work,   a simplified linear model of the DC motor is considered neglecting the nonlinearities like backlash, dead zone, and effects of load torque changes.

Conclusion
On the basis of results obtained in the previous section the following conclusions could be drawn.The problem under discussion could be solved using metaheuristic techniques which give a substantial amount of improvement in terms of   ,   , and   as can be seen from Tables 6 and 12.Using metaheuristic techniques   decreased by 83.93%,   decreased by 17.58%, and   decreased by 98.71% as compared to Z-N method.Also the decrease in value for   ,   , and   was 92.11%, 50.32%, and 98.97%, respectively, as compared to C-C method.So the objective  of minimizing   ,   , and   is better achieved through metaheuristic algorithms, which validates the capabilities of these algorithms of best optimization algorithms for complex problems like PID controller tuning.Among all metaheuristic techniques for optimization the hybrid approach of SA-NM showed the best results and through this we obtained the PID controller parameters which showed the excellent results in terms of   ,   , and

Figure 1 :
Figure 1: Block diagram of DC motor.

Figure 3 :
Figure 3: Step response of system tuned by ZN and CC methods.

Figure 8 :
Figure 8: Multiple setpoint tracking for Z-N and C-C tuned PID.

2
Advances in Artificial Neural Systems

Table 1 :
DC motor parameters.  is back-emf,   is motor constant,   is back emf constant,   is inertia of rotor,   is viscous damping,   is developed motor torque, is torque delivered to load,   is disturbance torque (we neglect it),   is armature resistance,  is armature inductance,   is armature current, and  is s-plane.By using (1) the transfer function of DC motor is

Table 2 :
[20]otor output response.response of system one can find the following set of points (  ,   ) and (  ,   ).The first point corresponds to output of step response at a value of 35.3% and the second point corresponds to output of step response at a value of 85.3%[20].By using this method, we get open loop step response values of DC motor given as follows:  = 8 sec,   = 14.52, = 37.7 sec,   = 35.09,

Table 3 :
,   , and   values by using Z-N method.

Table 4 :
,   , and   values by using C-C method.
tool which is based on the method of "survival of the fittest." The principle of GA is simple: imitate genetic and natural selection in the form of computer program.The parameters of the problem are coded as DNA-like linear data structure, a vector or a string.GA differs from conventional optimization techniques in a way that (i) GA works with coding the solution set and the solution is not itself used;

Table 5 :
Parameters of PID through Z-N and C-C methods.

Table 6 :
Response for Z-N and C-C methods.

Table 12 :
Step response values for SA-NM. .Hence, metaheuristic techniques are far better than the classical techniques, and among these hybrid approach is preferable.However, in future work, these effects could be considered to form a comprehensive nonlinear model of DC motor and solve the problem of PID tuning based on the mentioned metaheuristic techniques because according to the best of our knowledge there has been a lot of research potential for the PID controller tuning by considering the nonlinearities of DC motor model.Some other techniques like ant colony optimization (ACO), bacterial foraging algorithm (BFA), and differential evolution (DE) could also be considered by making the hybrid pairs of these algorithms with some local search techniques.