This document presents the control system of a single-phase active filter used to mitigate the current harmonic distortion injected into distribution grid by nonlinear loads. The system is based on a cascade control scheme. The internal loop generates the current which is injected into the common point of coupling to eliminate the harmonics produced by non-linear loads. Meanwhile, the external loop regulates the DC voltage of the capacitor which feeds the active filter. In this work, a comparative analysis between two control techniques Proportional - Integral (PI) controller and Sliding Mode Controller (SMC) is carried out. The results for both PI and SMC controller are presented and discussed.