## 6 Implementation of the Dynamic Fuzzy Logic Controller (Dynamic FLC)
In that case, the boundary limit functions of this interval-valued fuzzy membership function could be expressed as in (22) and (23):  
\[f_{1}(x;\sigma_{1};c_{1})=\exp\left(-\frac{1}{2}\left(\frac{x-c_{1}}{\sigma_{1 }}\right)^{2}\right) \tag{22}\]  
\[f_{2}(x;\sigma_{2};c_{2})=\exp\left(-\frac{1}{2}\left(\frac{x-c_{2}}{\sigma_{2 }}\right)^{2}\right) \tag{23}\]  
In this curve, where \(x\) represents the error \(E_{k}\) and the change of the error \(dE_{k}\) for any current situation, \(\sigma_{1}\) and \(\sigma_{2}\) represent the spread or width of the curves according to the maximum r.p.m. of the motor in the clockwise and counter-clockwise directions (\(-5000\) r.p.m. to \(5000\) r.p.m.). Here, \(c_{1}\) and \(c_{2}\) represent the position of the center of each membership curve during the fuzzification process. According to (22) and (23), and as shown in Figure 6, the positions of the center \(c\) and the spread or the width \(\sigma\) of each the boundary curves \(f_{1}\) and \(f_{2}\) are fixed values. However, according to the non-linear behavior of this electric rover, the fuzzy membership functions should be more robust. Therefore, these interval-valued membership functions limit the optimum fuzzification process and the optimum fuzzy reasoning process because of the fixed boundaries. To overcome these drawbacks while maintaining the properties of the interval-valued membership functions, a dynamic fuzzification process was designed and developed. The dynamic behavior and the robust performance are given to the Mamdani-based dynamic FLC during the fuzzification, defuzzification and fuzzy reasoning processes through a dynamically optimized metaheuristic PSO mechanism for every sampling instant \"\(k\)\". The proposed dynamic PSO mechanism tunes 22 parameters of the proposed dynamic metaheuristic FLC. These 22 parameters of the dynamic FLC belong to the dynamic membership functions in the fuzzification process, de-fuzzification process and dynamic fuzzy reasoning process (the dynamic fuzzy rule base). Therefore, in this proposed dynamic metaheuristic FLC, the membership functions are formed with dynamic Gaussian curve membership functions. Figure 7 and (24) show the dynamic optimization mechanism of each fuzzy linguistic variable or a fuzzy membership function for any given sampling instant \"\(k\)\". \[f_{i}(x;\sigma_{i};c_{i})=\exp\left(-\frac{1}{2}\left(\frac{x-c_{i}}{\sigma_{i} }\right)^{2}\right) \tag{24}\]  
According to (24), to dynamically optimize the values \(c_{i}\) and \(\sigma_{i}\) of each membership function, two dynamic _membership gain factors gain\({}_{c_{i}}\)_ and \({}_{gain_{\sigma_{i}}}\) are considered. Therefore, for all seven linguistic variables (_NB_, _NM_, _NS_, _ZE_, _PS_, _PM_ and _PB_), 14 dynamic membership gain factors are taken into consideration. Therefore, the peak value of the center \(c_{i}\) and the width or the standard deviation \(\sigma_{i}\) of each membership function are functions of these dynamic membership gain factors. In this proposed dynamic metaheuristic FLC, \(E_{k}\) and \(dE_{k}\) are the inputs to the controller, where \(U_{k}\) is the output (actual r.p.m.). For all input and output variables, 21 (\(7\times 3\)) linguistic variables take place (each input or output variable is formed with seven linguistic variables). However, as described above, according to this mechanism, to dynamically optimize all these 21 linguistic variables that belong to \(E_{k}\), \(dE_{k}\) and \(U_{k}\), 42 (\(14\times 3\)) optimized membership gain factors (\(gain_{c_{i}}\) and \(gain_{\sigma_{i}}\)) need to be generated through the proposed dynamic PSO mechanism. However, these 42 membership gain factors will be good enough only to optimize the angular velocity of one wheel. Therefore, when considering the non-linear behavior of this four-wheeled independent-drive electric rover to optimize the desired angular velocity of all four wheels, 168 (\(42\times 4\)) dynamic membership gain factors need to be generated and optimized.