WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
Apparatus for automatically adjusting offset correction values for current detectors    
United States Patent5319294   
Link to this pagehttp://www.wikipatents.com/5319294.html
Inventor(s)Ohto; Masahiro (Hirakata, JP); Kinoshita; Hisashi (Katano, JP); Kake; Nin (Ikoma, JP); Ino; Yoshihiro (Kawanishi, JP)
AbstractAn automatic offset adjusting apparatus for current detectors in a digital controller for a servo motor is constructed so that, when errors occur in offset correction values due to a temperature change and the like while the servo motor is in operation, an electrical angle detecting unit detects a ripple of the torque of the servo motor, on the basis of a ripple of a torque command value, and detects a first electrical angle, where the torque command value becomes maximum, and a second electrical angle, where the torque command value becomes minimum, based on an electrical angle signal of the servo motor, a judgement unit judges whether or not offset correction errors have occurred on the basis of a difference between the first and second electrical angles, and, if the judgement unit judges that the offset correction errors have occurred, a correction unit adds adjustment values for the offset correction values corresponding to the first electrical angle to the respective offset correction values to update the offset correction values, whereby the correction of the offset correction values is automatically carried out even while the servo motor is in operation, thereby preventing generation of the ripple of the torque of the servo motor.
   














 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Inventor     Ohto; Masahiro (Hirakata, JP); Kinoshita; Hisashi (Katano, JP); Kake; Nin (Ikoma, JP); Ino; Yoshihiro (Kawanishi, JP)
Owner/Assignee     Matsushita Electric Industrial Co., Ltd. (Osaka, JP)
Patent assignment
All assignments
Publication Date     June 7, 1994
Application Number     08/065,232
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     May 24, 1993
US Classification     318/568.22 318/632 318/650
Int'l Classification     G05B 019/405 568.11-568.19 611 615-618
Examiner     Shoop Jr.; William M.
Assistant Examiner     Martin; David
Attorney/Law Firm     Stevens, Davis, Miller & Mosher
Address
Parent Case    
Priority Data     May 28, 1992[JP]4-135488 Sep 07, 1992[JP]4-237518 Oct 01, 1992[JP]4-263293 Oct 01, 1992[JP]4-263296
USPTO Field of Search     318/560 318/561 318/563 318/568.22 318/569 318/570 318/571 318/572 318/569 318/570 318/571 318/572 318/629 318/569 318/570 318/571 318/572 318/634 318/650 318/569 318/570 318/571 318/572 318/568.1 388/902
Patent Tags     automatically adjusting offset correction values for current detectors
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
5220261
Kempas
318/567
Jun,1993

[0 after 0 votes]
5200682
Kim
318/632
Apr,1993

[0 after 0 votes]
5157317
Coby
318/632
Oct,1992

[0 after 0 votes]
4967128
Sawai
318/609
Oct,1990

[0 after 0 votes]
4902951
Ohta
318/632
Feb,1990

[0 after 0 votes]
4874997
Daggett
318/568.1
Oct,1989

[0 after 0 votes]
4795954
Sakurai
318/661
Jan,1989

[0 after 0 votes]
4792739
Nakamura
318/661
Dec,1988

[0 after 0 votes]
4494060
Chitayat
318/568.16
Jan,1985

[0 after 0 votes]
4352050
Sakano
318/661
Sep,1982

[0 after 0 votes]
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


I claim:

1. An apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, comprising:

rotation detecting means for receiving both a torque command value and a electrical angle signal of said servo motor as an input thereto and detecting that, in one period of an electrical angle, said servo motor rotates in one direction and a rotational speed thereof is equal to or lower than a predetermined upper limit set value;

electrical angle detecting mean for detecting, at the time of detection by said rotation detecting means, a first electrical angle where the torque command value is maximum and a second electrical angle where the torque command value is minimum, in the one period of an electrical angle, respectively;

judgement means for judging whether or not a difference between the first and second electrical angles detected by said electrical angle detecting means is 180 degrees; and

correction means for correcting, when said judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for said current detectors in accordance with the first electrical angle.

2. An apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, comprising:

rotation detecting means for receiving both a three phase feedback a.c. value and an electrical angle signal of said servo motor as an input thereto and detecting that, in one period of an electrical angle, said servo motor rotates in one direction and a rotational speed thereof is equal to or lower than a predetermined upper limit set value;

