An improved particle swarm optimization algorithm based on the model of refracting opposite learning, called refrPSO, is applied to design and optimize FIR low pass and high pass digital filters with linear phase. According to the refraction principle of light, the process of opposition-based learning is ameliorated, and then a new model of opposition-based learning, which is applied for improvement of particle swarm optimization, is proposed. For enhancing the performance of FIR digital filters, in this paper, the optimal combination of the filter coefficients is found out by applying the refrPSO for the design of FIR digital filters. Meanwhile, some well-known algorithms such as classic Parks-McClellan, standard Particle Swarm optimization and Particle Swarm optimization based on opposite learning are used to design FIR digital filters for comparison. Extensive experimental results show that the performance of FIR digital filters optimized by the refrPSO outperforms the one optimized by other algorithms obviously.