The problem considered is that of solving for the control input that generates partly specified motion of a deformable structure with distributed piezoelectric actuation. The motion constraint, called the program constraint, is specified as a desired relation on the motion of selected material points of the structure. The solution is based on a projection method applicable to a class of finite-dimensional dynamical systems which includes many common vibration models. For a nonlinear model with a nonlinear program constraint, the procedure in general results in a set of differential algebraic equations. It is shown that for linear models with linear periodic program constraints, the system is reduced to a set of algebraic equations. Application examples are presented for a Euler-Bernoulli beam to demonstrate the usefulness of the procedure.