1. A control device comprising: a state-variable estimating section for estimating a state variable of a controlled system in a 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 said estimated state variable and said ideal controlled variable; and a feedback control section for determining said control input, based on a deviation between a desired command value and one of said estimated state variable and said ideal controlled variable; wherein a corrected control input obtained by correcting said control input determined through said feedback control section by using said compensation value calculated through said compensator is input to the controlled system as well as to said state-variable estimating section and said reference model.