# Design and Evaluation of a New Fuzzy Control Algorithm Applied to a Manipulator Robot
## 2 Controllers  
According to [37], there are several types of Fuzzy Logic Controllers (FLC) that can be built, among which the most known are FLC-PD, FLC-PI, and FLC-PID. Depending on the type of controller, the following inputs may be used: error \(e\), error change \(\Delta e\), and/or sum of errors \(\sum e\). FLC-P: The equation for a conventional proportional (P) fuzzy controller is given by:  
\[u=k_{p}\cdot e(k) \tag{1}\]  
where \(k_{p}\) represents the proportional gain coefficient and \(u\) the control output. The rules for a P-type FLC are built based on the following formulation: If \(e\) is \(A_{i}\) then \(u\) is \(B_{j}\), where \(A_{i}\) and \(B_{j}\), \(i\), \(j=1,2,\ldots,n\). represent linguistic variables. FLC-PD: A Proportional-Differential (PD) FLC can be developed by using error and error change model, as shown in the following equation:  
\[u=k_{p}\cdot e+k_{d}\cdot\Delta e \tag{2}\]  
where \(k_{p}\) and \(k_{d}\) represent the coefficients of proportional and differential gains, and \(u\) corresponds to control output. The rules for a PD-type FLC are formulated as follows: If \(e\) is \(A_{i}\) and \(\Delta e\) is \(B_{j}\) then \(u\) is \(C_{k}\), where \(A_{i}\), \(B_{j}\) and \(C_{k}\) are linguistic variables and \(i=1,2,\ldots,n_{1}\), \(j=1,2,\ldots,n_{2}\) and \(k=1,2,\ldots,n_{3}\). FLC-PI: A conventional Proportional Integral controller is described as:  
\[u=k_{p}e+k_{l}\!\int\!edt \tag{3}\]  
where \(k_{p}\) and \(k_{l}\) are the proportional and integral gains coefficient, and \(u\) is the control output. This controller is built based on the following rules: If \(e\) is \(A_{i}\) and \(\sum e\) is \(B_{j}\) then \(u\) is \(C_{k}\), where \(A_{i}\), \(B_{j}\) and \(C_{k}\) are linguistic variables. This type of FLC has a good performance and reduces error in stationary state, but causes degraded rise time and settling time. These undesirable characteristics are generated by the operation of the controller's integral, although this integrator is introduced just to overcome the issue of errors in stationary state. FLC similar to PID: An additional option that allows for obtaining better performance in terms of rise time, settling time, overshoot and error in stationary state is to develop a PID, which is described by the following equation:  
\[u_{PID}=k_{p}\cdot e+k_{d}\cdot\Delta e+k_{l}\!\int\limits_{0}^{t}e\cdot dt \tag{4}\]  
The FLC-PID has the following rules: If \(e\) is \(A_{i}\) and \(\Delta e\) is \(B_{j}\) and \(\sum e\) is \(C_{k}\) then \(u\) is \(D_{l}\), where \(i=1,2,\ldots,n_{1}\), \(j=1,2,\ldots,n_{2}\), \(k=1,2,\ldots,n_{3}\) and \(l=1,\ldots,m\).. In general, a two-term PD fuzzy controller is not able to eliminate error in stationary state, whereas a two-term PI-fuzzy controller is. However, the latter has a slower response due to the integral term in the control variable. To meet the design criteria, including fast rise time, minimum overshoot, shorter settling time, and error at stationary status equal to zero, an additional option may be developed: a PID-type FLC. PID fuzzy controllers are four-dimensional (three inputs and one output) systems, whose control law is based on the error \(e\), error change \(\Delta e\), and error integral or sum \(\sum e\). Nevertheless, this FLC supports a long processing time that results in an excessively slow response, which is not suitable for applications that need a quick response, for example, the control of joint trajectory of the 2-DoF manipulator robot addressed in this study. Several authors have proposed different approaches to overcome the problems above, such as decomposing PID FLC into a fuzzy PD connected in parallel to various types of fuzzy gains, fuzzy integrators, integral fuzzy controller, deterministic fuzzy controller; fuzzy PD with gain control in stationary state; fuzzy PD with integral action control; fuzzy PD with fuzzy integral gain controller; fuzzy PD and PI combined, and fuzzy PD and I combined. All these configurations and their corresponding schemes are shown in [37].