Absolute position detection device and absolute position detection method

A single-track magnetic scale with offset detection elements addresses the complexity and cost issues of dual-track devices, achieving compact and cost-effective high-resolution absolute position detection.

JP7718747B1Active Publication Date: 2025-08-05MACOME CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025057327
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-08-05
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

Existing absolute value magnetic scale devices require two magnetic tracks, leading to a complex structure, increased cost, and difficulty in miniaturization due to the wide magnetic scale width and large detection head size.

Method used

A magnetic scale with a single non-repeating code pattern is used, employing two detection element groups with a half-pitch offset, allowing for high-resolution absolute position detection without an alternating magnetic track, reducing device size and cost.

Benefits of technology

The solution enables high-resolution digital absolute position detection using a single magnetic scale, minimizing device size and cost while maintaining accurate position measurement capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007718747000001_ABST
    Figure 0007718747000001_ABST
Patent Text Reader

Abstract

The absolute position is detected with high resolution using only a magnetic scale having a magnetized pattern consisting of a non-repeating code pattern. [Solution] The absolute position detecting device 1 includes a magnetic scale 10 having one magnetic track on which a magnetization pattern consisting of a non-repeating code pattern is recorded, and a detecting device 20. The detecting device 20 has two detecting element groups S, each consisting of a plurality of detecting elements, arranged opposite to each other on the magnetic scale 10, and calculates a code section position calculation value corresponding to the code section position based on the code information of the magnetic scale 10 obtained from the magnetization pattern, and calculates an interval interpolated value of the magnetic scale 10 using the difference value between the detection values of each detecting element in a plurality of detecting element pairs selected from the two detecting element groups, and obtains the absolute position over the entire length of the magnetic scale from the code section position calculation value and the interval interpolated value.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an absolute position detection device and a position detection method. [Background technology]

[0002] Known magnetic scale devices used for measurement, positioning control, etc. are incremental magnetic scale devices and absolute value magnetic scale devices. Incremental magnetic scale devices output one unit pulse for each unit displacement in accordance with the movement of a moving object, while absolute value magnetic scale devices output an output value in accordance with the absolute position of the moving object from the origin.

[0003] Unlike incremental magnetic scale devices, absolute value magnetic scale devices do not need to be returned to the origin even when the power is turned off, and no cumulative errors occur due to the influence of external noise.In addition, even if the detection head comes off the scale, the absolute position of the returned point can be instantly obtained by returning it to the scale.For these reasons, absolute value magnetic scale devices are widely used in various industrial machines to measure the position or absolute position of linearly moving objects.

[0004] As an example of an absolute value type magnetic scale device, Patent Document 1 discloses an absolute value type magnetic scale device that includes a magnetic scale in which a first magnetic track, on which a magnetization pattern in which no identical bit combination code is generated, is recorded, and a second magnetic track, on which an alternating magnetization pattern having a period equal to one bit length of the magnetization pattern is recorded, is disposed in parallel, and that generates a high-resolution digital absolute position signal by interpolating an interval absolute position signal over one period based on a two-phase signal obtained from the second magnetic track into a code position signal obtained from the magnetization pattern of the first magnetic track. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Patent No. 2571394 Summary of the Invention [Problem to be solved by the invention]

[0006] In the absolute value magnetic scale device disclosed in Patent Document 1, it is necessary to provide two adjacent magnetic tracks on the magnetic scale: an absolute value track as the first magnetic track and an alternating magnetic track as the second magnetic track. This makes the structure of the magnetic scale complicated and increases manufacturing costs. Furthermore, the use of two magnetic tracks requires a wide magnetic scale width, and the detection head is sized to match the magnetic scale, making it difficult to miniaturize the absolute value magnetic scale device.

[0007] The present invention has been made in consideration of these circumstances, and an object of the present invention is to provide an absolute position detection device and an absolute position detection method that can detect an absolute position with high resolution using only a magnetic scale having a magnetization pattern consisting of a single non-repeating code pattern in which no identical bit combination code is generated, without using an alternating magnetic track, and that can make the device smaller and less expensive.In this specification, angles are also described as being included in the term position. [Means for solving the problem]

[0008] In order to solve the above problems, a first technical means of the present invention includes a magnetic scale storing a magnetization pattern consisting of a non-repeating code pattern of n (n is an integer of 2 or more) bits magnetized at a predetermined pitch within an effective measurement length, a first detection element group consisting of m (m is an integer of 2 or more) detection elements arranged at one pitch intervals facing the magnetic scale, and a second detection element group consisting of at least m detection elements arranged at a half pitch offset from each of the detection elements of the first detection element group, and the detection device is configured to detect a detection value of each of the detection elements of the first detection element group or the second detection element group. a code interval position calculation unit that calculates a code interval position calculation value at a code interval position corresponding to the code information based on n-bit code information obtained from the code information; an interpolation value calculation detection element identification unit that identifies an interpolation value calculation detection element of the first detection element group or the second detection element group that corresponds to the code interval position; an interval interpolation value calculation unit that calculates an interval interpolation value at the code interval position from the detection values of the interpolation value calculation detection elements; and an absolute position calculation unit that obtains an absolute position signal over the entire length of the magnetic scale from the code interval position calculation value and the interval interpolation value.

[0009] A second technical means of the present invention is the first technical means, characterized in that within the range of every (m+1) pitch in the magnetization pattern of the magnetic scale, there is both at least one portion where a pole changes from south to north and at least one portion where a pole changes from north to south.

[0010] A third technical means of the present invention is characterized in that, in the first or second technical means, the number of bits n and the number of detecting elements m satisfy the relationship n≦m≦2n.

[0011] A fourth technical means of the present invention is the first or second technical means, characterized in that the magnetization patterns of the magnetic scale are arranged in a straight line.

[0012] A fifth technical means of the present invention is characterized in that, in the first or second technical means, the magnetization patterns of the magnetic scale are arranged in a ring shape.

[0013] A sixth technical means of the present invention is the first or second technical means, wherein the detection device has a lookup table that stores, for each code section position of the first detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for first detector element group interpolation value calculation, and, for each code section position of the second detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for second detector element group interpolation value calculation, and the detector element specification unit for interpolation value calculation selects a detector element from the lookup table according to the code section position of the first detector element group or the second detector element group. the first detection element group interpolation value calculation unit specifies either the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element as the detector element for calculating the interval interpolation value based on the magnitude of the difference value between the detection values of each of the detector elements of the detector element pair in the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element stored in a file, and the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on the ratio of the difference value between the detection values of each of the detector elements of each of the two pairs of detector elements in the first detection element group interpolation value calculation detector element or the second detection element group interpolation value calculation detector element specified by the interpolation value calculation detector element specification unit.

[0014] A seventh technical means of the present invention is an absolute position detection device comprising a magnetic scale having magnetic tracks on which a linear or ring-shaped magnetization pattern consisting of a non-repeating code pattern magnetized at a predetermined pitch within an effective measurement length is recorded, and a detection device, wherein the detection device has two sets of detection element groups consisting of a plurality of detection elements arranged opposite to the magnetic scale with a half pitch offset from each other, and comprises a detection unit that calculates a code section position calculation value corresponding to a code section position based on code information obtained from the magnetization pattern of the magnetic scale, calculates a section interpolation value at the code section position using a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two detection element groups, and obtains an absolute position over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value.

[0015] An eighth technical means of the present invention is an absolute position detection method using a magnetic scale having magnetic tracks on which a linear or ring-shaped magnetization pattern consisting of a non-repeating code pattern magnetized at a predetermined pitch within an effective measurement length is recorded, the method comprising the steps of: obtaining code information of the magnetization pattern of the magnetic scale from detection values of two sets of detection element groups, each of which comprises a plurality of detection elements arranged opposite to each other on the magnetic scale and which are shifted by half a pitch; calculating a code section position calculation value corresponding to a code section position of the magnetic scale based on the code information; and calculating an interval interpolation value at the code section position based on a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two sets of detection element groups; and obtaining an absolute position over the entire length of the magnetic scale from the position calculation value based on the code section position and the interval interpolation value. [Effects of the Invention]

[0016] According to the present invention, it is possible to provide an absolute position detection device and an absolute position detection method that can detect a high-resolution digital absolute position using only a magnetic scale having a magnetized pattern consisting of one non-repeating code pattern, and that can reduce the size and cost of the device. [Brief explanation of the drawings]

