This paper presents a new hybrid strategy which allows the dynamic identification of AC/DC microgrids (MG) by using algorithms such as Auto-Regressive with exogenous inputs (ARX) and Petri Nets (PN). The proposed strategy demonstrated in this study serves to obtain a dynamic model of the DC MG in isolated or connected modes. Given the non-linear nature of the system under study, the methodology divides the whole system in a bank of linearized models at different stable operating points, coordinated by a PN state machine. The bank of models obtained in state space, together with an adequate selection of models, can capture and reflect the non-linear dynamic properties of the AD/DC MGs and the different systems that it composes. The performance of the proposed algorithm has been tested using the Matlab/Simulink simulation platform.