Keywords

1 Introduction

Though the control theory has touched new heights, even today the most inescapable form of feedback compensation comes from the PID controller. PID controllers have become the backbone of the motion control system in the industry [1]. Self-adjusting PID has transformed the shape of the industrial world and made it suitable for engineers to bring the finest control of a plant. The output generated by the PID controller is the aggregation of the outputs of proportional, integral, and derivative controllers. As per the literature concerned, above 95% of industrial control is done by the PID controllers. A PID regulator ceaselessly figures an error e(t) as the distinction amid the process variable (PV) and set point (SP). PID’s accuracy and optimized automatic control make it a problem solver. As it has all the necessary dynamics like reduced rise time, steady-state error and improves the transient response which makes the system stable. Ziegler–Nichols developed the first tuning rules with two methods [2]. The first one is for an open-loop system, and the second one is for the closed-loop system. The Z-N adjusting in feedback loop requires the critical gain and critical period. In this technique, the controller is put on automatic mode while the integral and derivative actions are shut off. The regulator gain is raised until an interruption which causes continuous oscillations in the process variable. As the computational approaches are modernized in recent times for the sake of desirable results in industrial process control via tuning of the regulator’s optimization, algorithms came into role [3,4,5,6,7,8]. The principal proponents of the PSO algorithm were Kennedy and Eberhart in 1995 [9]. In order to get the finest results, different agents are employed. These agents move in a group and every agent tries to provide the finest outcome. In PSO individual particle’s latest location is decided by a velocity term which redirects the attraction of global best and its own best throughout the history of the particle and random coefficients.

2 Problem Formulation

The block diagram of a feedback control system of the closed-loop type is shown in Fig. 1. PID regulator comprises of following gains (a) proportional, (b) integral, and (c) derivative. The scheme of feedback type is reflected in Fig. 1 where reference input, control error, and measured output are denoted as r, e, y correspondingly.

Fig. 1
figure 1

Block diagram representation of a feedback control system [10]

In this control scheme shown in Fig. 1, the target system (plant) is represented as G(s) and regulator as C(s), which is specified by Eq. (1) as given below:

$$C\left( s \right) = K_{{\text{p}}} + K_{{\text{i}}} /s + K_{{\text{d}}} s$$
(1)

where Kp, Ki, Kd are separately recognized as proportional, integral, and derivative coefficients of the PID regulator that are heading for adjustment.

DC Motor Modeling

See Fig. 2.

Fig. 2
figure 2

Electrical equivalent circuit of DC motor [11]

System equations are represented as follows:

Torque equation:

$$T = K*i$$
(2)

Back EMF equation:

$$e_{{\text{V}}} = K_{{\text{W}}} *\left( {\theta^{\prime } } \right)$$
(3)

Torque equation using Newton’s second law:

$$T = J*\left( {\theta^{\prime \prime } } \right) + b*\left( {\theta^{\prime } } \right)$$
(4)

Terminal voltage equation using Kirchhoff’s voltage law:

$$V = L\frac{{{\text{d}}i}}{{{\text{d}}t}} + R*I + K_{{\text{W}}} *(\theta^{\prime } )$$
(5)

Using Eqs. (2)–(5) in Laplace domain, we get

$$P\left( s \right) = \frac{{\left( {\theta^{\prime } \left( s \right)} \right)}}{V\left( s \right)} = \frac{K}{{\left( {Js + b} \right)\left( {Ls + R} \right) + K*Kw}}$$
(6)

Using the block diagram, the obtained transfer function between angular position and voltage is given in Fig. 3:

$$G\left( s \right) = \frac{\theta \left( s \right)}{{V\left( s \right)}} = \frac{K}{{JLs^{3} + \left( {BL + JR} \right)s^{2} + \left( {BR + K*Kw} \right)s + K*Kt}}$$
(7)
Fig. 3
figure 3

Block diagram of DC motor [12]

The physical parameters of the DC motor are given below:

J = 1 kg m2, B = 8 N m s, R = 1 Ω, L = 1 H, K = 1 N m/A, KW = 15 V/Rad/s and Kt = 15 V/Rad.

