## 4 Simulation and Experimental Results Analysis
### Simulation Analysis of the Compensation System Response  
Figure 3 shows the frequency response of the power generation system with and without the compensation system. The natural gas generator system was an impulse by a 400 kW resistive load at the 2 s moment. As can be seen in Figure 3, the compensation system makes the frequency overshoot of the generator set smaller under the impact load. However, the compensation system also imposes a long setting time for the generator. Because (21) and (22) construct feedback linearized controllers to satisfy the system's asymptotic stability but leave the system with a contradiction between overshoot and setting time. Note that if the controller can ensure the frequency deviation is within the allowable range, the longer the settling time of the generator is instead beneficial to the stability of the system. In a real system, the rotational inertia of a high-power motor is large. This character takes a longer settling time to make the generator transition from one steady state to another. Figure 4 shows the angular frequency waveform controlled by the adaptive algorithm. Comparing Equations (37) and (29), it can be found that the angular frequency is not included in Equation (37), and it can be proved that the active and reactive power outputs of the compensated system converge to the desired values in a finite time according to _Lyapunov_ theory. It is exactly because the stability Equation (37) does not ultimately contain the angular frequency; the angular frequency is theoretically only bounded by stability. \begin{table}
\begin{tabular}{c c c} \hline
**Generator Parameter** & **Unit** & **Value** \\ \hline Rated power & kW & 300 \\ Rated voltage & V & 600 \\ Rated frequency & Hz & 50 \\ Rated power factor & & 0.8 \\ Rated speed & rpm & 1500 \\ \hline \end{tabular}
\end{table} 
Table 1: The main parameters of Natural Gas Generator (300 GF31-T). Figure 3: Bus frequency waveform with and without compensation system (**a**) frequency waveform, (**b**) Waveform of error in frequency. Figure 2: Photograph of a natural gas power generation system based on the compensation device. Figure 4 serves as a simulation result, and although the figure achieves a steady state error equal to zero for the angular frequency, the asymptotic stability as a subset of the bounded stability makes this phenomenon not contradictory to the theoretical analysis. Figure 5 shows the load voltage and current waveforms. Figure 5a,b are waveforms with the compensation system, and Figure 5c,d are the load voltage and current waveforms without the compensation system. Comparing Figure 5b,d, we can see that the system is in a steady state until two seconds, and the rectifier and reactive loads present in the system make the waveform have some degree of phase difference. However, the waveform in Figure 5b shows a larger waveform distortion compared with (d) when the time is equal to 2 s. This means that the output power of the generator is jittering at this moment. This is harmful for high-power generators, and it can even cause shaft excitation problems and damage the rotor shaft. In comparison with 5a,c, the current waveform of the (b) only shows a step at 2 s and no jitter after 2 s. This phenomenon means that the impact load achieves power balance in a short period of time. Note that this generator is unable to provide enough impact power at this moment. As a result, the majority of power is provided by the compensation system. Figure 6 shows the voltage and current waveforms of the output of the compensation system. Figure 6 shows that the compensation system is in a steady state until 2 s. In this interval, the output power of the compensation system is approximately equal to zero. This is due to the reference values for both active and reactive power being set to zero in (16). For compensated systems, the impact load becomes a disturbance term to test the robustness of the adaptive controller.