A control device for controlling the motion of a movable part in a machine
while suppressing vibration generated in the movable part. The control
device includes a state-variable estimating section for estimating a
state variable of a controlled system in the machine and outputting an
estimated state variable; a reference model for outputting an ideal
controlled variable for the controlled system; a compensator for
calculating a compensation value for correcting a control input for the
controlled system, based on a difference between the estimated state
variable and the ideal controlled variable; and a feedback control
section for determining the control input, based on a deviation between a
desired command value and one of the estimated state variable and the
ideal controlled variable. A corrected control input obtained by
correcting the control input determined through the feedback control
section by using the compensation value calculated through the
compensator is input to the controlled system as well as to the
state-variable estimating section and the reference model.