On substituting the above parameters in Eq. (7), the transfer function model of the DC motor is given by Eq. (8):

$$G\left( s \right) = 1/\left( {s^{3} + 9s^{2} + 23s + 15} \right)$$
(8)

Moreover, error-based performance index to design an optimum PID regulator is being used in this work. Error-based performance criteria are utilized as a measurable tool to rate the functioning of the PID regulator system which has been designed in this paper. Utilizing the instant strategy an ‘ideal framework’ can be frequently planned, and a bunch of coefficients of PID regulator in the framework can be changed accordingly to achieve the necessary conditions. Framework execution of PID regulator is portrayed in ISE, IAE, ITAE, and ITSE. They are characterized as follows:

$${\text{ISE}} = \mathop \int \limits_{0}^{\infty } e^{2} \left( t \right){\text{d}}t$$
(9)
$${\text{IAE}} = \mathop \int \limits_{0}^{\infty } \left| {e\left( t \right)} \right|{\text{d}}t$$
(10)
$${\text{ITAE}} = \mathop \int \limits_{0}^{\infty } t\left| {e\left( t \right)} \right|{\text{d}}t$$
(11)
$${\text{ITSE}} = \mathop \int \limits_{0}^{\infty } te^{2} \left( t \right){\text{d}}t$$
(12)

3 Solution Methodology

  1. A.

    Two solution methodologies have been used in this research work. First one is tuning of PID using conventional Ziegler–Nichols (ZN) technique, and the second one is PID tuning using particle swarm optimization.

  2. B.

    Z-N METHOD USED FOR TUNING OF PID REGULATOR

We have used the second technique of ZN METHOD, i.e., tuning of PID with closed-loop method. This approach demands that the critical gain and critical time to be calculated. The derivative time constant (Td) is kept at zero while integral time constant (Ti) is retained at infinity. All this can be accomplished by altering the regulator gain (Ku) until continuous oscillations are met by the system (Table 1).

Table 1 Parameters used for Ziegler–Nichols closed-loop tuning [13]
  1. C.

    PSO-BASED PID REGULATOR TUNING

The transformative computational procedure is the base of PSO optimization. Collective ventures in a school of fish and group of birds were the reason and inspiration which brought out a new technique of optimization, and the proponents of this technique were Kennedy and Eberhart in 1995. A very few numbers of parameters are assigned to the PSO algorithm in contrast to other metaheuristic algorithms. Initialization of a cluster of simulated birds is done with random locations Xi and velocities Vi. Every bird in the swarm is scattered arbitrarily in the first stage throughout the D dimensional search space. Every particle within the cluster starts adjusting its velocity and location under the inspection of the objective function, companion’s experiences and their own experiences. Every particle remembers its best position attained by it along with the best global place attained by any other particle in the swarm throughout the exploration of an optimal solution. XI = (xi1, xi2, …, xiD) is the representation of the ith particle. Gbest denoted by symbol g is a representative of the finest particle amid all particles in the population. PI = (pi1, pi2, …, piD) is represented as pbest and VI = (vi1, vi2, …, viD) is represented as velocity of the particle.

The particles are modified corresponding to the equations below:

$$V_{{{\text{id}}}}{^{n + 1}} = w*V_{{{\text{id}}}}{^{n}} + c_{1} *{\text{rand}}()*\left( {p_{{{\text{id}}}}{^{n}} {-}X_{{{\text{id}}}}{^{n}} } \right) + c_{2} *{\text{rand}}()*\left( {p_{{{\text{gd}}}}{^{n}} {-}X_{{{\text{id}}}}{^{n}} } \right)$$
(13)
$$X_{{{\text{id}}}}{^{n + 1}} = X_{{{\text{id}}}}{^{n}} + V_{{{\text{id}}}}{^{n + 1}}$$
(14)