[0017] [Figure 1] 1 is a diagram showing an example of the configuration of an absolute position detection device according to a first embodiment of the present invention, which has linear magnetized patterns as magnetic tracks. [Figure 2] FIG. 10 is a diagram illustrating an example of a 6-bit non-repeating code pattern as a linear magnetization pattern and the relationship between the code position number. [Figure 3] FIG. 10 is a diagram for explaining an example of a "code information-code position number correspondence table" showing code position numbers corresponding to code information obtained from a detection element. [Figure 4] 10 is an example of a "code position number-detector element for calculating interpolated value correspondence table" in which the detector element for calculating interpolated value to be used corresponds to the code position number. [Figure 5A] FIG. 10 is a process flow diagram showing an example of absolute position calculation in a position calculation unit. [Figure 5B] FIG. 10 is a process flow diagram showing an example of absolute position calculation in a position calculation unit. [Figure 6] 10 is a diagram illustrating the positional relationship between each of the detecting elements of groups A and B and the magnetic scale at code position numbers 0 to 1. FIG. [Figure 7A] FIG. 10 is a diagram showing detection values obtained from each detection element of group A at code position numbers 0 to 1. [Figure 7B] FIG. 10 is a diagram showing detection values obtained from each detection element of group B at code position numbers 0 to 1. [Figure 8A] 10 is a diagram showing the detection values of detection elements selected for calculating interpolated values when code position numbers 0 to 1 and code position numbers in group A are used. FIG. [Figure 8B] 10 is a diagram showing the detection values of detection elements selected for calculating interpolated values when code position numbers 0 to 1 and code position numbers in group B are used. FIG. [Figure 9A]10 is a diagram showing the difference between the detected values of the respective detector elements of the detector element pair for calculating an interpolated value when the code position numbers 0 to 1 are in group A and code position numbers 1 to 3 are used. FIG. [Figure 9B] 10 is a diagram showing the difference values of the detection values of the detection elements of the detection element pairs for calculating an interpolated value when the code position numbers 0 to 1 are in group B and code position numbers 0 to 1 are used. FIG. [Figure 10] 10 is a diagram for explaining which difference value of the interpolated value calculation detection elements of group A or group B is used to calculate the section interpolated value at code position numbers 0 to 1. FIG. [Figure 11] 10 is a diagram showing changes in the minimum absolute values of the detected values of the detecting elements of groups A and B at code position numbers 0 to 1. FIG. [Figure 12] 10 is a diagram for explaining a method for calculating an interval interpolation value using a difference value between detection values of each detection element of a detection element pair in group B. FIG. [Figure 13] 10 is a diagram for explaining a method for calculating an interval interpolation value using a difference value between detection values of each detection element of a detection element pair in group A. FIG. [Figure 14] 10 is a diagram showing the results of calculating absolute positions from calculated chord section position values and section interpolated values for chord position numbers 0 to 1. FIG. [Figure 15] 10 is a diagram illustrating the positional relationship between the detection elements of groups A and B and the magnetic scale at code position numbers 56 to 57. FIG. [Figure 16A] FIG. 10 is a diagram showing the detection values obtained from each detection element of group A at code position numbers 56 to 57. [Figure 16B] FIG. 10 is a diagram showing the detection values obtained from each detection element of group B at code position numbers 56 to 57. [Figure 17A] 13 is a diagram showing the detection values of detection elements selected for calculating interpolated values when code position numbers 56 to 57 are used and code position numbers in group A are adopted. FIG. [Figure 17B] 13 is a diagram showing the detection values of detection elements selected for calculating interpolated values when code position numbers 56 to 57 are used and code position numbers in group B are adopted. FIG. [Figure 18A]13 is a diagram showing the difference values of the detection values of the detection elements of the detection element pairs for calculating an interpolated value when code position numbers 56 to 57 and code position numbers in group A are used. FIG. [Figure 18B] 13 is a diagram showing the difference values of the detection values of the detection elements of the detection element pairs for calculating an interpolated value when code position numbers 56 to 57 and code position numbers in group B are adopted. FIG. [Figure 19] FIG. 10 is a diagram showing the detection values of all the detection elements when group A is at code position number 0. [Figure 20A] 10 is a diagram showing an example of detection values of a pair of detector elements Aw and Ax that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 0. FIG. [Figure 20B] FIG. 10 is a diagram showing another example of the detection values of the pair of detector elements Aw and Ax that satisfy the selection conditions for the detector elements for calculating an interpolated value when group A is at code position number 0. [Figure 21A] 10 is a diagram showing an example of detection values of a pair of detector elements Ay and Az that satisfy the selection conditions for detector elements for calculating interpolated values when group A is at code position number 0. FIG. [Figure 21B] FIG. 10 is a diagram showing another example of the detection values of the pair of detector elements Ay and Az that satisfy the selection conditions for the detector elements for calculating an interpolated value when group A is at code position number 0. [Figure 22] FIG. 10 is a diagram showing the detection values of all the detection elements when group A is at code position number 56. [Figure 23A] 10 is a diagram showing an example of detection values of a pair of detector elements Aw and Ax that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 56. FIG. [Figure 23B] 10 is a diagram showing another example of the detection values of the pair of detector elements Aw and Ax that satisfy the selection conditions for the detector elements for calculating an interpolated value when group A is at code position number 56. FIG. [Figure 24A] 10 is a diagram showing an example of the detection values of the pair of detector elements Ay and Az that satisfy the selection conditions for the detector elements for calculating the interpolated value when group A is at code position number 56. FIG. [Figure 24B]10 is a diagram showing another example of the detection values of the pair of detector elements Ay and Az that satisfy the selection conditions for the detector elements for calculating an interpolated value when group A is at code position number 56. FIG. [Figure 25] 10 is a diagram showing an example of the configuration of an absolute position detection device according to a second embodiment of the present invention, which has a ring-shaped magnetized pattern made up of a non-repeating code pattern as a magnetic track. FIG. [Figure 26] FIG. 10 is a diagram showing another example of the configuration of an absolute position detection device according to the third embodiment of the present invention, which has a ring-shaped magnetized pattern made up of a non-repeating code pattern as a magnetic track. DETAILED DESCRIPTION OF THE INVENTION

[0018] Preferred embodiments of an absolute position detection device and an absolute position detection method according to the present invention will be described below with reference to the drawings. In the following description, configurations with the same reference numerals in different drawings are considered to be similar, and their description may be omitted. Note that the present invention is not limited to the examples of these embodiments, and includes all modifications within the scope of the claims and equivalents. Furthermore, to the extent that multiple embodiments can be combined, the present invention includes any combination of the embodiments.

[0019] [First embodiment] FIG. 1 is a diagram showing an example of the configuration of an absolute position detection device according to a first embodiment of the present invention, which has a linear magnetization pattern as a magnetic track. The absolute position detection device 1 includes a magnetic scale 10 having one magnetic track magnetized at a predetermined pitch P, and a detection device 20. The magnetic scale 10 has a magnetization pattern in which no combination code of the same bit occurs among n bits, forming a non-repeating code pattern such as an M sequence (Maximum Length Sequence) when the north pole is "0" and the south pole is "1." The following description of the parameters of the magnetic scale 10 in this embodiment will be given taking as an example a case where the number of bits is 6 and the pitch P is 6 mm.

[0020] (Code position number) 2 is a diagram illustrating the relationship between an example of a 6-bit non-repeating code pattern as a linear magnetization pattern and the code position number. In this embodiment, numbers are assigned sequentially for each pitch of the magnetic scale 10 within the detection device 20, and these numbers are called code position numbers. As shown in FIG. 2, the code position numbers are assigned sequentially from 0 from the left, and the length of 384 mm (= 64 × 6 mm) from 0 to 63, which is the 6-bit number, is the effective measurement length.

[0021] The six pitches of code position numbers 0 to 5 on the right side shown in Fig. 2 are overlapping portions of the scale pattern that are required when the magnetic scale 10 is configured linearly, and are provided for reading the code at code position number 63 and for calculating the interpolated position in the present embodiment that has a linear magnetization pattern. In this embodiment, the 6-bit non-repeating code pattern of the magnetic scale 10 includes a portion in which N and S poles continue consecutively as "NNNNNNSSSSSS" for a total of 12 pitches, so that in all portions of the magnetization pattern of the magnetic scale 10, both portions where "N pole to S pole" and portions where "S pole to N pole" exist within the 13-pitch pattern.

[0022] As will be described later, calculating the section interpolation value requires 12 bits of detector elements from detector element group S, consisting of two sets of detector elements, group A and group B, arranged at one pitch intervals. The portion of magnetic scale 10 detected by the detector element group must have both a "north-to-south" portion and a "south-to-north" portion. To read the code at code position number 63, the overlapping portion of magnetic scale 10 may be five pitches long (code positions 0 to 4). However, with only a five-pitch overlapping portion, the pattern at code position number 63 contains the "south-to-north" portion necessary for calculating the interpolation value, but does not contain the "north-to-south" portion. Therefore, the portion of code positions 0 to 5, including code position number 5, is added as a pattern overlapping portion. For this reason, in this embodiment, the total length of magnetic scale 10 is 420 mm.

[0023] (Detection device) The detection device 20 includes a detection element group S consisting of multiple detection elements, and a microcomputer M that calculates the position from the analog output data of the detection element group S and outputs the absolute position to the outside. In the configuration example shown in Fig. 1, the microcomputer M is depicted as a functional block, but the microcomputer M includes hardware such as a CPU, ROM, and RAM (not shown). Details of the detection device 20 will be described later.

[0024] (detection element group) 1 is disposed facing the magnetic scale 10 and outputs an analog value corresponding to each magnetic field of the magnetic scale 10. For example, a Hall sensor using the Hall effect, which can detect the magnitude and direction of a static magnetic field, can be used. In this embodiment, two sets of detection element groups, group A and group B, are provided to avoid inaccurate reading of code information at points where the polarity of the non-repeating code pattern of the magnetic scale 10 changes.

