Patent ID: 7030585

Claim:
A controller for controlling a servomotor for driving a movable part of a machine such that a position of the movable part is controlled by performing a position loop control based on a position command and a detected motor position to obtain a velocity command and by performing a velocity loop control based on the velocity command and a detected motor velocity to obtain a torque command for the servomotor, said controller comprising: velocity command determining means for obtaining a compensated velocity command for the velocity loop control by adding a velocity offset amount, proportional to a command acceleration and corresponding to a torsion amount, to the velocity command outputted by the position loop control; torque offset calculation means for calculating a torque offset amount based on a differentiated value of the velocity offset amount; and torque command determining means for obtaining a compensated torque command for the servomotor by adding the torque offset amount to a torque command outputted by the velocity loop control performed based on the compensated velocity command.