Feedforward calculation in tracking control of flexible robots