A dynamical multi-input/multi-output network formulation for stability analysis in AC microgrids