## 3 Proposed Distributed Secondary Control Technique
### Fuzzy-Based Distributed Secondary Control (FDSC)  
In a standalone direct current MG system, the comprehensive framework of the proposed FDSC is illustrated in Figure 4. The conventional approach in the microgrid involves utilizing the droop method for the primary control, which facilitates current sharing among multiple distributed generators to allocate power effectively. The operation of the droop control within the microgrid results in a variation in the converter output voltage. Therefore, concurrently achieving both voltage regulation and current sharing becomes challenging with primary control. The secondary control system is utilized to overcome this constraint caused by the droop control. The proposed secondary control system employs a fuzzy logic approach to produce a reference signal for the primary control. This aids in compensating for voltage errors and guarantees balanced current distribution among the converters concurrently. To accomplish the distributed characteristic, every DER in the microgrid possesses its own secondary control and enables communication with the secondary controls of neighboring DERs. Fuzzy logic technique is employed to dynamically and adaptively regulate the virtual impedance \(\tau\) introduced in the proposed consensus-based FDSC framework, as shown in Figure 4. The typical components of a fuzzy inference system consist of the _'if-then'_ rules, fuzzy logic operators, and membership functions. These components were employed to compute the mapping from input values to output values, involving the three sequential subprocesses described in the previous subsection (fuzzification, inference engine, and defuzzification). The [PERSON] fuzzy inference scheme was implemented in this context. Fuzzy logic utilizes membership functions (MFs) across the universe of discourse in order to establish a non-linear relationship between the output and input variables. Due to their simplicity and application efficiency, triangular membership functions were utilized for the fuzzy sets for both the input and output MFs; this is shown in Figures 5 and 6. The training set-up is outlined as follows.  
Fuzzification: At this stage, the output, inputs, and their corresponding ranges were identified. As inputs to the fuzzy logic system of each DER, the current-sharing error (\(\Delta I_{o_{i}}\)) and voltage deviation (\(\Delta U_{dc}\)) are used, while the virtual impedance (\(\tau\)) was considered as the output. For the input variables, five MFs were used and allotted an abbreviated linguistic label: NB (Negative Big), NS (Negative Small), Z (Zero), PS (Positive Small), and PB (Positive Big). Three MFs were used for the output variable and labeled as B (Big), M (Moderate), and S (Small).  
The correction signal, \(\mathcal{H}_{i}\), is the output signal produced by the FDSC technique utilized to rectify the deviations introduced by the primary control system. Mathematically, the proposed FDSC can be expressed as:  
\[\begin{cases}\mathcal{H}_{i}(t)&=\tau_{i}\cdot u_{i}(t)\\ u_{i}(t)&=\alpha_{i}\int\Delta U_{dc}(t)\,dt+\beta_{i}\int\Delta I_{o_{i}}(t) \,dt.\\ \tau&=\Theta(\Delta U_{dc},\,\Delta I_{o_{i}})\end{cases} \tag{14}\]  
where \(\Theta(\cdot)\) depicts the proposed FDSC.  
Figure 4: Proposed FDSC system.  
Figure 5: Inputs’ membership functions.