Text this: Smart control of UPCQ within microgrid energy system