Patent ID: 7477951

Claim:
A servo controller which repeatedly performs a predetermined control process, and controls a state of a controlled system on the basis of a result of performing the control process, comprising: a detector for detecting the state of the controlled system; and a control unit which performs: a positive-integral calculation in which an integral calculation of a physical quantity representing the state of the controlled system detected by the detector is performed, and in which, when a resulting integral value is positive, the integral calculation is continued, and a negative-integral calculation in which an integral calculation of the physical quantity representing the state of the controlled system detected by the detector is performed, and in which, when a resulting integral value is negative, the integral calculation is continued, and a selection of which one of the positive-integral calculation and the negative-integral calculation is used when control is performed so that a value representing the state of the controlled system becomes equal to a desired control value, wherein: the control unit performs control so that the value representing the state of the controlled system becomes equal to the desired control value, using one of the positive-integral calculation and the negative-integral calculation, which has been selected, and the control unit resets the integral value calculated by the positive-integral calculation to zero when the sign of the integral value calculated by the positive-integral calculation is negative, and resets the integral value calculated by the negative-integral calculation to zero when the sign of the integral value calculated by the negative-integral calculation is positive.