a servo motor controller having : a frequency identification section that performs analysis based on a frequency response method and identifies the frequency of a disturbance exhibiting a specified phase lag ; an input / output gain identification section that identifies the input / output gain at the frequency identified by the frequency identification section ; and a magnification factor resetting section that resets an adjustment magnification factor by performing a specified operation on a ratio between the identified input / output gain and a specified target value of the input / output gain .