This paper presents a novel technique based on artificial neural networks (ANNs) to correct the line power factor with variable loads. A synchronous motor controlled by the neural compensator was used to handle the reactive power of the system. The ANN compensator was trained with the extended delta-bar-delta learning algorithm. The parameters of the ANN were then inserted into a PIC 16F877 controller to get a better and faster compensation. The results have shown that the proposed novel technique developed in this work overcomes the problems occurring in conventional compensators including over or under compensation, time delay and step changes of reactive power and provides accurate, low cost and fast compensation compared to the technique with capacitor groups. © 2006 Elsevier Ltd. All rights reserved.