Regulation of the charging current or voltage by variation of field using magnetic devices with controllable degree of saturation