Stable current sharing and voltage balancing in DC microgrids: A consensus-based secondary control layer