An improved particle swarm optimization (IPSO) was proposed in this paper to solve the problem that the linearly decreasing inertia weight (LDIW) of particle swarm optimization algorithm cannot adapt to the complex and nonlinear optimization process. The strategy of nonlinear decreasing inertia weight based on the concave function was used in this algorithm. The aggregation degree factor of the swarm was introduced in this new algorithm. And in each iteration process, the weight is changed dynamically based on the current aggregation degree factor and the iteration times, which provides the algorithm with dynamic adaptability. The experiments on the three classical functions show that the convergence speed of IPSO is significantly superior to LDIWPSO, and the convergence accuracy is increased.