## 3 Proposed Control Methods
### Overall Control Diagram  
Figure 6 shows the overall control diagram of our proposed methods. The SNN collects variation data from the common load and processes it through input enhancement specific to the SNN. After training and prediction, it combines with dynamic timing regularization to match power commands with load consumption. This output feeds into the power reference setting of the droop control at the primary level. As a result, the system compensates for frequency deviation in the microgrid's primary level, maintaining stability near the rated frequency. As for where the network training data comes from, as mentioned earlier, it is necessary to first obtain the droop control power reference value, set it as the power value required by each DG itself, and use this value to obtain training data by making the frequency reach its rated value.  
Regarding the programming and time decision of the proposed approach, the hierarchical positioning can be explained from both dispatch-level and inverter-level perspectives. The SNN-based power fitting operates at the dispatch level, as it involves system-wide power allocation and matching between common load and individual DG controllers. The frequency deviation elimination is implemented at the inverter level, as it requires fast, localized control of individual inverters. The coordination between these two levels is achieved through a hierarchical control framework [29; 30]. Specifically, the dispatch level sends power setpoints to the inverter level based on SNN predictions, and the inverter level fine-tunes these setpoints in real time to eliminate frequency deviations while respecting dispatch-level constraints.  
Figure 5: Complete flowchart for data processing.  
The proposed algorithm, which incorporates droop control along with predictive and fitting methods, has been implemented in a microprocessor environment (such as DSP, FPGA, and other controllers, which are omitted here). This implementation enables efficient execution of control strategies vital for microgrid operations. The communication link plays a crucial role in the algorithm's function, facilitating both the input of power reference values and the output of control compensation amounts. This ensures reliable information exchange for stable and efficient microgrid performance.  
Regarding physical validation, while this study focuses primarily on simulation-based validation, the proposed SNN approach for microgrid frequency regulation could be verified through hardware-in-the-loop (HIL) or small-scale experimental setups in future work. A real-time digital simulator (e.g., OPAL-RT) could integrate either the trained neural network model or the microgrid model to test performance. Power conversion control algorithms could be implemented on programmable controllers such as DSP or FPGA development boards, creating a simple HIL architecture to test the effectiveness of the proposed control methods on the microgrid model in real time. Furthermore, an FPGA development board could act as a control unit, connected to a computer running the microgrid and control algorithms, to control the primary level in the simulation model and incorporate the SNN-trained power reference values. However, this physical validation will not be pursued in this paper.