Dynamic Analysis of Elastic Mechanism Systems, Part I: Generalized Equations of Motion