A Novel Framework for Optimal Sizing of A DC Microgrid Considering Energy Management and Battery Degradation