Patent ID: 6998810

Claim:
A position controller for controlling a position of a feed shaft of a machine having a motor and the feed shaft driven by the motor, based on an output of a first position detector coupled to the motor and an output of a second position detector coupled to the feed shaft, the position controller comprising: a position calculator which outputs a speed feedback instruction obtained from a difference between a position instruction and a position detection value obtained from the output of the second position detector; a position instruction differentiator which differentiates the position instruction to output a speed feedforward instruction; a speed instruction compensator which outputs a speed instruction compensation value obtained from the speed feedforward instruction and an actual speed of the feed shaft obtained from the output of the second position detector; an adder which adds the speed feedforward instruction and the speed feedback instruction to output a motor speed instruction; an integrator which integrates a difference between the motor speed instruction and a motor speed obtained from the output of the first position detector; a proportion calculator which proportionally calculates a difference between a motor speed instruction correction value, in which the motor speed instruction is corrected by adding the speed instruction compensation value, and the motor speed; and an adder which adds an output of the integrator and an output of the proportion calculator to output a torque instruction.