Artificial neural network (ANN) is a computational algorithm based on the structure and functions of biological neural networks. It is used for modelling of the non-linear systems that cannot be mathematically expressed by the formula and extraction of the system dynamics, expressed by using the complex mathematical equations, such as harmonics. To show the effective usage of ANNs in the power system, the fundamental harmonic of a load with six-pulse thyristor controlled rectifier is extracted with ANN by using the system variables that are difficult to express with each other. Then, a new approach is proposed to generate the reference signal for compensating the harmonics of the current by using discrete fuzzy logic in this study. In addition, a simple and useful method to determine the circuit parameters of the active power filter (APF) is proposed to reduce the rating of the required filter and the capacitor values without affecting its efficiency. Case studies are performed to test the performance of the proposed control algorithm for APF.