Input-shaping is an open-loop control technique for dynamic control of electrostatic MEMS. In MEMS applications, open-loop control is attractive as it computes a priori the required system input to achieve desired dynamic behav- ior without using feedback. In this work, a 3-D computational electromechanical analysis is performed to preshape the voltage commands applied to electrostati- cally actuate a torsional micromirror to a desired tilt angle with minimal residual oscillations. The effect of higher vibration modes on the controlled response is also investigated. It is shown that, for some structural design parameters, the first bend- ing mode of the micromirror can have a significant effect on the dynamic response. If not accounted for in the control algorithm, these bending vibrations could have an adverse effect on the controlled response of the mirror. To resolve this issue, a numerical optimization procedure is employed to shape the input voltage from the real time dynamic response of the mirror structure. The optimization scheme yields a periodic nonlinear input voltage design that can effectively suppress the bending