In this, two positive acceleration coefficients c1 and c2 are used. A random number between 0 and 1 is produced by rand () operator, and n represents iteration. The new results of the speed and location in comparison with the earlier results from its own top experience are evaluated by Eq. (7). According to Eq. (14), the particle moves toward a novel location. Shi and Eberhart [14] proposed the concept of inertial weight which was missing in the primary algorithm suggested by Kennedy and Eberhart. The work reports that the global exploration is facilitated by large inertia weight factor while local exploration is facilitated by a small weight factor. Moreover, particle swarm optimization exploration potential can be enhanced for multi-dimensional issues by regulating the weight of inertia which was proposed by various scientists. Later in 1999 Clerc [15] presented his own version of PSO which resulted in guaranteed convergence of algorithm for inertial weight w = 0.729.

  1. D.

    EXECUTION OF PSO TUNED PID CONTROLLER

The PSO-based technique has been used using MATLAB/Simulink model as shown in Figs. 4 and 5.

Fig. 4
figure 4

Simulink diagram of the PID-based control system [16]

Fig. 5
figure 5

Simulink diagram of four performance indices

Metaheuristic optimization can be implemented to alter PID regulator gains to guarantee the performance of the regulator at minimal functioning states. In Eq. (8), using the plant transfer functions Kp, Ki, and Kd are altered using PSO in offline mode. It primarily creates an initial horde of particles in a domain characterized by a matrix. Every particle denotes a unique result for PID coefficients. The values of these coefficients are varied on a scale between 0 and 100. As there are primarily three coefficients, we have to solve for three-dimensional space with velocity and position characterized by matrices of dimension 3× swarm size. For PSO algorithm, these values such as swarm size of 40, acceleration coefficients c1 = c2 = 1.494, and weight of inertia (w) which is reducing linearly from 0.9 to 0.4 as the number of iterations reach its maximum value are referred from the existing literature [17].

4 Results and Discussion

Using the traditional Ziegler–Nichols (Z-N) technique, the step response of the system creates large overshoot, instead superior performance is found with the execution of the PSO tuned PID controller. As compared to the Z-N technique, PSO has less overshoot and less settling time. The PSO process is simulated for 50 iterations. Collective step response is plotted for the Z-N method and PSO tuned controller with different performance index shown in Fig. 6. In Fig. 7 on applying step disturbance signal on the transducer side, PSO tuned PID controller attenuates the disturbance successfully and Z-N tuned PID controller takes more time to settle down.

Fig. 6
figure 6

Step response plot for Z-N and PSO tuned PID controller

Fig. 7
figure 7

Step response plot for Z-N and PSO tuned PID controller when a disturbance is introduced at the transducer side

Figure 8 denotes the plot between the fitness function value and the number of iterations. This plot shows how the value of performance index converges to minimum value with the increase in the number of iterations.

Fig. 8
figure 8

Performance index plot of PSO algorithm of IAE type

Relative outcomes for the PID regulators are shown beneath in Table 2 where the performance of step response is measured centered on the peak value, overshoot, settling time, rise time, and peak time.

Table 2 Parameters of step response for proportional integral derivative controllers

Table 2 shows the relative effect in which step response parameters for different tuning techniques are evaluated, and PSO shows a significant enhancement in the values of overshoot values and settling time.

Table 3 exhibits the controller gains optimized for respective methods. For different performance indices used in the PSO algorithm, PID regulators show different optimized gains.

Table 3 Controller gains optimized for respective methods

Table 3 exhibits the performance index used in the PSO algorithm and ZN method. It shows those different optimized gains that lead to different step response parameters.

5 Conclusion and Future Scope

As inferred from the results that PSO works well as compared to that of traditional Ziegler–Nichols method by attenuating the disturbance produced at the transducer side. PSO in comparison with Ziegler–Nichols method has less overshoot and less settling time, and because of this, it becomes a more efficient computational method. While a few parameters are to be adjusted in PSO, it has an edge over Ziegler–Nichols method and successfully gives optimal solutions. Moreover, indistinguishable performances are observed when PSO tuned PID regulators are optimized with various error-based performance indices. In relation to future scope other metaheuristic optimization techniques such as moth flame optimization (MFO) can be carried out for tuning of PID regulator as it has achieved a faster rate of convergence and less peak overshoot value. Here in this paper, third-order DC motor is used as a plant; however, higher-order DC motor model can also be considered for further research.