Position detecting apparatus

Abstract: A position detecting apparatus for a scale measuring system executes a offset correction of the detected three-phase signals A, B and C by using the arithmetic mean (A + B + C)/3 as an offset value. Further, the apparatus executes a gain correction of the offset corrected signals by using a gain which is obtained by the calculation of a square-root of { A 2 + (B-C) 2 /3 }. Therefore, the accurate measurement is executed by this apparatus even if the gain level is changed at a turn-on of an electric source of this apparatus.

Description: The present invention relates to a position detecting apparatus, and more particularly to an apparatus which generates a high-accuracy position-detective signal by the interpolation of a plurality of detecting signals from a plurality of detection elements. Various position detecting apparatuses have been proposed and in practical use. A magnetic encoder effecting the addition of two squared signals having a phase difference of 90° and comparing the result with a reference is described in JP-A-60114714. Figs. 10 and 11 show a typical position detecting apparatus which detects a position of movable objects. This conventional position detecting apparatus is provided with a measuring scale 901 and a MR sensor 902 which is constituted by three units of magnetic resistance elements. Three-phase signals outputted from the three magnetic resistance elements of the MR sensor 902 are supplied to sampling circuits 906, 907 and 908 through buffer amplifiers 903, 904 and 905, respectively. The sampling circuits 906, 907 and 908 are turned on sequentially so as to supply the analog signals from the buffer amplifiers 903, 904 and 905 to an AD conversion circuit 909 sequentially. The AD conversion circuit 909 converts the analog signals to digital signals and supplies them to a central processing unit (CPU) 910. The CPU 910 executes a calculating operation for obtaining a position of a movable object as to each of the three-phase signals A, B and C. Next, the manner of this calculating operation will be discussed hereinafter. As shown in Fig. 7, each phase of the three-phase signals A, B and C is shifted from those of the other signals A, B and C by 120°. Assuming that the signal A is standard, the three-phase signals A, B and C can be represented by the following equations A=G A sin, B=G B sin{ +(2π/3)}, C=G C sin{ -(2π/3)}. A cycle period of the signal A can be divided into first to sixth intervals. In the first interval, the amplitude of the signals A, B and C are A>C>B. In the second interval, A>B>C. In the third interval, B>A>C. In the fourth interval, B>C>A. In the fifth interval, C>B>A. In the sixth interval, C>A>B. Therefore, it is possible to distinguish which interval is positioned by the detected signals from the amplitude relationship of the signals A, B and C. When a straight line is drawn on points at each of where two signals are the same in the amplitude, a straight line extending to right and lower direction is drawn in the first, third and fifth intervals, and a straight line extending to right and upper direction is drawn in the second, fourth and sixth intervals in Fig. 7. Fig. 8 shows an enlarged view of the second interval of Fig. 7. In case that the amplitude of the signals A, B and C is large, the gradient of the line becomes large as shown by a real line in Fig. 8. In case that the amplitude of the signals is small, the gradient of the line becomes small as shown by a broken line in Fig. 8. Therefore, in case of a large gradient, the offset of the phase of the signal is detected as if it takes a small value at a point a with respect to the detection signal v in Fig. 8. Further, in case of small gradient, the offset of the phase of the signal is detected as if it take a large value at a point b in Fig. 8. Therefore, it is difficult to execute a accurate position detection according to the offset amount of the phase of the signal in the above-mentioned situation. As shown in Fig. 9, by multiplying a multiplying factor ( V max -V min )/(V 1max -V 1min ) with the signal v1 so that the amplitude (V 1max -V 1min ) is changed to the amplitude (V max -V min ), the offset amount b of the signal v1 becomes equal to that of the signal v2. On the basis of this concept, the conventional position detecting apparatus has been arranged so as to detect a maximum value V max and a minimum value V min of the intersections between the phase signals and to obtain a center voltage (V max + V min )/2 , for executing a correction by an offset voltage. Next, the convention position detecting apparatus Is arranged to obtain a multiplying factor functioning as a reference amplitude by the calculation of (V max - V min ) and to correct the signals A, B and C by multiplying the obtained multiplying factor with the detection signal, in order to execute a position detection by means of the corrected signal. Accordingly, this conventional position detecting apparatus is required to detect the previous maximum value V max and minimum value V min of the intersections since this apparatus executes a position detection by detecting an actual amount of the phase offset according to a ratio (V-V min )/(V max -V min ) wherein V is a present detected voltage, (V-V min ) is a present deviation, and (V max -V min ) is a maximum deviation. However, it may happen that the gain level at a turn-on time of an electric source becomes different from the gain lever at a turn-off time due to the change of the position of the measuring scale or deviation of the output of the electric source. If such difference of the gain lever is occurred in the event that the electric source is turned on after the turn-off of it, the accurate detection by this apparatus may be avoided. Further, if this conventional position detecting apparatus employing gage system shown in Fig. 11 is applied to a machine tool or industrial equipment, the position of the measuring scale may further frequently generates a difference between a turn-on time and a turn-off time of the electric source. This generates an error and avoids an accurate position detecting operation of this apparatus. A position detecting apparatus having the features of portion of claim 1 is disclosed in EP-A-0 588 549. It is an object of the present invention to provide an improved position detecting apparatus overcoming the above-mentioned difficulties. Another object of the present invention is to provides a position detecting apparatus which enables the generation of correct position indicative signal without using previously stored data. The object of the invention is achieved with a position detecting apparatus having the features of the characterizing portion of claim 1. A further aspect of the present invention resides in a position detecting apparatus which is further defined by additional elements. That is, the above position detecting apparatus further comprises a sine-wave signal squaring means which generates a signal indicative of a square of one of the three-phase signals. A cosine-wave signal squaring means includes a subtracter which calculates a difference between the other two of the three-phase signals, a square calculator which calculates a square of an output of the subtracter, and a calculator which derived one-third of an output of the square calculator. A gain calculating means includes an adder which adds an output of the sine-wave signal squaring means and an output of the cosine-wave signal squaring means, and a square-root calculator which calculates a square-root of an output of the adder. A position-information calculating means obtains a signal indicative of position information by correcting an output of the three-phase signals correcting means by an output of the gain calculating means. Fig. 1 is a part of a circuit diagram of an embodiment of a position detecting apparatus according to the present invention; Fig. 2 is another part of a circuit diagram of an embodiment of a position detecting apparatus according to the present invention; Fig. 3 is a circuit diagram of a sine-curve calculating circuit which is applicable to the position detecting apparatus according to the present invention; Fig. 4 is a part of a circuit diagram of a second embodiment of the position detecting apparatus according to the present invention; Fig. 5 is another part of a circuit diagram of a second embodiment of the position detecting apparatus according to the present invention; Fig. 6 is a flowchart which shows a procedure for calculating the offset value and the gain on the basis of the stored data; Fig. 7 is a wave-form view which shows divided intervals in a cycle period of three-phase signals; Fig. 8 is a graph which shows a gain characteristic of the three-phase signals; Fig. 9 is another graph which shows a gain characteristic of the three-phase signals; Fig. 10 is a schematic view of a conventional position detecting apparatus; and Fig. 11 is a circuit diagram which shows the conventional position detecting apparatus. DETAILED DESCRIPTION OF THE INVENTION Referring to the drawings, there are shown embodiments of a position detecting apparatus according to the present invention. First, a theoretical explanation as to a method for eliminating a detection error in the position detecting apparatus according to the present invention will be discussed hereinafter. Assuming that three-phase signals A, B and C detected by detection elements have gains G A , G B and G C and offset values A OFF , B OFF and C OFF , respectively, the three-phase signals A, B and C may be represented as follows: A = G A sin + A OFF B = G B sin{ +(2π/3)} + B OFF C = G C sin{ -(2π/3)} + C OFF Normally, the gains G A , G B and G C are set to have the same amplitude and tend to be simultaneously changed according to an external condition. That is, the gains G A , G B and G C tend to be changed as follows. When the gain G A is increased, the gains G B and G C are increased, and when the gain G A is decreased, the gains G B and G C are decreased. Accordingly, it may be assumed that G A = G B = G C . Further, from the relationship of the trigonometric function sinx +siny =2sin{(x+y)/2}cos{(x-y)/2}, the sum of the three-phase signals A, B and C can be represented by the following equation. G A sin + A OFF + G B sin{ +(2π/3)} + B OFF + G C sin{ -(2π/3)} + C OFF = G A [sin+sin{+(2π/3)} + sin{-(2π/3)] + A OFF + B OFF + C OFF = A OFF + B OFF + C OFF Therefore, the sum of the three-phase signals A, B and C becomes equal to the sum of the offset values A OFF , B OFF and C OFF of the three-phase signals A, B and C. Since it may be assumed that the offset values of the respective signals A, B and C generally receive the same effect according to the external condition, by setting the offset value as follows: A OFF = B OFF = C OFF = D OFF , the sum of the offset values of the respective three-phase signals A, B and C can be represented as follows: A OFF + B OFF + C OFF = 3D OFF Therefore, an offset value D OFF of each signal A, B, C can be obtained by dividing the obtained value 3D OFF by 3. As to the gain, by using a proper value G 0 , which is not equal to zero, as a standard gain, and by comparing the present gain G with the standard gain G 0 , it becomes possible to adjust the gain. Assuming that the gain G of the three-phase signals A, B and C satisfies G A = G B = G C = G, the difference between the signals B and C is obtained as follows: B-C = Gsin{+(2π/3)}-Gsin{-(2π/3)} =2Gcossin(2π/3) = + 3 Gcos Therefore, the present gain G can be obtained from the following equation: G 2 sin 2  + 3G 2 cos 2 /3 = G 2 That is, by adding the square of the signal A=Gsin and one-third of the square of the value 3 Gcos of the equation (2), and by further obtaining the square-root of the sum G 2 , the present gain G is obtained. From the obtained offset value D OFF and the present gain G, the values V max and V min , which indicate characteristics of the chopping wave shown in Figs. 8 and 9, can be obtained as follows: V max = G/2 +D OFF V min = -G/2 +D OFF Referring to Fig. 1, there is shown a first embodiment of the position detecting apparatus based on the above-mentioned method according to the present invention. This position detecting apparatus is of a digital signal processing type. The position detecting apparatus comprises a sensor 101 which detects a position read-on signals from a measuring scale 100. The read-on signals are picked up through a switch unit 102 as three-phase signals. The three-phase signals are analog signals whose phases are offset with each other by 120°. The analog signals are supplied to an A/D converter 104 through an amplifier 103. An output from the A/D converter 104 is supplied to an offset value calculator 105 wherein an offset value of the three-phase signals A, B and C are calculated by adding the signals A 0 , B 0 and C 0 and dividing the sum of them by 3. The calculated offset value is supplied to subtracters 106, 107 and 108. Further, the signals A 0 , B 0 and C 0 are supplied to the subtracters 106, 107 and 108, respectively. Each of the subtracters 106, 107 and 108 calculates a difference between the signal A 0 , B 0 , C 0 and the offset value. These calculations at the subtracters 106, 107 and 108 correspond to a correction of the detected three-phase signals as to the offset value. If the offset value inputted to the subtracters 106, 107 and 108 takes a minus value, the substracters 106, 107 and 108 execute adding operation. Therefore, output ends 113, 115 and 117 output signals A1, B1 and C1, respectively, from which the offset value has been eliminated. The output A1 of the subtracter 106 is supplied to a square calculator 109 wherein G 2 sin 2  is generated. The generated value G 2 sin 2  is outputted to an output end 114. The outputs B1 and C1 from the subtracters 107 and 108 are supplied to a subtracter 110 where the difference (B1-C1) is calculated. The output of the subtracter 110 is supplied to a square calculator 111 where (B1-C1) 2 is obtained. The calculated value (B1-C1) 2 is supplied to a divider 112 where (B1-C1) 2 /3 is obtained by dividing (B1-C1) 2 by 3. The calculated value (B1-C1) 2 /3 is outputted to an output end 116. It will be understood that the divider 112 may be replaced by a multiplier which multiplies the value (B1-C1) 2 with 1/3 (0.33). The signal G 2 sin 2  outputted to the output end 114 and the signal G2cos 2  outputted to the output end 116 are supplied to input ends 201 and 202, respectively, as shown in Fig. 2. An adder 203 receives the signals G 2 sin 2  and G 2 cos 2  and obtains G 2 as is clear from the formula G 2 sin 2  + G 2 cos 2  = G 2 . The output G 2 of the adder 203 is inputted into a square-root calculator 204 wherein G is obtained by calculating a square-root of G 2 . The value G represents the above-mentioned gain and is supplied to a divider 205 wherein a gain ratio G 0 /G is obtained. One input end of each multiplier 209, 210, 211 receives the signal A1, B1, C1. Another input end of each multiplier 209, 210, 211 receives the gain ratio G/G 0 from the divider 205. The multipliers 209, 210 and 211 outputs signals A2, B2 and C2 which have been corrected by the present gain. Therefore, it becomes possible to execute an accurate position detection based on the phase  of the signals. Fig. 3 shows a position detecting circuit which generates a difference signal (B1-C1) at a subtracter 303 from the signals B1 and C1. Since the difference signal (B1-C1) is corresponding to 3 Gcos as is clear from the equation (2), by multiplying 1/ 3 with the difference signal (B1-C1) at a multiplier 304, Gcos is obtained. By using a signal Gcos of an output end 305 and the signal Gsin of the output end 113, a signal  indicative of a position information is obtained (  = tan -1 (sin/cos)). Although the explanation of the position detecting apparatus employing a digital signal processing has been described hereinabove, it is possible to apply this method according to the present invention to a position detecting apparatus employing an analog signal processing. Referring to Figs. 4 and 5, there is shown a second embodiment of the position detecting apparatus according to the present invention. The position detecting apparatus is an analog-signal processing type. In Fig. 4, a measuring scale 401 and a sensor 402 are positioned so as to be relatively movable, that is, one of them is installed at a fixed position, and the other one is installed at a movable object. The sensor 402 detects three-phase signals A 0 , B 0 and C 0 whose phases are shifted by 120° with each other. The three-phase signals A 0 , B 0 and C 0 are sent to amplifiers 403, 404 and 405, respectively, and their gains are adjusted (controlled). The output signals from the amplifier 403, 404 and 405 are added at an adder 412 to form a signal indicative of the sum ( A 0 + B 0 + C 0 ). The signal indicative of the sum is supplied to a divider 416 through an amplifier 414. The signal indicative of the sum ( A 0 + B 0 + C 0 ) can be represented by the sum 3D OFF of the respective offset values as shown by the equation (1). Therefore, by dividing the sum ( A 0 + B 0 + C 0 ) by 3 at the divider 414, the signal indicative of the offset value D OFF is derived. The signals A 0 , B 0 and C 0 outputted from the respective amplifiers 403, 404 and 405 are sent to subtracters 406, 407 and 408, respectively so that offset eliminated signals are obtained by the subtraction of the offset value D OFF of the divider 416 from the inputted signals A 0 , B 0 and C 0 . Output signals from subtracters 406, 407 and 408 are inputted to amplifiers 409, 410 and 411, respectively, and offset eliminated signals A 1 , B 1 and C 1 , from which offset has been eliminated, are outputted therefrom. The signal C 1 from the amplifier 409 and the signal B 1 from the amplifier 410 are inputted to a subtracter 413 where a difference signal (B 1 - C 1 ) is calculated and outputted. The signal outputted from the subtracter 413 is a signal from which an offset has been eliminated and which includes a value 3 Gcos derived from the equation (2). Further, the output signals C 0 and B 0 from the amplifiers 403 and 404 may be used instead of the output signals C 1 and B 1 from the amplifiers 409 and 410. A square calculating block 418 calculates the square of the signal 3 Gcos and outputs a signal indicative of 3G 2 cos 2 . The output of the square calculating block 418 is supplied to a divider (or multiplier) 419 wherein the signal indicative of 3G 2 con 2  is divided by 3 (or multiplied by 1/3), and a signal indicative of G 2 con 2  is outputted. On the other hand, a signal indicative of A 1 = Gsin outputted from the amplifier 411 is squared at a square calculating block 417. Therefore, by adding the output of the square calculating block 417 and the output of the divider 419, G 2 = G 2 sin 2  + G 2 con 2  is obtained at an adder 420. Further, the signal indicative of G 2 is inputted through an amplifier 421 to a square-root calculating block 423 where the square-root of the inputted value is calculated. the signal indicative of G is outputted from the square-root calculating block 423. The obtained value G represents a gain and is a parameter relating to the amplitude of the respective three-phase signals A 1 , B 1 and C 1 . As is clear from the above explanation of Fig. 8, when the gain G is larger than a predetermined value, it is necessary to increase the value of the signal in proportion to the increase of the gain G to obtain correct position information. Therefore, the following gain correction is executed. Fig. 5 shows a circuit for executing a gain correction. The present gain G and the standard gain G 0 are inputted to a divider 503 wherein the gain ratio G 0 /G is calculated. The output of the divider 503 is inputted to the respective multipliers 507, 508 and 509 where the signals indicative of C 1 , B 1 and A 1 is multiplied with the ratio G 0 /G, respectively, in order to correct the amplitudes of the signals indicative of C 1 , B 1 and A 1 according to the gain ratio. The corrected signals are supplied to the switches 513, 514 and 515 through amplifiers 510, 511 and 512, respectively. According to the sequential switching operation of the respective switches 515, 514 and 513, the signals are supplied to an A/D converter 516 where the inputted signals are converted into digital signals. Further, the converted digital signals are inputted to a later circuit 517 which has been used in a conventional position detecting apparatus. Although in the above-explanation, the standard gain G 0 has been properly determined, it is further preferable to store the maximum value and the minimum value of the standard gain G 0 at a previous turning-off of the electric source by means of EEPROM or NVRAM in order to be applicable to such a case that the offset values and gains with respect to the signals A, B and C are largely dispersed. Also, the maximum value and the minimum value read from the sensor at an initial setting period may be stored in a memory. With reference to a flowchart of Fig. 6, the manner of operation of the gain control, which control is executed at a turning-on of the electric source based on data stored in the memory, will be discussed hereinafter. First, it is assumed that the respective maximum and minimum values of input signals A, B and C are G Amax , G Amin ; G Bmax , G Bmin ; G Cmax , G Cmin . By turning-on the electric source, the gain control operation is started. In a step S1, the respective input signals A, B and C are read-in from the sensor. In a step S2, a midpoint of each input signal A, B, C is calculated according to the stored maximum and minimum values G Amax , G Amin ; G Bmax , G Bmin ; G Cmax , G Cmin . That is, the midpoints of the respective input signals A, B and C are calculated from the following equations: G Amid = (G Amax + G Amin )/2 G Bmid = (G Bmax + G Bmin )/2 G Cmid = (G Cmax + G Cmin )/2 wherein G Amid is a midpoint of the input signal A, G Bmid is a midpoint of the input signal B, and G Cmid is a midpoint of the input signal C. In a step S3, differences (A-G Amid ), (B-G Bmid ), (C-G Cmid ) between the signals A, B and C and the midpoints G Amid , G Bmid and G Cmid are calculated, then the respective gains are calculated from the following equations: G A = (A-G Amid )/(G Amax - G Amin ) G B = (B-G Bmid )/(G Bmax - G Bmin ) G C = (C-G Cmid )/(G Cmax - G Cmin ) In a step S4, the present gain G is calculated from the following equation: G A =Gsin, G B = Gsin{+(2π/3)}, G C =Gsin{-(2π/3)} G A 2 +{(G B -G C ) 2 /3} = G 2 Then, the square root of G 2 is calculated. In a step S5, the gain amplitude is obtained by correcting the maximum amplitude of a previously stored value by the present gain G. That is, the calculation of the following equations is executed. G AOFF = G(G Amax -G Amin ) G BOFF = G(G Bmax -G Bmin ) G COFF = G(G Cmax -G Cmin ) In a step S6, the present maximum gain and minimum gain are calculated from the midpoints G Amid , G Bmid and G Cmid and the gain amplitudes G AOFF , G BOFF and G COFF . That is, the calculation of the following equations is executed. G Amax = G Amid + G AOFF G Amin = G Amid - G AOFF G Bmax = G Bmid + G BOFF G Bmin = G Bmid - G BOFF G Cmax = G Cmid + G COFF G Cmin = G Cmid - G COFF Following this calculation of the maximum and minimum gains of each three-phase signal A, B, C, the conventional scale measurement procedure is executed by using the obtained maximum and minimum gains. With this arranged position detecting apparatus according to the present invention, even if the gain is changed by the turning-on of the electric power source, the position detection is accurately executed. Further, even if the gain is changed due to the thermal and/or machinery effect, the accurate detection is executed by correcting the obtained data. While the invention has been shown and described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form and details can be made therein without departing from the wording of the claims.

Claims: A position detecting apparatus comprising: a measuring scale (100); a sensor (101) detecting a signal recorded on said measuring scale (100) and outputting three-phase signals indicative of the recorded signal; offset calculating means (105), and subtracting means (106,107,108) for subtracting a calculated offset value delivered by the offset calculating means (105) from each of the three-phase signals, characterised in that the offset calculating means (105) calculates the sum of the three-phase signals and calculates one-third of the sum of the three-phase signals, whereby the calculated one-third of the three-phase signals represents the calculated offset value. A position detecting apparatus as claimed in Claim 1, further comprising: a sine-wave signal squaring means (109) for generating a signal indicative of a square of one of the three-phase signals; a cosine-wave signal squaring means (110, 111, 112) including a subtracter (110) which calculates a difference between the other two of the three-phase signals, a square calculator (111) which calculates a square of an output of the subtracter (110), and a calculator (112) which derives one-third of an output of the square calculator (111), a gain calculating means (203, 204) including an adder (203) which adds an output of said sine-wave signal squaring means (109) and an output of said cosine-wave signal squaring means (110, 111, 112) and a square-root calculator (204) which calculates a square-root of an output of the adder (203), and a position-information calculating means (209, 210, 211) for obtaining a signal indicative of position information by correcting an output of said three-phase signals correcting means (106, 107, 108) by an output of said gain calculating means. A position detecting apparatus as claimed in Claim 2, wherein a ratio between a present gain (G) and a standard gain (G 0 ) is obtained, the amplitude of each of the three-phase signals being corrected by the ratio before obtaining the position information. A position detecting apparatus as claimed in Claim 1, wherein the calculation of the sum of the three-phase signals in said offset value calculating means (105) is executed by an adder (412) or a substractor, the subtraction of the offset value from each of the three-phase signals in said correcting means being executed by an adder or a subtracter (406, 407, 408). A position detecting apparatus as claimed in Claim 2, wherein the calculator (112) for calculating one-third of the output of said cosine-wave signal squaring means includes a multiplier or a divider.

Inventors: MATUYAMA YASUHIKO, MATUYAMA, YASUHIKO
Applicants: SONY PRECISION TECHNOLOGY INC, SONY PRECISION TECHNOLOGY INC.
Application year: 1995
Main classification: G01D5
IPC codes: G01B7, G01D5, H02J3