[0025] In this embodiment, the detector element groups A and B that make up the detector element group S each have 12 detector elements, twice the number of bits in the non-repeating code, because the 6-bit non-repeating code pattern of the magnetic scale 10 includes a portion in which the north and south poles continue in succession, "NNNNNNSSSSSS," for a total of 12 pitches. The 12 detector elements A1 to A12 in the group A are arranged consecutively at one-pitch intervals, and the 12 detector elements B1 to B12 in the group B are arranged consecutively at one-pitch intervals, shifted half a pitch from each detector element in the group A. Therefore, the detector elements A1, B1, A2, B2, etc., and the detector elements of the group A and the detector elements of the group B are arranged alternately at half-scale pitch intervals, resulting in a total of 24 detector elements in the detector element group S.

[0026] Here, the detector element group of group A and the detector element group of group B correspond to the first detector element group and the second detector element group, respectively, of the present invention. In the following description, the detector element group of group A may be simply referred to as group A, and the detector element group of group B may be simply referred to as group B. Furthermore, the detector elements A1 to A12 and the detector elements B1 to B12 themselves, as well as the detection values of these detector elements, may also be simply referred to as A1 to A12 and B1 to B12. The direction in which the code position number increases is defined as forward. Therefore, the detector element group of group B is positioned half a pitch ahead of the detector element group of group A.

[0027] The magnetization pattern shown in this embodiment, which is a 6-bit non-repeating code pattern of the magnetic scale 10, is the example in which the number of detection elements required to calculate the interval interpolation value is the largest. However, as will be described later, if a 6-bit non-repeating code pattern other than the "NNNNNN" and "SSSSSS" magnetization patterns is adopted, the number of detection elements in each detection element group can be configured to be less than 12. Furthermore, to read the code information of a magnetization pattern consisting of an n-bit non-repeating code pattern, the minimum number of detection elements in each detection element group is n. Therefore, the number of bits n of the non-repeating code pattern of the magnetization pattern and the number m of detection elements in groups A and B can be configured to satisfy the relationship n≦m≦2n. To calculate the interval interpolation value, the number m of detection elements in each of groups A and B can also be set to be greater than 2n.

[0028] 6 is a diagram illustrating the positional relationship between the detection elements of groups A and B and the magnetic scale at code position numbers 0 to 1. In the following description, in FIG. 6, the left end of magnetic scale 10 (on the code position number 0 side) is defined as a position displaced 1.5 mm, and the point 1.5 mm further to the left from the position where detection element A1 of group A, the leftmost on the page, overlaps with the left end of magnetic scale 10 is defined as point 0 (origin) of magnetic scale 10, and the point where detection element A1 is 420 mm from point 0 is defined as the effective measurement length (range). Furthermore, the code position numbers 0 to 63 are defined as the effective measurement range, which is the range over which detection elements A1 and B1 of detection device 20 can move relatively to calculate absolute position.

[0029] (microcomputer) Returning to the configuration example shown in Fig. 1, the microcomputer M uses a multiplexer 21 to select the analog detection value output by each detection element of the detection element group S, converts it into a digital value in an A / D converter 22, and sends it to the RAM of the microcomputer M. The CPU of the microcomputer M operates in accordance with various programs stored in the ROM to realize various functions for calculating the absolute position shown in the position calculation unit 30, and outputs the absolute position by internally calculating the detection value of each detection element sent to the RAM. In addition to the programs, the ROM of the microcomputer M also stores a lookup table 36 used for position calculations, etc.

[0030] The position calculation unit 30 includes functional units, such as a code information acquisition unit 31, a code interval position calculation unit 32, a detection element identification unit for calculating an interpolated value 33, an interval interpolated value calculation unit 34, and an absolute position calculation unit 35. These functional units will be described in detail in the description of the operation of the detection device. The code information acquisition unit 31 is for acquiring code information, etc. of the magnetic scale 10 from the detection values of each of the detection element groups A and B. The code interval position calculation unit 32 is for calculating a code interval position calculation value, which is a displacement determined by the code of the magnetic scale 10, based on the code information of the groups A and B acquired by the code information acquisition unit 31. In this embodiment, since the non-repeating code pattern of the magnetic scale 10 is 6 bits, the code interval position of the detection element group A is obtained from the 6-bit code information acquired from the detection elements A1 to A6, and the code interval position of the detection element group B is obtained from the 6-bit code information acquired from the detection elements B1 to B6, as will be described later.

[0031] The interpolated value calculation detector element specifying unit 33 specifies the detector elements for calculating an interpolated value for each code interval position, and in this embodiment, the detector elements for calculating interpolated values corresponding to code information are stored in advance as a look-up table in a storage unit (not shown). The interval interpolated value calculation unit 34 calculates an interpolated value for the corresponding code interval position based on the detection values of the detector elements specified by the interpolated value calculation detector element specifying unit 33. The absolute position calculation unit 35 adds the interval interpolated value calculated by the interval interpolated value calculation unit 34 to the code interval position calculated by the code interval position calculation unit 32 to calculate the absolute position of the magnetic scale 10.

[0032] (External output section) The microcomputer M is provided with a communication means for outputting the absolute position data calculated by the absolute position calculation unit 35 to the external output unit 23, and for example has a built-in interface for SPI communication. The external output unit 23 uses SPI communication to send the absolute position data calculated by the microcomputer M to a D / A converter, and outputs the absolute position to the outside as a voltage output.

[0033] (Magnetic scale magnetization pattern conditions) In order to detect the absolute position with high resolution, the magnetization pattern of the magnetic scale 10 must satisfy the following conditions. (Condition 1) The magnetic scale 10 has a non-repeating code pattern. In order to make the number m of detection elements in each of groups A and B equal to or less than twice the number n of bits in the non-repeating code pattern of the magnetic scale 10, the following condition must be satisfied. (Condition 2) Within the range of all (m+1) pitches in the magnetization pattern of the magnetic scale 10, there must be both at least one portion that becomes "south pole to north pole" and at least one portion that becomes "north pole to south pole."

[0034] Condition 1 is a condition necessary for calculating the code section position corresponding to the code position number of the magnetic scale 10, and condition 2 is a condition necessary for identifying pairs of detecting elements in group A and detecting elements in group B that satisfy predetermined conditions described below in order to calculate an interpolated value at the code section position. Note that when the number m of detecting elements in each of groups A and B is set to a number that is more than twice the number n of bits in the non-repeating code pattern of the magnetic scale 10, condition 2 is always satisfied.

[0035] In this embodiment, both "North pole to South pole" portions and "South pole to North pole" portions exist within all patterns of at least 13 pitches of the magnetic scale 10, while the detection element group S is made up of 12 detection elements of group A and 12 detection elements of group B, arranged with a half-pitch offset. By providing such magnetized patterns and detection element groups, high-resolution position detection is achieved.

[0036] (Preparation required for processing) The following describes the preparations required for the processing operation of the absolute position detection device in this embodiment. First, an interpolated value for one pitch of the magnetic scale 10 is set. The resolution is determined by the size of this interpolated value. In this embodiment, for example, one pitch of 6 mm is divided into 120 parts to achieve a resolution of 0.05 mm. Next, the detection value of each detection element in a magnetic field-free environment is acquired and recorded as an offset value in the detection device 20. This offset value is used to correct the magnetic field detection value of each detection element when the absolute position detection device is in operation. Furthermore, a "code information-code position number correspondence table" and a "code position number-detection element correspondence table for calculating interpolated values" are recorded in the lookup table 36.

[0037] Figure 3 is a diagram illustrating an example of a "code information-code position number correspondence table" showing the code position numbers corresponding to the code information obtained from the detection elements. The "code information-code position number correspondence table" is used to convert the code information obtained from the 6-bit values acquired by each of the detection element groups A and B into a code position number. Table I in Figure 3 corresponds the polarity of each detection element (where N pole is "0" and S pole is "1"), the corresponding 6-digit binary number, the code information converted to decimal, the code position number corresponding to the code information, and the displacement of detection element A1 or B1 as the displacement of the magnetic scale corresponding to the code position number.

[0038] 3 shows the case where the code position number corresponding to the effective measurement length in this embodiment is 0 to 63 (when the displacement of the detection element A1 is 0 mm to 384 mm). Table II shows the relationship between the code information and the code position number, with the code position numbers sorted in numerical order of the code information, and the information in Table II is recorded in the lookup table 36.

[0039] FIG. 4 shows an example of a "code position number-detector element for calculating interpolated values correspondence table" that associates code position numbers with detector elements for calculating interpolated values to be used according to the code position number. The "code position number-detector element for calculating interpolated values correspondence table" records multiple detector elements selected from detector elements A1 to B12 to be used to calculate an interpolated value at a code position number when the detection device 20 reads code information and acquires the code position number. In this embodiment, there are provided Table α corresponding to code position numbers in Group A and Table β corresponding to code position numbers in Group B, and four detector elements Aw, Ax, Ay, Az, Bw, Bx, By, and Bz are recorded according to the code position number. Aw and Ax, Ay and Az, Bw and Bx, and By and Bz are pairs of detector elements selected to calculate an interpolated value, respectively. The criteria for selecting these detector elements will be described later.

