Text this: A model reference based adaptive controller for power flow management in microgrid systems