Power quality enhancement and intelligent control of hybrid renewable microgrids using artificial intelligence techniques and custom power devices