Discrete-time modeling of flexible robots