Displacement detecting apparatus

Abstract: A displacement detecting apparatus includes an error correcting circuit through which a pair of sine wave signals detected by a detecting head unit are corrected. A signal detecting circuit receives the pair of sine wave signals whose phases are shifted by about 90°, and detects a magnitude of one of the two sine wave signal when the other one of the two sine wave signals crosses with a reference voltage level. The error correcting circuit calculates an error correction amount of each sine wave signal according to the detected magnitude of the signal and eliminates the calculated error correction amount from the signals. Therefore, the sine wave signals of position information are accurately corrected in direct-current component, voltage ratio and phase difference.

Description: The present invention relates to improvements in a displacement detecting apparatus which includes an error correcting subsystem. Generally, a displacement detecting apparatus (scale apparatus) utilizes an interpolation method for dividing a regenerated wave length λ of an incremental signal, in order to have a high-resolution that can distinguish the regenerated wave length λ of an incremental signal. As shown in Figs. 16A to 16D, when an electromagnetic division (scale) are formed on a scale 1001, signals detected by detection heads 1002 and 1003 are represented as follows: E A =Asin(2πX/λ), E B =Bcos(2πX/λ) where A and B are amplitudes of detected signals E A and E B , and X is a postion of a detection head. Assuming that B=A, the equation E A /E B = Asin(2πX/λ)/Acos(2πX/λ) = tan(2πX/λ) is derived. Accordingly, the equation X = (λ/2π)arctan(E A /E B )is obtained. This relationship by this equaiton forms a Lissajous figure of Fig. 16D. As shown in Fig. 16D, since A=B, the Lissajous figure becomes a circle. Assuming that the position X of the head is (λ/2π) (X=(λ/2π))the phase 6 thereof is represented by (E A /E B ), that is, = arctan(E A /E B ). At this time, the errors of the signals are generated if one of the following conditions is satisfied: a first condition that a direct current component is superposed on the incremental signal as shown in Figs. 17A to 17C; a second condition that the amplitude of the signal a becomes different from that of the signal b , and a third condition that the phase shift between the signals a and b is not accurately controlled at 90°. Signal values Ea and Eb of such signals a and b can be represented as follows: Ea=Asin(2πX/λ)+D 1 , Eb=Bsin{(2πX/λ)+δ}+D 2 The head position X within one wave length λ is represented as follows: X=(λ/2π)arctan(E a /E b ) In this case, the Lissajous figure forms an ellipse as shown in Fig. 17C. In order to eleminate such direct-current components D 1 and D 2 , JP-A-2-251720 discloses a correction system as shown in Fig. 18. In this conventional system, signals a and b indicative of a scale detected from a scale 1 are sent to an A/D converter (analog-to-digital converter) wherein the signals a and b are converted into digital signals. The digital signals are sent to a digital signal processing circuit 8 of a CPU (Central Processing Unit) wherein the calculation for a correction is executed. As shown in Fig. 18, the detected signals a and b from detectors 2 and 3 on the scale 1 are supplied to a digital signal processing circuit 8 through amplifiers 4 and 5 and A/D converters 6 and 7. The digital signal processing circuit 8 samples the signals a and b as shown in Fig. 19 and stores them in a RAM 10. The digital signal processing circuit 8 obtains a maximum value and a minimum value of each signal data by comparing the newest data of the signals a and b with the previously stored data. Further, direct-current component (deviations) D 1 and D 2 are obtained by calculating a mid point between the maximum and minimum values of each signal. By subtracting the obtained direct-current components (deviations) D 1 and D 2 from the signals a and b , the digital signal processing circuit 8 generates corrected signals and supplies them to a data conversion circuit 11 wherein A/B phase signal is generated. The overlapped errors on the detection sensors 2 and 3 are controlled by the above-mentioned circuit. In addition to this error correction, the scale apparatus further required to eliminate various error factors such as a deviation of the direct-current error component due to the external magnetic field as shown in Fig. 20A, an output deviation due to a clearance deviation between a storage medium and the detection head as shown in Fig. 20B and a deviation due to phase deviation caused by the waviness of a head-running standard surface as shown in Fig. 20C. In order to eliminate such errors, the scale apparatus of JP-A-2-251720 is provided with a direct-current component detecting circuit, an output amplitude detecting circuit and a phase detecting circuit for obtaining respective correction values. The scale apparatus including a correction circuit calculates the amount of error from the correction values. The digital signal processing circuit 8 executes a correction of errors according to the direct-current component, an output amplitude difference and a phase shift of the signals a and b . More particularly, the scale apparatus obtains a maximum value and a minimum value of each signal a , b and executes a correction of the signals a and b by calculations. The corrected signals are supplied to an interpolation circuit wherein arc-tangent of the corrected signals are obtained as an interpolation. However, with this conventional correcting method of the scale apparatus, it is necessary to execute a high-speed sampling for detecting peak values of the signals a and b as shown in Fig. 19 and to frequently execute calculations of a complicated trigonometric function. Therefore, such displacement detecting apparatus has to provide two high-speed A/D converter and a high-speed performing CPU or digital signal processor. Further, since the signals a and b from the sale is deviated due to the temperature deviation, it is necessary to provide a high-bit and high-accuracy A/D converter. These installations largely increase the cost of the correction circuit and therefore the displacement detecting apparatus including this correction circuit is largely increased in cost. A similar prior art (EP-A-0599175) displacement detecting apparatus comprising a detection head unit detecting two sine wave signals, whose phases are shifted by about 90 degrees, a signal detecting circuit and a correcting circuit in which after an A/D conversion is first executed as to an original signal, the converted signal is then read in and a correction (interpolation) process thereof is executed. However in case that the level of the signal is low, quantization error is increased and therefore the accuracy of the signal is degraded by this correction. In order to solve this problem, it is necessary to use high-speed A/D converters which execute conversion operation in high accuracy and resolution. However, this provision increases the manufacturing costs of this device so as to decrease the possibility of a practical use of such a device. A prior art apparatus (EP-A-0 489936) comprises a signal detecting circuit detecting a magnitude of one of two sine wave signals when the other one of the two sine wave signals crosses with a reference voltage level (zero), as to the respective sine wave signals and using these detected magnitudes for calculation of an error amount, such that the correction of an output vibration amplitude is prior to others. Since the output vibration-amplitude of each channel is independently corrected, the accuracy is degraded in case that it becomes out of a range of a predetermined gain of the amplifier. In case that a correction of a scale signal is executed by an A/D converter, it is necessary to prepare two A/D converts in view point of a responsibility. However, it is necessary to make even the characteristics of such A/D converters in order to ensure a predetermined accuracy. It is the object of the invention to provide an improved displacement detecting apparatus which if free from the above mentioned drawbacks. This object is solved by the features as claimed in claim 1. Further, developments of the invention are claimed in sub-claims 2 to 7. The displacement determining apparatus according to the invention comprises a detection head unit which detects two sine wave signals whose phases are shifted by about 90°. A signal detecting circuit detects a magnitude of one of the two sine wave signal when the other one of the two sine wave signals crosses with a reference voltage level. A correcting circuit calculates an error correction amount of each sine wave signal according to the detected magnitude of the signal and eliminates the calculated error correction amount from the signals. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing an example of a correction circuit of a displacement detecting apparatus according to the present invention; Fig. 2 is a block diagram showing another example of the correction circuit of the displacement detecting apparatus according to the present invention; Figs. 3A and 3B are wave form charts for explaining a detection of zero-crossing of signals in the displacement detecting apparatus; Figs. 4A and 4B are wave form charts for explaining a detection of an absolute value correspondence between the signals; Fig. 5 is a wave form chart which shows an interval between read-in signals; Fig. 6 is a circuit diagram of a zero-crossing point detection circuit; Fig. 7 is a circuit diagram of an absolute-value correspondence detection circuit; Fig. 8 is a wave-form chart for explaining a reading point of an inversion signal; Fig. 9 is a wave-form chart which shows a change between a signal and a scale-up signal; Fig. 10 is a circuit diagram which shows a whole construction of the displacement detecting apparatus according to the present invention; Fig. 11 is a flowchart showing a manner of an error correcting operation; Figs. 12A and 12B are flowcharts showing another manner of the error correcting operation; Figs. 13A and 13B are wave-form charts for explaining an improved error-component detecting manner; Figs. 14A and 14B are wave-form charts for explaining an improved error-component detecting manner; Figs. 15A and 15B are wave form charts for explaining an improved error-component detecting manner; Fig. 16A is a schematic view which shows a scale and a pair of detection heads of a conventional displacement detection apparatus; Figs. 16B, 16C and 16D are wave form charts showing a relationship between the detection heads of Fig. 16A; Fig. 17A, 17B and 17C are wave form charts showing a relationship between the detection heads; Fig. 18 is a block diagram showing a conventional correction circuit for a displacement detecting apparatus; Fig. 19 is a wave form chart for explaining a signal sampling of a conventional displacement detecting apparatus; and Fig. 20 is a view for explaining error deviation factors of a displacement detecting apparatus. DETAILED DESCRIPTION OF THE INVENTION Referring to drawings, preferred embodiments of a displacement detecting apparatus according to the present invention will be discussed. First, as to a case that a deviation of a phase difference between signals a and b is smaller than a predetermined value and that a direct-current component and an amplitude ratio of the signals are corrected, the manner of correcting operation will be discussed hereinafter with reference to Figs. 13A, 13B, 14A and 14B. When the output voltages of the signals a and b are Ea and Eb and when =2πX/λ, the following equations (I) and (2) are obtained. Ea=Asin+D 1 Eb=Bcos+D 2 From the equations (1) and (2), values Ec, Ed, Ee and Ef at detection points c, d, e and f are obtained. If each phase at each of the detection points c, d, e and f is c, d, e, f as shown in Fig. 13A, four sets of the simultaneous equations are given. As to the detection point c , the following simultaneous equations are given: Eac=Asinc+D 1 = 0 Ebc=Bcosc+D 2 =Ec wherein Eac is a value of signal a at the detection point c , and Ebc is a value of signal b at the detection point c . From the equation (3), the following equation is obtained: sinc=-D 1 /A The equation (5) can be deformed by the relationship in the trigonometric function as follows: cosc=- 1-(-D 1 /A) 2 By substituting this equation (6) to the equation (4), the following equation is obtained: D 2 =B 1-(-D 1 /A) 2 + E c Similarly, as to the detection point e , the following simultaneous equations are obtained. Eae=Asine+D 1 = 0 Ebe=Bcose+D2=Ee wherein Eae is a value of signal a at the detection point e , and Ebe is a value of signal b at the detection point e . Accordingly, the following equation is obtained; D 2 =-B 1-(-D 1 /A) 2 +E e Finally, from the equations (7) and (10), the following equation is obtained. D 2 =(E c +Ee)/2 As to the detection point d , the following simultaneous equations are obtained: Ead=Asind+D 1 =Ed Ebd=Bcosd+D 2 =0 wherein Ead is a value of signal a at the detection point d , and Ebd is a value of signal b at the detection point d . As to the detection point f , the following simultaneous equations are given: Eaf=Asinf+D 1 =Ef Ebf=Bcosf+D 2 =0 wherein Eaf is a value of signal a at the detection point f , and Ebf is a value of signal b at the detection point f . As is the same as that in the detection points c and e , from the two sets of the simultaneous equations (12) and (13), (14) and (15), the following equation indicative of the direct-current component is obtained. D 1 =(Ed+Ef)/2 Next, as to the output amplitudes A and B, the following equations are obtained. A=Ed/ 1-(D 2 /B) 2 B=Ec/ 1-(D 2 /A) 2 Although the output amplitudes A and B are obtained by solving the above equations (17) and (18), this solving calculation takes lot of time. Therefore, only the correction as to the direct current component is carried out, and the correction as to the amplitude ratio of the signals a and b is not carried out. By the correction of the direction-current component, the signals a and b have a generally zero direct-current component. That is, D 1 =D 2 =0 . Accordingly, as shown in Figs. 14A and 14B, the read-in voltage values indicate output amplitudes of the respective signals a and b as follows: A=Ed=Ef B=Ec=Ee Next, as to a case that the corrections of all components including the phase correction are exectued, the manner of adjusting operation will be discussed hereinafter. When Ea and Eb are output voltage values of the signals a and b , and =2πX/λ , the following equations are obtained. Ea=Asin+D 1 Eb=Bcos(+δ)+D 2 As shown in Figs. 13A and 13B, values Ec, Ed, Ee and Ef at detection points c , d , e and f are obtained. If each phase at each of the detection points c , d , e and f is c, d, e, f, four sets of the simultaneous equations are established. As to the detection point c , the following simultaneous equations are obtained: Eac=Asinc+D 1 =0 Ebc=Bcos(c+δ)+D 2 =Ec wherein Eac is a value of signal a at the detection point c, and Ebc is a value of signal b at the detection point c . From the equation (23), the following equation (25) is derived. sinc=-D 1 /A From the equation (25), the following equations (26) and (27) are derived. cosc=- 1-(-D 1 /A) 2 cos(c+δ)=cos c cosδ-sin c sinδ =- 1-(-D 1 /A) 2 cosδ+(D 1 /A)sinδ By substituting the equation (27) into the equation (24), the following equation is obtained. D 2 =B{ 1-(D 1 /A) 2 cosδ-(D 1 /A)sinδ}+Ec As to the detection point e , the following simultaneous equations are established. Eae=Asine+D 1 =0 Ebe=Bcos(e+δ)+D 2 =Ee wherein Eae is a value of the signal a at the detection point e , and Ebe is a value of signal b at the detection point e . By the equation modulation similar to that as to the detection point c , the following equation is obtained. D 2 =B{- /1-(D 1 /A) 2 cosδ-(D 1 /A)sinδ}+Ee From the equations (28) and (31), the direct current component D 2 of the signal b is obtained as follows: D 2 =(Ec+Ee)/2-(D 1 /A)sinδ As to the detection point d , the following simultaneous equations are established. Ead=Asind+D 1 =Ed Ebd=Bcos(d+δ)+D 2 =0 wherein Ead is a value of signal a at the detection point d , and Ebd is a value of signal b at the detection point d . From the equation (34), the following equations are derived. cos(d+δ)=-D 2 /B sin(d+δ)=- 1-(-D 2 /B) 2 sind=sin(d+δ-δ) =sin(d+δ)cosδ-cos(+δ)sinδ =- 1-(-D 2 /B) 2 cosδ+(D 2 /B)sinδ Accordingly, the direct-current component D 1 of the signal a is derived as follows: D 1 =A{ 1-(D 2 /B) 2 cosδ-(D 2 /B)sinδ}+Ed As to the detection point f , the following simultaneous equations are established. Eaf=Asinf+D 1 =Ef Ebf=Bcos(f+δ)+D 2 =0 wherein Eaf is a value of signal a at the detection point f , and Ebf is a value of signal b at the detection point f . D 1 =A{- 1-(D 2 /B) 2 cosδ-(D 2 /B)sinδ}+Ef From the equations (38) and (41), the following equation is obtained. D 1 ={(Ed+Ef)/2}-(D 2 /B)sinδ Since (D 1 /A)sinδ of the equation (32) and (D 2 /B)sinδ of the equation (42) are considerably smaller than D 1 and D 2 , the direct-current component is deceased by executing the correction. Accordingly, by repeatingly executing this correction within a predetermined interval (such as twice or three times), the direct-current components of the signals are corrected. By the correction of the direct-current components of the signals a and b , the values D 1 and D 2 are converged into zero. Therefore, the correction of the amplitude ratio of the signals a and b is executed thereafter. From the equations (31) and (41), the amplitudes A and B are expressed as follows: A=Ef/cosδ B=Ee/cosδ Although the output ratio is decreased according the shift amount δ of the phase, the output of the signals is also decreased with the same ratio as that of the output ratio. Therefore, the ratio between the amplitudes A and B is equally corrected. The detection of the phase is executed as shown in Figs. 15A and 15B after the corrections of the direct-current component and the amplitude. That is, the values Eg and Eh of the voltages at the detection point g and h are read. The voltage values Eg and Eh are expressed as follows: Eg=Asin{(π/4)-δ}=Acos{(π/4)+δ} Eh=Asin{(π/4)+δ} Therefore, the following equations are derived. Eh/Eg=tan{(π/4)+δ} δ=arctan(Eh/Eg)-π/4 The correction of the phase of the signal a , b is executed by using the phase shift amount of the equation (48). Referring to Fig. 1, a first embodiment of a displacement detecting apparatus according to the present invention will be discussed hereinafter. The displacement detecting apparatus comprises a measuring scale 101 on which a pair of sensors 102 and 103 are silidably disposed. The sensor 102 outputs a detected signal a to an amplifier 104. The amplified signal a in the amplifier 104 is sent to an interpolation circuit 106, a comparator 107 and a multiplexer 108. Also, the sensor 103 outputs a detected signal b to an amplifier 105. The amplified signal b is sent to the interpolation circuit 106, the comparator 107 and the multiplexer 108. The amplifiers 104 and 105 are connected through a correction circuit 118 with a CPU (central processing unit) 114 which is connected with an EEPROM (electrically erasable and programble ROM) 115, a RAM (randam access memory) 116 and a ROM (read-only memory) 117. The amplifiers 104 and 105 amplify the detected signals a and b into a required level while controlling a direct-current component, a voltage ratio and a phase of each signal a , b according to preset values in the EEPROM 115. The interpolation circuit 106 interpolates the received signals a and b and outputs an A/B phase signal. The comparator 107 compares the signals a and b with a reference voltage to detect a zero-crossing point of the signals a and b . Fig. 3A shows zero-crossing points of the signals a and b . That is, at a point c where the signal a first crosses with the reference voltage, a voltage value Ebc of the signal b is detected At a point e where the signal a next crosses with the reference voltage, a voltage value Ebe of the signal b is detected. Similarly, at a point d where the signal b first crosses with the reference voltage, a voltage value Ead of the signal a is detected. At a point f where the signal b next crosses with the reference voltage, a voltage value Eaf of the signal a is detected. By plotting the voltage values Ebc, Ebe, Ead and Eaf on a-axis and b-axis which are perpendicularly crossed with each other, a Lissajous figure as shown in Fig. 3B is obtained. Fig. 6 shows a detection circuit for detecting a zero-crossing point. The structure of the detection circuit for the signal a is the same as that for the signal b . The signal a inputted to an input terminal 601 is compared with a reference voltage in a comparator 603 as to whether the signal a is crossing with the reference voltage. When the signal a crosses with the reference voltage, the comparator 603 outputs a pulse signal indicative that the signal a is crossing with the reference voltage. The outputted signal is inputted to a first flip-flop circuit 605 according to a clock signal. The output of the first flip-flop circuit 605 is inputted to a second flip-flop circuit 607 according to next clock signal. The outputs of the first and second flop-flip circuits 605 and 607 are supplied to an exclusive-OR circuit 609. The output of the exclusive-OR circuit 609 is supplied to an OR circuit 611. Similarly, the signal b inputted to an input terminal 602 is compared with a reference voltage in a comparator 604 whether the signal b is crossing with the reference voltage. When the signal b crosses with the reference voltage, the comparator 604 outputs a pulse signal indicative that the signal b is crossing with the reference voltage. The outputted signal is inputted to a first flip-flop circuit 606 according to a clock signal. The output of the first flip-flop circuit 606 is inputted to a second flip-flop circuit 608 according to next clock signal. The outputs of the first and second flop-flip circuits 606 and 608 are supplied to an exclusive-OR circuit 610. The output of the exclusive-OR circuit 610 is supplied to the OR circuit 611. With this circuit, when the signal a or b crosses with the reference voltage, a signal indicative of the crossing of the signal a, b with the reference voltage is outputted. As shown in Fig. 1, the output of the comparator 107 is supplied to a control, circuit 109 which controls a multiplexer 108 so as to input the signals a and b into a sample-and-hold circuit 110. The sample-and-hold circuit 110 executes a sampling of a momentum value of each signal a , b and stores it. The stored signal in the sample-and-hold circuit 110 is supplied to a shift circuit 111 where the signal is shifted according to a signal from the CPU 114 and a necessary part of the signal is outputted to a scale-up circuit 112 wherein the necessary part of the signal is scaled up and the scale-up signal is outputted to an A/D converter (analog-to-digital converter) 113. The A/D converter 113 converts the received signal into a digital signal and supplies it to the CPU 114. The CPU 114 calculates amplitudes of the signals a and b for the A/D converter 113 with reference to data in the EEPROM 115, the RAM 116 and the ROM 117. The calculated amplitudes are supplied to a correction circuit 118 as a correction signal. The correction circuit 118 executes a correction of the amplitudes of the signals a and b by applying the amplitude correcting signal to the amplifiers 104 and 105. The corrected signals, which are corrected as to the reference voltage and the amplitude, are supplied to the interpolation circuit 106 wherein a correct A/B phase signal is obtained. Next, as to a case that three deviation of a direct-current component, an output voltage ratio and a phase shift of the signals a and b are corrected, the manner of the correcting operation will be discussed hereinafter. Referring again to Fig. 1, the signals a and b detected by the sensors 102 and 103 are supplied to amplifiers 104 and 105 wherein the signals are amplified into a necessary level. The amplified signals in the amplifiers 104 and 105 are supplied to the interpolation circuit 106, the comparator 107 and the multiplexer 108. In the amplifiers 104 and 105, the direct-current component, the output voltage ratio and the phase of the signals a and b are controlled according to the preset values in the EEPROM 115. The interpolation circuit 106 interpolates the signals a and b and outputs as an A/B phase signal. The comparator 107 compares the signals a and b with the reference voltage for detecting a zero-crossing point. The comparator 107 executes a detection of an absolute amount correspondence. Figs. 6 and 7 show a circuit for detecting a zero-crossing point and a circuit for detecting a correspondence between absolute amounts of the singals a and b . The circuit for detecting absolute amount correspondence will be discussed hereinafter with reference to a circuit diagram of Fig. 7. The signal a inputted to a terminal 701 and the signal b inputted to a terminal 702 are compared in a comparator 703 wherein a signal is ouputted when the signals a and b take the same value. The output from the comparator 703 is inputted to a first flip-flop circuit 705 according to a clock signal. The output of the first flip-flop circuit 705 is inputted to a second flip-flop circuit 707 according to next clock signal. During the time, the output pulse is outputted through an exclusive-OR circuit 709. On the other hand, the signal a inputted to a terminal 712 and an inversion signal of the signal b inputted to a terminal 713 are supplied to a comparator 704 wherein a signal is outputted only when the signal a and the inversion signal of the signal b take the same value. Fig. 8 shows the absolute values of the sine-wave and the cosine-wave. The points g , h , i and j , where the amplitude of the sine wave and the amplitude of the cosine wave are correspondent with each other, are marked. Further, the points f , c , d and e , where the absolute value of the sine-wave or cosine-wave takes maximum value, are marked. The signals are read-in at π/4 intervals as shown in Fig. 5. When the zero-crossing point and the absolute amount correspondence point are detected, the signal is supplied through the multiplexer 108 to the sample-and-hold circuit 110 wherein the data is sampled and stored. The sampled signal is supplied to the shift circuit 111 wherein the data is shifted so that a part higher than the point where the absolute values of the sine-wave and cosine-wave correspond with each other is picked up. The data processed by the shift circuit 111 is supplied to a scale-up circuit 112. The scale-up circuit 112 scales up the signal in the vicinity of the corresponding point and supplies the signal scaled-up into a dynamic range to the A/D converter 113. The A/D converter 113 converts the signal indicative of a scaled-up portion of the initial signal. Therefore, the conversion by the A/D converter 113 is accurately executed. The digital signal converted in the A/D converter 113 is supplied to the CPU 114. When the zero-crossing points c , d , e and f and one of three pairs of the corresponded points g and h ; h and i ; i and j ; or j and g shown in Fig. 3 are detected, the error amount of the direct-current component is calculated. According to the calculated error amount the correction of the electronic volume of the circuit shown in Fig. 10 is executed. In this situation, when the error amount of the direct-current component is smaller than an allowable value, the output voltage values A and B are calculated and corrected. Further, when the output voltage ratio is smaller than an allowable value, the phase amount is calculated and corrected. Fig. 10 shows an example of an error correcting circuit of the displacement detecting apparatus according to the present invention. This circuit comprises a channel 1 (CH1) and a channel 2 (CH2) for the respective signals a and b detected by the detection heads 302 and 303. Each electronic volume at a first stage amplifier of each channel is arranged to receive a direct-current component control signal. Each electronic volume at a second stage amplifier of each channel is arranged to receive an output voltage control signal. An electronic volume of an impedance circuit between the channel 1 and the channel 2 receives a phase control signal. Next, the manner of the error correcting operation of the displacement detecting apparatus according to the present invention will be discussed hereinafter with reference to a flowchart of Fig. 11. In a step S1, the routine is started. In a step S2, an initial resistance value of an electronic volume (E.V.) is set at a predetermined value. In a step S3, it is judged whether signal data at either of the detection points c , d , e , f , g , h , i , j is detected or not. When no data is detected, the routine repeats the step 3 until the data at either of detection points is detected. When the data at either of the detection points is detected, the routine proceeds to a step S4. In the step S4, the detected data is stored in a memory. In a step S5, it is judged whether the data at all of the detection points is obtained or not. When the data at either of the detection points is not yet obtained, the routine returns to the step S3 and repeats the steps S3, S4 and S5 until the YES answor is obtained in the step S5. When the data at all detection points is obtained, the routine proceeds to a step S6 wherein the direct-current component of each signal is calculated. In a step S7, it is judged whether the calculated direct-current component is smaller than an allowable value or not. When the calculated direct-current component is not smaller than the allowable value, the routine jumps to a step S12 wherein the correction of the direct-current component is executed. When the direct-current component is smaller than the allowable value, the routine proceeds to a step S8 wherein the output voltage ratio is calculated. In a step S9, it is judged whether the output voltage ratio is smaller than an allowable value or not. When the judgment in the step S9 is "NO", the routine jumps to a step S13 wherein the correction of the output voltage ratio is executed. When the judgment in the step S9 is "YES", the routine proceeds to a step S10 wherein the phase difference is calculated. Following this, in a step S11, the correction of the phase difference is executed. After the execution of the step S11, the routine returns to the step S3. Referring to Fig. 2, there is shown a second embodiment of the displacement detecting apparatus according to the present invention. The structure of the second embodiment is generally similar to that of the first embodiment except that a multiplexer 219 is further added to the circuit of the second embodiment. In case that the measuring scale 101 is put in a temperature out of the predetermined range, or receives a dynamic impact larger than a predetermined value, it may happen that the scale signals a and b are largely deviated and therefore the input signal to the A/C converter 113 through the scale-up circuit 112 may take a large value out of a predetermined range. In contrast, according to the second embodiment, even if such signals are inputted in the apparatus, such signals are corrected without trouble. As shown in Fig. 2, the signals a and b detected by sensors 202 and 203 from a scale 201 is amplified at amplifiers (AMP) 204 and 205 at a necessary level. In the amplifiers 204 and 205, the direct-current component, the voltage ratio and the phase of the signals a and b are controlled according to a preset value stored in the EEPROM. The amplified signals a and b in the amplifiers 204 and 205 are supplied to an interpolation circuit 206 wherein the signals are interpolated and A/B phase signal is outputted. The amplified signals a and b are inputted to a comparator 207 wherein the signals are compared with a reference voltage for detecting a zero-crossing point and for detecting the absolute amount correspondence point of the sine-wave and cosine-wave of the signals. The circuit for detecting the zero-crossing point and the circuit for detecting the absolute amount correspondence point are shown in Figs. 6 and 7, respectively. The output indicative that the zero-crossing point and the absolute amount correspondence point are detected is inputted from the comparator 207 to a control circuit 209. The control circuit 209 outputs a control signal to a multiplexer 208 and a sample-and-hold circuit 210 so that the output signals from the amplifiers 204 and 205 at time when the zero-crossing point and the absolute amount correspondence point are detected are supplied to and stored in the sample-and-hold circuit 210 through the multiplexer 208. The sample-and-hold signal is supplied to a shift circuit 211 wherein the signal is shifted so that the data in the vicinity of the detection point is outputted. The signal from the shift circuit 211 is supplied to a scale-up circuit 212 wherein the signal indicative of the data in the vicinity of the detection point is scaled up into a dynamic-range. Then, the scaled-up signal is supplied to an A/D converter 213. In case that the detected voltage (the signal supplied to the A/D converter) takes a value out of a range of the A/D converter 213, the sampled signal is not supplied to the scale-up circuit 212 and is supplied to the A/D converter 213 wherein the direct-current component and the gain of the signal is controlled in range so as to be within a range of the scale-up circuit. The manner of operation of the displacement detecting apparatus of the second embodiment will be discussed hereinafter with reference to flowcharts of Figs. 12A and 12B. In a step S101, the routine is started. In a step S102, an initial resistance value of an electronic volume (E.V.) is set at a predetermined value. In a step S103, it is judged whether signal data at either of the detection point c , d , e , f , g , h , i , j is detected or not. When no data is detected, the routine repeats the step 103 until the data at either of the detection points is detected. When the data at either of the detection points is detected, the routine proceeds to a step S104. In the step S104, the detected data is stored in a memory. In a step S105, it is judged whether the detected data is out of a predetermined range or not. When the detected data is within the range, the routine proceeds to a step S106. When it is out of the range, the routine proceeds to a step S115. In a step S106, it is judged whether the data at all of the detection points is obtained or not. When the data at either of the detection points is not yet obtained, the routine returns to the step S103 and repeats the steps S103 to S106 until the YES answer is obtained in the step S106. When the data at all detection points is obtained, the routine proceeds to a step S107 wherein the direct-current component of each signal is calculated. In a step S108, it is judged whether the calculated direct-current component is smaller than an allowable value or not. When the calculated direct-current component is not smaller than the allowable value, the routine jumps to a step S113 wherein the correction of the direct-current component is executed. When the direct-current component is smaller than the allowable value, the routine proceeds to a step S109 wherein the output voltage ratio is calculated. In a step S110, it is judged whether the output voltage ratio is smaller than an allowable value or not. When the judgment in the step S110 is "NO", the routine proceeds to a step S114 wherein the correction of the output voltage ratio is executed. When the judgment in the step S110 is "YES", the routine proceeds to a step S111 wherein the phase difference is calculated. Following this, in a step S112, the correction of the phase difference is executed. After the execution of the step S112, the routine returns to the step S103. When the judgment in the step S105 is "YES", that is, when the detected data is out of the range, the routine proceeds to the step S115 wherein it is judged as to whether the data at the detection points c , d , e and f are detected by the sample-and-hold circuit 210 or not. When the judgment in the step S115 is "YES", the routine proceeds to a step S116 wherein the detected data is stored. When the judgment in the step S115 is "NO", the routine repeats the step S115 until the sample-and-hold circuit 210 detects the signal at the detection points c , d , e and f . In a step S117, it is judged whether the data at all of the four detection points c , d , e and f is detected or not. When the judgement in the step S117 is "NO", the routine returns to the step S115 and repeats the steps S115, S116 and S117 until the data at all four points is detected. When the judgment in the step S117 is "YES", that is, when the data at all four detection points is detected, the routine proceeds to a step S118 wherein the direct-current component of each signal is calculated. In a step S119, it is judged whether the calculated direct-current component is smaller than an allowable value or not. When the calculated direct-current component is not smaller than the allowable value, the routine proceeds to a step S122 wherein the correction of the direct-current component is executed. Following the step S122, the routine proceed to a step S123. When it is judged in the step S119 that the direct-current component is smaller than the allowable value, the routine proceeds to a step S120 wherein the output voltage ratio is calculated. In a step S121, the correction of the output voltage is executed. In a step S123, it is judged whether the data at the detection points c, d, e and f is detected by the sample-and-hoid circuit 210 or not. When the judgment in the step S123 is "YES", the routine proceeds to a step S124 wherein the detected data is read-in and stored. When the judgment in the step S123 is "NO", the routine repeats the step S123 until the sample-and-hold circuit 210 detects the signal at the detection points c, d, e and f . In the step S125, it is judged whether the detected data at the detection points c, d, e and f is within the range or not. When the judgment in the step S125 is "YES", the routine returns to the step S103. When the judgment in the step S125 is "NO", the routine returns to the step S115.

