A finite-time distributed cooperative control approach for microgrids