# An Optimal Fuzzy PID Controller Design Based on Conventional PID Control and Nonlinear Factors
## 3 Simulation Results
### Simulation 1: A Two-Order Plant  
A two-order controlled plant is shown below with transfer function [19]:  
\[G(s)=\frac{2}{s^{2}+12s+24}. \tag{7}\]  
First, the unit feedback control structure is adopted, as shown in Figure 5. A preliminary conventional PID controller design with \(K_{P}=50\), \(K_{I}=250\), and \(K_{D}=1.5\) can be obtained through some basic traditional techniques. Experiments to verify the proposed design approach can be seen in the following section. Figure 4: Crossover operation: (**a**) all parameters; and (**b**) single parameter. Subsequently, we built the equivalent FLC for the above conventional PID controller design through the procedure shown below, which will satisfy Equation (4). 1. \(OR_{e}\) is set as \([-a_{e},\ a_{e}]=[-1.33,1.33]\), which is the range for \(e(t)\). 2. \(OR_{u}\) is set as \([-a_{u},\ a_{u}]=[-199.5,199.5]\) to satisfy \(K_{P}=50\). 3. \(OR_{i}\) is set as \([-a_{i},\ a_{i}]=[-0.266,0.266]\) to satisfy \(K_{I}=250\). 4. \(OR_{d}\) is set as \([-a_{d},\ a_{d}]=[-44.33,44.33]\) to satisfy \(K_{D}=1.5\). The parameter \(m\) is set as 5, resulting in 5 fuzzy sets for each input variable of the FLC. Figure 6 shows the settings of all the MFs in the Matlab environment. The linearity of the equivalent fuzzy PID controller can be verified by the control surface view shown in Figure 7, which is similar to the plan surface shown in [23]. The resulting equivalent fuzzy PID controller has almost the same system response as the conventional PID controller. With the conventional PID controller design and the corresponding equivalent FLC, we finally have a basic understanding about the operating ranges of fuzzy I/O variables for a FLC. We can then add additional nonlinear factors and enlarge the operating ranges to find the optimal fuzzy PID controller through GA.  
For the GA optimization, we use an 11-bit binary coding for each variable, and each generation contains 20 individuals. The search domains are confined to \(0<a_{e}\leq 10\), \(0<a_{i}\leq 50\), \(0<a_{d}\leq 100\), \(0<a_{u}\leq 5000\) and \(0.01<\gamma_{(e,d,\mu)}\leq 7\). Moreover, the mutation rate is set as 0.1, and the elitism is applied to keep the best two individuals across generations. It is required to initialize a population with randomly generated individuals and evaluate the fitness value of each individual for the first step of GA. In this stage, our first attempt is taking the above equivalent FLC design, \([a_{e},\ a_{i},\ a_{d},\ a_{u},\ \lambda_{e},\ \lambda_{i},\ \lambda_{d},\ \lambda_{u}]=[1.33, 0.266, 44.33, 199.5, 1, 1, 1, 1]\), as one individual in the population of the first generation. Figure 8 shows the performance of GAs across generations, where the optimal design with initial equivalent FLC may yield faster convergence with higher quality than the optimal design without initial equivalent FLC. Figure 5: The unit feedback control structure: (a) PID control; and (b) optimal fuzzy PID control. Figure 8: Performance of GAs across generations: (**a**) with initial equivalent FLC; and (**b**) without initial equivalent FLC. Figure 6: Membership functions for fuzzy variables: (**a**) \(e(t)\); (**b**) \(\int e(t)\); (**c**) \(\dot{e}(t)\); and (**d**) \(u(t)\) in Matlab. Figure 7: The control surface view of the equivalent fuzzy PID controller (\(\int e(t)=0.266\)). The step responses with the conventional PID controller (\(K_{P}=50\), \(K_{I}=250\), \(K_{D}=1.5\)) and the proposed optimal fuzzy PID controller (with initial equivalent FLC) are shown in Figure 9. The resulting eight optimized parameters are shown in Table 1. Furthermore, Table 2 summarizes the response performance, including the rise time (_Tr_), the settling time (_Ts_), the percentage overshoot (_P.O._), and the steady-state error (\(E_{ss}\)), of Pelusi's GNFC optimized controller [19] and the proposed optimal fuzzy PID controller.