electrical angle detecting means for detecting, at the time of detection by said rotation detecting means, a first electrical angle where a quadrature-axis current obtained from the three phase feedback a.c. value of said servo motor is maximum and a second electrical angle where the quadrature-axis current is minimum, in the one period of an electrical angle, respectively;

judgement means for judging whether or not a difference between the first and second electrical angles detected by said electrical angle detecting means is 180 degrees; and

correction means for correcting, when said judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for said current detectors in accordance with the first electrical angle.

3. An apparatus according to claim 1, wherein said correction means for correcting the offset correction values for said current detectors comprises:

electrical angle existing range judging means for judging in which one of eight division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and

offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the eight division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and to output the resultant values.

4. An apparatus according to claim 2, wherein said correction means for correcting the offset correction values for said current detectors comprises:

electrical angle existing range judging means for judging in which one of eight division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and

offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the eight division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and to output the resultant values.

5. An apparatus according to claim 1, wherein said correction means for correcting the offset correction values for said current detectors comprises:

electrical angle existing range judging means for judging in which one of four division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and

offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the four division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and to output the resultant values.

6. An apparatus according to claim 2, wherein said correction means for correcting the offset correction values for said current detectors comprises:

electrical angle existing range judging means for judging in which one of four division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and

offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the four division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and to output the resultant values.

7. An apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, comprising:

rotation detecting means for receiving both a torque command value and an electrical angle signal of said servo motor as an input thereto and detecting that, in one period of an electrical angle, said servo motor rotates in one direction and a rotational speed thereof is equal to or lower than a predetermined upper limit set value;

torque/electrical angle detecting means for detecting, at the time of detection by said rotation detecting means, a maximum value of the torque command value, a first electrical angle at the time of obtaining the maximum torque command value, a minimum value of the torque command value, and a second electrical angle at the time of obtaining the minimum torque command value, in the one period of the electrical angle, respectively;

judgement means for judging whether or not a difference between the first and second electrical angles detected by said torque/electrical angle detecting means is 180 degrees; and

correction means for correcting, when said judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for said current detectors in accordance with the first electrical angle and a difference between the maximum torque command value and the minimum torque command value.

8. An apparatus according to claim 5, wherein said correction means for correcting the offset correction values for said current detectors comprises:

electrical angle existing range judging means for judging in which one of four division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and

offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the four division ranges and a difference between the maximum torque command value and the minimum torque command value, and serving to add the adjustment values for the offset correction values corresponding to the division range in which the first electrical angle exists and the difference between the maximum torque command value and the minimum torque command value to the respective offset correction values to update the offset correction value and to output the resultant values.
 Description Submit all comments and votes
 


BACKGROUND OF THE INVENTION

The present invention relates to an apparatus for automatically adjusting offset correction values for current detectors in a digital controller for a servo motor for use in a high precision NC system, robot, etc.

Heretofore, in a digital control apparatus for a servo motor for use in a high precision NC system, robot, etc., in the case where a current detector composed of an analog circuit is used as current detecting means, correction of an offset of an output of the current detector is carried out. That is, when turning on a power source, an output voltage of the current detector, which is detected while the servo motor is stopped, is set as an offset correction value, and the offset correction value which has been set upon turning on the power source is not updated while the motor is in operation.

However, in the above-mentioned prior art apparatus, there arises a problem that, when an error occurs between an actual offset value and the offset correction value, which has been set when turning on the power source, due to a change of an ambient temperature, a temperature rise in component elements of the current detector and the like while operating the servo motor for a long period of time, a ripple having the same period as that of an electrical angle is generated in the torque of the servo motor.

SUMMARY OF THE INVENTION

The present invention was made in order to solve the above-mentioned problem, and an object of the present invention is to provide an apparatus for automatically adjusting offset correction values for current detectors which is capable of judging occurrence of correction errors of offset correction values due to a temperature rise in component elements in the current detectors on the basis of a ripple of the quadratureaxis current value which is obtained by subjecting a ripple of a torque command value for the servo motor or a three phase feedback a.c. value to three phase/two phase conversion, and which is capable of automatically carrying out the correction of the offset correction values even when the servo motor is in operation, thereby preventing generation of the ripple of the torque of the servo motor.

