Keywords

1 Introduction

Robotic manipulators are mechanized devices to mimic human behavior in order to perform a continuous operation to fulfill various tasks like picking and placing of an object in industries, welding, assembling in automobile industries, handling of radioactive and bio-hazardous materials in nuclear plants, assistance in surgery in medical fields, etc. [1]. Since the dynamics of robotic manipulators is highly complex and nonlinear as well as it is associated with unavoidable structured and unstructured uncertainties like parameter variations, external disturbances, friction, noise, etc., it is a challenging task for researchers to effectively control the end effector of a manipulator to follow a desired trajectory [2]. Since the invention of proportional–integral–derivative (PID) controller in 1910 [3], the PID controller has been extensively used in industries due to its simple structure and effectively controls many real-world problems. In literature, different implementations of PID controller to control robotic manipulators have been cited by the researchers [4, 5]. In recent years, researchers showed that the nonlinearities must be included and modeled to study the system satisfactorily as they are inevitable and intrinsic for the system [6]. Now, researchers have been attracted toward the intelligent process control due to the progress in the area of fuzzy logic control (FLC), neural network (NN) and the genetic algorithm (GA) [7]. In 1965, Zadeh gave the concept of fuzzy logic based on fuzzy sets [8]. Not the requirement of exact mathematical modeling, incorporation of human expertise into the design and dealing with the uncertainties are the features, which make the FLC as an efficient controller to control the highly complex, nonlinear systems under parameter variations as well as external disturbances. Mamdani [9] reported a successful application of FLC in a laboratory scale process. Since then, different structures of the FLC have been developed by the researchers for the linear as well as nonlinear are presented in the literature. An improved fuzzy PI controller was introduced in [10], and it was proved that the tracking performance of the controller is much good as the conventional PI controller. A new hybrid fuzzy PI + conventional D was presented in [11] which was proved to be much robust as compared to a PID controller.

In addition to the implementation of the controller, it is very essential to properly determine the parameters of the FLC to make it more robust, and hence, a vast research has been done in the optimization of the parameters of a controller. As computational intelligence keeps on improving, the intelligent optimization technique has also been used for estimate the parameters of FLC controller. In this paper, a comparative study of the PID controller with fuzzy PID controller is done which is optimized with a highly efficient metaheuristic ant bee colony optimization technique to justify the superiority of fuzzy PID controller over PID controller. The implemented controllers are applied to highly complex and nonlinear two-link manipulator system with payload. The superiority of the fuzzy PID controller is also discussed in the case of parameter variations, disturbance rejection and noise suppression. It was found that the fuzzy PID controller overruled the PID controller in all the cases. This paper has six sections as follows: In the first section, introduction of the paper is given, second section shows the mathematical modeling of the system, third section gives the details of the PID controller, and fourth section explains the fuzzy logic controller design and optimization technique. Fifth section represents the simulation results, and sixth part gives conclusion of the paper.

2 Dynamic Model of the System

In this paper, the two-link robotic manipulator system with payload has been used as shown in Fig. 1. The mathematical model of the system is described in Eq. (1) given below [12].

Fig. 1
figure 1

Two-link planar robotic manipulator system with payload at tip

