Local versus global dynamics and control of an AFM model in a safety perspective