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 behavior without using feedback. In this work, a 3-D computational electromechanical analysis is performed to preshape the voltage commands applied to electrostatically 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. We show that, depending on the design of the micromirros, the first bending mode of the micromirror structures can have significant effect on the dynamic behavior of the system, which is difficidt to suppress by using the step-voltage open-loop control. We employ a numerical optimization procedure to shape the input voltage from the real time dynamic response of the mirror structures. The optimization procedure results in a periodic nonlinear input voltage design that can effectively suppress the bending mode effect.