摘要 |
PROBLEM TO BE SOLVED: To prevent an excessive correction amount from being created by considering an elastic deformation.SOLUTION: A motor control device (10) includes: a deviation calculation part (31) for calculating a deviation between a first position detection value detected by a first position detection part (11) for detecting a position of a movable part and a second position detection value detected by a second position detection part (12) for detecting the position of a driven part; a holding part (33) for holding the deviation calculated by the deviation calculation part when the movable part is engaged with the driven part in a first drive direction and a second drive direction; and a correction amount calculation part (34) for calculating a correction amount for correcting a backlash between the movable part and the driven part and an elastic displacement generated by engagement of the movable part with the driven part. The correction amount calculation part calculates a command deviation on the basis of a first initial deviation, a second initial deviation, and a prescribed constant larger than zero and less than 1, and the correction amount is calculated by subtracting the present deviation calculated by the deviation calculation part from the command deviation. |