Control of dynamics and hystresis in electromagnetic lenses door