* Corresponding author at: University of Beira Interior, R. Fonte do Lameiro, 6201-001 Covilhã, Portugal. Tel.: +351 275 329914; fax: +351 275 329972. E-mail address:catalao@ubi.pt (J.P.S. Catalão). Multilevel Converter Control Approach of Active Power Filter for Harmonics Elimination in Electric Grids Majid Mehrasa 1 , Edris Pouresmaeil 2 , Mudathir Funsho Akorede 3 , Bo Nørregaard Jørgensen 2 , João P. S. Catalão 4,5,6,* 1 Young Researchers and Elite Club, Sari Branch, Islamic Azad University, Sari, Iran. 2 Centre for Energy Informatics, University of Southern Denmark, Odense, Denmark. 3 Department of Electrical & Electronics Engineering, Faculty of Engineering and Technology, University of Ilorin, P.M.B. 1515 Ilorin, Nigeria. 4 University of Beira Interior, R. Fonte do Lameiro, Covilha, Portugal. 5 INESC-ID, R. Alves Redol, Lisbon, Portugal. 6 IST, University of Lisbon, Av. Rovisco Pais, Lisbon, Portugal. AbstractThis paper presents a Direct Lyapunov based control technique for active power filtering in electric grids. The proposed technique through the interfacing system is designed with the goal to compensate the harmonic current components and reactive power provoked by the nonlinear grid-connected loads. In the method, based on multilevel converter topologies, active power in fundamental frequency is injected from the main grid, which results in unity power factor (PF) between grid currents and load voltages. The performance of the proposed control technique in a Shunt Active Power Filter (SAPF) model is validated in both dynamic and steady-state operating conditions. The simulation results show that the proposed scheme can effectively compensate the system background harmonics and improve the performance of the line current harmonics. The main benefit of this approach is that it prevents current overshoot as the proposed model connects to the grid. Index TermsShunt Active Power Filter, Direct Lyapunov Method, Multilevel Converter, Distribution Grid I. Nomenclature Indices , dj qj eq eq u u Dynamic part of switching functions j 1,2 SF S Nominal power of VSC in SAPF i ,, abc , SF SF P Q Active and reactive power of SAPF K 1,2,3,4 2 hn SF n P SAPF injected harmonics in the d-axis Variables  V x Lyapunov function 1 2 , C C V V dc-voltage of capacitors Abbreviations i V Load voltages SAPF Shunt Active Power Filter , d q VV Load voltages in the dq frame NPC Neutral Point Clamped dc i dc-link current VSC Voltage Source Converter i SF i SAPF currents in abc frame HC Harmonic Curve , d q SF SF i i SAPF currents in dq frame CC Capability Curve * * , d q SF SF i i SAPF reference currents in dq frame THD Total Harmonic Distortion