This paper proposed the concept of centroid in particle swarm optimization which is similar to physical centroid properties of objects. Similarly, we may think of a particle swarm as a discrete system of particles and find the centroid representing the entire population. Usually, it has a more promising position than worse particles among the population. In order to verify the role of centroid which can speed up the convergence rate of the algorithm, and prevent the algorithm from being trapped into a local solution early as far as possible at the same time, A Novel Centroid Particle Swarm Optimization Algorithm Based on Two Subpopulations(CPSO) is proposed. Numerical simulation experiments show that CPSO by testing some benchmark functions is better than Linear Decreasing Weight PSO (LDWPSO) in convergence speed in the same accuracy of solution case.