Characterization of electromagnetic device by means of spice models