A consensus-based secondary control layer for stable current sharing and voltage balancing in DC microgrids