Shunt active power filter (SAPF) belongs to the class of custom power devices (CPDs) and offers compensation to harmonics originated owing to customer side nonlinear loads, reactive power and unbalance in the distribution power networks functioning in current control mode (CCM). The performance of a SAPF as a harmonic compensator entirely relies on the control technique i.e. the precise detection of the harmonic current components of load that are necessary to be compensated. In the present work, a 3-phase SAPF, inspired by a Lyapunov function based control approach, has been designed for compensation of harmonics resulted in the feeder current owing to the customer side nonlinearity. A control law is determined in the proposed strategy which makes the derivative of the Lyapunov function consistently a negative one for an entire set of stable states. The DC-link capacitor voltage is regulated at constant reference through the proportional-integral (PI) controller. In this method rating of the shunt active power filter is considerably reduced than the other two broadly employed conventional methods. Furthermore, the harmonic compensation efficacy of the proposed Lyapunov function based SAPF is compared with the one based on other two conventional approaches under four different system scenarios namely a simple nonlinear load with and without utility side voltage distortion, a modified IEEE 13 bus test distribution system loaded with a 3phase chopper fed direct current (DC) motor drive at a single bus and last especially for increasing the harmonic-constrained penetration level of renewable energy. Results obtained through simulation performed in MATLAB/Simulink shows that total harmonic distortion (THD) of source current and dynamic, as well as steady-state performance with Lyapunov function based controller, is significantly improved than the other two conventional methods. Also, the robust compensation performance of the SAPF empowers it to deal with the high penetration of renewable energy.