[0040] (Processing flow) Hereinafter, in this embodiment, a process will be described in which the detection device 20 acquires detection values of the magnetic field of the magnetic scale from each of the detection elements A1 to B12, and calculates the absolute position based on that data using the microcomputer M. Figures 5A and 5B are process flow diagrams showing an example of absolute position calculation in the position calculation unit.

[0041] First, in step S1, detection values of the magnetic field of the magnetic scale are obtained for all detection elements in groups A and B. In this embodiment, a total of 24 detection values are obtained: 12 detection elements in group A (A1 to A12) and 12 detection elements in group B (B1 to B12). FIG. 7A shows an example of detection values obtained from each detection element in group A at code position numbers 0 to 1, and FIG. 7B shows an example of detection values obtained from each detection element in group B at code position numbers 0 to 1. The detection values shown in FIGS. 7A and 7B are obtained from actual measurements, with the south pole indicated as a positive value and the north pole indicated as a negative value. FIG. 6 shows the positional relationship between the magnetic scale and each detection element when the detection values shown in FIGS. 7A and 7B were obtained. For example, detection element A1 is located in the displacement range of 0 to 12 mm, and detection element B12 is located in the displacement range of 69 to 81 mm.

[0042] Next, in step S2, the absolute values of the detection values of all the detection elements in groups A and B are calculated. At this time, the minimum absolute value of the detection values of the detection elements in group A and the minimum absolute value of the detection elements in group B are obtained in advance.

[0043] Next, proceeding to step S3, the detection values of both group A and group B are converted into code information. Here, since the magnetic scale 10 has a magnetization pattern consisting of a 6-bit non-repeating code pattern, the detection values of the detection elements for 6 consecutive pitches in each of group A and group B can be used to obtain the code information of the magnetic scale 10. In this embodiment, the output values of the detection elements A1 to A6 are used in group A, and the output values of the detection elements B1 to B6 are used in group B. Therefore, the detection values of the detection elements A7 to A12 in group A and the detection elements B7 to B12 in group B are not used to obtain the code information of the magnetic scale 10.

[0044] As shown in Table I of the "Code Information - Code Position Number Correspondence Table" in Figure 3, the code information is converted into a six-digit binary number with the north pole being "0" and the south pole being "1," and then converted back into a decimal number to obtain the code information. When the detecting element is located on the boundary between the north and south poles, the detected value approaches 0 (zero), and accurate code information may not be read. However, because the detecting elements of groups A and B are offset by half a pitch, when the detecting elements of group A are located on the boundary between the north and south poles, the detecting elements of group B are away from the boundary, and when the detecting elements of group B are located on the boundary between the north and south poles, the detecting elements of group A are away from the boundary. As a result, the correct code information can be read from either group A or B. The question of which code information from group A or B to use will be discussed later.

[0045] Next, the process proceeds to step S4, where the chord position numbers of groups A and B are obtained from the chord information of groups A and B using a pre-recorded lookup table 36. In this embodiment, the chord position numbers are obtained by referring to Table II of FIG. 3 recorded in lookup table 36. Note that in this embodiment, the obtained chord position numbers may be the same as the chord position number of group A and the chord position number of group B, or may be one greater than the chord position number of group A because the position of group B is half a pitch ahead of the position of group A. The processes from step S1 to step S4 are performed by the chord information obtaining unit 31 of the position calculation unit 30.

[0046] Next, the process proceeds to step S5, where it is determined whether the code position number of group A is outside the range of the magnetic scale being used. If it is outside the range (if "YES"), the process proceeds to step S6, where an invalid flag for group A is set, and then the process proceeds to step S9. In this embodiment, the valid range for code position numbers is 0 to 63.

[0047] If the code position number of group A is within the range in step S5 (if "NO"), the process proceeds to step S7, where the four detector elements to be used to calculate the interpolated value from the acquired code position number of group A are acquired from a "code position number - detector element for calculating interpolated value correspondence table" previously recorded in lookup table 36. In this embodiment, the four detector elements Aw, Ax, Ay, and Az corresponding to each code position number shown in table α in FIG. 4 are selected. For example, when the code position number of group A is 1, B4, A4, A4, and B3 are selected as the four detector elements Aw, Ax, Ay, and Az, respectively. Hereinafter, the detected values of the four detector elements Aw, Ax, Ay, and Az will also be simply referred to as Aw, Ax, Ay, and Az. FIG. 8A is a diagram showing the detection values of the detection elements selected for calculating the interpolated value when code position numbers 0 to 1 and code position numbers in group A are used, and shows the detection values of each of the four detection elements Aw, Ax, Ay, and Az.

[0048] The process proceeds from step S7 to step S8, where the difference value of the detection values of each detection element of the detection element pair in group A is calculated. In this embodiment, two difference values are calculated from the detection values of the four detection elements to reduce the influence of geomagnetism, temperature changes, etc. If the two difference values are Au and Av, respectively, they can be calculated using the following equation. Au = Ax - Aw Equation 1 Av = Az - Ay Equation 2 9A is a diagram showing the difference between the detection values of the detection elements of the detection element pairs for calculating an interpolated value when code position numbers 0 to 1 are in group A. As shown in Fig. 9A, it can be seen that the difference value Au crosses zero at a position where the displacement is approximately 3 mm, and the difference value Av crosses zero at a position where the displacement is approximately 6 mm.

[0049] The process proceeds from step S6 or step S8 to step S9, where it is determined whether the code position number of group B is outside the range of the magnetic scale being used. If it is outside the range (if "YES"), the process proceeds to step S10, where an invalid flag for group B is set, and then the process proceeds to step S13. As with the determination in step S5, the valid range for code position numbers of group B is 0 to 63.

[0050] If the code position number of group B is within the range in step S9 (if "NO"), the process proceeds to step S11, where four detector elements to be used for calculating an interpolated value based on the acquired code position number of group B are acquired from a "code position number - detector element for calculating interpolated value correspondence table" previously stored in lookup table 36. In this embodiment, four detector elements corresponding to each code position number shown in Table β of FIG. 4 are selected as Bw, Bx, By, and Bz. For example, when the code position number of group B is 0, A6, B5, B5, and A5 are selected as the four detector elements Bw, Bx, By, and Bz, respectively. Hereinafter, the detection values of the four detector elements Bw, Bx, By, and Bz will also be simply referred to as Bw, Bx, By, and Bz. FIG. 8B is a diagram showing the detection values of the detector elements selected for calculating an interpolated value when a code position number of group B is used for code position numbers 0 to 1, and shows the detection values of the four detector elements Bw, Bx, By, and Bz.

[0051] Next, the process moves from step S11 to step S12, where the difference value of the detection values of each detection element of the detection element pair of group B is calculated. In this embodiment, two difference values are calculated from the detection values of the four detection elements to reduce the influence of geomagnetism, temperature changes, etc. If the two difference values are Bu and Bv, respectively, they can be calculated using the following equation. Bu=Bx-Bw...Equation 3 Bv=Bz-By...Formula 4 9B is a diagram showing the difference between the detection values of the detection elements of the pair of detection elements for calculating an interpolated value when code position numbers 0 to 1 and code position numbers in group B are used. As shown in FIG. 9B, it can be seen that the difference value Bu crosses zero at positions where the displacement is near 0 mm and near 6 mm, and the difference value Bv crosses zero at positions where the displacement is near 3 mm and near 9 mm. Note that the processes from step S5 to step S12 are mainly performed by the interpolated value calculation detection element identification unit 33 of the position calculation unit 30.

[0052] Next, the process proceeds to step S13, where it is determined whether both the invalid flags for group A and group B are set, and if they are set (if "YES"), the process proceeds to step S14, where an error is output and the calculation of the absolute position is terminated. This process mainly occurs when the detection element group S of the detection device goes outside the effective range of the magnetic scale 10.

[0053] If neither the invalid flag for group A nor the invalid flag for group B is set in step S13 (if "NO"), the process proceeds to step S15 and subsequent steps, where it is determined whether the difference value of the code position number of group A or group B should be used to calculate the interval interpolation value used in the absolute position calculation. First, in step S15, it is determined whether the invalid flag for group A is set. If the invalid flag for group A is set (if "YES"), the process proceeds to step S20, where the interval interpolation value is calculated using the data of the difference values Bu and Bv of group B. Also, if the invalid flag for group A is not set (if "NO") in step S15, the process proceeds to step S16, where it is determined whether the invalid flag for group B is set. If the invalid flag for group B is set (if "YES") in step S16, the process proceeds to step S19, where the interval interpolation value is calculated using the data of the difference values Au and Av of group A.

