Robust and adaptive control of a beam deflector