Abstract-The increasing penetration of generation power plants based on renewable energies in the electrical networks has boosted the number of systems connected to the grid. In this scenario the microgrid, providing advanced functionalities to improve the stability and operation of the network, have become very popular. In this paper a control strategy for the microgrid management is presented. The proposed system improves the performance of microgrids and its interaction with the main network, or another microgrid, under grid voltage transients. This technique gives rise to a simple and robust control scheme to ensure the appropriate microgrid disconnection, and further resynchronization and reconnection, from the main grid. In the following, the control algorithm for the intelligent connection agent will be shown, and the grid synchronization system, as well as the voltage and current control loops will be detailed. Finally, results obtained using the MATLAB/Simulink & PSIM platform will be presented and discussed.