## 4 A Fuzzy PSO-Based Control Design
### Synthesis of the Fuzzy PSO Control  
The Mamdani fuzzy inference system was employed for the enhancement of the control specified by Equation (40). This technique is beneficial because it has a straightforward implementation and has more comprehensive coverage concerning the variable-specific state models. The fuzzy-type inference is used for control systems because it facilitates smooth interpolation of the planned gains corresponding to the input state space. Thus, this fuzzy PSO controller essentially regulates the controller gain and offsets the undesirable nonlinearity that depends on the dynamic trajectory of the process.  
The control variable fed to the plant is regulated in a way that there is fuzzy optimization pertaining to the SMC feedback gain while the system monitors the error dynamic and its first-order derivative. Then the optimization algorithm by PSO consists of adjusting the parameters of the fuzzy controller apprutename function in order to improve its performance. The control strategy is illustrated in Figure 9.  
The control of a given system is based on the use fuzzy controller. Fuzzy controller parameters are the membership functions exploited for Gaussian types for the input variables \(E_{i}\) and \(\Delta E_{i}\) also for the output variables. The selected membership functions are given by:  
\[Gaussian(E_{i},\Theta_{i},\Omega_{i}) =e^{-\frac{1}{2}\left(\frac{E_{i}-\Theta_{i}}{\Omega_{i}}\right)^ {2}} \tag{53}\] \[Gaussian(\Delta E_{i},\Theta_{i},\Omega_{i}) =e^{-\frac{1}{2}\left(\frac{\Delta E_{i}-\Theta_{i}}{\Omega_{i}} \right)^{2}} \tag{54}\]  
where \(\Theta_{i}\) is the center of the membership function and \(\Omega_{i}\) is the breadth of the membership function.  
Unlike empirical control techniques, where controller gains are specified by process experts, fuzzy inference systems are designed to provide the control gains for the SMC while preserving its main features and structure. Each controlled gain is adjusted with an advanced stable and optimized system through PSO and fuzzy membership sets, which are well specified in Figures 10 and 11. The fuzzy controller gains tuning rules are given in Table 2.  
Figure 10: Gaussian membership function for \(E(t)\).  
Figure 9: Block diagram of the advanced fuzzy logic SMC-I/O FBL controller.  
These figures represent the membership functions of the controller, based on the tracking error and its derivative for the case of minimum phase plant characteristic.  
The fuzzy PSO control strategy will be specified here. The formal description of the 9-step algorithm is as follows:  
Step 1: Activate all individuals;  
Step 2: Calculate the control gain defined by Equation (36);  
Step 3: Tune the regulator gains using the rules as demonstrated in the following table.  
Step 4: Calculate parameters of the Gaussian defined by Equations (53) and (54);  
Step 5: Apply the defuzzification formulas;  
Step 6: Calculate the objective function defined by Equation (50);  
Step 7: Update speed and position and iteration defined by Equation (49);  
Step 8: Update of \(X_{pk}\) and \(X_{gk}\) which are defined by Equation (48);  
Step 9: Go to step 2 to the stop criterion is met;  
Step 10: Determine the control \(U\) defined by Equation (40);  
Step 11: Determine the fuzzy controller input expressed by:  
\[U_{f}=\frac{\sum\limits_{i=1}^{N}\mu_{i}X_{i}}{\sum\limits_{i=1}^{N}\mu_{i}} \tag{55}\]  
Step 12: Calculate the control system defined by Equation (44).