[0054] Furthermore, if the invalid flag for group B is not set in step S16 (if "NO"), that is, if the invalid flags for both group A and group B are not set, the process proceeds to step S17, where it is determined whether the code position number for group A and the code position number for group B are the same. If the code position number for group A and the code position number for group B are the same in step S17 (if "YES"), the process proceeds to step S18. If the magnitude of the difference value Bv is negative (if "YES") in step S18, the process proceeds to step S19, where an interval interpolation value is calculated using the data of the difference values Au and Av for group A. If the magnitude of the difference value Bv is not negative (if "NO"), the process proceeds to step S20, where an interval interpolation value is calculated using the data of the difference values Bu and Bv for group B.

[0055] In step S17, if the code position number of group A and the code position number of group B are different (if "NO"), proceed to step S21, and if the code position number of group B is one greater than the code position number of group A (if "YES"), proceed to step S22. In step S22, if the magnitude of difference value Av is negative (if "YES"), proceed to step S20, and an interval interpolation value is calculated using the difference values Bu and Bv data of group B. If the magnitude of difference value Av is not negative (if "NO"), proceed to step S19, and an interval interpolation value is calculated using the difference values Au and Av data of group A.

[0056] If, in step S21, the code position number of group B is not one greater than the code position number of group A (if "NO"), the process proceeds to step S23, where it is determined whether the minimum of the absolute values of the detected values of group A is greater than the minimum of the absolute values of the detected values of group B. If the minimum of the absolute values of the detected values of group A is greater than the minimum of the absolute values of the detected values of group B (if "YES"), the process proceeds to step S19, where an interval interpolation value is calculated using the data of the difference values Au and Av of group A. If the minimum of the absolute values of the detected values of group A is not greater than the minimum of the absolute values of the detected values of group B (if "NO"), the process proceeds to step S20, where an interval interpolation value is calculated using the data of the difference values Bu and Bv of group B.

[0057] After calculating the interval interpolation value in step S19 or step S20, the process proceeds to step S24, where the absolute position is calculated by adding the interval interpolation value to the code interval position calculated based on the code position number. The process of step S24 is performed by the absolute position calculation unit 35 of the position calculation unit 30.

[0058] 10 is a diagram for explaining which difference value of the interpolation value calculation detection element in group A or group B is used to calculate the interval interpolation value for code position numbers 0 to 1. Interval A indicates the range where the code position number in group A and the code position number in group B are the same, and interval B indicates the range where the code position number in group B is one greater than the code position number in group A. Furthermore, interval C1 indicates the range in the vicinity where the code position number in group A changes, and interval C2 indicates the range in the vicinity where the code position number in group B changes.

[0059] Fig. 11 is a diagram showing changes in the minimum absolute values of the detection values of each detection element in groups A and B for code position numbers 0 to 1. When the displacement of detection element group S is in section C1 or C2 shown in Fig. 10, determination is made in step S23 according to the data shown in Fig. 11. Then, in section C1, the difference values Bu and Bv of group B are used to calculate the interval interpolation value, and in section C2, the difference values Au and Av of group A are used to calculate the interval interpolation value. Furthermore, in section D shown in Fig. 10, the code position number of group A is out of range, so the difference values Bu and Bv of group B are used to calculate the interval interpolation value as determined in step S15.

[0060] (Interval interpolation calculation) FIG. 12 is a diagram illustrating a method for calculating an interval interpolation value using the difference between the detected values of each detection element of the detection element pair in group B. For example, when the displacement between the magnetic scale 10 and the detection device 20 is in the range of 0 to 3 mm, the interval interpolation value is calculated using the code position number of group B and the difference values Bu and Bv of group B. The difference value Bu is approximately 0 at a position near a displacement of 0 mm, and the difference value Bv is approximately 0 at a position near 3 mm. In the range of displacement of 0 to 3 mm, the difference value Bu is always negative and the difference value Bv is always positive. Assuming that the changes in the difference values Bu and Bv are parallel, the magnitude of the displacement L can be calculated by the following equation, based on a proportional relationship, where P is the length of one pitch. L = Bu / (Bu - Bv) × P / 2 Equation 5

[0061] FIG. 13 is a diagram illustrating a method for calculating an interval interpolation value using the difference between the detection values of each detection element of a detection element pair in group A. For example, when the displacement between the magnetic scale 10 and the detection device 20 is between 3 and 6 mm, the interval interpolation value is calculated using the code position number of group A and the difference values Au and Av of group A. The difference value Au is nearly 0 at a position near a displacement of 3 mm, and the difference value Av is nearly 0 at a position near 6 mm. Furthermore, in the range of displacement between 3 and 6 mm, the difference value Au is always negative and the difference value Av is always positive. Assuming that the changes in the difference values Au and Av are parallel, the magnitude of L, starting from the position of a displacement of 3 mm (P / 2), can be calculated using the following proportional relationship: L = Au / (Au-Av) × P / 2 Equation 6

[0062] Therefore, within the displacement range of 0 to 6 mm, If you refer to the code position number of group B, the interval interpolation value is Bu / (Bu-Bv)×P / 2 Equation 7 If the code position number of group A is referenced, the interval interpolation value is Au / (Au-Av)×P / 2+P / 2 Equation 8 can be calculated using the formula:

[0063] In addition, since the interpolated value for 1 pitch of 6 mm is 120, if you refer to the code position number of group B, the interval interpolated value is Bu / (Bu-Bv) × 60 Equation 9 If the code position number of group A is referenced, the interval interpolation value is Au / (Au-Av)×60+60 Equation 10 can be calculated using the formula:

[0064] The absolute position of detection element A1 relative to the magnetic scale 10 is found by adding the interval interpolation value to the code interval position calculated from the code position number. In this case, if the code position number in group A was referenced, the code position number in group A is used as the code position number, and if the code position number in group B was referenced, the code position number in group B is used. In this embodiment, one pitch is set to 6 mm, so the code interval position calculated from the code position number is calculated by multiplying the code position number, which takes a value from 0 to 63, by 6 mm. The code interval position calculated value is calculated by code interval position calculation unit 32 of position calculation unit 30.

[0065] FIG. 14 shows the results of calculating absolute positions from calculated chord section position values and interpolated section values for code position numbers 0 to 1. FIG. 14(A) shows the changes in the interpolated section values obtained from the above processing flow, and FIG. 14(B) shows the changes in the calculated chord section position values corresponding to the code position numbers. FIG. 14(C) shows the calculated absolute position values obtained by adding the interpolated section values shown in FIG. 14(A) and the calculated chord section position values shown in FIG. 14(B). It can be seen that the absolute position displacement value changes almost linearly with respect to the displacement. FIG. 14 only shows the range of 0 to 12 mm for code position numbers 0 and 1, but the absolute position can also be calculated for code position numbers 2 to 63 according to the above processing flow.

[0066] (Continuity of absolute position at the detection element group switching section) In order to continuously detect the absolute position of the magnetic scale 10, in this embodiment, it is necessary to eliminate jumps in the calculated absolute position value at the switching portion between the detecting element groups A and B. At the switching portion between the detecting element groups A and B, i.e., at the switching portion between the case where the detected values of the detecting elements for calculating interpolated values obtained from the code position numbers of group A are used and the case where the detected values of the detecting elements for calculating interpolated values obtained from the code position numbers of group B are used, the formula for calculating the position changes. However, if the calculated values of the position at the switching portion match, no jumps have occurred. Below, in this embodiment, it will be verified whether the calculated values at one of the switching portion of the detecting element groups match.

[0067] As a premise, as shown in Figure 10, the code position number is switched sequentially from the end of the magnetic scale 10, from code position number 0 in group B to code position number 0 in group A to code position number 1 in group B, continuing to code position number 63 in group A at the end of the scale. Regarding the detection value of the detector element selected for each code position number, referring to "Code Position Number - Detector Element for Calculating Interpolated Value" in Figure 4, if the code position number in group B and the code position number in group A are the same, the detector element in the detector element pair for By, Bz in group B matches the detector element in the detector element pair for Aw, Ax in group A. Furthermore, if the code position number in group B is one greater than the code position number in group A, the detector element in the detector element pair for Bw, Bx in group B matches the detector element in the detector element pair for Ay, Az in group A for the code position number in group A that is one less than the code position number in group B.

[0068] Here, referring to Equations 1 to 4, Au = Ax - Aw Equation 1 Av = Az - Ay Equation 2 Bu=Bx-Bw...Equation 3 Bv=Bz-By...Formula 4 Therefore, when the code position numbers of group A and group B are the same, the difference values Bv and Au are equal, and when the code position number of group B is one greater than the code position number of group A, the difference values Av and Bu are equal. As shown in Figure 10, the switching point between the detection element groups of groups A and B is the point where the difference value Bv or difference value Av becomes 0. This does not change even if the code position number increases, and at the point where the code position number switches from group B code position number k (0 to 63) to group A code position number k, the difference values Bv and Au are both 0.

[0069] Based on the above assumptions, when the calculations in steps S19, S20, and S24 of the processing flow shown in FIG. 5B are performed, the calculated absolute position value of the part where code position number k (0 to 63) of group B switches to code position number k of group A is as follows: In the position calculation using the interval interpolation value of group B according to Equation 5, Bu / (Bu-Bv)×P / 2+k×P=Bu / (Bu-0)×P / 2+k×P=P / 2+k×P, In the position calculation using the section interpolation value of group A according to Equation 6, Au / (Au-Av)×P / 2+P / 2+k×P=0 / (0-Av)×P / 2+P / 2+k×P=P / 2+k×P, Here, the value of k×P corresponds to the chord section position calculation value, and so on.

