This paper proposes a particle swarm optimization (PSO) to identify the optimal parameter set of periodic deep brain stimulation (DBS) waveforms. A computational model characterizing Parkinson's disease (PD) is introduced. In Parkinsonian state, the firing of globus pallidus in pars interna (GPi) is burstlike and synchronized. If DBS current is applied, the tonic rhythm output of GPi could restore the thalamic relay properties. Thus, we use a synchronized measure to optimize periodic DBS currents. By comparison with the grid sampling approach and the genetic algorithm, we demonstrate the effectiveness of the proposed algorithm.