###### Abstract
In [27], the authors designed an event triggered robust controller to solve the problem of frequency instability caused by uncertainty, and used system interference attenuation to reduce the communication burden. However, this method needed an accurate energy storage device model and did not consider the influence of the transmission delay. The work of [28], the distributed self-triggering secondary control, was proposed to solve the impact of communication interference and realize voltage recovery and reactive power sharing. The work of [29] achieved the bounded stability of frequency and voltage after an uncertain load change. However, it lacked the impact of the sensitivity of the hardware--in--the loop (HIL) on the boundary. In [30], the authors proposed online primary regulation under island to reduce power loss, optimize operation characteristics, and improve system reliability. However, the parameter sensitivity of the HIL was not considered. In [31], the authors investigated robust optimal control for a class of nonlinear quadratic systems with norm-bounded parameter uncertainties and disturbances. The work solved and suppressed the influence of disturbances and achieved system stability. However, this method had great limitations as it only realized the system in the local stability of the equilibrium point it did not apply to the actual engineering. Therefore, in [32], a newly defined LMI structure was introduced, which studied the design of the controller and observer for uncertain positive discrete systems, so that the ideal model could respond to actual engineering requirements and achieve secondary stability control. As mentioned above, the intermittency of distributed energy affects the output of the intelligent microgrid inverter, leading to changes in power quality. The inverter with filter has a better control output effect than the traditional inverter and can respond to the demand of the power system in real time. However, because the resonance damping and conjugate poles of the filter are sensitive to parameters, parameter uncertainty will interfere with the stable operation of the microgrid system, resulting in voltage distortion and power imbalance. To better meet the needs of practical projects, the main contribution of this paper is to design a moving average phase-locked loop based on the nominal model to replace the traditional phase-locked loop to limit frequency fluctuations. Secondly, when the filter parameters change, based on the guaranteed cost control theory and method, this kind of uncertainty problem is analyzed in a bounded range to achieve a low-cost filter. Finally, the linear integral quadratic regulation (LQR) state feedback controller is used to optimize the influence of uncertain parameters on the system model, suppress the voltage harmonic distortion, ensure that the system is in a certain progressive stable state, and ensure the power output balance. The paper is arranged as follows: Section 2 describes the problem and analyzes the model and the bounded range of parameter uncertainty according to assumptions. Section 3 describes a linear integral controller that is designed to analyze the stability and verify the hypothesis; Section 4 addresses the optimization and adjustment system parameters that verify system reliability. Section 5 summarizes the conclusions and prospects for future work.