In this study, a novel method is proposed for the compensation of loads that vary frequently in time. The proposed scheme is based on the fuzzy logic controller (FLC) that is widely used in control of nonlinear processes. FLC architecture is used for regulating the gains of the basis Proportional-Integral (PI) as a self-tuning controller. On the other hand, the constant gains of the basis: PI controller are optimised by a genetic algorithm. Experimental results demonstrate that the proposed method shows better performance than that of the conventional PI controller.