[0070] Here, when using the one-pitch interpolation value 120, at the point where the chord position number 0 in group B is switched to the chord position number 0 in group A in this embodiment, In the position calculation using the interval interpolation value of group B according to Equation 5, Bu / (Bu-0)×60+0×120=60+0×120=60, In the position calculation using the section interpolation value of group A according to Equation 6, 0 / (0-Av)×60+60+0×120=0+60+0×120=60, and the values match.

[0071] Similarly, at the portion where code position number k (0 to 63) in group A switches to code position number k+1 in group B, both difference values Av and Bu are 0. When the calculations in steps S19, S20, and S24 shown in FIG. 5B are performed, the position at which code position number k (0 to 63) in group A switches to code position number k+1 in group B is determined as follows: In the position calculation using the section interpolation value of group A according to Equation 6, Au / (Au-0)×P / 2+P / 2+k×P=Au / (Au-0)×P / 2+P / 2+k×P=P+k×P, In the position calculation using the interval interpolation value of group B according to Equation 5, Bu / (Bu-Bv)×P / 2=0 / (0-Bv)×P / 2+(k+1)×P=P+k×P, and both have the same value.

[0072] Similarly, when an interpolation value of 120 is used for one pitch, at the point where the chord position number 0 of group A switches to the chord position number 1 of group B in this embodiment, In the position calculation using the section interpolation value of group A according to Equation 6, Au / (Au-0)×60+60+0×120=60+60+0×120=120, In the position calculation using the interval interpolation value of group B according to Equation 5, 0 / (0-Bv)×60+(0+1)×120=0+1×120=120, and the values match. In this way, in this embodiment, the calculated position values are the same at the switching points from group A to group B and from group B to group A, so there is no jump in the calculated position value at the switching points of the detection element groups, ensuring continuity of the absolute position.

[0073] The absolute position detection process has been explained above using the example of the case where the detection element group S is located at code position numbers 0 to 1. Here, we will explain that even when the detection element group S faces a portion of the magnetic scale 10 where the magnetization pattern "NNNNNNSSSSSS" is continuous with N and S poles for a total of 12 pitches, it is possible to calculate an interpolated value from the detection values of each detection element.

[0074] 15 is a diagram illustrating the positional relationship between each of the detection elements of groups A and B and the magnetic scale at code position numbers 56 to 57. As shown in FIG. 15, when the reference detection element A1 is located at a displacement of 336 mm on the magnetic scale 10, the detection element group S is substantially opposed to the magnetization pattern "NNNNNNSSSSSS" on the magnetic scale 10.

[0075] Fig. 16A is a diagram showing an example of detection values obtained from each detection element in group A at code position numbers 56 to 57, and Fig. 16B is a diagram showing an example of detection values obtained from each detection element in group B at code position numbers 56 to 57. The detection values shown in Fig. 16A and Fig. 16B are obtained from actual measurements. Fig. 16A and Fig. 16B show the detection values of each detection element when reference detection element A1 is located in a displacement range of 336 to 348 mm and detection element B12 is located in a displacement range of 405 to 417 mm.

[0076] For example, when code position numbers in group A are used, at code position number 56, the detector elements for calculating the interpolated value for code position numbers in group A are B6, A1, A6, and B12 selected as four detector elements Aw, Ax, Ay, and Az from table α of the "Code Position Number - Detector Element for Calculating Interpolated Value" shown in Fig. 4. Similarly, at code position number 57, the detector elements for calculating the interpolated value for code position numbers in group A are B5, A12, A5, and B11 selected as four detector elements Aw, Ax, Ay, and Az from table α in Fig. 4.

[0077] Fig. 17A is a diagram showing detection values of detection elements selected for calculating interpolated values when code position numbers 56 to 57 are in group A, and each detection value is the detection value of the above-mentioned detection element selected for calculating interpolated values from the detection values in Fig. 16A and Fig. 16B. Fig. 18A is a diagram showing difference values Au and Av between detection values of each detection element of a detection element pair for calculating interpolated values when code position numbers 56 to 57 are in group A.

[0078] As shown in FIG. 18A, the difference value Au crosses zero at a displacement near 339 mm, and the difference value Av crosses zero at a displacement near 342 mm. In the displacement range of 339 to 342 mm, the difference value Au is always negative and the difference value Av is always positive. Therefore, when a code position number in group A is used as code position number 56, the interval interpolation can be obtained in the displacement range of 339 to 342 mm using the same method as described above for code position number 0. Similarly, when a code position number in group A is used as code position number 56, the interval interpolation can be obtained in the displacement range of 345 to 348 mm.

[0079] The same applies when using code position numbers in group B. For example, for code position number 56, the detector elements for calculating an interpolated value for code position numbers in group B are A7, B1, B6, and A1 selected as four detector elements Bw, Bx, By, and Bz from table β of the "Code Position Number - Detector Element for Calculating Interpolated Value" shown in Fig. 4. Similarly, for code position number 57, the detector elements for calculating an interpolated value for code position numbers in group B are A6, B12, B5, and A12 selected as four detector elements Bw, Bx, By, and Bz from table β of Fig. 4.

[0080] Fig. 17B is a diagram showing detection values of detection elements selected for calculating interpolated values when code position numbers 56 to 57 are in group B, and each detection value is the detection value of the above-mentioned detection element selected for calculating interpolated values from the detection values in Fig. 16A and Fig. 16B. Fig. 18B is a diagram showing difference values Bu, Bv of detection values of each detection element of a detection element pair for calculating interpolated values when code position numbers 56 to 57 are in group B.

[0081] As shown in Figure 18B, the difference value Bu crosses zero at a displacement of approximately 336 mm, and the difference value Bv crosses zero at a displacement of approximately 339 mm. In the displacement range of 336 to 339 mm, the difference value Bu is always negative and the difference value Bv is always positive. Therefore, when a code position number in group B is used as code position number 56, the intra-interval interpolation can be obtained in the displacement range of 336 to 339 mm using the same method as described above for code position number 0. The same is true when a code position number in group B is used as code position number 57, and the intra-interval interpolation can be obtained in the displacement range of 342 to 345 mm.

[0082] (Code position number - detection element correspondence table for calculating interpolated values) Next, a method for creating the "code position number-detector element correspondence table for calculating interpolated values" shown in Fig. 4 will be described. First, as a premise, when the code position number of group B and the code position number of group A are the same, the detector element pair of By, Bz in group B is matched with the detector element pair of Aw, Ax in group A, as shown by the thick hatching in Fig. 4. When the code position number of group B is one greater than the code position number of group A, the detector element pair of Bw, Bx in group B is matched with the detector element pair of Ay, Az in group A, which has the code number one smaller, as shown by the light hatching in Fig. 4. Furthermore, when the magnetic scale 10 is linear, the detector element pair of Bw, Bx at code position number 0 in group B is matched with the detector element pair of Ay, Az at code position number 63 in group A, which correspond to both ends of the magnetic scale 10.

[0083] By matching the detector element pairs when using the code position numbers of group A with the detector element pairs when using the code position numbers of group B in this way, the code position number-detector element correspondence table for calculating interpolated values can be created by selecting detector elements Aw, Ax, Ay, and Az for code position numbers 0 to 63 of group A. Alternatively, it can also be created by selecting detector elements Bw, Bx, By, and Bz for code position numbers 0 to 63 of group B. The same applies when the magnetic scale 10, which will be described later, is arranged in a ring shape; in the case of a 6-bit code pattern, the code position number one greater than code position number 63 corresponds to code position number 0.

[0084] Next, the conditions for the detector elements Aw, Ax, Ay, and Az for calculating the interpolated value at each code position number will be explained using an example in which code position numbers in group A are used. In the calculation of step S19 of the processing flow shown in Fig. 5B, combinations of pairs of detector elements Aw, Ax, and Ay, Az for obtaining appropriate difference values Au and Av for calculating the interpolated value are selected for each code position number. The detector elements Aw, Ax, Ay, and Az for calculating the interpolated value that meet the conditions are selected from all detector elements A1 to B12 for the corresponding code position number.

[0085] Depending on the positional relationship between the detection element group S and the magnetic scale 10, the selection conditions for the detection elements for calculating the interpolated value when the A group is located at code position numbers 0 to 63 are as follows (hereinafter referred to as "A group detection element selection condition 1"). Aw selection condition 1: The part of group B that becomes the north pole to the south pole Ax selection condition 1: The part of group A that is the north pole and the left side is the south pole or Aw selection condition 2: The part of group A where the south pole is located and the left side is the north pole. Ax selection condition 2: The part of group B that becomes the north pole from the south pole

[0086] Similarly, the selection condition for the pair of detecting elements Ay and Az of group A (hereinafter referred to as "group A detecting element selection condition 2") is as follows: Ay selection condition 1: The part of group A that is the north pole and the right side is the south pole Az selection condition 1: The part of group B that becomes the north pole from the south pole or Ay selection condition 2: The part of group B that becomes the north pole to the south pole Az selection condition 2: The part of group A that is the south pole and the right side is the north pole

