Modeling and closed loop control of a polymer composite-based hard-magnetic micromirror for optical switching applications