In order to attain the above-mentioned object, a first aspect of the present invention provides an apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, which comprises: rotation detecting means for receiving both a torque command value and an electrical angle signal of the servo motor as its input and detecting that, in one period of an electrical angle, the servo motor rotates in one direction and its rotational speed is equal to or lower than a predetermined upper limit set value; electrical angle detecting means for detecting, at the time of detection by the rotation detecting means, a first electrical angle where the torque command value is maximum and a second electrical angle where the torque command value is minimum, in one period of an electrical angle, respectively; judgement means for judging whether or not a difference between the first and second electrical angles detected by the electrical angle detecting means is 180 degrees; and correction means for correcting, when the judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for the current detectors in accordance with the first electrical angle.

Further, in order to attain the abovementioned object, a second aspect of the present invention provides an apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, which comprises: rotation detecting means for receiving both a three phase feedback a.c. value and an electrical angle signal of the servo motor as its input and detecting that, in one period of an electrical angle, the servo motor rotates in one direction and its rotational speed is equal to or lower than a predetermined upper limit set value; electrical angle detecting means for detecting, at the time of detection by the rotation detecting means, a first electrical angle where a quadrature-axis current obtained from the three phase feedback a.c. value of the servo motor is maximum and a second electrical angle where the quadrature-axis current value is minimum, in the one period of an electrical angle, respectively; judgement means for judging whether or not a difference between the first and second electrical angles detected by the electrical angle detecting means is 180 degrees; and correction means for correcting, when the judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for the current detectors in accordance with the first electrical angle.

Further in the first or second aspect of the present invention, the correction means for correcting the offset correction values for the current detectors according to a third aspect of the present invention comprises: electrical angle existing range judging means for judging in which one of eight division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the eight division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and output the resultant values.

Further in the first or second aspect of the present invention, the correction means for correcting offset correction values for the current detectors according to a fourth aspect of the present invention comprises: electrical angle existing range judging means for judging in which one of four division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the four division ranges, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, to the respective offset correction values to update the offset correction values and output the resultant values.

Further, a fifth aspect of the present invention provides an apparatus for automatically adjusting offset correction values for current detectors of a digital controller for a servo motor employing the current detectors, each having an offset value, which comprises: rotation detecting means for receiving both a torque command value and an electrical angle signal of the servo motor as its input and detecting that, in one period of an electrical angle, the servo motor rotates in one direction and its rotational speed is equal to or lower than a predetermined upper limit set value; torque/electrical angle detecting means for detecting, at the time of detection by the rotation detecting means, a maximum value of the torque command value, a first electrical angle at the time of obtaining the maximum torque command value, a minimum value of the torque command value, and a second electrical angle at the time of obtaining the minimum torque command value, in the one period of the electrical angle, respectively; judgement means for judging whether or not a difference between the first and second electrical angles detected by the torque/electrical angle detecting means is 180 degrees; and correction means for correcting, when the judgement means judges that the difference between the first and second electrical angles is 180 degrees, offset correction values for the current detectors in accordance with the first electrical angle and a difference between the maximum torque command value and the minimum torque command value.

Further in the fifth aspect of the present invention, the correction means for correcting offset correction values for the current detectors according to a sixth aspect of the present invention comprises: electrical angle existing range judging means for judging in which one of four division ranges obtained by dividing an electrical angle of 360 degrees the first electrical angle exists; and offset correction value outputting means having adjustment values for the offset correction values, which are set in accordance with the four division ranges and a difference between the maximum torque command value and the minimum torque command value, and serving to add the adjustment values for the offset correction values corresponding to the division range, in which the first electrical angle exists, and the difference between the maximum torque command value and the minimum torque command value to the respective offset correction values to update the offset correction values and output the resultant values.

By virtue of the first aspect of the present invention, even if correction errors occur in the offset correction values due to a change of an ambient temperature and the like while the servo motor is in operation, the occurrence of the correction errors of the offset correction values due to a temperature rise in the current detectors is judged on the basis of a ripple of the torque command value for the servo motor, and in accordance with the electrical angle where the torque command value becomes maximum in one period of an electrical angle, the offset correction values for the current detectors are corrected, so that, even while the servo motor is in operation, correction of the offset correction values is automatically performed, and therefore it is possible to prevent generation of a ripple of the torque of the servo motor and also to suppress deterioration of control performance such as an increase of a speed ripple.

