Abstract— This paper considers the problem of oscillations in a synchronous generator connected to infinite bus through transmission lines. Two on-line control techniques, namely, artificial neural networks (ANN) and simulated annealing (SA) are utilized to cancel the oscillations in synchronous generators (SG). Simulation results of applying external disturbances to the synchronous generator controlled by the proposed simulated annealing controllers are compared to results obtained by using neural network controllers. These control schemes contribute to preventing system instability by suppressing the low-frequency oscillations arising from power grid fault disturbances. The proposed on-line SA and NN integrate a voltage regulator and a power system stabilizer to obtain near-optimal solutions of the problem through utilizing functions evaluation. They can be adopted to replace the conventional automatic voltage regulator (AVR) with power system stabilizer (PSS) of the generator. Simulation results show that algorithms can efficiently and effectively solve such optimization problems within short time. In addition, they are presented to demonstrate the effectiveness and advantage of the control system of synchronous generator (SG) in comparison with the conventional control scheme so as to allow the generator to operate closely to its steady state stability limits.