Displacement detecting apparatus

Abstract: A magnetic scale (3) formed by arranging a non-magnetic material (2) at a predetermined pitch (P) in the direction of motion of a piston rod (1), and a pair of magnetic sensors (5) which output two sine waves with a phase difference of 90° corresponding to the pitch (P) of said magnetic scale (3), are provided. The peak voltages of the sensor output at each pitch of the magnetic scale are updated and stored. Center voltages are computed from the peak voltages at each pitch, and a coarse displacement is computed based on the result of comparing the center voltages and sensor outputs. Correction coefficeints of the sensor outputs are computed from the peak voltages and center voltages, and the sensor outputs are compensated based on these correction coefficients. A fine displacement is then computed by an inverse trigonometric function from the two corrected signals, and a displacement signal is output by adding the coarse displacement to the fine displacement.

Description: This invention relates to an apparatus for detecting, for example, the displacement of a piston rod in a hydraulic cylinder. An apparatus wherein pieces of a non-magnetic material are embedded in the surface of a piston rod at a fixed pitch interval in the axial direction to form a magnetic scale, and the sinusoidal variation of the output signal from a sensor attached to the side of a cylinder due to the motion of the piston rod is used to detect the displacement of the piston rod with high precision, has been disclosed by the Applicant and several others (Tokkaisho No. 63-263418, Tokkaihei No. 1-269015, Tokkaihei No. 2-105013 and other applications published by the Japanese Patent Office). This magnetic sensor outputs a sine wave of one cycle for each pitch of the magnetic scale due to the motion of the piston rod, and by installing a pair of magnetic sensors in the axial direction of the piston rod such that two sine waves are output with a phase difference of 90° , the displacement of the rod within each pitch can be determined very precisely by computing an inverse trigonometric function. More specifically, the following method can be used as disclosed in for example Jikkaihei No. 1-173604 published by the Japanese Patent Office. Fig. 9 shows the waveform output from the magnetic sensors. The two sensor outputs which differ in phase by 90° may be regarded as (sin) wave and (cos) wave. In this case, the sensor outputs y1, y2 due to the displacement of the piston rod within one pitch ( 0 - 2π ) of the magnetic scale are given respectively by: y 1 = V 1 sin y 2 = V 2 cos V₁ and V₂ are peak voltages determined by the characteristics of the magnetic sensor and of the magnetic scale. If the gain can be adjusted such that V₁ = V₂, we then obtain: tan = sin/cos = y 1 /y 2 An angular displacement  may be determined from the sensor outputs y₁, y₂, i.e.:  = tan -1 (y 1 /y 2 ). If we find , therefore, the piston rod displacement (fine displacement) within 1 pitch (or 1/2 pitch) may be computed from: Δ ℓ = (p/2π ) ·  where p is the pitch. A coarse displacement at every pitch (1/2 pitch) on the magnetic scale can be found by observing the peak voltage or the center voltage (center value of the amplitude) of the sensor output. By adding this coarse displacement to the fine displacement between pitches, therefore, the actual displacement within 1 pitch can be measured with extremely high precision. This displacement computation however assumes that V₁ = V₂ due to gain adjustment of peak voltages of sensor voltages. The two sensor outputs, however, may not always have the same amplitude and center voltage, but may vary at every pitch due to unevenness in the characteristics of the magnetic resistors comprising the magnetic sensors, unevenness in the depth of non-magnetic material in the piston rod or temperature variations. Unless these variations are compensated, therefore, the precision of the displacement that is computed cannot always be guaranteed. As shown in Fig. 10, differences in depth of non-magnetic material at each pitch of the magnetic scale give rise directly to variations in the amplitudes of the output signals from the magnetic sensors. In addition, there will naturally be a difference between the center voltages of the magnetic sensors, drifts in the center voltages due to temperature variations, and variations of amplitude. It is therefore impossible to compensate fluctuations, and in particular differences of amplitude at each pitch, merely by an initial gain adjustment of the magnetic sensors as described above, and it is thus difficult to detect the displacement with high precision. If the magnetic scale is embedded in the piston rod with high precision, it is of course possible to improve the precision of displacement detection. There is however a limit to this improvement, and if precision of the embedded depth is to be guaranteed, it necessarily entails a great increase in the cost of machining the piston rod. US-A-4462083 discloses a method of interpolation, in which signals from a unit scanning a scale are corrected for the direct voltage component, amplitude inequality, and phase difference, before use in interpolation. The object of this invention is to permit fine detection of displacement without requiring mechanical precision by correcting the output signals from the magnetic sensors at each scale pitch. To achieve this object, the displacement detecting apparatus of the present invention comprises a magnetic scale having a predetermined pitch in the direction of motion of said object; two magnetic sensors each of which outputs a signal in the form of a sine wave due to movement of said scale relative to said sensor, said sine wave signals having a 90° phase difference between each other; means for computing a coarse displacement of said object in dependence on a count of either the peak or center values of said sine wave signals; means for compensating said sine wave signals for differences in amplitude; means for computing a fine displacement from an inverse trigonometric function using said compensated sine wave signals (A,B); and displacement computing means which outputs a displacement signal by adding said coarse displacement to said fine displacement; characterised in that said apparatus further comprises: means for sampling a value of one of said sine wave signals (A,B) as a peak value (Ape,Bpe) when the other of said sine wave signals (A,B) crosses its centre value (Bce,Ace) and vice versa; means for updating and storing the peak values sampled by said sensors at each pitch interval over the entire movement of the object (1); means for computing a center value (Ace,Bce) of the sine wave signals from said peak values (Ape,Bpe) at each pitch interval; and means for computing correction coefficients (Asc,Bsc) of said sensor output signals (A,B) from said sampled peak values (Ape,Bpe) and said center values (Ace,Bce); said sine wave signals (A,B) being compensated by said compensating means in dependence on said correction coefficients (Asc,Bsc). The correction coefficient may be taken as the reciprocal of the difference of the peak voltages and center voltages at each pitch. The sensor outputs at each scale pitch may be compensated by multiplying the actual sensor outputs by this correction coefficient, which equalizes the amplitude levels. From the two corrected signals with different phases, a coarse displacement and a fine displacement are computed, and a displacement signal may be computed by adding them. Output variations due to unevenness of the magnetic scale, etc., can thus be compensated, and a very precise displacement signal can be output. An embodiment of the present invention will now be described, by way of example only, with reference to the accompanying drawings, in which: Fig. 1 is an enlarged illustration of the sensor in one embodiment of the present invention; Fig. 2 is a block diagram of the controller; Fig. 3 is an illustration showing the way in which sensor signals and peak voltages are stored; Figs. 4(A) and 4(B) are flowcharts for computing correction coefficients and center voltages; Fig. 5 is a flowchart for updating peak voltages; Fig. 6 is a flowchart for computing the displacement signal from the sensor signal correction, fine displacement and coarse displacement; Fig. 7 is an illustration of the relation between coarse displacement counter values and quadrant positions in the composite amplitude characteristics of signals A and B; Fig. 8 is a similar illustration of combined amplitude; Fig. 9 is an illustration showing the displacement computation of the prior art; and Fig. 10 is an illustration of the actual sensor signal output waveforms. Fig. 1 shows an embodiment of this invention used to detect the displacement of a piston rod of a hydraulic cylinder. Shallow hollows are formed at equal intervals on the surface of a piston rod 1 of magnetic material in its axial direction, and non-magnetic parts 2 of equal pitch are formed by for example embedding chips of non-magnetic material in these hollows so as to constitute a magnetic scale. A pair of magnetic sensors 5 is provided on the side of the hydraulic cylinder, for example in the vicinity of a bearing 4, which output two sine waves of which one cycle corresponds to one pitch of the magnetic scale 3 and whose phase differs by 90° with the displacement of the piston rod 1. As shown in Fig. 2, the two output signals A, B of different phase from magnetic sensors 5 are input to a controller 7 comprising a microprocessor, for example, and the displacement of the piston rod 1 is computed based on this information. In principle, the controller 7 performs a compensation based on correction coefficients found from the peak voltages of the magnetic sensor output signals (described hereinafter) so as to make their amplitude levels constant at each pitch, finds a coarse displacement in 1/2 pitch units based on these corrected signals, finds a fine displacement by dividing each pitch interval into a predetermined number of parts, and computes the actual displacement by adding the coarse displacement to the fine displacement. Said output signals A, B are input to a central processing unit (CPU) of the controller 7 via sample hold circuits SHA, SHB and an analog/digital converter ADC. SHA, SHB take the peak voltages (maxima and minima) of the sensor signals when these voltages are input to the memory RAM described hereinafter, and use them when the sensor signals are input to compute the fine displacement. Comparators CA, CB compare each signal A, B with the center voltages of the maxima and minima at each pitch computed by the CPU, i.e. they compare the sensor signals A, B with the center voltages as references. If the signal is higher than the center voltage an H level signal is output, and if the signal is lower than the center voltage, an L level signal is output. DACA, DACB are digital/analog converters to perform analog conversion on the center voltages computed by the CPU. The memory RAM progressively updates and stores the peak voltages of the sensor signals A, B at each pitch. As shown in Fig. 3, the peak voltages (maxima and minima) are stored for signal A and signal B separately, and class values are assigned to them according to their reliability (the displacement is determined such that maximum values are even integers and minimum values are odd integers). Before the system is initialized, all values are guessed (class Gu). When it is initialized, the first value is measured (class Me), and the next one is estimated (class Es). The latter however is subsequently updated to Me, which gives rise to another Es. In this way, Gu values are progressively replaced by Es values, and then by Me values. When the piston rod has completed one stroke, all values will be Me. These class values are weighting coefficients used to update the peak voltages in the manner described hereinafter. More specifically, if Me = 1, Me > Es > Gu. The computations performed by the controller 7 shall now be explained with reference to the flowcharts of Fig. 4 - Fig. 6. Fig. 6 is a flowchart for computing the actual displacement of the piston rod by finding a coarse displacement and a fine displacement from the sensor signals A, B. First, however, the computational process to determine the center voltages and correction coefficients of the sensor signals A, B will be described with reference to Figs. 4(A) and 4(B), and the updating and storing process to determine peak voltages with reference to Fig. 5. Fig s. 4(A) and 4(B) are executed when sensor signal A (sensor signal with phase A) and sensor signal B (sensor signal with phase B) respectively cross their center voltages. Firstly, in Fig. 4(A), when it is determined that the sensor signal A has crossed its center level by detecting that the output of comparator CA has varied, a command is issued to hold the peak voltage of the sensor signal B (steps 1 and 2). As shown in Fig. 3, when the sensor signal A is at its center cross-over point, the sensor signal B has a maximum or minimum voltage, and this is held by a sample hold for computation of the center voltage and counting. The gathering and updating of peak voltages of signal B ,will be described with reference to the flowchart of Fig. 5. By counting the number of times the sensor signal A has crossed its center voltage, a coarse displacement in 1 pitch or 1/2 pitch units of the magnetic scale is found. Furthermore, by determining the order of H and L between signals A and B output by the comparators CA, CB, the stroke direction can be judged. In one direction, the coarse displacement counter for A is decreased, while in the other it is increased (steps 4 and 5). As shown in Fig. 7, the coarse displacement counter A, and the coarse displacement counter B to be described hereinafter are first initialized such that the value of counter A minus the value of counter B = 0 or 1. If however the coarse displacement counters are not operating properly due to a break in the sensor signal wiring, excessive noise or a fault in the comparator output, the difference between the two counter values will then no longer be 0 or 1. This therefore permits an abnormality to be diagnosed immediately, in which case an error is output (step 7). Next, in a step 8, a correction coefficient for signal A is computed from the peak voltage and center voltage. The correction coefficient compensates differences in the amplitude of the sensor output at each pitch of the magnetic scale, and thereby equalizes the output level over the whole scale. It is used when a correction is applied to compute the fine displacement of the piston rod. This correction coefficient Asc is calculated as 1/| peak voltage Ape - center voltage Ace | . The peak voltage and center voltage of signal A are found by the routine of Fig. 4(B) . If for example the correct value of | peak voltage - center voltage | is 1, and the measured value is twice this figure (the center voltage, as will be described hereinafter, is determined as the intermediate voltage between the maximum and minimum voltages at each pitch), the correction coefficient will be 1/2. As described hereinafter, by multiplying the amplitude of sensor signal A at every pitch with this correction coefficient, the value of the amplitude will always be 1. Next, the peak voltage of signal B which has been held, is updated (step 9). This updating is carried out according to the flowchart of Fig. 5 described hereinafter. At a step 10, it is determined whether the timing is right to compute the center voltage of signal B. The center voltage is computed when the sensor signal is at its peak voltage (step 11). The center voltage is basically computed as the intermediate voltage between the last maximum and minimum voltage within one pitch interval with increasing pitch in the stroke direction. However, as the center voltage itself does not vary much, it can also be computed as the average of the maximum and minimum voltages between several preceding and successive pitches. The result of this computation is output as the center voltage of signal B to compute a coarse displacement, and guarantee the precision of displacement detection (step 12). Next, processing is carried out when signal B crosses its center voltage. This is basically the same as the processing carried out when signal A crosses its center voltage except that, as it has opposite phase, the direction of up and down counts is reversed. As shown in Fig. 3, when signal B crosses its center voltage, signal A has its peak voltage. In the same way as described hereinbefore , therefore, an updated value of the peak voltage and the center voltage of signal A are computed, and at the same time, a correction coefficient for signal B is computed (steps 1′ - 12′). Next, the updating of peak voltages in Fig. 5 is performed on signals A and B with opposite phases. This is done by checking the class value (Gu, Es or Me) of one sensor signal when the other signal crosses its center voltage (steps 21, 22 ) . Updated peak voltages are then computed using the class value as a weighting coefficient (steps 23 - 26). This computation is performed by taking the result of multiplying the peak voltage already stored with the weighting coefficient selected, adding the result of multiplying the present peak voltage with a reference coefficient (Ta), and dividing by the result of adding the reference coefficient and the weighting coefficient. As mentioned hereinbefore, if Me = 1, the weighting coefficients have the relationship Me > Es > Gu, and Ta is normally 1. Further, this reference coefficient may be expressed as(1/number of times updating is performed), and Ta may also be greater than 1 to give priority to the present peak voltage. Updating of peak voltages also takes account of errors in the signals which are read. In order to approximate estimated voltages to real voltages as soon as possible even when measured voltages have not yet been stored and increase the precision of the computation, averages of present peak voltages corrected by weighting coefficients are calculated, and stored as updated peak voltages. In steps 28 - 33, if the peak voltages at two positions before and after the present peak voltage stored (if the peak voltage is a maximum, this corresponds to the two maxima stored at the preceding and following pitch) are initial guesses (Gu), the present peak voltage is stored and its class is replaced by Es. In this way, preceding and subsequent guesses (Gu) of peak voltages that have been stored are approximated to real voltages as soon as possible on the basis of measured voltages up to the present time. More specifically, in steps 28 - 30, the class of the two following peak voltages is checked. If they are guesses (Gu), the stored peak voltage is updated to a present peak voltage and its class is replaced by Es. Then, in steps 31 - 33, the class of the two preceding peak voltages is checked, and if they are estimates, they are updated and replaced. If it is determined by the class check that the peak voltage is an estimated value (Es) or a measured value (Me), it is not updated and the class is not replaced. Next, it shall be described how the displacement is computed. This is done by correcting the signals A and B using center voltages, peak voltages and correction coefficients to find a coarse displacement and a fine displacement, and adding the two as described hereinbefore. First, signals A and B are held by a sample hold, subjected to A/D conversion, and read as sensor signals As and Bs (step 41). The corrected signal Aco is found by subtracting the center voltage Ace from the sensor signal As, and multiplying with a correction coefficient Asc described hereinbefore, and a corrected signal Bco is computed in the same way. This adjusts the amplitude levels so that they are equal at each pitch as described hereintofore. Thus, even if the signal amplitudes at each pitch are different as shown in Fig. 10, they can be corrected to signals with a fixed amplitude. Next, in a step 44, the combined amplitude of these corrected signals is found, and it is determined whether or not the corrected signals have errors. Fig. 8 is a graph for determining the range of correct values. The two signals correspond to sin and cos. If a predetermined zone is defined with respect to the circles drawn by (sin² + cos²  = 1) , and the combined signal amplitude is within this zone, it is confirmed that both corrected signals Aco and Bco are within correct limits. If the combined amplitude is outside this zone, on the other hand, it is judged that the corrected signals are not so reliable and an error is output. This zone may be determined taking account of the allowable phase difference between the sensor signals and allowable noise level, etc. It enables a check to be performed to guarantee high precision of displacement detection, and a check to be performed for faults due to breaks in sensor signal wiring, short circuits and so on. Next, provided that there are no errors, the values of the counters denoting the coarse displacement are taken, and a fine displacement is computed based on the corrected signals A, B. As the sensor signals contain some noise, the values of the coarse displacement counters may not be very reliable inside the small angular range just before and after the canter cross-over point. If the counter value is taken immediately when the signal crosses the center voltage, therefore, there may be unexpected errors if this value is simply added to the fine displacement. The precision is therefore increased by using two coarse displacement counters, one for A and one for B, selecting the counter value which does not vary over a certain region, and adding this to the fine displacement. The computation begins by determining the region defined by 45° lines on a circular trace (sin² + cos² = 1) of the combined amplitude of the corrected signals (Aco - Bco) shown in Fig. 7, in which the present displacement of the piston rod is located. As shown in this figure, 45° lines are the {(1/4), (3/4), (5/4). (7/4) π } lines. Further, the values of displacement counters A and B coincide with or differ from each other depending on their position relative to the vertical and horizontal axes as boundaries. In each of the four regions divided by the 45° lines, the coarse displacement counter for one of the signals is varying. If the counter value one region before that of the present position is chosen, therefore, a stable and correct coarse displacement can be determined. After determining the region from the magnitude of the absolute values of the corrected signals Aco and Bco in a step 45, the coarse displacement is calculated and the fine displacement is calculated from an inverse trigonometric function as described hereinbefore. In steps 45 - 50, in regions where the absolute value of corrected signal Bco is greater than that of Aco, the coarse displacement counter for signal B is chosen and a coarse displacement is found from the counter value for signal B. A fine displacement is then calculated as 100/π · tan-¹ | Aco/Bco | , i.e. in terms of the deviation from the vertical axis (Bco axis). In this case, the magnetic scale pitch is set at 2 mm (the coarse displacement is then expressed in 1 mm units), and a fine displacement can be obtained by dividing this coarse displacement unit into 100 parts (the fine displacement will then be expressed in 0.01 mm units). If further precision is required, the coarse displacement unit may be divided not into 100 parts but into 1000 parts. The constant in the above expression is then 1000, and a fine displacement can be found to the nearest 0.001 mm. Further, tan-¹ was used for the inverse trigonometric function, but the processing may also be carried out by sin-¹ and cos-¹ using the combined amplitude of the corrected signals. If a fine displacement Fd is found in this way, compensation is performed by determining whether the signs of the corrected sensor signals Aco and Bco are identical in a step 48. If the signs are different, the compensated fine displacement is given by (50 + Fd) in a step 49, while if the signs are the same, the compensated fine displacement is given by (50 - Fd). However, if the absolute value of the corrected signal Aco is greater than Bco in the step 45, the program proceeds to steps 51 - 55, the counter value for signal A is taken as a coarse displacement, the fine displacement is calculated as Fd = (100/π)tan-¹| Bco/Aco | or the deviation from the horizontal axis, and the fine displacement is given after determining whether the signs of the two corrected signals are identical. If the signs coincide, the fine displacement is output as (Fd) in a step 55, while if they do not, the fine displacement is output as (-Fd) in a step 54. As shown in Fig. 7, signal B crosses its center voltage at 0 → π → 0(2π ) , and signal A crosses its center voltage at (1/2) π → (3/2) π → (1/2)π. From (7/4) π to (1/4) π , the counter value for signal A which does not vary over this range, may be taken as the coarse displacement signal; from (1/4)π to (3/4)π , the counter value for signal B may be taken; from (3/4)π to (5/4) π , the counter value for signal A may be taken; and from (5/4) π to (7/4)π , the counter value for signal B may be taken. The actual displacement signal is then obtained by adding this to the fine displacement signal. As described hereinbefore, the fine displacement is given by dividing 1/2 pitch intervals on the magnetic scale into 100 parts. The region 0 → π is therefore divided into 100 equal parts, and the region π → 0 (2π ) into 100 equal parts. In the angle range  = 0 - (1/4)π , the absolute value of sensor signal A is large. As the signs of both sensor signals are then identical, the fine displacement Fd may simply be added to the coarse counter value of signal A (e.g. N) to give an actual stroke displacement St = N + Fd/100. In the angle range  = (1/4)π - (1/2)π , the absolute value of sensor signal B is large and the signs of both sensor signals are identical. The fine displacement 50 - Fd is thus added to the coarse counter value of signal B (N). At the angle  = (1/2)π , for example, Fd = 0, the fine displacement = 50, and the actual stroke displacement St = N + 50/100. In the angle range  = (1/2)π - (3/4)π , the absolute value of sensor signal B is large and the signs of the sensor signals are different. The fine displacement is then 50 + Fd and this is added to the coarse counter value of signal B (N). The actual stroke displacement is thus St = N + ( 50 + Fd) /100. In the angle range  = (3/4)π - π , the absolute value of sensor signal A is large and the signs of the sensor signals are different, so the fine displacement is corrected to -Fd. The coarse displacement is then the value of the coarse displacement counter for signal A (N + 1), so St = (N + 1) - Fd/100. Further, if the stroke is in the forward direction as shown in the diagram, N is increased to N + 1 at the position π /2 . If the stroke is in the reverse direction, the value of the counter is decreased at the position 3π /2 and the coarse displacement counter for signal A is then N + 1 as when the piston is moving in the forward direction. When the angle  = π , Fd = 0 , and the value of the coarse counter for signal A, (N + 1), indicates the displacement. Further, in the angle range  = π - 2π (0), the displacement can be computed in the same way as above. In a step 56, the coarse displacement and fine displacement are added together to output a stroke signal St. In this way, the actual displacement is interpolated by dividing the interval between coarse displacements into 100 parts to find a fine displacement, and the displacement can then be computed with high resolution. According to the the present invention, therefore, the peak voltages of the magnetic sensor signals are updated and stored at every pitch of the magnetic scale over the entire stroke of the piston rod. Even if the sensor output,signals fluctuate at each pitch due to errors in the machining of the magnetic scale, or even if there are temporal variations or fluctuations due to temperature changes, therefore, the amplitude levels of the sensor signals are adjusted to be constant and the center voltage is also adjusted based on this updated information. A stable and accurate displacement detection is therefore always obtained.

