Control of MMC-based STATCOM as an effective interface between energy sources and the power grid