## 7 Conclusions  
This paper has addressed the tuning of parameters using the nature-inspired PSO and DE algorithms of an FLC that is part of the EMS of a residential grid-connected electro-thermal microgrid. The FLC-based EMS has been designed to smooth the power profile exchanged with the grid. Numerical simulations have allowed the performance comparison between PSO-tuned and DE-tuned EMSs as well as with heuristically tuned and CS-tuned EMSs presented in previous works. In the adjustment process, the algorithms perform the optimization of 72 variables corresponding to the MF mapping of inputs and the output as well as the FLC rule base. The results have shown that all the designs are capable of meeting the objective pursued by the EMS, obtaining a smooth grid power profile, and the evolution of the battery SOC within the permitted ranges. Moreover, it has been shown that all EMSs designs resulting from a tuning process based on PSO, DE, and CS nature-inspired algorithms have obtained a reduction in the maximum grid power ramp-rates (MPD) of over 40% when being compared to a fuzzy-based EMS where the adjustment of the FLC uses a heuristic approach. In addition, simulation results have revealed that the PSO algorithm performs better than CS and DE algorithms regarding the convergence time. Finally, the quality criteria comparison have shown that the CS algorithm has achieved an improved solution in terms of the _MPD_ and _PPV_ quality criteria, whereas the DE algorithm presents a better behavior concerning the \(P_{G,MAX}\), \(P_{G,MIN}\), and _APD_ criteria.  
Therefore, this study has shown that the different nature-inspired optimization algorithms present similar results when it comes to improving FLC-based EMSs. However, convergence time is a critical parameter that should be considered in any deployment, especially if a real-time implementation is required. Furthermore, the set of input parameters needed for each algorithm must be understood to provide stability and robustness to the optimization task. Finally, these nature-inspired optimization algorithms are able to optimize the FLC rule base and the MF mapping simultaneously, using a single cost function for both activities.  
Figure 10: Grid power ramp-rates (**a**) EMS-FC, (**b**) EMS-CS, (**c**) EMS-PSO, and (**d**) EMS-DE.  
Future work will focus on the design of a real-time adaptive fuzzy-based energy management system. This new design will update the fuzzy logic control parameters at the same time as the forecast variables, which could improve the EMS efficiency.  
Conceptualization, D.A.-A., D.P. ([PERSON]), D.P. ([PERSON]) and E.V.C.; data curation D.P. ([PERSON]), D.P. ([PERSON]) and G.G.-G.; formal analysis D.A.-A., E.V.C., F.G., P.A., A.I. and W.M.; investigation D.P. ([PERSON]), D.P. ([PERSON]) and D.A.-A.; methodology D.P. ([PERSON]), D.P. ([PERSON]), D.A.-A., E.V.C. and F.G.; project administration D.A.-A. and W.M.; software D.P. ([PERSON]), D.P. ([PERSON]) and G.G.-G.; supervision D.A.-A. and E.V.C.; validation D.A.-A. and E.V.C.; visualization P.A. and A.I.; writing--original draft preparation D.A.-A., D.P. ([PERSON]), D.P. ([PERSON]), G.G.-G., E.V.C., F.G., P.A. and A.I.; writing--review and editing D.A.-A., E.V.C., F.G. and W.M. All authors have read and agreed to the published version of the manuscript.  
This work is part of the projects 2019-PIC-003-CTE and 2020-EXT-007 from the Research Group of Propagation, Electronic Control, and Networking (PROCONET) of Universidad de las Fuerzas Armadas ESPE. This work has been developed with the support of VLIR-UOS and the Belgian Development Cooperation (DGD) under the project EC2020 ISN322A101. This work has been partially supported by the Spanish Ministry of Industry and Competitiveness under the grant DPI2017-85404 and PID2019-111443 RB-100.  
Not applicable.  
A special acknowledgment to the Public University of Navarre (UPNa), Pamplona, Spain, and the INGEPER research group who provided the microgrid data that were used in this work.  
The authors declare no conflict of interest.