Claims: Apparatus for detecting displacement of an object (1), comprising: a magnetic scale (3) having a predetermined pitch in the direction of motion of said object (1); two magnetic sensors (5), each of which outputs a signal (A,B) in the form of a sine wave due to movement of said scale (3) relative to said sensor (5), said sine wave signals (A,B) having a 90° phase difference between each other; means for computing a coarse displacement of said object in dependence on a count of either the peak (Ape, Bpe) or center (Ace,Bce) values of said sine wave signals (A,B); means for compensating said sine wave signals for differences in amplitude; means for computing a fine displacement from an inverse trigonometric function using said compensated sine wave signals (A,B); and displacement computing means which outputs a displacement signal by adding said coarse displacement to said fine displacement; characterised in that said apparatus further comprises: means for sampling a value of one of said sine wave signals (A,B) as a peak value (Ape,Bpe) when the other of said sine wave signals (A,B) crosses its centre value (Bce,Ace) and vice versa; means for updating and storing the peak values sampled by said sensors (5) at each pitch interval over the entire movement of the object (1); means for computing a center value (Ace,Bce) of the sine wave signals from said peak values (Ape,Bpe) at each pitch interval; and means for computing correction coefficients (Asc,Bsc) of said sensor output signals (A,B) from said sampled peak values (Ape,Bpe) and the computed center values (Ace,Bce); said sine wave signals (A,B) being compensated by said compensating means in dependence on said correction coefficients (Asc,Bsc). The apparatus as defined in Claim 1, wherein the peak values (Ape,Bpe) memorized by said updating and storing means comprise sine wave maxima and minima. The apparatus as defined in any preceding claim, wherein estimated values are stored as initializing values by said updating and storing means before the peak values (Ape,Bpe) actually measured are input. The apparatus as defined in any preceding claim, wherein said peak value updating and storing means memorizes class values (Gu,Es,Me) representing the reliability of the peak values (Ape,Bpe) together with the peak values (Ape,Bpe). The apparatus as defined in Claim 4, wherein the class values (Gu,Es,Me) memorized by said updating and storing means can be modified according to the reliability of the peak values (Ape,Bpe) stored together with them. The apparatus as defined in Claim 4 or 5, wherein said updating and storing means updates peak values (Ape,Bpe) by compensating input measured values based on the peak values (Ape,Bpe) and class values (Gu,Es,Me) already stored. The apparatus as defined in any preceding claim, wherein said center value computing means computes center values (Ace,Bce) as intermediate values between maxima and minima of the sensor output signals within one pitch. The apparatus as defined in any preceding claim, wherein said center value computing means computes center values (Ace,Bce) as average values of maxima and minima of the sensor output signals (A,B) over several pitches. The apparatus as defined in any preceding claim, wherein said coarse displacement computing means computes a coarse displacement when the sensor output signals (A,B) cross the center values (Ace,Bce). The apparatus as defined in any preceding claim, wherein said correction coefficient computing means computes correction coefficients (Asc,Bsc) as the reciprocal of the absolute values of the differences between said peak values (Ape,Bpe) and said center values (Ace,Bce). The apparatus as defined in any preceding claim, wherein said sensor output compensating means computes two corrected signals (Aco,Bco) by subtracting the center values (Ace,Bce) from said sensor output signals (A,B), and multiplying the result by the correction coefficients (Asc,Bsc). The apparatus as defined in any preceding claim, wherein said sensor output compensating means judges the corrected signal (Aco,Bco) to be correct when the combined amplitude of said two corrected signals (Aco, Bco) is within a predetermined range. The apparatus as defined in any preceding claim, wherein said fine displacement computing means computes a fine displacement based on said two corrected signals as N/π . tan⁻¹ | Aco/Bco | where N is a natural integer and Aco, Bco are corrected signals. The apparatus as defined in any preceding claim, wherein said displacement computing means selects a coarse displacement in dependence on the magnitudes of the absolute values of the two corrected signals (Aco,Bco). A method of detecting the displacement of an object (1) using a magnetic scale (3) of predetermined pitch in the direction of displacement of the object (1) and a pair of magnetic sensors (5), wherein the scale (3) or sensors (5) are provided on said object (1) and relative movement therebetween causes each said sensor (5) to output a sine wave signal (A,B) of different phase to the other, a coarse displacement value being obtained through a count of the peak (Ape,Bpe) or center (Ace, Bce) values of said output signals (A,B) and a fine displacement value being obtained through an inverse trigonometric function of said output signals (A,B) after said signals have been compensated for to take account of amplitude differences therein, the method being characterised in that peak values of one of said sine wave signals are sampled when the other signal crosses its center value and vice versa; in that the sampled peak values (Ape,Bpe) are updated and stored at each pitch interval over the entire movement of the object (1); and in that a center value (Ace,Bce) of the sine wave signals is computed from the sampled peak values (Ape,Bpe) at each pitch interval; the sensor output signals (A,B) being compensated to take account of said amplitude differences by correction coefficients (Asc,Bsc) computed from said peak and center values.

Inventors: HELLINGA RICHARD, NAKAZATO MASAKAZU, SHIMOURA YOICHI, YAMAGATA HIDEKI, HELLINGA, RICHARD J., NAKAZATO, MASAKAZU, SHIMOURA, YOICHI, YAMAGATA, HIDEKI, Hellinga, Richard J., c/o Sagami Factory, Nakazato, Masakazu, c/o Sagami Factory, Shimoura, Yoichi, c/o Sagami Factory, Yamagata, Hideki, c/o Sagami Factory
Applicants: KAYABA INDUSTRY CO LTD, KAYABA KOGYO KABUSHIKI KAISHA
Application year: 1991
Main classification: G01D5
IPC codes: G01B7, G01D5