# Unity Power Factor Operation in Microgrid Applications Using Fuzzy Type 2 Nested Controllers
## 1 Introduction
Fuzzy logic control (FLC) is a form of intelligent control that does not necessitate elaborate mathematical modeling or calculations. Fuzzy logic controller design allows for dynamic small and big signal performance that is unachievable with linear control methods [9] and enhances the limits on overshooting and the sensitivity to parameter changes [14; 15]. Fuzzy type 1 and type 2 were compared in studies such as [16; 17]. The findings of the comparisons indicate that type-2 fuzzy logic controllers can provide superior control in terms of robustness [16; 17]. Most studies have designed fuzzy-based energy management systems for grid-connected or islanded MGs by adjusting the FLC parameters through meta-heuristic algorithms. The authors in [18] performed an energy management system for a MG considering photovoltaic (PV) and wind turbine (WT) systems, battery energy storage systems, and a dynamic electricity cost profile during the day. The results demonstrate the efficacy of the proposedmethodology in terms of saving on electricity bills. In [19], the fuzzy-based energy management system study was more focused on ensuring the safe and economical operation of the MG. This last study did not show any optimization of the parameters of the FLC. The authors in [20] used meta-heuristic methods to find the optimal parameters of the FLC to reduce power peaks and smooth the power flows exchanged with the main network in a grid-connected MG. In this area, the most widely used heuristic optimizations are the particle swarm optimization and the cuckoo search algorithms, as presented in [21]. Although these studies are very interesting, they consider the energy management aspect of the MG through FLC techniques and heuristic optimizations, and do not consider the technical aspects such as the power quality and deterministic optimizations. This paper aims to fill this scientific gap by introducing a FLC method to improve the power factor in a DC MG, using deterministic optimization to obtain the controller parameters. To regulate the voltage and keep the current in phase with the source voltage, the boost converter and a cascade PI controller were used in this study. Each loop's transfer function calculates the controller gains, making the proposed controller a hybrid of an outer- and an inner-loop voltage- and current-control scheme. The scientific improvements, compared to the present literature, introduced by this study are:  
* The conventional methods design controllers based on a linearized model, which is limited to the model accuracy and does not consider higher-order variations. The proposed technique uses the nonlinear model directly. * Compared to Fuzzy type 1, Fuzzy type 2 has a higher approximation capacity, making it a better choice for solving high-precision problems. * The use of a deterministic optimization for the determination of the FLC parameters guarantees an optimal solution; the optimal result is not guaranteed with meta-heuristic optimization algorithms;
* The application of the FLC approach to power quality issues via DC MGs, whose application in the literature is rather limited, if not absent. The rest of this paper is organized as follows. Section 2 presents the problem formulation, and Section 3 briefly describes the basics of Fuzzy type controllers. In Section 3, the proposed system is illustrated. The mathematical model of the proposed system is derived in Section 4. Section 5 presents the simulation and experimental results, while Section 6 states the research conclusions.