By virtue of the second aspect of the present invention, even if correction errors occur in the offset correction values due to a change of an ambient temperature and the like while the servo motor is in operation, the occurrence of the correction errors of the offset correction values due to a temperature rise in the current detectors is judged on the basis of a ripple of the quadrature-axis current value which is obtained from a feedback current value for the servo motor, and, in accordance with the electrical angle where the quadrature-axis current value becomes maximum in one period of an electrical angle, the offset correction values for the current detectors are corrected, so that, even while the servo motor is in operation, correction of the offset correction values is automatically performed, and therefore it is possible to prevent generation of a ripple of the torque of the servo motor and also to suppress deterioration of control performance such as an increase of a speed ripple.

By virtue of the fifth aspect of the present invention, even if correction errors occur in the offset correction values due to a change of an ambient temperature and the like while the servo motor is in operation, the occurrence of the correction errors of the offset correction values due to a temperature rise in the current detectors is judged on the basis of a ripple of the torque command value, and, in accordance with the electrical angle, where the torque command value becomes maximum, and a difference between the maximum torque command value and the minimum torque command value, which have been obtained in one period of an electrical angle of the servo motor driving current, respectively, the offset correction values for the current detectors are corrected, so that, even while the servo motor is in operation, correction of the offset correction values is automatically performed, and therefore it is possible to prevent generation of a ripple of the torque of the servo motor and also to suppress deterioration of control performance such as an increase of a speed ripple.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a digital controller for a servo motor having an apparatus for automatically adjusting offset correction values for current detectors of a first embodiment of the present invention;

FIG. 2 is a block diagram showing an internal structure of the apparatus for automatically adjusting offset correction values shown in FIG. 1;

FIG. 3 is a flow chart showing the processing operation performed in the apparatus for automatically adjusting offset correction values shown in FIG. 2;

FIGS. 4A and 4B are respectively a diagram showing the values of an electrical angle fl, the signs of plus and minus of offset correction errors dIu and dIv and the magnitude relation therebetween in the first and third embodiments of the present invention, and a diagram showing adjustment values for an offset correction value cl of phase U and an offset correction value c2 of phase V in the first and third embodiment of the present invention;

FIGS. 5A and 5B are respectively a diagram showing the values of an electrical angle fl, the signs of plus and minus of offset correction errors dIu and dIv and the magnitude relation therebetween in the second and third embodiments of the present invention, and a diagram showing adjustment values for an offset correction value cl of phase U and an offset correction value c2 of phase V in the second and third embodiment of the present invention;

FIG. 6 is a block diagram showing a digital controller for a servo motor having an apparatus for automatically adjusting offset correction values for current detectors of a third embodiment of the present invention;

FIG. 7 is a block diagram showing an internal structure of the apparatus for automatically adjusting offset correction values shown in FIG. 6;

FIG. 8 is a flow chart showing the processing operation performed in the apparatus for automatically adjusting offset correction values shown in FIG. 6;

FIG. 9 is a block diagram showing a digital controller for a servo motor having an apparatus for automatically adjusting offset correction values for current detectors of a fourth embodiment of the present invention;

FIG. 10 is a block diagram showing an internal structure of the apparatus for automatically adjusting offset correction values shown in FIG. 9;

FIG. 11 is a flow chart showing the processing operation performed in the apparatus for automatically adjusting offset correction values shown in FIG. 9; and

FIGS. 12A and 12B are respectively a diagram showing the values of an electrical angle f1 and the signs of plus and minus of offset correction errors dIu and dIv in the fourth embodiment of the present invention, and a diagram showing adjustment values for the offset correction value cl of phase U and the offset correction value c2 of phase V in the fourth embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments of the present invention will hereinafter be described with reference to the accompanying drawings.

Embodiment 1

