# Optimizing Rule Weights to Improve FRBS Clustering in Wireless Sensor Networks
## 5 Conclusions  
The presented CFC3 PSO clustering algorithm was shown to be able to handle three different WSN layouts and achieved better results than the four other clustering algorithms. Consequently, this work proved the premise that a three-stage fuzzy controller based on three different knowledge bases optimized by a PSO can improve on the performance of other clustering methods, without drastically increasing the complexity. Furthermore, the rule weights obtained by the optimization process effectively added a new layer of information to the initial rule base, allowing a more precise definition of the rules for future work. More specifically, first, the presented optimization process based on the PSO-RWT algorithm successfully obtained three knowledge bases by optimizing the weight of its rules to maximize the FND, HND, and LND metrics for three different scenarios, in order to achieve better adaptability for new WSN designs that could have their BSs in different locations than those used in the optimization process. In addition, another contribution of our work was the way in which the three KBs were obtained by defining a three-stage process, where the first KB or \(KB_{initial}\) is applied by the FRBS until the first node dies, then the second KB or \(KB_{intermediate}\) is loaded in the fuzzy engine until HND is reached, and finally using the third KB or \(KB_{final}\) to obtain the maximum WSN lifetime. Overall, in this paper, we presented a centralized clustering method that minimizes the communication between nodes based on a type-1 FRBS whose optimized KBs vary during the three stages. This proposal achieved significantly better results than the other compared methods and suggested an improvement due to the tuning of the knowledge base by the PSO-RWT algorithm, which detected which rules were more or less meaningful for each stage and scenario. As future lines of work, we propose changing the FRBS from a Mamdani to a Takagi-Sugeno-Kang type [46], whose functional output is suitable for optimization by the PSO-RWT algorithm. Moreover, we could explore additional design parameters for the presented approach, such as increasing the \(skip\) from 1 to a higher value, which could reduce the number of transmissions from the BS to the nodes in order to reduce the reception energy cost, taking into account that a too high \(skip\) value reduces the CH rotation, which could lead to premature deaths, so this parameter is also suitable for being optimized. In addition, the results obtained after the optimization process, in terms of the weights for each rule of the KB, could be tested under other WSN conditions, to check how these weights improved the lifetime of other WSN layouts. **Author Contributions:** Conceptualization, A.-J.-Y.-D. and J.-E.-M.-E.; methodology, A.-J.-Y.-D., J.-E.M.-E., J.-C.C.-M. and A.T.-C.; software, A.-J.-Y.-D., J.-E.M.-E. and J.-C.-M.; validation, A.-J.-Y.-D., J.-E.M.-E., J.-C.C.-M. and A.T.-C.; formal analysis, [PERSON]-J.-Y.-D., J.-E.M.-E. and J.-C.C.-M.; investigation, [PERSON]-J.-Y.-D., J.-E.M.-E., J.-C.C.-M. and A.T.-C.; resources, [PERSON]-J.-Y.-D., J.-E.M.-E. and J.-C.C.-M.; data curation, [PERSON]-J.-Y.-D., J.-E.M.-E. and J.-C.C.-M.; writing--original draft preparation, [PERSON]-J.-Y.-D., [PERSON]-E.M.-E., J.-C.-M. and A.T.-C.; writing--review and editing, [PERSON]-J. [PERSON], [PERSON], [PERSON] and [PERSON]; visualization, [PERSON]-[PERSON]-[PERSON], [PERSON], [PERSON] and [PERSON]; supervision, [PERSON] and [PERSON]. All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding. **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**dBS** & **C** & **ND** & **RE** & **CHR** & **Output** \\ \hline A & L & H & L & L & llm \\ A & H & L & H & L & m \\ A & H & M & H & L & nm \\ F & M & L & L & M & w \\ A & H & M & H & M & ls \\ A & L & H & H & M & hm \\ \hline \hline \end{tabular}
\end{table}