Patent ID: 8058827

Claim:
A motor control apparatus for controlling a motor used in a machine tool, comprising: a torque command monitoring unit configured to monitor a torque command when said motor is caused to operate at a constant speed; an approximation calculation unit configured to calculate a torque command approximation component by approximation from said torque command monitored by said torque command monitoring unit over an interval equal to an integral multiple of a cogging torque period of said motor; a second torque command calculation unit configured to calculate a second torque command by subtracting from said torque command monitored by said torque command monitoring unit said torque command approximation component calculated by said approximation calculation unit; a second torque command frequency analyzing unit configured to extract frequency components, each at an integral multiple of a fundamental frequency of cogging torque, by performing frequency analysis on said second torque command calculated by said second torque command calculation unit; and a cogging compensation amount calculation unit configured to calculate the amount of cogging compensation from the amplitude and phase of said frequency components extracted by said second torque command frequency analyzing unit.