FIG. 1 is a block diagram showing a digital controller for a servo motor including an apparatus for automatically adjusting offset correction values for current detectors of a first embodiment of the present invention. In the digital controller shown in FIG. 1, an adder 1 to which a speed command value a is input is connected to both a sine-wave table 3 and an apparatus 4 for automatically adjusting offset correction values through a speed control unit 2. Thus, a torque command value b output by the speed control unit 2 is input to both the sine-wave table 3 and the automatic offset correction value adjusting apparatus 4. An output terminal of the automatic offset correction value adjusting apparatus 4 and an output terminal of a current detector 5 of phase U having an offset value are connected to an adder 6, so that an offset correction value cl of phase U output by the automatic offset correction value adjusting apparatus 4 and a detected current value d1 of phase U having an offset value output by the current detector 5 are input to the adder 6. The adder 6 and the sine-wave table 3 are connected to an adder 7 so that a current command value el of phase U output by the sine-wave table 3 and a feedback current value g1 of phase U output by the adder 6 are input to the adder 7. The adder 7 is connected to a servo motor 10 through a proportional element 8 and a servo amplifier 9. The above-mentioned current detector 5 of phase U is provided between the servo amplifier 9 and the servo motor 10. Further, an output terminal of the automatic offset correction value adjusting apparatus 4 and an output terminal of a current detector 11 of phase V having an offset value are connected to an adder 12 so that an offset correction value c2 of phase V output by the automatic offset correction value adjusting apparatus 4 and a detected current value d2 of phase V having an offset value output by the current detector 11 are input to the adder 12. The adder 12 and the sine-wave table 3 are connected to an adder 13 so that a current command value e2 of phase V output by the sine-wave table 3 and a feedback current g2 of phase V output by the adder 12 are input to the adder 13. The adder 13 is connected to the servo motor 10 through a proportional element 14 and the servo amplifier 9. The current detector 11 of phase V is provided between the servo amplifier 9 and the servo motor 10. In addition, the adders 7 and 13 are connected to the servo motor 10 through an adder 15, a proportional element 16 and the servo amplifier 9.

Further, the servo motor 10 is connected to an encoder 17 which is connected to both the automatic offset correction value adjusting apparatus 4 and the sine-wave table 3 through a position counter 18 so that an electrical angle signal f of the servo motor 10 output by the position counter 18 is input to both the automatic offset correction value adjusting apparatus 4 and the sine-wave table 3. Further, the encoder 17 is connected to the adder 1 through a speed detector 19 so that a speed feedback value h output by the speed detector 19 is input to the adder 1.

FIG. 2 is a block diagram showing an internal structure of the automatic offset correction value adjusting apparatus 4 shown in FIG. 1. In FIG. 2, means 21 for setting a speed control processing cycle receives both a torque command value b and an electrical angle signal f of the servo motor 10 as its input, and passes both the torque command value b and the electrical angle signal f therethrough and also sets a speed control processing cycle on the basis of a speed control processing return flag so that the processing proceeds to a next speed control processing cycle. Means 22 for detecting rotation of the servo motor 10, to which the speed control processing cycle setting means 21 is connected, receives both the torque command value b and the electrical angle signal f as its input and detects that the rotational direction is the same as that in the last speed control processing cycle and the rotational speed is equal to or lower than a predetermined upper limit set value so that a difference in phase between the torque of the servo motor 10 and the torque command value b does not raise a problem. Means 26 for detecting an electrical angle, to which the rotation detecting means 22 is connected, receives both the torque command value b and the electrical angle signal f as its input. The electrical angle detecting means 26 is constituted by means 23 for detecting a maximum value which operates to store an electrical angle as a first electrical angle f1 when the torque command value b is maximum, means 24 for detecting a minimum value which operates to store an electrical angle as a second electrical angle f2 when the torque command value b is minimum, and an electrical angle counter 25 which operates to count an electrical angle signal f and to output a speed control processing return flag to the speed control processing cycle setting means 21, if the lapse of one period of the electrical angle is not detected, and this electrical angle detecting means 26 operates at the time of detection by the rotation detecting means 22. A judgement means 27, to which the electrical angle detecting means 26 is connected, judges whether or not a difference between the first and second electrical angles f1 and f2 detected by the electrical angle detecting means 26 is 180 degrees. Means 28 for judging an electrical angle existing range, to which the judgement means 27 is connected, judges, when the judgement means 27 judges that a difference between the first and second electrical angles f1 and f2 is 180 degrees, in which one of eight division ranges obtained by dividing the electrical angle of 360 degrees the first electrical angle f1 exists. Means 29 for outputting offset correction values, to which the electrical angle existing range judging means 28 is connected, has adjustment values for the offset correction values which were set in accordance with the eight division ranges. With this structure, the offset correction value outputting means 29 operates to add the adjustment values for the offset correction values corresponding to the division ranges, in which the first electrical angle f1 exists, to the offset correction values, respectively, to thereby update the offset correction values and to output the resultant values as offset correction values cl and c2. The electrical angle existing range judging means 28 and the offset correction value outputting means 29 constitute correction means 30, so that offset correction values for the current detectors 5 and 11 shown in FIG. 1 are corrected in accordance with the first electrical angle fl.

