This paper presents a naïve back propagation (NBP) based $$i\cos \emptyset$$
i
cos
∅
technique implemented to a cascaded multilevel inverter (MLI) based shunt active power filter (SAPF). The recommended control algorithm is applied to extract the fundamental component of load current and to decide the compensating current reference for harmonic elimination. The performance of the SAPF using the proposed NBP-based $$i\cos \emptyset$$
i
cos
∅
technique is compared with another two classical control techniques, such as, $$i_{d} - i_{q}$$
i
d
-
i
q
technique and $$i\cos \emptyset$$
i
cos
∅
technique. The accuracy of the proposed control technique depends on the tuned estimation of active and reactive weights. The performance study of the proposed SAPF with the proposed control technique is investigated under non-linear conditions, with balanced and unbalanced loading conditions. The results reveal that the recommended SAPF is efficient enough to reduce the harmonics from the source current with smooth variation in DC link voltage. The effectiveness of the proposed method is validated by simulation using MATLAB Simulink, and the real-time results are also validated by the experimental setup.