Claims: A displacement detecting apparatus comprising: a detection head unit (102,103;202,203;302,303) detecting two sine wave signals (a,b) whose phases are shifted by about 90°; a signal detecting circuit (107;207) detecting a magnitude (Ed,Ef,Ec,Ee) of one (a) of the two sine wave signals (a,b) when the other one (b) of the two sine signals (a,b) crosses with a reference voltage level, as to the respective sine wave signals; a circuit means (108,109,110,111,112,113,114:208,209,210,211,212,213, 214,219) for obtaining a correction amount of a direct current amount (D1,D2) of the detected one of the two sine wave signals (a,b) from an added value divided by two of two signal amounts which are detected at points crossing with the reference voltage level and are located in different quadrants; and a correctoin circuit means (118;218) for changing the sine wave signals (a,b) by the correction amount of the direct current component according to the detected correction amount until an error amount of the detected direct current component is smaller than an allowable predetermined value. A displacement detecting apparatus as claimed in claim 1, further comprising: a circuit means (108,...114;208,...219:57,5108) deciding whether an error amount of the detected direct current component is smaller than the allowable predetermined value at which the correction of the direct component is completed; a circuit means (108,...114; 208,...219:58,5109) obtaining, when said error amount is smaller than said allowable value, a correction amount for an amplitude ratio between the two sine wave signals (a,b) by comparing one of two signal amounts obtained from the sine wave signal (a) with one of two signal amounts obtained from the other sine wave signal (b); and a correction circuit means (S13;S114) for changing the amplitude ratio to a predetermined value according to the calculated correction amount until an error amount of the amplitude ratio is smaller than an allowable predetermined value. A displacement detecting apparatus as claimed in claim 2, wherein: said signal detecting circuit (107;207) compares absolute values of the two sine wave signals (a,b), and detects a magnitude of each sine wave signal at a time when the absolute value of one (a) of the two sine wave signals (a,b) is correspondent with that of the other sine wave signal (b); said circuit means (108,...114,208,...219;S7,S108,S9,S110) deciding whether an error amount of the direct current component is smaller decides whether an error amount of the amplitude ratio is smaller than the allowable predetermined value; said circuit means (108,...114;208,...219;S10,S111) calculates a correction amount of the phase (δ) from two signal amounts which are detected when the absolute value of one of the two sine wave signals (a,b) corresponds to that of the other sine wave signal and are located at adjacent two quadrants, when the error amount of the detected direct current component (S7,5108) and the error amount of the amplitude ratio (59,5110) are smaller than the respective allowable values; and said correction circuit means (118,218;S11,S112) executes the correction of the phase (δ) by correcting one of the sine wave signals with respect to the other of the two sine wave signals according to the obtained correction value amount. A displacement detecting apparatus as claimed in one of claims 1 to 3, wherein a plurality of sine wave signals (a,b) are supplied to one A/D converter (113;213) through a multiplexer (108;208). A displacement detecting apparatus as claimed in claim 4, further comprising a scale-up circuit (112;212) which selects a predetermined interval of the sine wave signals (a,b) which scales up the magnitudes of the sine wave signals within the predetermined interval so that the amplitude interval of the scaled-up magnitude becomes equal to a dynamic range of the A/D converter (113;213) and which supplies the scaled-up signal magnitudes to said A/D converter (113,213). A displacement detecting apparatus as claimed in claim 5, further comprising one of a micro-computer and a logic circuit which automatically control a setting of a scale-up ratio and an amplitude interval of the sampled signal. A displacement detecting apparatus as claimed in one of claims 1 to 6, wherein said detection head unit or head includes a pair of sensors (102,103;202,203;302,303) which read a position on a measuring scale (101;201). A displacement detecting apparatus as claimed in one of claims 5 to 7, wherein said scale-up circuit (112;212) scale up data in the vicinity of the signal detected by said signal detecting circuit (107;207) into a dynamic-range of the analog-to-digital converter (112;213).

Inventors: KUSUMI MASAAKI, TANAKA TAKASHI, KUSUMI, MASAAKI, TANAKA, TAKASHI, Kusumi, Masaaki, c/o Sony Magnescale Inc., Tanaka, Takashi, c/o Sony Magnescale Inc.
Applicants: SONY PRECISION TECHNOLOGY INC, SONY PRECISION TECHNOLOGY INC.
Application year: 1995
Main classification: G01D5
IPC codes: G01D5, G01B7