On Control And Optimization Of Dc Microgrids