# Equivalence between Fuzzy PID Controllers and Conventional PID Controllers
## 2 The Equivalent Fuzzy PID Controller Design  
The fuzzy PID controller design proposed is equivalent to a conventional PID controller, and is derived from the equivalence equations. First, for a conventional PID controller, the equation for output \(u(t)\) in the time domain is  
\[u(t)=K_{P}e(t)+K_{I}\!\int e(t)dt+K_{D}\frac{de(t)}{dt}, \tag{1}\]  
where the controller provides a proportional term, an integration term, and a derivative term. The output \(u(t)\) and the three inputs \(e(t)\), \(\int e(t)\), and \(\dot{e}(t)\) can be thought as fuzzy variables in the FLC design. It is assumed that the operating ranges for \(u(t)\), \(e(t)\), \(\int e(t)\), and \(\dot{e}(t)\) are \(OR_{u}=[-a_{u}\), \(a_{u}]\), \(OR_{e}=[-a_{e}\), \(a_{e}]\), \(OR_{i}=[-a_{i}\), \(a_{i}]\), and \(OR_{d}=[-a_{d}\), \(a_{d}]\), respectively. Figure 1 shows the membership functions for graphically defining the four fuzzy variables. As shown in Figure 1, the \(m\) fuzzy sets are equally-spaced and triangular-shaped for each input fuzzy variable \(e(t)\), \(\int e(t)\), or \(\dot{e}(t)\). On the other hand, the output fuzzy variable \(u(t)\) is fuzzified by \(3m-2\) singleton membership functions. Let \(e_{k}\), \(i_{k}\), \(d_{k}\), and \(u_{k}\) denote the center of fuzzy sets \(E_{k}\), \(I_{k}\), \(D_{k}\), and \(U_{k}\), respectively, so that we obtain the following equations  
\[e_{k}=\frac{(2k-m-1)}{m-1}a_{e},\quad i_{k}=\frac{(2k-m-1)}{m-1}a_{i},\quad d_ {k}=\frac{(2k-m-1)}{m-1}a_{d},\quad 1\leq k\leq m \tag{2}\]  
\[u_{k}=\frac{(2k-3m+1)}{3(m-1)}a_{u},\quad 1\leq k\leq(3m-2). \tag{3}\]We further define the distance between \(u_{k}\) and \(u_{k+1}\) as  
\[\Delta u\ =\ u_{k+1}-u_{k}, \tag{4}\]  
which will be used in later equation simplification. Based on the above fuzzy variables definition, the expression of antecedent (\(IF\)) and consequent (\(THEN\)) for each fuzzy rule is defined as  
\[IF\,e(t)\ \text{is}\ E_{i}\ \text{and}\ \int e(t)\ \text{is}\ I_{j}\ \text{and}\ \dot{e}(t)\ \text{is}\ D_{k}\ \ \ THEN\ u(t)\ \text{is}\ U_{l}\, \tag{5}\]  
where three input fuzzy variables \(e(t)\), \(\int e(t)\), and \(\dot{e}(t)\) are taken into consideration simultaneously. In the proposed linear fuzzy PID design, the overall fuzzy rules for the three-by-one system can be represented by the sliced cube fuzzy associative memory (FAM), as shown in Figure 2. Furthermore, we have the following equation related to Equation (5)  
\[l=i+j+k-2. \tag{6}\]  
Figure 1: Graphical definition of membership functions for fuzzy variables, \(e(t)\), \(\int e(t)\), \(\dot{e}(t)\), and \(u(t)\). Figure 2: Sliced cube fuzzy associative memory (FAM) representation of knowledge base. Subsequently, verification of the proposed design is done by applying the Sugeno-style inference, the resulting controller output \(u(t)\) for controller inputs \(e(t)\), \(\int e(t)\), and \(\dot{e}(t)\) can be calculated by carrying out an aggregation of the form  
\[u(t)=\frac{\sum u_{l}\times(\mu_{E_{i}}(e(t))\times\mu_{I_{j}}(\int e(t))\times \mu_{D_{k}}(\dot{e}(t)))}{\sum\left(\mu_{E_{i}}(e(t))\times\mu_{I_{j}}(\int e(t) )\times\mu_{D_{k}}(\dot{e}(t))\right)},\,1\leq i,j,k\leq m,\,l=i+j+k-2, \tag{7}\]  
where the product operation rule is used for the fuzzy logic implications and the center of gravity (COG) is applied for the defuzzification process. It is determined that there is at most, eight rules to be fired for any controller inputs \(e(t)\), \(\int e(t)\), and \(\dot{e}(t)\). To clarify, consider the crisp input \(e(t)\) corresponding to the membership functions \(E_{i}\) and \(E_{i+1}\) to the degrees of \(p\) and \(1-p\), respectively. Similarly, consider that \(\int e(t)\) maps the membership functions \(I_{j}\) and \(I_{j+1}\) to the degrees of \(q\) and \(1-q\), respectively. Also, it is assumed that \(\dot{e}(t)\) has degrees of \(r\) and \(1-r\) with respect to the membership functions \(D_{k}\) and \(D_{k+1}\).