Power quality improvement and DG integration in distribution systems with multi-functional custom power devices