The desire for sustainable development has led to the advancement of renewable energy generation through microgrids, and the control and stability of microgrids pose serious challenges to the popularization of microgrids. This article focuses on the stability and performance of the microgrid, and due to its limited channel bandwidth and other factors, may result in the loss of random packets from the sensor to the controller and from the controller to the actuator. To solve the problem, this paper designed a feedback controller based on the observer and robust H∞ control method and has established Bernoulli packet loss model. The proposed controller enables the networked control system robust exponential stability in the sense of mean square. Finally, the correctness and effectiveness of the proposed controller is verified by MATLAB simulation.