Further, initialization means 31, to which the rotation detecting means 22, the judgement means 27 and the offset correction value outputting means 29 are connected, initializes the maximum value and the minimum value of the torque command value b and the values of the first and second electrical angles f1 and f2 on the basis of an initialization flag output from one of the rotation detecting means 22, the judgement means 27 and the offset correction value outputting means 29, and then outputs a speed control processing return flag to the speed control processing cycle setting means 21. Besides, at the time of performing initialization of the processing cycle, setting of initial values of the offset correction values is also performed in the initialization means 31.

In the automatic offset correction value adjusting apparatus 4 having the structure as described above, if correction errors have occurred in the offset correction values of the current detectors 5, 11, a ripple having the same period as that of the electrical angle is generated in the torque of the servo motor 10, and there exist a first electrical angle f1 where the torque command value b is maximum and a second electrical angle f2 where the torque command value b is minimum. In the present embodiment, automatic adjustment of the offset correction values is performed by detecting the first electrical angle f1.

FIG. 3 is a flow chart showing the processings performed in the automatic offset correction value adjusting apparatus 4 shown in FIG. 2. Among the steps of the processings, Steps S0 and S1 show processing steps of initialization, and a speed control processing step SV and Steps S2 to S8 show processing step which are executed in a normal operation of the servo motor 10. As shown in FIG. 3, firstly in Step S0, according to the above-mentioned prior art, the offset correction values which are determined at the time of turning on a power supply, are set as initial values. Then, in Step S1, the maximum value b1 and the minimum value b2 of the torque command value b and the values of the first and second electrical angles f1 and f2 are initialized by the initialization means 31.

After a normal operation of the servo motor 10 is started and the speed control processing step SV has been executed, in Step S2, the rotation detecting means 22 detects the present rotational direction of the motor shaft and then compares this rotational direction thus detected with the rotational direction in the last speed control processing cycle. If the rotational direction is changed, the processing proceeds to Step 8, where the maximum value and the minimum value of the torque command value b and the values of the first and second electrical angles f1 and f2 are initialized by the initialization means 31, and then the processing proceeds to a next speed control processing cycle. On the other hand, if the present rotational direction is the same as that in the last speed control processing cycle, the processing proceeds to Step S3. In Step S3, the present rotational speed is detected by the rotation detecting means 22. Then, if the present rotational speed thus detected is equal to or higher than a predetermined upper limit set value, in the same manner as that of Step S2, the processing proceeds to Step S8, and the maximum value and the minimum value of the torque command value b and the values of the first and second electrical angles f1 and f2 are initialized by the initialization means 31, and then the processing proceeds to a next speed control processing cycle. On the other hand, if the rotational speed is equal to or lower than the predetermined upper limit set value, the processing proceeds to Step S4. In Step S4, until the time when the electrical angle counter 25 detects the lapse of one period of the electrical angle, the torque command value b and the electrical angle signal f are input to the maximum value detecting means 23 and the minimum value detecting means 24 once at every speed control processing cycle, and the value of the electrical angle signal at the time when the torque command value b measured during one period of the electrical angle becomes maximum is stored as a first electrical angle f1 in the maximum value detecting means 23, and the value of the electrical angle signal at the time when the torque command value b measured during one period of the electrical angle becomes minimum is stored as a second electrical angle f2 in the minimum value detecting means 24. If the lapse of one period of the electrical angle is not detected, the processing proceeds to a next speed control processing cycle. On the other hand, if the lapse of one period of the electrical angle is detected, the processing proceeds to Step S5. In Step S5, based on the fact that a torque ripple of the servo motor 10 due to correction errors of the offset correction values has the same period as that of the electrical angle, if an absolute value of a difference between the first and second electrical angles f1 and f2 is not 180 degrees, it is judged by the judgement means 27 that a torque ripple due to any factor other than corre