In this paper, we present an electromagnetic inverse particle swarm optimization (PSO)-based method for modeling the electromagnetic radiation of components or systems of power electronics using the near-field technique. The implementation of this method has been applied to the cartography of the magnetic field emitted by different structures. To fully appreciate our approach, the obtained results along with the proposed methods were compared to those obtained by the inverse method, based on the genetic algorithm (GA). Basically, we will compare the results at two levels, theoretical and practical. For the theoretical comparison, both methods are applied to several calculated cartographies of the magnetic field, using the analytical equations of the magnetic and electric dipoles. For the practical comparison, we have used results based on the measurements performed on real systems. The purpose of these comparisons is to show that using the PSO in the electromagnetic inverse method is more interesting than the GA. In fact, the obtained results have shown that the PSO-based method is at least six times faster than the GA-based one.