When a position/speed feedback changes while a control system for driving a
feed axis uses an integration gain during a shaft stopping, the control system
goes unstable to cause a torque instruction to vibrate or diverge. In addition,
only a single, narrow-range feed speed can be accommodated to find an out-of-range
speed to be insufficient or excessive in compensation effects. After detecting
the movement reversal of a feed axis, a control loop is modeled, a virtual internal
model computing unit (21) using a constant separate from a constant used
in a control loop is configured, a virtual torque instruction (22) computed
by this computing unit (21) is added to a torque instruction (16)
for driving the feed axis, this adding is terminated when the virtual torque instruction
(22) reaches a specified value, and a value (25) of an integrator
in a virtual internal model at the adding termination is added to the integrator
(14) corresponding to a position/speed feedback loop.