Abstract: A detector (20) detects the position of a motor, and a differentiator (26) calculates the speed of the motor from the position of the motor. An command generation section (11) fixes a position command to a current position. A position control section (12) generates a speed command such that the position command matches the position of the motor. A speed control section (13) generates such a torque command that the speed command coincides with the speed of the motor. An adder (16) adds a high-speed sweep waveform generated by a random signal generation section (15) as torque random to a torque command output from a torque filter section (14), thereby outputting a new torque command. A current control section (17) converts the torque command into a current command, thereby driving a motor (18). A frequency response measurement section (21) receives a torque command output from the adder (16) and a motor speed calculated by a differentiator (26) and measures a frequency response.