DC microgrids require advanced protection techniques for fault detection and isolation (FDI). In this work, an FDI method able to respond to different types of component faults is developed based on system modeling. First, the state-space representation of a multiterminal dc microgrid with component faults is derived. Then, an FDI function based on ${\mathcal {H}}_{-}/{\mathcal {H}}_{\infty }$ observers is designed. To achieve the desired selectivity in fault isolation, the linear matrix inequality (LMI) optimization approach is adopted in the observer design. The performance of the proposed FDI method is verified under the real-time (RT) simulation of a three-terminal low-voltage dc microgrid and with a small-scale laboratory dc grid. The proposed FDI method is proved to be effective to detect and isolate different faults in dc microgrids with a response time of 1 ms.