The paper presents application of particle swarm optimization in designing electrical circuits on the basis of frequency characteristics. Particle swarm is a population-based global optimization algorithm, inspired by the behavior of flocks of birds or insect swarming. This algorithm is applied in optimization approach to the synthesis of the electric circuits on the basis of the required frequency characteristics. The usefulness of the algorithm was shown on the example of designing the electrical filter and humidity sensor model. The results prove the practical suitability of PSO to the optimization problems of many minima.