Modeling And Control Of Directly Connected And Inverter Interfaced Sources In A Microgrid