Abstract With the gradual reduction of conventional energy sources, the problem of environmental pollution is becoming more and more serious. Environmentally friendly, efficient and flexible power generation models are widely favored, and microgrids emerge as the times require. Microgrid is a medium and low voltage network including power distribution, storage devices, loads and other equipment. It can operate in grid-connected mode or as a stand-alone system in an island environment, continuing to supply power to users even when the large grid is disrupted. Compared with traditional power grids, microgrids have small capacity and changeable operation modes, making it difficult to locate distribution areas and short-circuit currents. At the same time, it is difficult to trace the faults during operation. So far, microgrids have had a lot of technical issues in operation that need to be resolved quickly. In recent years, IoT technology has developed rapidly. The Internet of Things is a comprehensive network that integrates location services, monitoring services, information identification and monitoring services through information exchange and communication technologies, such as video recognition technology, positioning technology, and wireless sensor technology. In order to monitor the operation mode of the microgrid in real time, find the source of the fault and locate the operation target, based on the Internet of Things technology, this paper installs wireless sensors in the line segment to monitor the line and other applications. This paper uses wireless sensor networks to record positioning variables, processes and data analysis to achieve the accuracy of microgrid operation target positioning. In addition, in order to improve the positioning accuracy of wireless sensor monitoring network and solve the problem of energy limitation, DV-Hop algorithm EB-IDMF algorithm and R-A algorithm are also introduced. Finally, the feasibility of the system is verified through experiments and tests. With the blessing of the positioning algorithm, the positioning accuracy is improved by 4.9%, which has great practical value for the target positioning of microgrid operation.