In the proposed PhD thesis, advanced automatic control systems using Artificial Intelligence (neural networks, genetic algorithms, fuzzy logic, etc.) are studied and simulated in MATLAB/Simulink environment, in order to integrate them into energy management systems of microgrids with high penetration of RES. These systems cooperate and regulate in real time the action of Unified Power Quality Conditioners (UPQC) and/or other reactive power compensation systems (STATCOM, active harmonic suppression filters, etc.). The objective is to ensure uninterrupted and reliable operation of the microgrids and to provide high quality power to consumers.