Robust dynamic and algebraic state estimation for microgrids: A generalized approach