Harmonic gear drive system has been widely used in robot joint modules. In order to improve torque control and torque detection ability of robotjoints, a torque estimation method with embedded torque sensor based on error analysis is proposed in this paper. Based on first-order ripple model, the vector cancellation principle is used to offset the interference of the firstorder ripple for the acquired signal, and then the various factors of affecting the accuracy of the torque estimation is analyzed. In addition, the main influencing factor–the angle deviation of the patch is selected and detailed analyzed in term of theory and experiment. Proposed method is verified by a torque sensor testing device, and the loading test results show that the embedded torque sensor based on error analysis has higher accuracy.