the present invention will be described in detail below with reference to the drawings . servo motor controller 1 according to the present invention controls servo motor 2 as a driving source for operating a driven object such as a joint of an industrial robot or a table of a machine tool . fig1 is a block diagram of the flow of control instructions from an unshown superior controller to servo motor 2 via servo motor controller 1 . as shown , servo motor controller 1 has velocity control section 3 that outputs a torque instruction value by multiplying a velocity deviation which is a difference between a velocity instruction value and a velocity detection value by a velocity control gain , current control section 5 that inputs the torque instruction value added by torque disturbance 6 to output a current instruction value , and gain adjustment section 4 that automatically adjusts the velocity control gain of velocity control section 3 . the current instruction value is provided to servo motor 2 from current control section 5 via an unshown servo amplifier to operate an object to be driven such as a robot or a machine tool . referring to fig2 , velocity control section 3 will be described in further detail below . velocity control section 3 adds , to a value obtained by multiplying the velocity deviation which is the difference between the velocity instruction value and the velocity detection value by velocity proportional gain ( operation constant ) 7 , a value obtained by multiplying a velocity integration value by a velocity integration gain ( operation constant ), and multiplies the resulting value by specified adjustment magnification factor mag to output the torque instruction value . the comprehensive gain obtained by multiplying the velocity proportional gain and the velocity integration gain by adjustment magnification factor mag is defined as the velocity control gain in this specification . as shown in fig3 , the gain adjustment section 4 has input / output characteristic estimation processing section 11 that estimates the input / output gain and the phase lag with torque disturbance 6 as an input value to a control system and with the torque instruction value as an output value of the control system , frequency identification section 12 that , while varying the frequency of torque disturbance 6 , identifies the frequency of torque disturbance 6 exhibiting a specified phase lag , input / output gain identification section 13 that identifies the input / output gain at the frequency identified by frequency identification section 12 , and magnification factor resetting section 14 that sets adjustment magnification factor by multiplying adjustment magnification factor mag by the ratio of the identified input / output gain to the target value of the input / output gain multiplied by a specified correction coefficient α . such gain adjustment section 4 is adapted to automatically set adjustment magnification factor . next , referring to fig4 - 7 , the method for determining the correction coefficient α in magnification factor resetting section 14 will be described . as shown in fig4 , when adjustment is made to multiply input / output gain a by ratio x so as to bring it close to input / output gain b ( specified target value of gain ), since thus , ratio x of input / output gain b as seen from input / output gain a can be obtained as in fig5 , it is shown that input / output gain b is five times the value of input / output gain a . however , due to non - linearity of the machine , the characteristic of input / output gain b cannot be obtained simply by multiplying adjustment magnification factor mag of velocity control section 3 by ratio x ( 5 in this example ), and as shown in fig6 , the result turns out to be input / output gain c which exceeds input / output gain b . the amount of the excess varies with the environmental conditions such as the construction of the machine , load , and the like ( considered to be the difference of the servo motor characteristics ). therefore , it is attempted to define correction coefficient α such that ratio x multiplied by α can be multiplied to adjustment magnification factor mag in order to prevent excessive increase of input / output gain c . here , it is conceivable that ratio x of 1 or greater may become less than 1 ( the input / output gain that should be increased may be decreased ). however , since the amount of change is large , the degree of freedom for adjustment in a constant period is increased . as a method for determining the correction coefficient α , it is desirable that input / output gain d obtained by multiplying the adjustment magnification factor by xα become closer to b than a , that is , it is desirable that α be determined in the range such that | d − b |& lt ;| b − a |. this can be achieved as follows . when b ≦ d , this can be achieved by selecting α to be a value (= β + ) slightly larger than 1 / x ( the lower limit of α ). and , let the value of α for which d − b = b − a be γ , then α can be arbitrarily selected in the range such that β + & lt ; α & lt ; β . it is ideal that , in the range β & lt ; α & lt ; γ , α can be identified for which the input / output gain is equal to specified input / output gain b . however , even if α is arbitrarily selected in the range such that β + & lt ; α & lt ; γ , there is no problem since the input / output gain necessarily becomes closer to specified input / output gain b by definition . when b & gt ; d , this can be achieved by selecting α to be a value (= β − ) slightly smaller than 1 / x ( the upper limit of α ). and , let the value of α for which b − d = a − b be γ , then α can be arbitrarily selected in the range such that γ & lt ; α & lt ; β − . it is ideal that , in the range γ & lt ; α & lt ; β − , α can be identified for which the input / output gain is equal to specified input / output gain b . however , even if α is arbitrarily selected in the range such that γ & lt ; α & lt ; β − , there is no problem since the input / output gain necessarily becomes closer to specified input / output gain b by definition . the correction coefficient α less than 1 can be determined as described above , and as shown in fig7 , input / output gain d that is closer to specified input / output gain b can be obtained . next , referring to fig8 , another method for determining the correction coefficient α will be described below . unlike the previous method in which the correction coefficient α less than 1 is determined and is directly multiplied to ratio x , in this method , as shown in equation ( 1 ), b − a ( change of a ) is multiplied by a to temper the change so as to bring α closer to b . thus , input / output gain d is obtained as the input / output gain using adjustment magnification factor multiplied by equation ( 1 ). as a method for determining the correction coefficient α , it is necessary that input / output gain d become closer to b than a , that is , it is necessary that α be determined in the range such that | d − b |& lt ;| b − a |. as shown in fig8 , since d = a when α = 0 , the requirement that | d − b |& lt ;| b − a | can be always met if α is set to a positive value close to 0 . as the value of α increases , d increases monotonically ( or decreases monotonically ), and there is a point at which | d − b | becomes infinitely close to 0 . when α increases further , the requirement | d − b |& lt ;| b − a | is no longer satisfied (| d − b |& gt ;| b − a |), and the input / output gain after adjustment departs further from specified input / output gain b than before adjustment . in summary , let the value of α for which d − b = a − b be γ , then α can be arbitrarily selected in the range such that 0 & lt ; α & lt ; γ . in this method , it is difficult to obtain the optimum α in one trial , but it is possible to approach securely to specified input / output gain b . since a series of operations do not require manual input of information or the like , this process can be said to be an automatic adjustment . since this method has a feature of tempering the change in magnification factor , the number of steps may be increased when a large change in the magnification factor is required . but , since the possibility that ratio x of 1 or higher ( magnification factor to be increased ) is decreased to less than 1 ( decreased magnification factor ) is eliminated , more stable adjustment can be performed . fig9 - 11 show bode diagrams before adjustment and after adjustment . fig9 is a bode diagram before adjustment with the magnification factor of 100 %. in this figure , the input / output gain at the frequency at which the phase lag is − 180 ° is − 16 . 7 db . thus , if the target value of the input / output gain is set to − 3 db , ratio x of the target value to the measured value ( analysis value ) of the input / output gain is 10 (− 3 + 16 . 7 )/ 20 = 4 . 84 . by multiplying the magnification factor 100 % by this ratio x , adjustment magnification factor mag is determined to be 484 %. fig1 shows a bode diagram with the correction magnification factor of 484 %. in this figure , the input / output gain at a frequency where the phase lag is − 180 ° is 2 . 9 db . this shows that the obtained input / output gain is higher by 5 . 9 db than the target value of the input / output gain of − 3 db . here , correction coefficient α is obtained as (− 3 + 16 . 7 )/( 2 . 9 + 16 . 7 )= 0 . 699 . from equation ( 1 ), ( 4 . 84 − 1 )× 0 . 699 + 1 = 3 . 68 is obtained and the adjustment magnification factor is determined to be 368 %. fig1 shows a bode diagram with the correction magnification factor of 368 %. in this figure , the input / output gain at a frequency where the phase lag is − 180 ° is − 1 . 8 db . thus , the result obtained is very close to the target value of the input / output gain of − 3 db . next , referring to fig1 , a gain threshold value of the input / output gain will be described . in the frequency region where the phase lag is about − 180 ° or has smaller absolute value , by setting the adjustment magnification factor such that the maximum value of the input / output gain should not exceed a specified value of 0 db or higher ( for example , about 5 to 10 db ), stability can be secured in the frequency region where the control can respond . in the frequency region where the phase lag has larger absolute value than − 180 °, the magnification factor is adjusted such that the input / output gain is kept in the range of − 3 to − 10 db or lower . since , in this frequency region , the control cannot sufficiently respond , and instability of the control at resonant frequency can be avoided by suppressing the gain . in the frequency region where the phase lag is near − 180 °, since the reflection of the output torque by the control is in the same direction as the input torque , the output will diverge when the gain exceeds 0 db ( that is , magnification factor of 1 ). therefore , the magnification factor is adjusted such that the input / output gain in the frequency region where the phase lag is specified lag near − 180 ° does not exceed the specified value of 0 db or lower . in the frequency region where the phase lag has smaller absolute value than the phase lag − 180 °, although there is no problem even if the gain exceeds 0 db to some extent , the magnification factor is adjusted such that the maximum value of the gain does not exceed 5 ˜ to 10 db . the maximum value of the input / output gain is calculated by the maximum gain calculation section , and when the maximum value exceeds 5 to 10 db , the adjustment magnification factor is adjusted to be lowered by the ratio determined by the difference between the maximum value and the specified threshold value . fig1 is a view of the relation between the initial value of the magnification factor and the optimum value of correction coefficient α . here , the expression “ the initial value of the magnification factor ” refers to the value of the magnification factor that has been set by the manufacturer of the controller , or by the user of the controller before using the controller , and the expression “ the optimum value of α ” refers to such value of α where the ratio of the input / output gain is determined at the initial value of the magnification factor shown in horizontal axis , and the initial value of the magnification factor is multiplied by this ratio multiplied by α , and the input / output gain determined with the new magnification factor coincides with the specified target value of the input / output gain . the smaller the initial value of the magnification factor is , the smaller is the optimum value of α . as an example , as can be seen from the result of fig9 - 11 , when the initial value of the magnification factor is 10 %, correction coefficient α is determined to be 0 . 68 . although the relation between the initial value of the magnification factor and the optimum value of α is not defined unambiguously for all controls , it can be used as a tendency common to all controls . the present invention is not limited to the embodiment described above , but can be carried out in various modifications without departing from the scope and spirit of the invention . for example , although , in the present embodiment , as shown in fig1 , torque disturbance 6 is added to the torque instruction value , it is also possible , as shown in fig1 , to add velocity disturbance 9 to the velocity instruction value to reset the adjustment magnification factor .