# Equivalence between Fuzzy PID Controllers and Conventional PID Controllers
## 2 The Equivalent Fuzzy PID Controller Design
Based on the above assumption, the membership degrees \(p\), \(q\), and \(r\) can be described as  
\[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}\]0  
The fired eight rules are listed below, and Figure 3 is an illustration for these eight rules. 1. \(IF\,e(t)\) is \(E_{i}\) and \(\int e(t)\) is \(I_{j}\) and \(\dot{e}(t)\) is \(D_{k}\)\(THEN\,u(t)\) is \(U_{i+j+k-2}\)
2. \(IF\,e(t)\) is \(E_{i}\) and \(\int e(t)\) is \(I_{j}\) and \(\dot{e}(t)\) is \(D_{k+1}\)\(THEN\,u(t)\) is \(U_{i+j+k-1}\)
3. \(IF\,e(t)\) is \(E_{i}\) and \(\int e(t)\) is \(I_{j+1}\) and \(\dot{e}(t)\) is \(D_{k}\)\(THEN\,u(t)\) is \(U_{i+j+k-1}\)
4. \(IF\,e(t)\) is \(E_{i}\) and \(\int e(t)\) is \(I_{j+1}\) and \(\dot{e}(t)\) is \(D_{k+1}\)\(THEN\,u(t)\) is \(U_{i+j+k}\)
5. \(IF\,e(t)\) is \(E_{i+1}\) and \(\int e(t)\) is \(I_{j}\) and \(\dot{e}(t)\) is \(D_{k}\)\(THEN\,u(t)\) is \(U_{i+j+k-1}\)
6. \(IF\,e(t)\) is \(E_{i+1}\) and \(\int e(t)\) is \(I_{j}\) and \(\dot{e}(t)\) is \(D_{k+1}\)\(THEN\,u(t)\) is \(U_{i+j+k}\)
7. \(IF\,e(t)\) is \(E_{i+1}\) and \(\int e(t)\) is \(I_{j+1}\) and \(\dot{e}(t)\) is \(D_{k}\)\(THEN\,u(t)\) is \(U_{i+j+k}\)
8. \(IF\,e(t)\) is \(E_{i+1}\) and \(\int e(t)\) is \(I_{j+1}\) and \(\dot{e}(t)\) is \(D_{k+1}\)\(THEN\,u(t)\) is \(U_{i+j+k+1}\)  
As shown in Equation (7), the crisp output \(u(t)\) can be evaluated as \(u(t)=\frac{\operatorname{num}u(t)}{\operatorname{den}u(t)}\) by taking the weighted average of the eight rules consequents. Thus, the denominator of \(u(t)\) with 8 terms will be finally reduced to 1, as shown in Equation (9). \[ \begin{array}{ll}\operatorname{den}u(t)&=pqr+pq(1-r)+p(1-q)r+p(1-q)(1-r)+( 1-p)qr\\ &+(1-p)q(1-r)+(1-p)(1-q)r+(1-p)(1-q)(1-r)\\ &=1\end{array}  \tag{9}\]  
On the other hand, the nominator part of \(u(t)\) with 8 terms is obtained by  
\[ \begin{array}{ll}\operatorname{num}u(t)=&pqr\,u_{i+j+k-2}+pq(1-r)\,u_{i+j+k- 1}+p(1-q)r\,u_{i+j+k-1}+p(1-q)(1-r)u_{i+j+k}\\ &+(1-p)qru_{i+j+k-1}+(1-p)q(1-r)u_{i+j+k}+(1-p)(1-q)ru_{i+j+k}\\ &+(1-p)(1-q)(1-r)u_{i+j+k+1}\end{array} , \tag{10}\]  
Figure 3: The fired eight rules. which can also be confirmed in Figure 3. In order to simplify Equation (10), we use a method of applying Equation (4) and defining \(u_{x}=u_{i+j+k}\). Then Equation (10) can be reduced to  
\[ \begin{array}{ll}\text{num}\;u(t)&=u_{x}+\Delta u(1-p-q-r)=u_{i+j+k+1-p-q-r} \\ &=\frac{(2(i+j+k+1-p-q-r)-3m+1)}{3(m-1)}a_{u}\end{array} , \tag{11}\]  
where Equation (3) is also applied. By substituting Equation (2) into Equation (8), we can rewrite the membership degrees \(p\), \(q\), and \(r\) as  
\[ \begin{array}{ll}p=\frac{(2i-m+1)a_{q}-(m-1)e(t)}{2a_{e}},\quad q=\frac{(2j- m+1)a_{i}-(m-1)\int e(t)}{2a_{i}},\\ \text{and}\quad r=\frac{(2k-m+1)a_{q}-(m-1)e(t)}{2a_{d}}.\end{array}  \tag{12}\]  
With Equation (12) substituted into Equation (11), \(\text{num}\;u(t)\) is finally obtained as follows  
\[ \begin{array}{ll}\text{num}\;u(t)&=\frac{a_{u}}{3(m-1)}[2i+2j+2k-3m+3+\frac{( m-1)e(t)}{a_{e}}-\frac{2 ia_{e}}{a_{e}}+\frac{(m-1)a_{e}}{a_{e}}+\frac{(m-1) \int e(t)}{a_{i}}\\ &-\frac{2 ia_{i}}{a_{i}}+\frac{(m-1)a_{i}}{a_{i}}+\frac{(m-1)\dot{e}(t)}{a_{d}} -\frac{2 ak_{d}}{a_{d}}+\frac{(m-1)\dot{a}_{d}}{a_{d}}]\\ &=\frac{a_{u}}{3d_{e}}e(t)+\frac{a_{u}}{3a_{i}}\int e(t)+\frac{a_{u}}{3a_{d}} \dot{e}(t).\end{array}