This paper presents a new optimization algorithm to control the voltage of power system generators by the simultaneous tuning of the parameters of Automatic Voltage Regulator (AVR) and Power System Stabilizer (PSS) using a new technique called Particle Swarm Optimization with Periodic Oscillating Exponential Decay (PSO - POED). The proposed algorithm was applied to both the Single-Machine Infinite-Bus (SMIB) Power System and the 9-Bus Multi-Machine Power System. The results of the simulation show that the proposed method is efficient and guarantees an improvement in the dynamic stability and convergence rate of the simulations.