An integrated multi-function control scheme for independent BESS in islanded synchronous generator-based microgrids