$$ \left[ {\begin{array}{*{20}c} {S_{11} } & {S_{12} } \\ {S_{21} } & {S_{22} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\ddot{\theta }_{11} } \\ {\ddot{\theta }_{22} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {P_{11} } \\ {P_{21} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {f_{r1} } \\ {f_{r2} } \\ \end{array} } \right] + \left[ {\begin{array}{*{20}c} {f_{n1p} } \\ {f_{n2p} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\tau_{1} } \\ {\tau_{2} } \\ \end{array} } \right] $$
(1)

where \( \theta_{1} \) and \( \theta_{2} \) are the position of the links, \( \tau_{1} \) and \( \tau_{2} \) are the generated torques, and \( f_{r1} \) and \( f_{r2} \) represent dynamic friction. The parameters values are shown below in Table 1 [12].

Table 1 Parameter values for link 1 and link 2 for the system

3 PID Controller

Reference [13] gives the conventional PID controller in time domain as in Eq. (2) given below:

$$ u\left( t \right) = k_{\text{p }} e\left( t \right) + k_{\text{I}} \int {e\left( t \right){\text{d}}t} + k_{\text{D}} \frac{{{\text{d}}e\left( t \right)}}{{{\text{d}}t}} $$
(2)

where u(t) is the output of the controller, and e(t) is the instantaneous error signal obtained as the difference between the reference signal and the plant actual output. The three terms \( k_{\text{p}} \), \( k_{\text{I}} \) and \( k_{\text{D}} \) are the proportional gain, integral gain and differential gain parameters of the controller.

4 Design of Fuzzy PID Controller for the Two-Link Manipulator System

In this section, implementation of fuzzy PID (FPID) controller has been described which is used to generate desired torque to effectively deflect the links of the system to move the end effector in a prescribed trajectory. Figure 2 shows the block diagram of the control system for the two-link manipulator system with payload using FPID. It depicts that the fuzzy PID is the combination of fuzzy PI and fuzzy PD controller. The system requires two inputs, i.e., error and rate of change of error. At the output of fuzzy logic controller (FLC), the output is integrated and added again with the output of the FLC to form fuzzy PID controller. KP1, KD1, KPI1 and KPD1 are the parameters of the controller for link 1, and KP2, KD2, KPI2 and KPD2 are the parameters of the controller for link 2 as shown in Fig. 2.

Fig. 2
figure 2

Block diagram of PID controller using fuzzy logic for two-link robotic manipulator with payload

4.1 Design of Fuzzy Logic Controller

Fuzzy logic controller (FLC) performs in three steps. First step is the fuzzification in which the crisp input data is converted into the fuzzy data with the help of membership functions defined in the range (−1, 1). In this work, seven membership functions with triangular shape as shown in Fig. 3 have been used. In the second step, a two-dimensional rule base is formed based on human knowledge using if–then, which is the principal part of a FLC. Table 2 shows the rules formed for the membership functions for the error and the derivative of the error. In addition to this, Mamdani inference mechanism is used which applies min–max composition for implication and aggregation using logical AND-OR operator. At last, in the third step, the fuzzified data is converted into again the crisp data by using the center of gravity method [14].

Fig. 3
figure 3

Triangular membership functions for fuzzification of error, the derivative of error and output

Table 2 Input–output rule base for FLC [1]

4.2 Optimization

In 2005, D. Karaboga having inspired by the foraging behavior of the honeybees introduced ant bee colony (ABC) algorithm, which is a swarm intelligence-based optimization algorithm [15]. In this work, the fitness function (fit) has been chosen as the sum of the integral of absolute error (IAE) of the links chosen given by the formula as shown in Eq. (3).

$$ {\text{fit}} = \mathop \int \limits_{0}^{t} \left| {e_{1} \left( t \right)} \right| {\text{d}}t + \mathop \int \limits_{0}^{t} \left| {e_{2} \left( t \right)} \right| {\text{d}}t $$
(3)

where \( e_{1} \left( t \right) \) is the instantaneous error signal between the reference signal \( r_{1} \left( t \right) \) and the plant’s output \( \theta_{1} \left( t \right) \), and \( e_{2} \left( t \right) \) is the instantaneous error signal between the reference signal \( r_{2} \left( t \right) \) and the plant’s output \( \theta_{2} \left( {t } \right) \) as given in Eqs. (4) and (5).

$$ e_{1} \left( t \right) = r_{1} \left( t \right) - \theta_{1} \left( t \right) $$
(4)
$$ e_{2} \left( t \right) = r_{2} \left( t \right) - \theta_{2} \left( t \right) $$
(5)

5 Simulation Results

The parameters of the controller obtained by the ABC algorithm minimize the fitness function (fit). The desired trajectory to be followed is taken as given in Eqs. (6) and (7):

$$ r_{1} \left( t \right) = - 2\sin \left( {\left( {\pi /3} \right)t} \right) $$
(6)
$$ r_{2} \left( t \right) = 2\sin \left( {\left( {\pi /2} \right)t} \right) $$
(7)

where r1(t) is the desired position for the link 1, and r2(t) is the desired position for the link 2. The settings of the parameters of the ABC for optimization are as follows: no. of population—40, food number—20, limit—100, max. cycle—100, lower bound—1 and upper bound—500. Figure 4 shows the convergence curve for the optimization technique which minimizes the value of the fitness function to follow the desired trajectory by both controllers. It is clear from the figure that the FPID controller acquires less value of the fitness function as compared to the PID controller and hence follows the desired path more effectively and efficiently than the PID. After optimization for trajectory tracking, the obtained parameters for the PID as well as fuzzy PID for both links are given in Table 3, and the overall fitness value of PID is found to be 3.38e−2 while of FPID is 13e−4. It depicts that the FPID controller is more efficient than the PID controller for trajectory tracking. Figure 5 shows the trajectory-tracking curve of the output of the link 1 and link 2.

Fig. 4
figure 4

Convergence curve for the fitness function (IAE) of the ABC optimized fuzzy PID and PID

Table 3 Parameter values for the controllers and the IAE values achieved after optimization
Fig. 5
figure 5

Output curve during trajectory tracking for a link 1 b link 2

5.1 Testing Against the Parameters Uncertainties

The PID controller and the fuzzy PID controllers are simulated by varying the parameter values of the system like +5% change in the masses of the links individually, +5% variation in the lengths of the links as well as +5% variation in the payload mass. The obtained IAE values for the links are listed in Table 4. The IAE values show that the FPID controller acquires less value of error as compared to PID even the parameters of the system are varying while the parameters of the controller are kept constant.

Table 4 IAE and fitness function values for link 1 and link 2 during parameters variations

5.2 Testing for the Disturbance Rejection and Noise Suppression

For robustness testing of the controller, a disturbance signal as given in Eq. (8) is applied to the controller outputs of both links simultaneously for 2 s, a noise signal as shown in Eq. (9) is accumulated at the output, and the results are shown in Table 5.

Table 5 IAE and fitness function values for link 1 and link 2 during disturbance and noise accumulation
$$ d\left( t \right) = 5\left( {u\left( {t - 5} \right) - u\left( {t - 7} \right)} \right) $$
(8)
$$ n\left( t \right) = r\left( t \right)*{\text{random}}*0.001 $$
(9)

6 Conclusion

Aim of the work done in this paper is to study and verify the efficacy and robustness of a nonlinear PID controller using fuzzy logic as well as an appropriate optimization technique to control a highly complex and nonlinear two-link robotic manipulator system. In this paper, it is shown that the FPID is more accurate as the IAE values of the links of the manipulator controlled with FPID are having very much less value as compared to the PID controller. In addition to this, the ant bee colony optimization technique used in this paper proved to give optimum parameters to get better results. Further, in the study of the controller in the presence of parametric uncertainties, disturbance and noise, it is found that the FPID overruled the PID controller by giving lower IAE values. The feasibility of the implemented controller in this work could be checked for more complex nonlinear systems like three-link manipulator systems, etc., in the future.