[0087] Fig. 19 is a diagram showing detection values of all detector elements when group A is at code position number 0. Figs. 20A and 20B are diagrams showing an example of detection values of a pair of detector elements Aw and Ax that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 0. Figs. 21A and 21B are diagrams showing an example of detection values of a pair of detector elements Ay and Az that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 0.

[0088] (Example of selecting Aw and Ax as a pair of detecting elements) When group A is at code position number 0, the detector elements that meet selection condition 1 for Aw in group A detector element selection condition 1 are the part of group B where the north pole changes to the south pole, and the detected values shown in Figure 19 are detected values where the south pole is positive and the north pole is negative, so B5, B7, and B11 are applicable as Aw. Also, the detector elements that meet selection condition 2 for Ax in group A detector element selection condition 1 are the part of group A where the north pole is located and the left side is the south pole, so A5, A7, and A11 are applicable. Figure 20A is a diagram when B5 is selected as Aw and A5 is selected as Ax.

[0089] Furthermore, detector elements that satisfy selection condition 2 for Aw in group A detector element selection condition 1 are those in the south pole portion of group A where the left side is the north pole, so A6 and A8 are applicable as Aw. Also, detector elements that satisfy selection condition 2 for Ax are those in the B group where the pole changes from south to north, so B4, B6, B8, and B11 are applicable. FIG. 20B shows a case where A6 is selected as Aw and B4 as Ax. In the code position number-detector element correspondence table shown in FIG. 4, B5 is selected as Aw and A5 as Ax for the detector element pair at group A code position number 0. However, A6 may also be selected as Aw and B4 as Ax. As described above, the same is true for other detector element pairs, but multiple combinations are possible for detector element pairs for interpolation value calculation. Specific selection methods will be described later.

[0090] (Example of selecting a pair of detector elements Ay and Az) Next, when group A is at code position number 0, the detector elements that meet selection condition 1 for Ay in group A detector element selection condition 2 are those that are in the north pole portion of group A and have a portion where the right side becomes the south pole, so A5, A7, and A11 are applicable as Ay. Also, the detector elements that meet selection condition 1 for Az in group A detector element selection condition 1 are those that are in the portion of group B that changes from south pole to north pole, so B4, B6, B8, and B11 are applicable. Figure 21A shows the case where A5 is selected as Ay and B4 is selected as Az.

[0091] Furthermore, the detector elements that satisfy selection condition 2 for Ay in group A detector element selection condition 2 are in the portion of group B where the north pole changes to the south pole, so B5, B7, and B11 are applicable as Ay. The detector elements that satisfy selection condition 2 for Az in group A detector element selection condition 1 are in the south pole portion of group A where the right side becomes the north pole, so A4, A6, A8, and A11 are applicable. Figure 21B shows the case where B5 is selected as Ay and A4 is selected as Az. In the code position number-interpolated value calculation correspondence table shown in Figure 4, A5 is selected as Ay and B4 as Ax as the detector element pair at group A code position number 0. However, B5 may be selected as Ay and A4 as Az.

[0092] Fig. 22 is a diagram showing detection values of all detector elements when group A is at code position number 56. Figs. 23A and 23B are diagrams showing an example of detection values of a pair of detector elements Aw and Ax that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 56. Figs. 24A and 24B are diagrams showing an example of detection values of a pair of detector elements Ay and Az that satisfy the selection conditions for detector elements for calculating an interpolated value when group A is at code position number 56.

[0093] When Group A is at code position number 56, Fig. 23A shows the case where B6 is selected as Aw and A1 as Ax, and Fig. 23B shows the case where A7 is selected as Aw and B12 as Ax. In the code position number-detector element correspondence table for calculating interpolated values shown in Fig. 4, B6 is selected as Aw and A1 as Ax as the detector element pair for Group A code position number 56. In Fig. 24A shows the case where A6 is selected as Ay and B12 as Az, and Fig. 24B shows the case where B6 is selected as Ay and A12 as Az. In the code position number-detector element correspondence table for calculating interpolated values shown in Fig. 4, A6 is selected as Ay and B12 as Az as the detector element pair for Group A code position number 56.

[0094] The method for identifying a pair of detection devices for calculating an interpolated value when group A is at code position number 56 is the same as the method for identifying a pair of detection devices for calculating an interpolated value when group A is at code position number 0; it is sufficient to select a pair of detection elements that satisfy group A detection element selection conditions 1 and 2, and detailed explanation will be omitted.

[0095] The above has explained the selection conditions for the detector elements Aw, Ax, Ay, and Az for the code position numbers 0 to 63 in group A in order to create the code position number-detector element correspondence table for calculating interpolated values shown in Figure 4. However, the code position number-detector element correspondence table for calculating interpolated values shown in Figure 4 can also be created by selecting the detector elements Bw, Bx, By, and Bz for the code position numbers 0 to 63 in group B.

[0096] When group B is in the code position numbers 0 to 63, the selection condition for the pair of detecting elements Bw and Bx of group B (hereinafter referred to as "group B detecting element selection condition 1") is as follows. Bw selection condition 1: The part of group A that changes from north pole to south pole Bx selection condition 1: The part of the B group that is the north pole and the left side is the south pole or Bw selection condition 2: The part of the B group that is the south pole and the left side is the north pole Bx selection condition 2: The part of group A that goes from south pole to north pole

[0097] Furthermore, when group B is in the code position numbers 0 to 63, the selection conditions for the pair of detecting elements By, Bz of group B (hereinafter referred to as "group B detecting element selection conditions 2") are as follows: By selection condition 1: The part of group B that is the north pole and the part to the right is the south pole Bz selection condition 1: The part of group A that changes from south pole to north pole or By selection condition 2: The part of group A that changes from north pole to south pole Bz selection condition 2: The part of the B group that is the south pole and the right side is the north pole

[0098] 4, when selecting detector elements Bw, Bx, By, and Bz for code position numbers 0 to 63 in group B, pairs of detector elements can be selected in accordance with detector element selection condition 1.2 for group B. In this case, the same method as for selecting detector elements Aw, Ax, Ay, and Az for code position numbers 0 to 63 in group A described above can be used, and therefore a description thereof will be omitted.

[0099] As described above, there is not necessarily one pair of detecting elements that satisfies the selection conditions for the detecting elements for calculating the interpolated value, and multiple pairs of detecting elements can be selected depending on the positional relationship between the detecting element group S and the magnetic scale 10. For example, the number of candidate detecting element pairs that satisfy each of the A group detecting element selection conditions 1 and 2 varies depending on each code position number, but in practice, it is necessary to select from multiple candidates and determine the detecting element pairs to be written into the lookup table 36. If the above selection conditions are satisfied, absolute position detection can be performed with high resolution, but in order to perform absolute position detection with high accuracy while taking into account individual differences between detecting elements, it is desirable to actually measure and determine the most ideal detecting elements.

[0100] As a specific method, first, the necessary data is obtained by obtaining the detection values of all detection elements at the ideal position where the code position number of group A for absolute value detection switches to the code position number of group B on the magnetic scale 10. As shown in Figure 6, the ideal positions are positions with displacements of 3 mm, 6 mm, 9 mm, etc., with 0 mm being the starting point, which is the position where detection element A1 moves 1.5 mm backward from the point at the end of the magnetic scale 10, and where P is the size of one pitch and k is the code position number, as follows: Switching point from B group code position number k to A group code position number k: 1 / 2 × P + P × k Switching point from group A code position number k to group B code position number k+1: P × (k+1)

[0101] Then, at the point of switching from group B to group A, it is desirable that Au (= Ax - Aw) = 0, so from among all selection candidates, a pair of detection elements whose actual measured value of Ax - Aw is closest to 0 is adopted as a pair of detection elements for calculating an interpolated value. Also, since it is desirable that Av (= Az - Ay) = 0 at the point of switching from group A to group B, a pair of detection elements whose actual measured value of Az - Ay is closest to 0 is adopted as a pair of detection elements for calculating an interpolated value.

[0102] 10, it can be seen that the difference values Au and Bv are 0 at points of displacement 3 mm and 9 mm, i.e., at the point of (t-1 / 2) pitch where t is a positive integer, and the difference values Av and Bu are 0 at points of displacement 6 mm and 12 mm, i.e., at the point of (t-1) pitch. In this way, one pair of detection elements of the two pairs of detection elements for calculating an interpolated value is a combination in which the difference value is 0 at a position in the vicinity of the (t-1 / 2) pitch when the displacement of the magnetic scale, and the other pair of detection elements is a combination in which the difference value is 0 when the displacement is at the (t-1) pitch.

[0103] [Second embodiment] In the first embodiment, the magnetic scale 10 has a linear magnetization pattern consisting of a non-repeating code pattern as a magnetic track, but the magnetic scale 10 may have a ring-shaped magnetization pattern consisting of a non-repeating code pattern as a magnetic track. Fig. 25 is a diagram showing an example configuration of an absolute position detection device according to a second embodiment of the present invention, which has a ring-shaped magnetization pattern consisting of a non-repeating code pattern as a magnetic track. Fig. 25 shows only the magnetic scale 10 and the detection element group S, and the detection device other than the detection element group S has the same configuration as the detection device 20 in the first embodiment shown in Fig. 1.

