Encoder
Patent Information
- Application Number
- KR1020170008402
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2016-01-20
- Filing Date
- 2017-01-18
- Publication Date
- 2026-09-02
- Estimated Expiration
- 2037-01-18
Smart Images

Figure 112017005968314-PAT00002_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to an encoder, and more specifically, to a magnetic encoder that calculates a rotation angle obtained based on magnetic sensor outputs of an A-phase signal and a B-phase signal having a phase difference of, for example, π / 2. Background Technology
[0002] Magnetic encoders are known as devices for detecting the amount of displacement or the absolute value of displacement of a detected object. For example, as a magnetic encoder, a disc-shaped magnet magnetized with two poles of NS is rotated, the change in the magnetic field is detected by an MR element, and the obtained Sin signal and Cos signal are converted to AD and brought to a microcomputer to detect the absolute value of the rotation position.
[0003] In such magnetic encoders, for example, if the phase of the inverse tangent signal is used as a parameter and the Sin signal is plotted as the Y coordinate of an orthogonal coordinate system and the Cos signal as the X coordinate of an orthogonal coordinate system, a so-called Lissajous waveform is obtained. Assuming that the Sin and Cos signals are ideal signals free from noise, the Lissajous waveform becomes a circular shape without center misalignment or distortion. However, in reality, due to variations in the sensor, the circle may be misaligned; that is, the distance from the intersection point of the Y and X coordinates to the circumference of the Lissajous waveform may differ. Therefore, it is common practice to apply offset correction in advance when the encoder is shipped from the factory. Furthermore, there is a technique for adjusting the offset error by taking into account the difference between the offset adjustment environment at the time of shipment (initial) and the actual usage environment, particularly the temperature environment (see, for example, Patent Document 1). Prior art literature
[0004] Japanese Patent Publication No. 2010-78340 The problem to be solved
[0005] However, in a technique that calculates an offset based on two intersection points with the Y-axis and two intersection points with the X-axis, there are limitations in offset calculation for applications where only a small rotation angle is moved, and there was a need for a technique capable of improving precision even in such situations.
[0006] The present invention is made in consideration of the above situation and aims to improve precision by appropriately reflecting the offset in an encoder using an MR element. means of solving the problem
[0007] An encoder according to the present invention comprises a magnet magnetized with two poles of NS, a magnetic sensor disposed opposite to the magnet and outputting an A-phase signal and a B-phase signal having a phase difference of π / 2, an angle calculation unit that calculates the angular position of the magnet based on the A-phase signal and the B-phase signal, and an offset control unit that forms a Lissajous waveform on an orthogonal coordinate system based on the A-phase signal and the B-phase signal and calculates an offset of the A-phase signal and the B-phase signal based on the Lissajous waveform, wherein the offset control unit detects an offset from the intersection point of the perpendicular bisector of two sides formed by three consecutive points among candidate points that are equally divided into a predetermined number on the circumference represented by the Lissajous waveform.
[0008] Here, the A-phase signal and B-phase signal having a phase difference of π / 2 refer, for example, to the Sin signal and Cos signal. Compared to the conventional method of calculating the offset using two intersection points with the Y-axis and two intersection points with the X-axis, the offset can be detected even with a small rotation angle. Therefore, it can be used in applications that only move a small rotation angle.
[0009] The above offset control unit may calculate the offset from the three consecutive points by correcting the Lissajous waveform to become an ideal circle when there is distortion in the waveform.
[0010] Even if there is distortion in the original shape represented by the Lissajous waveform, a more accurate offset can be calculated.
[0011] In addition, the three consecutive points may include at least one intersection point of the Lissajous waveform and any one of the coordinate axes of the orthogonal coordinate system.
[0012] Generally, Lissajous waveforms exhibit minimal distortion at intersection points with the axes (X-axis, Y-axis) of the Cartesian coordinate system. Therefore, by including these intersection points, there is no need to perform distortion correction on these points, allowing for faster calculation of the offset.
[0013] The three consecutive points mentioned above may be intersection points of any one of the coordinate axes of the orthogonal coordinate system and the Lissajous waveform.
[0014] By making all three points intersection points with the axis, the three points are selected at locations where the distortion of the Lissajous waveform is minimal, so distortion correction is unnecessary for all three points, allowing the offset to be calculated more quickly.
[0015] The detection of the intersection point with the above coordinate axis may be calculated from a combination of the value when either the A-phase signal or the B-phase signal becomes zero and the other value.
[0016] The offset can be calculated by detecting the intersection point with the axis using a simple method, without detecting the maximum or minimum value.
[0017] The above offset control unit may use a smoothed offset of the previously calculated offset and the most recently calculated offset when determining the offset applied to calculate the amount of rotation.
[0018] By applying the result of smoothing (filtering) the previous offset by adding a weighted value to the latest offset when calculating the rotation amount, an appropriate offset can be detected by following changes such as changes in ambient temperature or a rise in device temperature during use, and by applying a filter, the offset can be made to remain unchanged.
[0019] When determining the offset applied to calculate the amount of rotation, the offset detected at the first three points may be used as is, and the offsets subsequently detected sequentially may be weighted and reflected in the offsets detected at the first three points.
[0020] The offset can be calculated quickly immediately after the encoding rotation, and as described above, it can also be calculated as an offset that does not change. Effects of the invention
[0021] According to the present invention, in an encoder using an MR element, the precision can be improved by appropriately reflecting the offset. Brief explanation of the drawing
[0022] Figure 1 is an image of the hardware configuration of an encoder according to an embodiment. FIG. 2 is a functional block diagram of an encoder according to an embodiment. FIG. 3 is a drawing for explaining an offset calculation method according to an embodiment. Figure 4 is a diagram illustrating the relationship between the Lissajous waveform and candidate points according to an embodiment. FIG. 5 is a flowchart showing an overview of the offset calculation process according to an embodiment. Specific details for implementing the invention
[0023] Hereinafter, a form for carrying out the invention (hereinafter referred to as "form") will be described with reference to the drawings.
[0024] FIG. 1 is an image of the hardware configuration of an encoder (1) in which offset value correction is performed according to an embodiment of the present invention. FIG. 2 is a functional block of the encoder (1), mainly focusing on the function of offset correction.
[0025] The encoder (1) has an MR element (10) that changes its output signal in conjunction with the rotation of the rotating body, and a control unit (20). In this embodiment, a disc-shaped magnet (50) with a pair of S-pole and N-pole magnetic poles is used as the rotating body. The magnet (50) is fixed to the frame of the motor device, etc., and is used while connected to the rotation output shaft of the motor device, etc.
[0026] In the encoder (1), a Cos signal (A-phase signal) and a Sin signal (B-phase signal) having a phase difference of π / 2 are output from the MR element (10) toward the control unit (20). More specifically, the MR element (10) has a magnetic resistance pattern of A phase and a magnetic resistance pattern of B phase having a phase difference of 90° with respect to the phase of the magnet (50), and outputs the A-phase signal and the B-phase signal in response to the rotation of the magnet (50).
[0027] In addition, although only the MR element (10), which is a component of the A-phase sensor and the B-phase sensor, is shown in the city, the output of the A-phase sensor and the B-phase sensor is processed according to various other electrical elements, such as a rectifier circuit, a low-pass filter, a differential amplifier, and a driver that supplies excitation current to the MR element (10).
[0028] The control unit (20) is formed by various electrical elements such as, for example, an MPU, ROM, and RAM, and functionally includes an A / D converter (21) (hereinafter referred to as “ADC (21)”), an angle calculation unit (22), and an offset control unit (23).
[0029] The ADC (21) acquires the analog signal output from the MR element (10), digitizes it, and outputs it to the angle calculation unit (22) and the offset control unit (23). The angle calculation unit (22) calculates the angle position of the magnet (50) based on the output (A-phase signal, B-phase signal) from the MR element (10).
[0030] The offset control unit (23) has the function of calculating a Lissajous waveform and the offset correction function. When calculating the angle position of the magnet (50), the angle calculation unit (22) obtains the offset from the offset control unit (23) and calculates an appropriate angle position.
[0031] The offset control unit (23) is equipped with an offset calculation unit (24), an offset data storage unit (25), and a distortion correction data storage unit (26).
[0032] The offset calculation unit (24) calculates the offset between the A-phase signal and the B-phase signal and provides it to the angle calculation unit (22) for the angle position calculation process. The specific offset calculation procedure will be described later with reference to FIGS. 4 and FIGS. 5, but simply put, three consecutive points are selected from a predetermined candidate point that divides a circular Lissajous waveform equally, two perpendicular bisectors are obtained between two consecutive points thereon, and the intersection point is calculated as the offset. The value obtained in the first offset calculation process after the encoder (1) starts up is used as is in the angle calculation unit (22). The offset obtained thereafter is used in the angle calculation unit (22) after being smoothed with the first offset. By doing so, the latest offset is reflected as quickly as possible during startup, and an offset that does not change thereafter can be used. In addition, the weighting applied for smoothing can be appropriately selected according to the purpose.
[0033] The offset data storage unit (25) stores offset data. Here, the offset value calculated after the actual usage state is stored along with the offset value at the time of shipment, and is used in the smoothing process described above.
[0034] The distortion correction data storage unit (26) maintains data for performing distortion correction when distortion occurs in the Lissajous waveform. There may be cases where distortion occurs in the analog signal (A-phase signal and B-phase signal) acquired by the ADC (21) due to the MR element (10) and the amplifier, driver, etc. associated therewith. Additionally, as a cause of distortion, there are also geometric factors, such as problems with the shape of the magnet (50) and the MR element (10). The magnet (50) is formed in a disc shape, and each pole is semicircular in shape, and the magnetic flux lines are distributed in a rounded manner from the semicircular region to the semicircular region, rather than being completely uniform. Furthermore, the magnetic flux applied to each segment of the bridge circuit formed in the MR element (10) varies slightly depending on the location. These factors cause distortion in the Lissajous waveform.
[0035] Since such distortion generally changes uniformly according to temperature characteristics, a correction value for normalization is stored in advance and applied when creating the Lissajous waveform, thereby obtaining a circular shape with no (or very little) distortion. Furthermore, in this embodiment, as described below, when calculating the offset, predetermined candidate points are set in advance, so the actual amount of data maintained and the amount of computation required for distortion correction can be small.
[0036] FIG. 3 is a diagram illustrating an offset calculation method applied in the present embodiment. Here, an offset is calculated from the intersection of the perpendicular bisectors of two sides formed by using three consecutive points from candidate points that are evenly divided on a circular Lissajous waveform.
[0037] Here, the explanation is based on three consecutive points: the first point P1(X1, Y1), the second point P2(X2, Y2), and the third point P3(X3, Y3). The perpendicular bisector of the side connecting the first point P1(X1, Y1) and the second point P2(X2, Y2) and the first intersection point Pm1(Xm1, Ym1), and the perpendicular bisector of the side connecting the second point P2(X2, Y2) and the third point P3(X3, Y3) and the second intersection point Pm2(Xm2, Ym2) are obtained by the following equations.
[0038] Xm1=(X1+X2) / 2
[0039] Ym1=(Y1+Y2) / 2
[0040] Xm2=(X2+X3) / 2
[0041] Ym2=(Y2+Y3) / 2
[0042] The intersection point P0(X0, Y0) of the perpendicular bisector L1 passing through the first intersection point Pm1(Xm1, Ym1) and the perpendicular bisector L2 passing through the second intersection point Pm2(Xm2, Ym2) is obtained by the following formula. The value of this intersection point P0(X0, Y0) becomes the newly calculated offset.
[0043] X0=(Nr1×Ys2-Nr2×Ys1) / (Nr1-Nr2)
[0044] Y0=(Ys2-Ys1) / (Nr1-Nr2)
[0045] However, Nr1 (slope of L1), Nr2 (slope of L2), Ys1, and Ys2 are defined by the following formulas.
[0046] Nr1=-(X2-X1) / (Y2-Y1)
[0047] Nr2=-(X3-X2) / (Y3-Y2)
[0048] Ys1=Ym1-Nr1×Xm1
[0049] Ys2=Ym2-Nr2×Xm2
[0050] Figure 4 is a diagram showing the relationship between a Lissajous waveform and candidate points, Figure 4 (a) shows an example in which the Lissajous waveform is divided into 4 parts, and Figure 4 (b) shows an example in which Figure 4 (a) is further divided to divide the Lissajous waveform into 8 parts.
[0051] As shown in FIG. 4(a), the Lissajous waveform is divided into four equal parts, and four intersection points (P1 to P4) of the X-axis and Y-axis are assumed to be candidate points. Here, as in FIG. 3, the first to third points P1 to P3 are used to calculate the intersection point P0 that becomes the offset. Generally, since there is little distortion at the intersection points of the Lissajous waveform and the axis (on the X-axis or Y-axis), the value of the obtained intersection point P0 (X0, Y0) as the offset becomes very accurate. From another perspective, the offset can be obtained with sufficient precision without performing distortion correction. Furthermore, since the Sin signal and Cos signal are output for two cycles with one rotation of the magnet (50), in the case of a circular Lissajous waveform, the offset can be detected at a central angle of 180 degrees, that is, 90 degrees (180 degrees / 2) with the rotation of the magnet (50). In other words, rapid offset calculation processing becomes possible.
[0052] In addition, in FIG. 4(b), the Lissajous waveform is further divided into eight equal parts, and the third point P3 to the fifth point P5 among the eight candidate points (P1 to P8) at the eight divided positions are used to calculate the intersection point P0 that becomes the offset. When three consecutive points are selected from the eight divided candidate points, one or two points on the X-axis or Y-axis are necessarily included. In addition, points other than those on the axis have a slope of ±45 degrees with respect to the origin and correspond to the intersection point of the A-phase signal and the B-phase signal. Since this position has a large distortion, a value corrected for the distortion is used. As a result, the value as the offset of the obtained intersection point P0 (X0, Y0) becomes very accurate. In this case, in a circular Lissajous waveform, the offset can be detected at a central angle of 90 degrees, that is, at a rotation of 45 degrees of the magnet (50). Therefore, even if the magnet (50) is installed in a device that rotates only slightly, the offset can be calculated appropriately, thereby improving the detection precision of the encoder (1).
[0053] Next, using the flowchart of FIG. 5, an overview of the offset calculation process is explained. The control unit (20) acquires the A-phase signal and the B-phase signal output from the MR element (10) (S10). The acquired A-phase signal and the B-phase signal are output to the angle calculation unit (22) and the offset control unit (23).
[0054] The offset calculation unit (24) acquires a Lissajous waveform based on the A-phase signal and the B-phase signal (S12). At this time, if necessary, the distortion correction described above is performed by referring to the distortion correction data storage unit (26). Subsequently, the offset calculation unit (24) identifies three consecutive points from a predetermined candidate point (S14), obtains two perpendicular bisectors of the side obtained by connecting two consecutive points, calculates their intersection point (S16), and determines the latest offset (S18).
[0055] When the latest offset is determined, the offset calculation unit (24) determines whether the first offset is calculated after starting the encoder (1) (S20).
[0056] If the first offset is calculated (e.g., S20), the offset calculation unit (24) notifies the angle calculation unit (22) of the latest offset (S22). After notification, the calculated offset is stored in the offset data memory unit (25) (S24).
[0057] If the first offset is not calculated (S20 No), the offset calculation unit (24) performs a smoothing process using the latest offset and the previously calculated offset recorded in the offset data storage unit (25) (S26), and notifies the angle calculation unit (22) of the smoothed offset (S28). After notification, the calculated offset is stored in the offset data storage unit (25) (S24).
[0058] Although the present invention has been described based on embodiments, it is understood by those skilled in the art that these embodiments are examples and various variations are possible, such as combinations of each of their components, and that such variations are also within the scope of the present invention. Explanation of the symbols
[0059] 1 : Encoder 10 : MR element 20 : Control unit 21 : ADC (A / D converter) 22 : Angle calculation unit 23 : Offset control unit 24 : Offset calculation section 25 : Offset data storage 26: Data storage unit for distortion correction 50 : Magnet
Claims
Claim 1 An encoder comprising: a magnet magnetized with two poles of NS; a magnetic sensor disposed opposite to the magnet and outputting an A-phase signal and a B-phase signal having a phase difference of π / 2; an angle calculation unit that calculates the angular position of the magnet based on the A-phase signal and the B-phase signal; and an offset control unit that forms a Lissajous waveform on an orthogonal coordinate system based on the A-phase signal and the B-phase signal, and calculates an offset of the A-phase signal and the B-phase signal based on the Lissajous waveform; wherein the offset control unit detects an offset from the intersection point of the perpendicular bisectors of two sides formed by three consecutive points among candidate points that are equally divided by a predetermined number on the circumference represented by the Lissajous waveform; and wherein, when determining the offset applied to calculate the angular position of the magnet, the offset detected from the first three points is used as is, and the offset subsequently detected sequentially is weighted and reflected in the offset detected from the first three points. Claim 2 An encoder according to claim 1, wherein the offset control unit calculates the offset from the three consecutive points by correcting the circular shape represented by the Lissajous waveform to become an ideal circle when there is distortion in the circular shape represented by the Lissajous waveform. Claim 3 An encoder according to paragraph 2, wherein the three consecutive points include at least one intersection point of a coordinate axis of the orthogonal coordinate system and the Lissajous waveform. Claim 4 An encoder according to paragraph 3, characterized in that the three consecutive points are the intersection points of one of the coordinate axes of the orthogonal coordinate system and the Lissajous waveform. Claim 5 An encoder according to claim 3, wherein the detection of an intersection point on the coordinate axis is calculated from a combination of the value when either the A-phase signal or the B-phase signal becomes zero and the other value. Claim 6 An encoder according to any one of claims 1 to 5, wherein the offset control unit smooths and uses the previously calculated offset and the most recently calculated offset when determining the offset applied to calculate the angular position of the magnet. Claim 7 delete Claim 8 An encoder according to claim 1, characterized in that the three consecutive points include at least one intersection point of one of the coordinate axes of the orthogonal coordinate system and the Lissajous waveform. Claim 9 An encoder according to claim 8, characterized in that the three consecutive points are intersection points of one of the coordinate axes of the orthogonal coordinate system and the Lissajous waveform. Claim 10 An encoder according to claim 8, wherein the detection of an intersection point on the coordinate axis is calculated from a combination of the value when either the A-phase signal or the B-phase signal becomes zero and the other value. Claim 11 An encoder according to any one of claims 8 to 10, wherein the offset control unit smooths and uses the previously calculated offset and the most recently calculated offset when determining the offset applied to calculate the angular position of the magnet. Claim 12 delete
Citation Information
Patent Citations
encoder
JP1992136714A
Encoder output signal corrector and method
JP2006112862A
Encoder output signal correction apparatus
JP2014025871A
Encoder
JP2015225023A