## 1 Introduction
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Reference**} & \multicolumn{2}{c}{**Offset Elimination Level**} & \multicolumn{3}{c}{**Artificial Intelligence Methods Employed**} \\ \cline{2-6}  & **Primary** & **Secondary** & **SNN** & **DNN** & **ANN** \\  & & & & & **(No Clarity Whether It Is Shallow or Deep)** \\ \hline
[6] & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & - \\
[7] & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & - \\
[8] & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & - \\
[9] & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & \(\checkmark\) & - \\
[11] & \(\checkmark\) & \(\checkmark\) & - & - & \(\checkmark\) but for load power forecasting \\
[12] & - & - & - & - & \(\checkmark\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the proposed methods with existing techniques in the literature. Taking artificial neural networks (ANNs) as an example in terms of network architecture complexity and depth, these implementations can be categorized into two primary frameworks: deep neural networks (DNNs) and SNNs [19; 20]. When comparing DNNs and SNNs, it becomes apparent that DNNs have more complex network structures with more hidden layers and neurons. This means they require larger amounts of data and longer training and evaluation periods to obtain highly satisfactory models suitable for control applications. Given the real-time requirements of control systems, the SNN model becomes very convenient and simple, provided it meets data-fitting accuracy requirements [21; 22; 23]. Compared to DNNs, SNNs contain fewer parameters and provide higher training efficiency with immediate feedback and quick adjustments. SNNs require significantly fewer computational resources during both training and inference. This efficiency makes them particularly suitable for microgrid control applications that demand rapid response in real-time systems. SNNs demonstrate superior generalization on small datasets while reducing overfitting risks and are easier to tune and optimize. These characteristics make SNNs more robust for small- to medium-sized datasets. Their simpler structure also makes their behavior more transparent and easier to analyze, while providing more stable performance when input conditions vary. Leveraging the aforementioned advantages of SNNs and approach of setting power commands at the primary level, this paper will conduct frequency regulation for AC microgrid systems and fully explore the degree and potential of precise matching between power commands and load consumption. This paper makes the following key contributions:  
1. Unlike previous research, which typically defaults power reference values to zero, this paper conducts a comprehensive analysis of optimal power reference value configurations in droop control. A direct relationship is established between the power variations of time-varying public loads and the power reference values in droop control within the controller, leading to enhanced system frequency stability and offset correction. 2. Unlike paper [11], which uses quantitative numerical relationship corrections to eliminate operational state deviations, this study's SNNs are designed to match power commands with load consumption to deliver efficient and accurate results. Moreover, an input enhancement method is proposed to mitigate gradient vanishing and enhance SNN stability when addressing power inputs with zero values. 3. To further correct the time delay and data misalignment issues between curves caused by SNN fitting, a dynamic timing regularization is proposed to achieve precise peak-to-peak correspondence between curves. As a result, frequency regulation becomes more stable at the rated value. Figure 1 illustrates the AC microgrid topology implemented in this paper. AC microgrids are currently the predominant type and can operate in islanded mode when disconnected from the main grid via an electrical switch. The DGs can be connected in