[0104] The magnetic scale 10 in this embodiment is ring-shaped, connecting the right end of code position number 63 and the left end of code position number 0 shown in FIG. 2, in order to be used in a rotational system, and has a magnetization pattern consisting of a 6-bit non-repeating code pattern. The magnetic scale 10 has 64 magnetic poles and is ring-shaped, so the pitch of the magnetic poles is approximately 5.6°. The code information obtained at different rotational positions is different across 360°.

[0105] Similarly to the first embodiment, the detection element group S has 12 detection elements A1 to A12 of group A arranged consecutively at one-pitch intervals, and 12 detection elements B1 to B12 of group B arranged at one-pitch intervals with a half-pitch offset from each detection element of group A, and each of the detection elements A1 to B12 is arranged on an arc along the ring-shaped magnetic scale 10. In the absolute position detection device shown in Fig. 25, the detection elements of the detection element group S are arranged on the radially outer side of the magnetic scale 10, but they may also be arranged on the radially inner side, or may be arranged so as to face each other at a position either above or below the plane of the drawing.

[0106] In the first embodiment, a high-resolution displacement magnitude is output as the absolute position output, but in this embodiment, a high-resolution angle magnitude is output as the absolute position output of the rotation system. The method of calculating the absolute position in this embodiment is the same as in the first embodiment, except that the displacement is changed to an angle, so a description thereof will be omitted.

[0107] [Third embodiment] 26 is a diagram showing another example of the configuration of an absolute position detection device according to the third embodiment of the present invention, which has a ring-shaped magnetized pattern consisting of a non-repeating code pattern as a magnetic track. Like the absolute position detection device of the second embodiment, the absolute position detection device of this embodiment outputs the absolute position (angle) of a rotational system, but in this embodiment, the number of detection elements in the detection element group S for outputting the absolute position (angle) is reduced compared to the second embodiment by devising the non-repeating code pattern of the magnetic scale 10.

[0108] In the second embodiment, the magnetization pattern of the magnetic scale 10 includes a portion in which N and S poles are consecutively arranged in a sequence of "NNNNNNSSSSSS" (see magnetic poles numbered 57-4 in FIG. 25), for a total of 12 pitches. Therefore, a 6-bit absolute position detection device requires 12 bits (24 elements) of detection elements to calculate an interpolated value. In contrast, the magnetic scale 10 of this embodiment employs a 6-bit non-repeating code as the magnetization pattern, but excludes the pattern in which N poles are consecutively arranged in a sequence of "NNNNNN" and the pattern in which N poles are consecutively arranged in a sequence of "SSSSSS." Therefore, the number of magnetic poles in the magnetic scale 10 is reduced by two to 62, and the magnetic pole pitch is approximately 5.8°.

[0109] In this embodiment, the maximum length of the continuous magnetic poles is eight pitches of "SSSNNNNN" (see magnetic poles numbered 61 to 6 in FIG. 26), and the number of detector elements in group A and group B is eight, for a total of 16, so that the interpolated value can be calculated. In this way, in this embodiment, the number of detector elements is reduced by four bits (eight) compared to the second embodiment, but the interpolated value can still be calculated.

[0110] As described above, in the third embodiment, the number of detection elements in the detection element group S for outputting the absolute position (angle) is reduced by devising a 6-bit non-repeating code pattern in the ring-shaped magnetic scale 10. However, even in the first embodiment having the linear magnetic scale 10, by eliminating the pattern in which N poles continue in succession as "NNNNNN" and the pattern in which N poles continue in succession as "SSSSSS", it is possible to calculate an interpolated value even if the number of detection elements is reduced by 4 bits (8). Furthermore, by reducing the number of consecutive S poles and N poles in the magnetization pattern, it is possible to reduce the number of detection elements by satisfying the above-mentioned conditions 1 and 2 for the magnetization pattern of the magnetic scale. [Explanation of symbols]

[0111] 1...absolute position detection device, 10...magnetic scale, 20...detection device, 21...multiplexer, 22...A / D conversion unit, 23...external output unit, 30...position calculation unit, 31...code information acquisition unit, 32...code interval position calculation unit, 33...detection element identification unit for interpolated value calculation, 34...interval interpolated value calculation unit, 35...absolute position calculation unit, 36...lookup table, A1 to A12...detection elements (detected values) of group A, B1 to B12...detection elements (detected values) of group B, M...microcontroller, S...detection element group.

Claims

1. a magnetic scale storing a magnetization pattern consisting of a non-repeating code pattern having n bits (n is an integer of 2 or more) magnetized at a predetermined pitch within an effective measurement length; a detection device including a first detection element group consisting of m (m is an integer of 2 or more) detection elements arranged at one pitch intervals facing the magnetic scale, and a second detection element group consisting of m detection elements arranged at half a pitch offset from each of the detection elements in the first detection element group, the detection device includes a code section position calculation unit that calculates, based on n-bit code information obtained from the detection values of each of the detection elements of the first detection element group or the second detection element group, a code section position calculation value at a code section position corresponding to the code information; an interpolation-value-calculating detector element specifying unit that specifies an interpolation-value-calculating detector element corresponding to the code section position of the first detector element group or the second detector element group; an interval interpolation value calculation unit that calculates an interval interpolation value at the code interval position from the detection value of the interpolation value calculation detection element; an absolute position calculation unit that obtains an absolute position signal over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value;

2. 2. The absolute position detection device according to claim 1, wherein within each of all (m+1) pitches in the magnetization pattern of the magnetic scale, there is both at least one portion where the pole changes from south to north and at least one portion where the pole changes from north to south.

3. 3. The absolute position detection device according to claim 1, wherein the number of bits n and the number of detection elements m satisfy the relationship n≦m≦2n.

4. 3. The absolute position detection device according to claim 1, wherein the magnetization patterns of the magnetic scale are arranged in a straight line.

5. 3. The absolute position detection device according to claim 1, wherein the magnetization patterns of the magnetic scale are arranged in a ring shape.

6. the detection device includes a lookup table that stores, for each code section position of the first detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for first detector element group interpolation value calculation, and, for each code section position of the second detector element group, two pairs of detector element pairs, each consisting of one detector element of the first detector element group and one detector element of the second detector element group, as detector elements for second detector element group interpolation value calculation, the interpolated value calculation detector element specifying unit specifies either the first detector element group interpolated value calculation detector element or the second detector element group interpolated value calculation detector element as the detector element for calculating the interval interpolated value, based on a magnitude of a difference value between detection values of each of the detector elements in the pair of detector elements in the first detector element group interpolated value calculation detector element or the second detector element group interpolated value calculation detector element stored in the lookup table, in accordance with the code interval position of the first detector element group or the second detector element group; 3. The absolute position detection device according to claim 1, wherein the interval interpolation value calculation unit calculates the interval interpolation value at the code interval position based on a ratio of difference values between detection values of each of the detection elements of each of two pairs of detection elements in the first detection element group interpolation value calculation detection elements or the second detection element group interpolation value calculation detection elements identified by the interpolation value calculation detection element identification unit.

7. An absolute position detection device comprising: a magnetic scale having a magnetic track on which a linear or ring-shaped magnetized pattern consisting of a non-repeating code pattern magnetized at a predetermined pitch within an effective measurement length is recorded; and a detection device, the detection device has two detection element groups each consisting of a plurality of detection elements disposed opposite the magnetic scale with a half-pitch offset from each other, and comprises a detection unit that calculates a code section position calculation value corresponding to a code section position based on code information obtained from the magnetization pattern of the magnetic scale, calculates a section interpolation value at the code section position using a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two detection element groups, and obtains an absolute position over the entire length of the magnetic scale from the code section position calculation value and the section interpolation value.

8. 1. An absolute position detection method using a magnetic scale having magnetic tracks on which linear or ring-shaped magnetized patterns are recorded, the linear or ring-shaped magnetized patterns being non-repeated code patterns magnetized at a predetermined pitch within an effective measurement length, an absolute position detection method comprising the steps of: obtaining code information of the magnetization pattern of the magnetic scale from detection values of two sets of detection element groups, each set of a plurality of detection elements being arranged opposite each other on the magnetic scale and being shifted by a half pitch; calculating a code section position calculation value corresponding to a code section position of the magnetic scale based on the code information; calculating a section interpolation value at the code section position based on a difference value between detection values of each detection element in a plurality of detection element pairs selected from the two detection element groups; and obtaining absolute positions over the entire length of the magnetic scale from the position calculation value based on the code section position and the section interpolation value.

Citation Information

Patent Citations

  • Absolute value type magnetic scale apparatus

    JP1989079618A

  • Encoder reading head

    JP2012519297A

  • Absolute position detection device

    JP2015219180A

  • Position detector

    JP2021167744A

  • Absolute value type magnetic scale device

    JP2571394B2