Analysis and control of kinematic error in harmonic gear drive mechanisms