Angle detection method and angle detection device

The angle detection method and device enhance the accuracy of mechanical angle estimation by extracting intersections and zero-crossing points from sensor signals and correcting angles using Bezier curves, addressing the accuracy limitations of existing methods.

JP7789770B2Active Publication Date: 2025-12-22NIDEC CORP(JP)
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023525414
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-05-31
Filing Date
2022-03-10
Publication Date
2025-12-22
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

Existing methods for estimating the mechanical angle of a rotating shaft using inexpensive magnetic sensors lack the accuracy required for precise motor control.

Method used

An angle detection method that involves extracting intersections and zero-crossing points from sensor signals, generating linear functions, and correcting mechanical angles using Bezier curves to enhance estimation accuracy.

Benefits of technology

The solution significantly improves the accuracy of mechanical angle estimation of the mechanical angle of a rotating shaft, enhancing the accuracy of the mechanical angle of the rotating shaft.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007789770000007
    Figure 0007789770000007
  • Figure 0007789770000008
    Figure 0007789770000008
  • Figure 0007789770000009
    Figure 0007789770000009
Patent Text Reader

Abstract

One embodiment of this angle detection device comprises three magnetic sensors for detecting magnetic flux variation resulting from the rotation of a rotating shaft and a signal processing unit for processing signals output from the three magnetic sensors. The signal processing unit acquires sensor signals output from the three sensor signals, generates a linear function θ(Δx) representing a straight line joining a point of intersection and zero crossing point that are adjacent to each other, retrieves, as a maximum error point, the point where the error between a mechanical angle θ calculated on the basis of the linear function θ(Δx) and a mechanical angle θe acquired from an encoder is greatest, calculates a first curve on the basis of an origin point, peak, and first control point, uses the first curve to correct the mechanical angle θ calculated on the basis of the linear function θ(Δx), acquires, as a first maximum error, the maximum error between the corrected mechanical angle θ and the mechanical angle θe, and, for a prescribed number of times, returns to fifth processing after changing the Δx value of the first control point in a direction in which the first maximum error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

[0002] Conventionally, motors capable of accurately controlling their rotational position are known to be configured with absolute angular position sensors such as optical encoders and resolvers. However, absolute angular position sensors are large and expensive. Therefore, Patent Document 1 discloses a position estimation method that estimates the rotational position of a motor using three inexpensive and small magnetic sensors without using an absolute angular position sensor. [Prior art documents] [Patent documents]

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

[0004] The position estimation method described in Patent Document 1 can estimate the mechanical angle of the rotating shaft with high accuracy using three inexpensive and small magnetic sensors, but there has been a demand for higher accuracy in estimating the mechanical angle. [Means for solving the problem]

[0005] One aspect of the angle detection method of the present invention is an angle detection method for detecting a mechanical angle of a rotating shaft, the method comprising: a first step of acquiring, as sensor signals, signals output from three magnetic sensors that detect magnetic flux changes due to rotation of the rotating shaft, the three sensor signals having a phase difference of 120° in electrical angle from one another; a second step of extracting, over one mechanical angle cycle, intersections where two of the three sensor signals cross each other and zero-crossing points where each of the three sensor signals crosses a reference signal level; and a second step of extracting, over one mechanical angle cycle, the intersections and the zero-crossing points where adjacent ones of the three sensor signals cross each other. a third step of generating a linear function θ(Δx) representing a line connecting a zero crossing point and a zero crossing point, wherein Δx is the length from the start point of the line to an arbitrary point on the line, and θ is the mechanical angle corresponding to the arbitrary point on the line; a fourth step of searching for a point on the line where the error between the mechanical angle θ calculated based on the linear function θ(Δx) and the mechanical angle θe obtained from an encoder installed on the rotary shaft is the maximum, as an error maximum point, and obtaining the length from the start point of the line to the error maximum point as Δx1; a fifth step of calculating a first curve based on an origin, a vertex, and a first control point among points in a two-axis coordinate system with the difference as the vertical axis, wherein the origin is a point where the Δx and the error are zero, the vertex is a point where the Δx is the Δx1 and the error is the maximum value, and the first control point is a point where the Δx is a value between zero and Δx1 and the error is the maximum value; and a fifth step of calculating a mechanical angle θ calculated based on the linear function θ(Δx) for points included between the start point of the line and the maximum error point among a plurality of points on the line. a sixth step of correcting the value of Δx based on the first curve; a seventh step of determining a maximum error between the mechanical angle θ corrected in the sixth step and the mechanical angle θe as a first maximum error; an eighth step of changing the value of Δx of the first control point in a direction that reduces the first maximum error and then returning to the fifth step a predetermined number of times; and a step of calculating a second curve based on the vertex, end points, and second control points among the points in the two-axis coordinate system, wherein the end points are points where the Δx corresponds to the maximum length Δxm of the straight line and the error is zero, and the second control points area ninth step in which the Δx is a value between Δx1 and Δxm and the error is the maximum value; a tenth step in which, for points among a plurality of points on the straight line that are included between the end point of the straight line and the maximum error point, the mechanical angle θ calculated based on the linear function θ(Δx) is corrected based on the second curve; an eleventh step in which the maximum error is determined as a second maximum error, which is the maximum error between the mechanical angle θ corrected in the tenth step and the mechanical angle θe; a twelfth step in which the value of Δx of the second control point is changed in a direction that reduces the second maximum error, and then the process returns to the ninth step a predetermined number of times; a thirteenth step in which the value of Δx of the first control point that minimizes the first maximum error and the value of Δx of the second control point that minimizes the second maximum error are stored as learned values; and a fourteenth step in which the mechanical angle θ is corrected based on the learned value.

[0006] One aspect of the angle detection device of the present invention is an angle detection device that detects the mechanical angle of a rotating shaft, and includes three magnetic sensors that detect changes in magnetic flux due to rotation of the rotating shaft, and a signal processing unit that processes signals output from the three magnetic sensors. The signal processing unit includes: a first process for acquiring signals output from the three sensor signals as sensor signals, the three sensor signals having a phase difference of 120° in electrical angle from one another; a second process for extracting, over one mechanical angle cycle, intersections where two of the three sensor signals intersect with one another and zero-crossing points where each of the three sensor signals intersects with a reference signal level; a third process for generating a linear function θ(Δx) representing a line connecting adjacent intersections and the zero-crossing points, the Δx being the length from the start point of the line to an arbitrary point on the line, and the θ being the mechanical angle corresponding to the arbitrary point on the line; a fourth process for searching, among points on the line, for a point where an error between a mechanical angle θ calculated based on the linear function θ(Δx) and a mechanical angle θe acquired from an encoder installed on the rotating shaft is maximum, as an error maximum point, and acquiring the length from the start point of the line to the error maximum point as Δx1; and a fourth process for calculating a time series of the time series of the time series with the Δx as the horizontal axis and the error as the vertical axis. a fifth process for calculating a first curve based on an origin, a vertex, and a first control point among points in a two-axis coordinate system having a first axis as an axis, the origin being a point where the Δx and the error are zero, the vertex being a point where the Δx is the Δx1 and the error is the maximum value, and the first control point being a point where the Δx is a value between zero and Δx1 and the error is the maximum value; and a fifth process for calculating a first curve based on an origin, a vertex, and a first control point among points on the straight line that are included between the start point of the straight line and the maximum error point. a sixth process for correcting the mechanical angle θ calculated based on the linear function θ(Δx) based on the first curve; a seventh process for determining a maximum error between the mechanical angle θ corrected by the sixth process and the mechanical angle θe as a first maximum error; an eighth process for changing the value of Δx of the first control point in a direction that reduces the first maximum error and then returning to the fifth process a predetermined number of times; and a process for calculating a second curve based on the vertex, the end point, and a second control point among points in the two-axis coordinate system,a ninth process in which the Δx corresponds to the maximum length Δxm of the straight line and the error is zero, and the second control point is a point in which the Δx is a value between Δx1 and Δxm and the error is the maximum value; a tenth process in which, for points on the straight line between the end point of the straight line and the maximum error point, the mechanical angle θ calculated based on the linear function θ(Δx) is corrected based on the second curve; an eleventh process in which the maximum error is determined as a second maximum error, which is the maximum error between the mechanical angle θ corrected by the tenth process and the mechanical angle θe; a twelfth process in which the value of Δx of the second control point is changed in a direction that reduces the second maximum error, and then the process returns to the ninth process a predetermined number of times; a thirteenth process in which the value of Δx of the first control point that minimizes the first maximum error and the value of Δx of the second control point that minimizes the second maximum error are stored as learned values; and a fourteenth process in which the mechanical angle θ is corrected based on the learned value. [Effects of the Invention]

[0007] According to the above aspects of the present invention, an angle detection method and an angle detection device are provided that can improve the estimation accuracy (detection accuracy) of the mechanical angle of a rotating shaft. [Brief explanation of the drawings]

[0008] [Figure 1] FIG. 1 is a block diagram schematically showing the configuration of an angle detection device according to one embodiment of the present invention. [Figure 2] FIG. 2 is a diagram showing an example of waveforms of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw. [Figure 3] FIG. 3 is an enlarged view of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw included in one pole pair region shown in FIG. [Figure 4] FIG. 4 is a diagram showing an example of waveforms of the sensor signals Hu, Hv, and Hw including an in-phase signal that is a noise component. [Figure 5] FIG. 5 is a diagram showing an example of waveforms of the sensor signals Hiu0, Hiv0, and Hiw0 obtained after the first correction process is performed. [Figure 6] FIG. 6 is a diagram showing an example of waveforms of the sensor signals Hiu1, Hiv1, and Hiw1 obtained after the second correction process is performed. [Figure 7] FIG. 7 is a diagram showing an example of waveforms of the sensor signals Hiu2, Hiv2, and Hiw2 obtained after the third correction process is performed. [Figure 8] FIG. 8 is a diagram showing an example of waveforms of sensor signals Hu', Hv', and Hw' including in-phase signals such as third, fifth, and seventh harmonic signals. [Figure 9] FIG. 9 is a diagram showing an example of waveforms of sensor signals Hiu0', Hiv0', and Hiw0' obtained after the first correction process is performed on sensor signals Hu', Hv', and Hw'. [Figure 10] FIG. 10 is a diagram showing an example of the waveforms of sensor signals Hiu1', Hiv1', and Hiw1' obtained after the second correction process is performed on the sensor signals Hiu0', Hiv0', and Hiw0'. [Figure 11] FIG. 11 is a diagram showing an example of waveforms of sensor signals Hiu2', Hiv2', and Hiw2' obtained after the third correction process is performed on the sensor signals Hiu1', Hiv1', and Hiw1'. [Figure 12] FIG. 12 is a diagram showing the results of an experiment measuring the error that occurs between the estimated mechanical angle θ calculated by equation (1) and the true mechanical angle when a sensor magnet with one pole pair is rotated once. [Figure 13] FIG. 13 is a flowchart showing the learning process that the processing unit 21 of the angle detection device 1 in this embodiment executes as offline processing. [Figure 14] FIG. 14 is a diagram showing a method for calculating the estimated mechanical angle θ[n] corresponding to each sampling point by substituting the digital value Δx[n] at each sampling point obtained by sampling the divided signal W10 corresponding to the i-th segment L10 into the mechanical angle estimation formula for the i-th segment L10. [Figure 15]FIG. 15 is a diagram showing an example of the result of calculating the error θerr[n] between the multiple mechanical angle estimated values ​​θ[n] obtained for the i-th segment L10 and the true mechanical angle value θe[n] obtained from the encoder 200. [Figure 16] FIG. 16 is a diagram showing an example of a two-axis coordinate system in which the horizontal axis represents Δx and the vertical axis represents the error, and is also an explanatory diagram relating to a method of correcting the estimated mechanical angle θ based on a Bezier curve. [Figure 17] FIG. 17 is a diagram plotting the error between the estimated mechanical angle θ and the true mechanical angle θe corrected by a Bézier curve when the first control point P2 in the left coordinate region XL and the second control point P5 in the right coordinate region XR are at their initial values, together with points on the Bézier curve, in a two-axis coordinate system. [Figure 18] FIG. 18 is a diagram showing the error between the mechanical angle estimated value θ corrected by a Bezier curve and the true mechanical angle value θe when the first control point P2 in the left coordinate region XL and the second control point P5 in the right coordinate region XR are at their initial values, in correspondence with each digital value Δx[n]. [Figure 19] FIG. 19 is a diagram in which the error between the estimated mechanical angle θ and the true mechanical angle θe corrected by a Bézier curve when using the first control point P2 that minimizes the first maximum error in the left coordinate region XL and the second control point P5 that minimizes the second maximum error in the right coordinate region XR is plotted on a two-axis coordinate system together with points on the Bézier curve. [Figure 20] FIG. 20 is a diagram showing the error between the mechanical angle estimated value θ and the true mechanical angle value θe corrected by a Bézier curve when using the first control point P2 that minimizes the first maximum error in the left coordinate region XL and the second control point P5 that minimizes the second maximum error in the right coordinate region XR, in correspondence with each digital value Δx[n]. DETAILED DESCRIPTION OF THE INVENTION

[0009] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. 1 is a block diagram showing a schematic configuration of an angle detection device 1 according to one embodiment of the present invention. As shown in FIG. 1, the angle detection device 1 is a device that detects the mechanical angle (rotation angle) of a rotor shaft 110, which is the rotation axis of a motor 100. In this embodiment, the motor 100 is, for example, an inner rotor type three-phase brushless DC motor. The motor 100 includes the rotor shaft 110 and a sensor magnet 120.

[0010] The sensor magnet 120 is a disk-shaped magnet attached to the rotor shaft 110. The sensor magnet 120 rotates in synchronization with the rotor shaft 110. The sensor magnet 120 has P magnetic pole pairs (P is an integer equal to or greater than 1). In this embodiment, as an example, the sensor magnet 120 has four magnetic pole pairs. Note that a magnetic pole pair refers to a pair of an N pole and an S pole. That is, in this embodiment, the sensor magnet 120 has four pairs of an N pole and an S pole, for a total of eight magnetic poles.

[0011] The angle detection device 1 includes a sensor group 10 and a signal processing unit 20. Although not shown in FIG. 1, a circuit board is attached to the motor 100, and the sensor group 10 and the signal processing unit 20 are arranged on the circuit board. The sensor magnet 120 is arranged in a position that does not interfere with the circuit board. The sensor magnet 120 may be arranged inside the housing of the motor 100 or outside the housing.

[0012] The sensor group 10 includes three magnetic sensors 11, 12, and 13. The magnetic sensors 11, 12, and 13 are arranged on the circuit board facing the sensor magnet 120 and at predetermined intervals along the rotation direction of the sensor magnet 120. In this embodiment, the magnetic sensors 11, 12, and 13 are arranged at 30° intervals along the rotation direction of the sensor magnet 120. The magnetic sensors 11, 12, and 13 are each an analog output type magnetic sensor including a magnetoresistive element, such as a Hall element or a linear Hall IC.

[0013] When the rotor shaft 110 rotates, the sensor magnet 120 rotates in synchronization with the rotor shaft 110. The three magnetic sensors 11, 12, and 13 each detect a change in magnetic flux due to the rotation of the rotor shaft 110, i.e., the rotation of the sensor magnet 120, and output an analog signal indicating the detection result of the magnetic flux change to the signal processing unit 20.

[0014] One electrical angle cycle of each analog signal output from the magnetic sensors 11, 12, and 13 corresponds to 1 / P of one mechanical angle cycle. In this embodiment, since the number of pole pairs P of the sensor magnet 120 is "4," one electrical angle cycle of each analog signal corresponds to 1 / 4 of one mechanical angle cycle, or 90° mechanical angle. Furthermore, the analog signals output from the magnetic sensors 11, 12, and 13 have a phase difference of 120° electrical angle from each other.

[0015] Hereinafter, the analog signals output from the three magnetic sensors 11, 12, and 13 to the signal processing unit 20 will be referred to as sensor signals. In addition, in the following description, the sensor signal output from the magnetic sensor 11 will be referred to as a U-phase sensor signal Hu, the sensor signal output from the magnetic sensor 12 will be referred to as a V-phase sensor signal Hv, and the sensor signal output from the magnetic sensor 13 will be referred to as a W-phase sensor signal Hw.

[0016] The signal processing unit 20 is a signal processing circuit that processes sensor signals output from the three magnetic sensors 11, 12, and 13. The signal processing unit 20 estimates the mechanical angle of the rotor shaft 110, which is the rotation axis, based on the U-phase sensor signal Hu output from the magnetic sensor 11, the V-phase sensor signal Hv output from the magnetic sensor 12, and the W-phase sensor signal Hw output from the magnetic sensor 13. The signal processing unit 20 includes a processing unit 21 and a storage unit 22.

[0017] The processing unit 21 is a microprocessor such as an MCU (Microcontroller Unit). The U-phase sensor signal Hu output from the magnetic sensor 11, the V-phase sensor signal Hv output from the magnetic sensor 12, and the W-phase sensor signal Hw output from the magnetic sensor 13 are each input to the processing unit 21. The processing unit 21 is communicably connected to the storage unit 22 via a communication bus (not shown). The processing unit 21 executes at least the following two processes according to a program stored in advance in the storage unit 22.

[0018] The processing unit 21 performs a learning process as offline processing to acquire learning data required to estimate the mechanical angle of the rotor shaft 110. The offline processing is processing that is executed before the angle detection device 1 is shipped from a manufacturing factory or before the angle detection device 1 is incorporated into a customer's system and put into actual use. In the learning process, the processing unit 21 acquires learning data based on the sensor signals Hu, Hv, and Hw output from the magnetic sensors 11, 12, and 13, and the output signal AS of the encoder 200 (see FIG. 1). The encoder 200 is installed on the rotor shaft 110 only when the learning process is executed. The output signal AS of the encoder 200 is a signal that indicates the mechanical angle of the rotor shaft 110. The encoder 200 may be either an incremental encoder or an absolute encoder.

[0019] Furthermore, the processing unit 21 performs an angle estimation process as online processing to estimate the mechanical angle of the rotor shaft 110 based on the sensor signals Hu, Hv, and Hw output from the magnetic sensors 11, 12, and 13 and learning data obtained by the learning process. The online processing is processing that is executed when the angle detection device 1 is incorporated into a customer's system and put into actual operation.

[0020] The storage unit 22 includes a nonvolatile memory that stores programs, various setting data, the above-mentioned learning data, and the like required for the processing unit 21 to execute various processes, and a volatile memory that is used as a temporary storage destination for data when the processing unit 21 executes various processes. The nonvolatile memory is, for example, an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash memory. The volatile memory is, for example, a RAM (Random Access Memory).

[0021] Before describing the learning process and angle estimation process executed by the processing unit 21 of the angle detection device 1 configured as described above, a brief description of the position estimation method disclosed in Japanese Patent No. 6233532 will be given below to facilitate understanding of the present invention. In the following description, the position estimation method disclosed in Japanese Patent No. 6233532 may be referred to as the basic patent method. For details of the basic patent method, please refer to Japanese Patent No. 6233532. For convenience of explanation, the basic patent method will be described below using the elements shown in FIG. 1.

[0022] First, the learning process executed by the processing unit 21 in the basic patent method will be described. The processing unit 21 acquires the signals output from the magnetic sensors 11, 12, and 13 as sensor signals Hu, Hv, and Hw while the sensor magnet 120 is rotating together with the rotor shaft 110. Specifically, the processing unit 21 has a built-in A / D converter, and the processing unit 21 acquires digital values ​​of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw by digitally converting each of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw using the A / D converter at a predetermined sampling frequency.

[0023] During the learning process, the rotor shaft 110 may be rotated by controlling the supply of current to the motor 100 via a motor control device (not shown). Alternatively, the rotor shaft 110 may be connected to a rotating machine (not shown) and rotated by the rotating machine.

[0024] FIG. 2 is a diagram showing an example of the waveforms of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw. As shown in FIG. 2, one electrical cycle of each of the sensor signals Hu, Hv, and Hw corresponds to ¼ of one mechanical cycle, i.e., 90° mechanical angle. In FIG. 2, the period from time t1 to time t5 corresponds to one mechanical cycle (360° mechanical angle). In FIG. 2, the period from time t1 to time t2, the period from time t2 to time t3, the period from time t3 to time t4, and the period from time t4 to time t5 each correspond to 90° mechanical angle. Furthermore, the sensor signals Hu, Hv, and Hw have a phase difference of 120° electrical angle from one another.

[0025] Based on the digital values ​​of the sensor signals Hu, Hv, and Hw, the processing unit 21 extracts, over one mechanical angle cycle, intersection points where two of the three sensor signals intersect with each other and zero-crossing points where each of the three sensor signals intersects with a reference signal level. The reference signal level is, for example, ground level. When the reference signal level is ground level, the digital value of the reference signal level is "0."

[0026] As shown in FIG. 2, the processing unit 21 divides one mechanical angle cycle into four pole pair regions associated with pole pair numbers based on the result of extracting the zero-crossing points. In FIG. 2, "No. C" indicates the pole pair number. As shown in FIG. 1, pole pair numbers are assigned in advance to the four magnetic pole pairs of the sensor magnet 120. For example, the pole pair number "0" is assigned to the magnetic pole pair located in the mechanical angle range of 0° to 90°. The pole pair number "1" is assigned to the magnetic pole pair located in the mechanical angle range of 90° to 180°. The pole pair number "2" is assigned to the magnetic pole pair located in the mechanical angle range of 180° to 270°. The pole pair number "3" is assigned to the magnetic pole pair located in the mechanical angle range of 270° to 360°.

[0027] For example, when the sensor signal Hu is used as a reference, the processing unit 21 recognizes, among the zero-crossing points of the sensor signal Hu, the zero-crossing point obtained at the sampling timing (time t1) when the mechanical angle is 0° as the start point of the pole pair region associated with the pole pair number "0". Furthermore, the processing unit 21 recognizes, among the zero-crossing points of the sensor signal Hu, the zero-crossing point obtained at the sampling timing (time t2) when the mechanical angle is 90° as the end point of the pole pair region associated with the pole pair number "0". In other words, the processing unit 21 determines the section between the zero-crossing point obtained at time t1 and the zero-crossing point obtained at time t2 as the pole pair region associated with the pole pair number "0".

[0028] The processing unit 21 recognizes, among the zero-crossing points of the sensor signal Hu, the zero-crossing point obtained at the sampling timing (time t2) when the mechanical angle is 90° as the start point of the pole pair region associated with the pole pair number "1". Furthermore, the processing unit 21 recognizes, among the zero-crossing points of the sensor signal Hu, the zero-crossing point obtained at the sampling timing (time t3) when the mechanical angle is 180° as the end point of the pole pair region associated with the pole pair number "1". In other words, the processing unit 21 determines the section between the zero-crossing point obtained at time t2 and the zero-crossing point obtained at time t3 as the pole pair region associated with the pole pair number "1".

[0029] The processing unit 21 recognizes, among the zero crossing points of the sensor signal Hu, the zero crossing point obtained at the sampling timing (time t3) when the mechanical angle is 180° as the start point of the pole pair region associated with the pole pair number "2". Furthermore, the processing unit 21 recognizes, among the zero crossing points of the sensor signal Hu, the zero crossing point obtained at the sampling timing (time t4) when the mechanical angle is 270° as the end point of the pole pair region associated with the pole pair number "2". In other words, the processing unit 21 determines the section between the zero crossing point obtained at time t3 and the zero crossing point obtained at time t4 as the pole pair region associated with the pole pair number "2".

[0030] The processing unit 21 recognizes, among the zero crossing points of the sensor signal Hu, the zero crossing point obtained at the sampling timing (time t4) when the mechanical angle is 270° as the start point of the pole pair region associated with the pole pair number "3". Furthermore, the processing unit 21 recognizes, among the zero crossing points of the sensor signal Hu, the zero crossing point obtained at the sampling timing (time t5) when the mechanical angle is 360° as the end point of the pole pair region associated with the pole pair number "3". In other words, the processing unit 21 determines the section between the zero crossing point obtained at time t4 and the zero crossing point obtained at time t5 as the pole pair region associated with the pole pair number "3".

[0031] As shown in Fig. 2, the processing unit 21 divides each of the four pole pair regions into 12 sections associated with section numbers based on the extraction results of the intersections and zero crossing points. In Fig. 2, "No. A" indicates the section number associated with each section. As shown in Fig. 2, the 12 sections included in each of the four pole pair regions are associated with section numbers from "0" to "11."

[0032] 3 is an enlarged view of the sensor signals Hu, Hv, and Hw included in one pole pair region shown in FIG. 2. In FIG. 3, the reference value (reference signal level) of the amplitude is "0." In FIG. 3, the digital value of the amplitude that is a positive value represents, as an example, the digital value of the magnetic field strength of the north pole. Also, the digital value of the amplitude that is a negative value represents, as an example, the digital value of the magnetic field strength of the south pole.

[0033] 3, points P1, P3, P5, P7, P9, P11, and P13 are zero-crossing points extracted from the digital values ​​of the sensor signals Hu, Hv, and Hw included in one pole pair region. Also, in FIG. 3, points P2, P4, P6, P8, P10, and P12 are intersections extracted from the digital values ​​of the sensor signals Hu, Hv, and Hw included in one pole pair region. As shown in FIG. 3, the processing unit 21 determines the intervals between adjacent zero-crossing points and intersections as sections.

[0034] The processing unit 21 determines the section between zero cross point P1 and intersection point P2 as the section associated with section number "0." The processing unit 21 determines the section between intersection point P2 and zero cross point P3 as the section associated with section number "1." The processing unit 21 determines the section between zero cross point P3 and intersection point P4 as the section associated with section number "2." The processing unit 21 determines the section between intersection point P4 and zero cross point P5 as the section associated with section number "3." The processing unit 21 determines the section between zero cross point P5 and intersection point P6 as the section associated with section number "4." The processing unit 21 determines the section between intersection point P6 and zero cross point P7 as the section associated with section number "5."

[0035] The processing unit 21 determines the section between zero cross point P7 and intersection point P8 as the section associated with section number "6." The processing unit 21 determines the section between intersection point P8 and zero cross point P9 as the section associated with section number "7." The processing unit 21 determines the section between zero cross point P9 and intersection point P10 as the section associated with section number "8." The processing unit 21 determines the section between intersection point P10 and zero cross point P11 as the section associated with section number "9." The processing unit 21 determines the section between zero cross point P11 and intersection point P12 as the section associated with section number "10." The processing unit 21 determines the section between intersection point P12 and zero cross point P13 as the section associated with section number "11."

[0036] In the following description, for example, a section assigned section number "0" will be referred to as "section 0," and a section assigned section number "11" will be referred to as "section 11."

[0037] As shown in FIG. 2, consecutive numbers throughout one mechanical angle cycle are associated with each section number as segment numbers. In FIG. 2, "No. B" indicates the segment number associated with each section number. Note that the term "segment" refers to a line connecting adjacent intersections and zero-crossing points. In other words, a line connecting the start and end points of each section is called a segment. In FIG. 3, for example, the start point of section 0 is zero-crossing point P1, and the end point of section 0 is intersection point P2. Therefore, the segment corresponding to section 0 is the line connecting zero-crossing point P1 and intersection point P2. Similarly, in FIG. 3, for example, the start point of section 1 is intersection point P2, and the end point of section 1 is zero-crossing point P3. Therefore, the segment corresponding to section 1 is the line connecting intersection point P2 and zero-crossing point P3.

[0038] As shown in Figure 2, in the pole pair area associated with pole pair number "0", segment numbers "0" to "11" are associated with section numbers "0" to "11". In the pole pair area associated with pole pair number "1", segment numbers "12" to "23" are associated with section numbers "0" to "11". In the pole pair area associated with pole pair number "2", segment numbers "24" to "35" are associated with section numbers "0" to "11". In the pole pair area associated with pole pair number "3", segment numbers "36" to "47" are associated with section numbers "0" to "11".

[0039] In the following description, for example, a segment assigned segment number "0" will be referred to as "segment no. 1," and a segment assigned segment number "11" will be referred to as "segment no. 11."

[0040] The processing unit 21 generates a linear function θ(Δx) that represents each segment. Δx is the length (digital value) from the start point of the segment to an arbitrary point on the segment, and θ is the mechanical angle corresponding to the arbitrary point on the segment. In FIG. 3, for example, the start point of the segment corresponding to section 0 is zero-crossing point P1, and the end point of the segment corresponding to section 0 is intersection point P2. Similarly, in FIG. 3, for example, the start point of the segment corresponding to section 1 is intersection point P2, and the end point of the segment corresponding to section 1 is zero-crossing point P3.

[0041] For example, a linear function θ(Δx) representing a segment is expressed by the following equation (1): In the following equation (1), "i" is the segment number and is an integer from 0 to 47. In the following description, the linear function θ(Δx) expressed by the following equation (1) may be referred to as a mechanical angle estimation equation, and the mechanical angle θ calculated by the following equation (1) may be referred to as a mechanical angle estimated value. θ(Δx)=k[i]×Δx+θres[i] …(1)

[0042] In the above equation (1), k[i] is a coefficient called a normalization coefficient. In other words, k[i] is a coefficient that represents the slope of the i-th segment. The normalization coefficient k[i] is expressed by the following equation (2). In the following equation (2), ΔXnorm[i] is the deviation of the digital values ​​between the start point and end point of the i-th segment. In FIG. 3, for example, ΔXnorm[i] of the segment corresponding to section 0 is the deviation of the digital values ​​between zero-crossing point P1 and intersection point P2. Similarly, in FIG. 3, for example, ΔXnorm[i] of the segment corresponding to section 1 is the deviation of the digital values ​​between intersection point P2 and zero-crossing point P3. k[i]=θnorm[i] / ΔXnorm[i] …(2)

[0043] In the above equation (2), θnorm[i] is the deviation in mechanical angle between the start point and end point of the i-th segment, and is expressed by the following equation (3): In the below equation (3), t[i] is the time between the start point and end point of the i-th segment, t[0] is the time between the start point and end point of the 0-th segment, and t

[47] is the time between the start point and end point of the 47-th segment. In Figure 3, for example, if the segment corresponding to the 0-th segment is the 0-th segment, t[0] is the time between the zero-crossing point P1 and the intersection point P2. θnorm[i]={t[i] / (t[0]+…+t

[47] )}×360[degM] …(3)

[0044] In the above equation (1), θres[i] is a constant (the intercept of the linear function θ(Δx)) called the angle reset value of the i-th segment. When the segment number "i" is "0", the angle reset value θres[i] is expressed by the following equation (4). When the segment number "i" is any value from "1" to "47", the angle reset value θres[i] is expressed by the following equation (5). θres[i]=0[degM] …(4) θres[i]=Σ(θnorm[i-1]) …(5)

[0045] By performing the learning process described above, the processing unit 21 acquires the correspondence between pole pair numbers, section numbers, and segment numbers, characteristic data for each section, and the mechanical angle estimation formula for each segment, and stores this acquired data as learning data in the memory unit 22. Note that the characteristic data for each section refers to the magnitude relationship and positive / negative signs of the digital values ​​of the sensor signals Hu, Hv, and Hw included in each section. In addition, the normalization coefficient k[i] and angle reset value θres[i] that constitute the mechanical angle estimation formula for each segment are stored in the memory unit 22 as learning data.

[0046] Next, the angle estimation process executed by the processing unit 21 in the basic patent method will be described. The processing unit 21 acquires the sensor signals Hu, Hv, and Hw output from the magnetic sensors 11, 12, and 13. Specifically, the processing unit 21 acquires digital values ​​of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw by digitally converting each of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw at a predetermined sampling frequency using an A / D converter.

[0047] The processing unit 21 then identifies the current section number and pole pair number based on the digital values ​​of the sensor signals Hu, Hv, and Hw obtained at the current sampling timing. For example, in FIG. 3, assume that point PHu located on the waveform of the U-phase sensor signal Hu, point PHv located on the waveform of the V-phase sensor signal Hv, and point PHw located on the waveform of the W-phase sensor signal Hw are the digital values ​​of the sensor signals Hu, Hv, and Hw obtained at the current sampling timing. The processing unit 21 identifies the current section (section number) by comparing feature data, such as the magnitude relationship and positive / negative signs of the digital values ​​of points PHu, PHv, and PHw, with feature data of each section included in the learning data stored in the memory unit 22. In the example of FIG. 3, section 9 is identified as the current section. Note that a method for identifying pole pair numbers will not be described in this specification. For details on the method for identifying pole pair numbers, see Japanese Patent No. 6233532. Assume, for example, that pole pair number "2" is identified as the pole pair number at the current sampling timing.

[0048] Then, the processing unit 21 identifies the current segment number based on the identified current section number and pole pair number. For example, the processing unit 21 identifies the current segment number using the formula "segment number = 12 × pole pair number + section number." Assuming that the section number "9" is identified as the current section number and the pole pair number "2" is identified as the current pole pair number as described above, the processing unit 21 identifies the segment number "33" as the current segment number (see FIG. 2).

[0049] The processing unit 21 reads out the normalization coefficient k[i] and angle reset value θres[i] corresponding to the identified segment number "i" from the learning data stored in the memory unit 22, and calculates the estimated mechanical angle θ using the mechanical angle estimation formula expressed by the above equation (1). Here, the digital value of the sensor signal corresponding to the identified segment is used as Δx to be substituted into the mechanical angle estimation formula. For example, as described above, if segment number "33" is identified as the current segment number, the processing unit 21 reads out the normalization coefficient k

[33] and angle reset value θres

[33] from the memory unit 22, and substitutes the digital value of point PHv (see FIG. 3) into the mechanical angle estimation formula as Δx, thereby calculating the estimated mechanical angle θ at the current sampling timing.

[0050] The above is the basic procedure for estimating the mechanical angle in the basic patent method that forms the basis of the present invention. In the basic patent method, correction processing is performed on the sensor signals Hu, Hv, and Hw to improve the estimation accuracy of the mechanical angle (the accuracy of the estimated mechanical angle value θ). For example, as shown in FIG. 2, the amplitude values ​​of the sensor signals Hu, Hv, and Hw do not necessarily match. Furthermore, as shown in FIG. 4, the sensor signals Hu, Hv, and Hw may contain in-phase signals (such as DC signals and third-order harmonic signals) that are noise components. FIG. 4 shows an example of the waveforms of the sensor signals Hu, Hv, and Hw that contain in-phase signals that are noise components. In FIG. 4, the vertical axis represents the digital value, and the horizontal axis represents the electrical angle.

[0051] Therefore, when the processing unit 21 in the basic patent method acquires the digital values ​​of the sensor signals Hu, Hv, and Hw during the execution of the learning process and the angle estimation process, it first executes a first correction process to remove in-phase signals from the sensor signals Hu, Hv, and Hw based on the following equations (6), (7), and (8). Hiu0=Hu-(Hv+Hw) / 2 …(6) Hiv0 = Hv - (Hu + Hw) / 2 ... (7) Hiw0=Hw-(Hu+Hv) / 2 …(8)

[0052] In equation (6), Hiu0 is the digital value of the U-phase sensor signal obtained by performing the first correction process on the U-phase sensor signal Hu. In equation (7), Hiv0 is the digital value of the V-phase sensor signal obtained by performing the first correction process on the V-phase sensor signal Hv. In equation (8), Hiw0 is the digital value of the W-phase sensor signal obtained by performing the first correction process on the W-phase sensor signal Hw. FIG. 5 is a diagram showing an example of the waveforms of the sensor signals Hiu0, Hiv0, and Hiw0 obtained after the first correction process is performed. In FIG. 5, the vertical axis represents the digital value, and the horizontal axis represents the electrical angle.

[0053] After performing the first correction process, the processing unit 21 in the basic patent method performs a second correction process to match the amplitude values ​​of the sensor signals Hiu0, Hiv0, and Hiw0 based on the following equations (9) to (14): Hiu1(ppn)=au_max(ppn)×Hiu0(ppn)+bu…(9) Hiu1(ppn)=au_min(ppn)×Hiu0(ppn)+bu…(10) Hiv1(ppn)=av_max(ppn)×Hiv0(ppn)+bv …(11) Hiv1(ppn)=av_min(ppn)×Hiv0(ppn)+bv …(12) Hiw1(ppn)=aw_max(ppn)×Hiw0(ppn)+bw …(13) Hiw1(ppn)=aw_min(ppn)×Hiw0(ppn)+bw …(14)

[0054] The processing unit 21 performs the second correction process on the positive digital value of the U-phase sensor signal Hiu0 using the information stored in the storage unit 22, according to the above equation (9). The processing unit 21 also performs the second correction process on the negative digital value of the U-phase sensor signal Hiu0 using the information stored in the storage unit 22, according to the above equation (10). The processing unit 21 performs the second correction process on the positive digital value of the V-phase sensor signal Hiv0 using the information stored in the storage unit 22, according to the above equation (11). The processing unit 21 also performs the second correction process on the negative digital value of the V-phase sensor signal Hiv0 using the information stored in the storage unit 22, according to the above equation (12). The processing unit 21 performs the second correction process on the positive digital value of the W-phase sensor signal Hiw0 using the information stored in the storage unit 22, according to the above equation (13). The processing unit 21 also performs the second correction process on the negative digital value of the W-phase sensor signal Hiw0 using the information stored in the storage unit 22, according to the above equation (14).

[0055] In equations (9) and (10), Hiu1 is the digital value of the U-phase sensor signal obtained by performing the second correction process on the U-phase sensor signal Hiu0. In equations (11) and (12), Hiv1 is the digital value of the V-phase sensor signal obtained by performing the second correction process on the V-phase sensor signal Hiv0. In equations (13) and (14), Hiw1 is the digital value of the W-phase sensor signal obtained by performing the second correction process on the W-phase sensor signal Hiw0. FIG. 6 is a diagram showing an example of the waveforms of the sensor signals Hiu1, Hiv1, and Hiw1 obtained after the second correction process is performed. In FIG. 6, the vertical axis represents the digital value, and the horizontal axis represents the electrical angle.

[0056] In equations (9) to (14), ppn is a pole pair number ranging from 0 to 3. In equations (9), (11), and (13), au_max(ppn), av_max(ppn), and aw_max(ppn) are positive-side gain correction values ​​for the positive digital values ​​for one electrical cycle corresponding to each magnetic pole pair, which are pre-stored in the storage unit 22. In equations (10), (12), and (14), au_min(ppn), av_min(ppn), and aw_min(ppn) are negative-side gain correction values ​​for the negative digital values ​​for one electrical cycle corresponding to each magnetic pole pair, which are pre-stored in the storage unit 22. In equations (9) to (14), bu, bv, and bw are offset correction values ​​for each phase, which are pre-stored in the storage unit 22. Note that au_max(ppn), av_max(ppn), aw_max(ppn), au_min(ppn), av_min(ppn), and aw_min(ppn) are correction values ​​for each pole pair. Therefore, the number of positive-side gain correction values ​​is 12 (= 3 phases × 4 number of pole pairs). Similarly, the number of negative-side gain correction values ​​is 12.

[0057] After performing the second correction process, the processing unit 21 in the basic patent method performs a third correction process on the sensor signals Hiu1, Hiv1, and Hiw1 to linearize portions (divided signals) of the sensor signals corresponding to each segment. In Fig. 3, for example, if the segment corresponding to section 0 is segment 0, the divided signal corresponding to segment 0 is the signal of the portion of the U-phase sensor signal Hu connecting zero-cross point P1 and intersection point P2. Similarly, in Fig. 3, for example, if the segment corresponding to section 1 is segment 1, the divided signal corresponding to segment 1 is the signal of the portion of the W-phase sensor signal Hw connecting intersection point P2 and zero-cross point P3.

[0058] The processing unit 21 performs a third correction process on the sensor signals Hiu1, Hiv1, and Hiw1, changing the scale of each sensor signal by using values ​​pre-stored in the storage unit 22 as coefficients. By performing the third correction process, the approximately S-shaped shapes of the divided signals corresponding to each segment can be linearized. Here, the values ​​stored in the storage unit 22 are pre-designed values. This third correction process performs calculations using pre-designed values ​​and a correction formula such as a quadratic function, a cubic function, or a trigonometric function.

[0059] As an example, the processing unit 21 performs the third correction process on the sensor signals Hiu1, Hiv1, and Hiw1 based on the following equations (15) to (17): In the following equations (15) to (17), a and b are coefficients pre-stored in the storage unit 22. Hiu2=b×tan(a×Hiu1) …(15) HIV2=b×tan(a×HIV1) …(16) Hiw2=b×tan(a×Hiw1) …(17)

[0060] In equation (15), Hiu2 is the digital value of the U-phase sensor signal obtained by performing the third correction process on the U-phase sensor signal Hiu1. In equation (16), Hiv2 is the digital value of the V-phase sensor signal obtained by performing the third correction process on the V-phase sensor signal Hiv1. In equation (17), Hiw2 is the digital value of the W-phase sensor signal obtained by performing the third correction process on the W-phase sensor signal Hiw1. FIG. 7 is a diagram showing an example of the waveforms of the sensor signals Hiu2, Hiv2, and Hiw2 obtained after the third correction process is performed. In FIG. 7, the vertical axis represents the digital value, and the horizontal axis represents the electrical angle.

[0061] As described above, the basic patent method can reduce the common-mode noise contained in the sensor signals Hu, Hv, and Hw through the first correction process. Furthermore, the basic patent method can correct the inter-signal variation of each sensor signal through the second correction process. Here, inter-signal variation refers to, for example, variations in the amplitude and offset components of each sensor signal. Furthermore, the basic patent method can linearize the curved portions of the waveforms of each sensor signal through the third correction process. In particular, the second correction process equalizes the lengths of the portions of the sensor signals (divided signals) corresponding to the segments, making it easier to apply a uniform calculation process to all divided signals in the third correction process. Therefore, performing the second correction process before the third correction process can more effectively linearize the curved portions of the waveforms. As a result, in the basic patent method, the signal portion (divided signal) required for calculating the estimated mechanical angle θ based on the above equation (1) becomes more linear, and the difference between the estimated mechanical angle θ and the true mechanical angle (for example, the mechanical angle indicated by the output signal of an encoder attached to the rotor shaft 110) can be reduced, thereby enabling highly accurate mechanical angle estimation.

[0062] However, as a result of verification by the inventors of the present application, it was found that when each sensor signal output from the magnetic sensors 11, 12, and 13 includes not only the third harmonic signal but also in-phase signals such as the fifth harmonic signal and the seventh harmonic signal, the curved portion of the signal (divided signal) required for calculating the mechanical angle estimate value θ cannot be linearized even if the first, second, and third correction processes are performed.

[0063] FIG. 8 shows exemplary waveforms of sensor signals Hu', Hv', and Hw', which include in-phase signals such as third-, fifth-, and seventh-order harmonic signals. FIG. 9 shows exemplary waveforms of sensor signals Hiu0', Hiv0', and Hiw0' obtained after a first correction process is performed on the sensor signals Hu', Hv', and Hw'. FIG. 10 shows exemplary waveforms of sensor signals Hiu1', Hiv1', and Hiw1' obtained after a second correction process is performed on the sensor signals Hiu0', Hiv0', and Hiw0'. FIG. 11 shows exemplary waveforms of sensor signals Hiu2', Hiv2', and Hiw2' obtained after a third correction process is performed on the sensor signals Hiu1', Hiv1', and Hiw1'. In FIGS. 8 to 11, the vertical axis represents digital values, and the horizontal axis represents electrical angles.

[0064] 11, when the sensor signals output from the magnetic sensors 11, 12, and 13 include in-phase signals such as third-, fifth-, and seventh-order harmonic signals, distortion occurs in the waveforms of the sensor signals Hiu2', Hiv2', and Hiw2' obtained after the third correction process, and it is clear that the curved portions (divided signals) of the signals required for calculating the estimated mechanical angle θ cannot be linearized. Therefore, when the sensor signals output from the magnetic sensors 11, 12, and 13 include in-phase signals such as third-, fifth-, and seventh-order harmonic signals, the accuracy of the mechanical angle estimation based on the above equation (1) (the accuracy of the estimated mechanical angle θ) decreases even after the third correction process.

[0065] Figure 12 shows the results of an experiment measuring the error that occurs between the estimated mechanical angle θ calculated using equation (1) above and the true mechanical angle when a sensor magnet with one pole pair is rotated once. In Figure 12, the numbers aligned along the horizontal axis represent segment numbers. In this experiment, a sensor magnet with one pole pair is used, so one mechanical angle cycle contains only one pole pair region. In other words, one mechanical angle cycle is divided into 12 sections, and each section is assigned a segment number from "0" to "11."

[0066] 12, waveform W1 shows the result of measuring the error occurring between the mechanical angle estimate θ and the true mechanical angle using sensor signals Hiu1, Hiv1, and Hiw1 obtained after performing first and second correction processes on sensor signals Hu, Hv, and Hw. Also, in Fig. 12, waveform W2 shows the result of measuring the error occurring between the mechanical angle estimate θ and the true mechanical angle using sensor signals Hiu2, Hiv2, and Hiw2 obtained after performing first, second, and third correction processes on sensor signals Hu, Hv, and Hw.

[0067] As shown in Figure 12, for example, in segments 2, 6, and 10, the error between the estimated mechanical angle θ and the true mechanical angle was reduced to nearly zero by performing the third correction process. On the other hand, for segments 3, 7, and 11, the error between the estimated mechanical angle θ and the true mechanical angle was not significantly reduced even after performing the third correction process. Furthermore, for segments 0, 1, 4, 5, 8, and 9, the effect of the third correction process was too strong, resulting in the sign of the error between the estimated mechanical angle θ and the true mechanical angle being reversed. As these experimental results demonstrate, when using the third correction process adopted in the basic patent method, the error between the estimated mechanical angle θ and the true mechanical angle varied significantly from segment to segment due to the different degree of curvature of the divided signal for each segment.

[0068] The present invention aims to solve the technical problems inherent in the basic patent method described above, and to further reduce the angle error that occurs between the estimated mechanical angle θ and the true mechanical angle, thereby improving the accuracy of detecting the mechanical angle of a rotating shaft.

[0069] Hereinafter, the learning process and angle estimation process executed by the processing unit 21 of the angle detection device 1 in this embodiment to solve the above technical problems will be described.

[0070] First, the learning process executed by the processing unit 21 of the angle detection device 1 in this embodiment will be described. 13 is a flowchart showing a learning process executed as offline processing by the processing unit 21 of the angle detection device 1 in this embodiment. The processing unit 21 executes the learning process as offline processing to acquire learning data required for estimating the mechanical angle of the rotor shaft 110.

[0071] 13, first, sensor signals are input (step S1). In step S1, the processing unit 21 executes a first process to acquire signals output from the three magnetic sensors 11, 12, and 13 as sensor signals Hu, Hv, and Hw while rotating the sensor magnet 120 together with the rotor shaft 110 (first process). Specifically, the processing unit 21 has a built-in A / D converter, and the processing unit 21 digitally converts each of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw at a predetermined sampling frequency using the A / D converter, thereby acquiring digital values ​​of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw.

[0072] Next, intersection learning is performed (step S2). In step S2, the processing unit 21 executes a second process to extract, based on the digital values ​​of the sensor signals Hu, Hv, and Hw, intersections where two of the three sensor signals intersect with each other and zero-cross points where each of the three sensor signals intersects with a reference signal level over one mechanical angle cycle (second step), and then executes a third process to generate a linear function θ(Δx) that represents a line (segment) connecting adjacent intersections and zero-cross points, i.e., a mechanical angle estimation equation for each segment (third step).

[0073] The above-mentioned first to third processes are the same as the learning processes in the basic patent method, so detailed explanations will be omitted. Note that in this embodiment, the first, second, and third correction processes in the basic patent method are not performed on the sensor signals Hu, Hv, and Hw acquired in the first process.

[0074] By executing the first to third processes described above, the processing unit 21 acquires the correspondence between pole pair numbers, section numbers, and segment numbers, characteristic data for each section, and the mechanical angle estimation formula for each segment, and stores this acquired data as learning data in the memory unit 22. Note that the characteristic data for each section refers to the magnitude relationship and positive / negative signs of the digital values ​​of the sensor signals Hu, Hv, and Hw included in each section. In addition, the normalization coefficient k[i] and angle reset value θres[i] that constitute the mechanical angle estimation formula for each segment are stored in the memory unit 22 as learning data.

[0075] Next, the processing unit 21 searches for a point on the segment where the error between the mechanical angle estimated value θ calculated based on the mechanical angle estimation equation and the mechanical angle θe acquired from the output signal AS of the encoder 200 installed on the rotor shaft 110 is maximum, as the maximum error point, and executes a fourth process to acquire the length from the start point of the segment to the maximum error point as Δx1 (fourth step). Hereinafter, the mechanical angle θe acquired from the encoder 200 may be referred to as the true mechanical angle value.

[0076] Specifically, as shown in Fig. 14, the processing unit 21 calculates the mechanical angle estimated value θ[n] corresponding to each sampling point by substituting the digital value Δx[n] at each sampling point obtained by sampling the divided signal (magnetization waveform) W10 corresponding to the i-th segment L10 into the mechanical angle estimation equation for the i-th segment L10 (step S3). "n" represents the sampling number. That is, Δx[n] is the digital value at the n-th sampling point of the divided signal W10, and the mechanical angle estimated value θ[n] is the mechanical angle estimated value θ corresponding to the n-th sampling point. In Fig. 14, point Ps is the start point of the i-th segment L10, and point Pe is the end point of the i-th segment L10.

[0077] For example, if the number of sampling points of the divided signal W10 corresponding to the i-th segment L10 is 50, the processing of step S3 will result in 50 mechanical angle estimates θ[n] for the i-th segment L10. The processing unit 21 calculates the error θer[n] between each of the multiple mechanical angle estimates θ[n] obtained by the processing of step S3 and the true mechanical angle θe[n] obtained from the encoder 200, and obtains the largest error θer[n] among the multiple calculated errors θer[n] as the maximum error (step S4). The true mechanical angle θe[n] is the true mechanical angle θe obtained at the same sampling timing as the n-th sampling point. The error θer[n] can be calculated using the formula "θer[n] = θe[n] - θ[n]." The processing unit 21 stores the maximum error and the digital value Δx[n] from which the maximum error was obtained in the storage unit 22. Hereinafter, the digital value Δx[n] at which the maximum error value is obtained may be referred to as the maximum error obtained digital value.

[0078] 15 is a diagram showing an example of the results of calculating the error θer[n] between the multiple mechanical angle estimates θ[n] obtained for the i-th segment L10 and the true mechanical angle θe[n] obtained from the encoder 200. As shown in FIG. 15, the error θer[n] between the mechanical angle estimate θ[n] and the true mechanical angle θe[n] is zero at the start and end points of the i-th segment L10. Therefore, the curve connecting the multiple errors θer[n] obtained for the i-th segment L10 is an arched curve whose start and end points coincide. This curve of the error θer[n] can be regarded as the curve of the magnetization waveform.

[0079] After acquiring the maximum error value and the maximum error acquisition digital value of the i-th segment L10 as described above, the processing unit 21 determines whether the number of learning attempts has reached a predetermined number (step S5). If the answer to step S5 is "No," i.e., if the number of learning attempts has not reached the predetermined number, the processing unit 21 calculates a moving average value of the current and previous values ​​of the maximum error value and stores the calculated moving average value in the memory unit 22 as a new previous value of the maximum error value, and also calculates a moving average value of the current and previous values ​​of the maximum error acquisition digital value and stores the calculated moving average value in the memory unit 22 as a new previous value of the maximum error acquisition digital value (step S6). After executing step S6, the processing unit 21 returns to step S4. The number of learning attempts is incremented each time step S4 is executed.

[0080] On the other hand, if the answer to step S5 is "Yes," i.e., if the learning count has reached a predetermined number, the processing unit 21 proceeds to the next step S7. By performing the fourth processing including the processing of steps S3 to S6 described above, the processing unit 21 searches for a point on the i-th segment where the error between the estimated mechanical angle θ and the true mechanical angle θe is the maximum as the maximum error point, and obtains the length from the start point of the i-th segment to the maximum error point as Δx1. Here, Δx1 is the maximum error acquisition digital value finally stored in the storage unit 22, and the error value of the maximum error point is the maximum error value finally stored in the storage unit 22. The processing unit 21 performs the fourth processing for all 48 segments, thereby obtaining the maximum error value and maximum error acquisition digital value for each of the 48 segments. Hereinafter, the maximum error value of the i-th segment will be referred to as θerm[i], and the maximum error acquisition digital value of the i-th segment will be referred to as Δx1[i].

[0081] Next, the mechanical angle estimate θ is corrected based on a Bézier curve (step S7). As one of the processes included in step S7, the processing unit 21 first executes a fifth process (fifth step) to calculate a first curve based on the origin P1, vertex P3, and first control point P2 among points in a two-axis coordinate system with the digital value Δx as the horizontal axis and the error as the vertical axis. In this embodiment, as an example, a case will be described where the first curve is a Bézier curve. FIG. 16 is a diagram showing an example of a two-axis coordinate system with the digital value Δx as the horizontal axis (X axis) and the error as the vertical axis (Y axis). The two-axis coordinate system shown in FIG. 16 is a coordinate system corresponding to the i-th segment.

[0082] In FIG. 16, the origin P1 is a point where the digital value Δx and the error are zero. If the coordinates of the origin P1 are (P1x, P1y), then the point where (P1x, P1y) = (0, 0) is the origin P1. The vertex P3 is a point where the digital value Δx is the maximum error acquisition digital value Δx1[i] and the error is the maximum error value θerm[i]. If the coordinates of the vertex P3 are (P3x, P3y), then the point where (P3x, P3y) = (Δx1[i], θerm[i]) is the vertex P3. The first control point P2 is a point where the digital value Δx is a value between zero and the maximum error acquisition digital value Δx1[i] and the error is the maximum error value θerm[i]. In this embodiment, as an example, the initial value of Δx at the first control point P2 is half the maximum error acquisition digital value Δx1[i]. If the coordinates of the first control point P2 are (P2x, P2y), the point where (P2x, P2y) = (Δx1[i] / 2, θerm[i]) is the first control point P2. As shown in Fig. 16, of the areas included in the two-axis coordinate system, the area to the left of the vertex P3 is called the left coordinate area XL, and the area to the right of the vertex P3 is called the right coordinate area XR.

[0083] The processing unit 21 calculates a Bezier curve for the left coordinate area XL based on the origin P1, the vertex P3, and the first control point P2. Hereinafter, the Bezier curve for the left coordinate area XL may be referred to as the first Bezier curve. The coordinates (Px, Py) of a point P located on the first Bezier curve for the left coordinate area XL are expressed by the following equation (18). In the following equation (18), t is the resolution.

[0084]

number

[0085] The Y coordinate Py of point P is expressed by the following equation (19) based on equation (18). Since the Y coordinate P1y of origin P1 is zero, the following equation (20) is obtained from equation (19).

[0086]

number

[0087]

number

[0088] The X coordinate Px of point P is expressed by the following equation (21) based on equation (18): The solution of the resolution t is expressed by the following equation (22).

[0089]

number

[0090]

number

[0091] As described above, the initial value of Δx of the first control point is half the maximum error acquisition digital value Δx1[i], so P3x=2P2x. When P3x=2P2x, the resolution t is expressed by the following equation (23).

[0092]

number

[0093] By substituting equations (22) and (23) into equation (20), the Y coordinate Py of point P (the error corresponding to the digital value Δx[n]) can be calculated from the X coordinate Px (=Δx[n]) of point P. Here, Δx[n] is the digital value Δx of each sampling point obtained by sampling the divided signal corresponding to the i-th segment, as described with reference to FIG. 14. Using the above calculation method, the processing unit 21 calculates the first Bézier curve of the left coordinate region XL based on the origin P1, the vertex P3, and the first control point P2. More precisely, the processing unit 21 calculates the Y coordinates Py of multiple points P located on the first Bézier curve as errors corresponding to each digital value Δx[n] from the digital value Δx[n] of each sampling point.

[0094] Next, as one of the processes included in step S7, the processing unit 21 executes a sixth process in which, for points on the i-th segment between the start point and the maximum error point, the mechanical angle estimated value θ calculated based on the mechanical angle estimation equation for the i-th segment is corrected based on the first Bézier curve (sixth step). Specifically, the processing unit 21 calculates the mechanical angle estimated value θ corrected using the first Bézier curve by substituting the digital value Δx[n] between the start point (Δx[n] = 0) and the maximum error point (Δx[n] = Δx1[i]) of the i-th segment into the following formula (24). The following formula (24) is obtained by adding "Err1 × Δx[n]" to formula (1). Err1 is a correction value conversion coefficient for converting the digital value Δx[n] into the error (Y coordinate Py of the multiple points P located on the first Bézier curve) obtained by the fifth process. θ(Δx[n])=k[i]×Δx[n]+θres[i]+Err1×Δx[n] …(twenty four)

[0095] The above is the description of step S7, and the processing unit 21 proceeds to step S8 after completing step S7. In step S8, the processing unit 21 executes a seventh process to obtain the maximum error between the mechanical angle estimated value θ(Δx[n]) corrected by the sixth process and the true mechanical angle value θe[n] as a first maximum error (seventh step).

[0096] 17 is a diagram plotting the error between the mechanical angle estimated value θ(Δx[n]) corrected by the first Bezier curve and the true mechanical angle value θe[n] when the first control point P2 in the left coordinate area XL is at its initial value, together with points on the first Bezier curve in the left coordinate area XL, in a two-axis coordinate system. FIG. 18 is a diagram showing the error between the mechanical angle estimated value θ(Δx[n]) and the true mechanical angle value θe[n] when the first control point P2 in the left coordinate area XL is at its initial value, in correspondence with each digital value Δx[n]. As shown in FIGS. 17 and 18, when the X coordinate P2x of the first control point P2 is at its initial value (=Δx1[i] / 2), the error occurring between the mechanical angle estimated value θ(Δx[n]) corrected by the first Bezier curve and the true mechanical angle value θe[n] is quite large. The processing unit 21 acquires, as a first maximum error, the largest error in the left coordinate region XL among the errors occurring between the mechanical angle estimated value θ(Δx[n]) corrected by the first Bezier curve and the true mechanical angle value θe[n].

[0097] Next, the processing unit 21 executes an eighth process in which the value of Δx of the first control point P2 (the X coordinate P2x of the first control point P2) is changed in a direction that reduces the first maximum error acquired in the left coordinate region XL, and then the processing unit 21 returns to the fifth process a predetermined number of times (eighth step).

[0098] Specifically, after acquiring the first maximum error of the left coordinate region XL of the i-th segment as described above, the processing unit 21 determines whether the number of learning times has reached a predetermined number (step S9). If the answer to step S9 is "No," that is, if the number of learning times has not reached the predetermined number, the processing unit 21 changes the value of Δx of the first control point P2 (the X coordinate P2x of the first control point P2) in a direction that reduces the first maximum error, and then returns to step S8 (step S10). The number of learning times is incremented each time the processing of step S8 is executed.

[0099] On the other hand, if the answer is "Yes" in step S9, that is, if the number of learning times has reached the predetermined number, the processing unit 21 proceeds to the next step S11. By performing the processes of steps S7 to S10 as described above, the processing unit 21 searches for the value of Δx of the first control point P2 (the X coordinate P2x of the first control point P2) that minimizes the first maximum error in the left coordinate region XL of the i-th segment. As a search method, for example, a binary search method may be used.

[0100] 19 is a diagram plotting the error between the mechanical angle estimate θ(Δx[n]) corrected by the first Bézier curve when the first control point P2 that minimizes the first maximum error in the left coordinate area XL and the true mechanical angle θe[n] on a two-axis coordinate system together with points on the first Bézier curve in the left coordinate area XL. FIG. 20 is a diagram showing the error between the mechanical angle estimate θ(Δx[n]) corrected by the first Bézier curve when the first control point P2 that minimizes the first maximum error in the left coordinate area XL and the true mechanical angle θe[n], in correspondence with each digital value Δx[n]. As shown in FIGS. 19 and 20, when the first control point P2 that minimizes the first maximum error in the left coordinate area XL of the i-th segment is obtained, the error between the mechanical angle estimate θ(Δx[n]) corrected by the first Bézier curve and the true mechanical angle θe[n] approaches zero.

[0101] The above has been a description of the left coordinate region XL of the two-axis coordinate system corresponding to the i-th segment, but the same processing is also performed for the right coordinate region XR of the two-axis coordinate system. That is, the processing unit 21 executes a ninth process (ninth step) to calculate a second curve in the right coordinate region XR based on a vertex P3, an end point P4, and a second control point P5 located in the right coordinate region XR among points in the two-axis coordinate system with the digital value Δx on the horizontal axis and the error on the vertical axis. In this embodiment, as an example, a case where the second curve is a Bézier curve will be described.

[0102] In FIG. 16, endpoint P4 is a point where the digital value Δx corresponds to the maximum length Δxm (=ΔXnorm[i]) of the i-th segment and the error is zero. If the coordinates of endpoint P4 are (P4x, P4y), endpoint P4 is the point where (P4x, P4y) = (ΔXnorm[i], 0). Second control point P5 is a point where the digital value Δx is a value between the maximum error acquisition digital value Δx1[i] and the maximum length Δxm (=ΔXnorm[i]) of the i-th segment and the error is the maximum error value θerm[i]. In this embodiment, as an example, the initial value of Δx at second control point P5 is half the difference between the maximum error acquisition digital value Δx1[i] and the maximum length Δxm (=ΔXnorm[i]) of the i-th segment. If the coordinates of the second control point P5 are (P5x, P5y), then the point where (P5x, P5y)={(ΔXnorm[i]−Δx1[i]) / 2, θerm[i]} is the second control point P5.

[0103] The processing unit 21 calculates a Bézier curve for the right-side coordinate region XR based on the vertex P3, the end point P4, and the second control point P5. Hereinafter, the Bézier curve for the right-side coordinate region XR may be referred to as the second Bézier curve. The calculation method for the second Bézier curve for the right-side coordinate region XR is the same as the calculation method for the first Bézier curve for the left-side coordinate region XL, so a detailed description will be omitted. The processing unit 21 calculates the second Bézier curve for the right-side coordinate region XR based on the vertex P3, the end point P4, and the second control point P5 using the same calculation method as for the first Bézier curve. More precisely, the processing unit 21 calculates the Y coordinates Py of multiple points P located on the second Bézier curve as errors corresponding to each digital value Δx[n] from the digital values ​​Δx[n] of each sampling point.

[0104] Next, the processing unit 21 executes a tenth process in which, for points on the i-th segment between the end point of the i-th segment and the maximum error point, the mechanical angle estimate θ calculated based on the mechanical angle estimation equation for the i-th segment is corrected based on the second Bézier curve (tenth step). Specifically, the processing unit 21 calculates the mechanical angle estimate θ corrected using the second Bézier curve by substituting the digital value Δx[n] between the end point of the i-th segment (Δx[n] = ΔXnorm[i]) and the maximum error point (Δx[n] = Δx1[i]) into the following equation (25). The following equation (25) is obtained by adding "Err2 × Δx[n]" to equation (1). Err2 is a correction value conversion coefficient for converting the digital value Δx[n] into the error (Y coordinate Py of the multiple points P located on the second Bézier curve) obtained by the ninth process. θ(Δx[n])=k[i]×Δx[n]+θres[i]+Err2×Δx[n] …(twenty five)

[0105] The processing unit 21 executes an eleventh process to obtain the maximum error between the mechanical angle estimated value θ(Δx[n]) corrected by the above-described tenth process and the true mechanical angle value θe[n] as a second maximum error (eleventh step).

[0106] 17 is a diagram plotting the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] when the second control point P5 in the right-side coordinate region XR is at its initial value, together with points on the second Bézier curve in the right-side coordinate region XR, on a two-axis coordinate system. FIG. 18 is a diagram showing the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] when the second control point P5 in the right-side coordinate region XR is at its initial value, in correspondence with each digital value Δx[n]. As shown in FIGS. 17 and 18, when the X coordinate P5x of the second control point P5 is at its initial value, the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] is quite large. The processing unit 21 acquires the largest error in the right coordinate region XR among the errors occurring between the mechanical angle estimated value θ(Δx[n]) corrected by the second Bezier curve and the true mechanical angle value θe[n] as the second maximum error.

[0107] Next, the processing unit 21 executes a 12th process in which the value of Δx of the second control point P5 (the X coordinate P5x of the second control point P5) is changed in a direction that reduces the second maximum error acquired in the right coordinate region XR, and then the processing unit 21 returns to the 9th process a predetermined number of times (12th step).

[0108] Specifically, after acquiring the second maximum error of the right coordinate region XR of the i-th segment as described above, the processing unit 21 determines whether the number of learning attempts has reached a predetermined number (step S9). If the answer to step S9 is "No," i.e., if the number of learning attempts has not reached the predetermined number, the processing unit 21 changes the value of Δx of the second control point P5 (the X coordinate P5x of the second control point P5) in a direction that reduces the second maximum error, and then returns to step S8 (step S10). The number of learning attempts is incremented each time the processing of step S8 is executed.

[0109] On the other hand, if the answer is "Yes" in step S9, that is, if the number of learning times has reached the predetermined number, the processing unit 21 proceeds to the next step S11. By performing the processes of steps S7 to S10 as described above, the processing unit 21 searches for the value of Δx of the second control point P5 (the X coordinate P5x of the second control point P5) that minimizes the second maximum error in the right coordinate region XR of the i-th segment. As a search method, for example, a binary search method may be used.

[0110] 19 is a diagram plotting the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] when the second control point P5 that minimizes the second maximum error in the right-side coordinate region XR is used, together with points on the second Bézier curve in the right-side coordinate region XR, on a two-axis coordinate system. FIG. 20 is a diagram showing the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] when the second control point P5 that minimizes the second maximum error in the right-side coordinate region XR is used, in association with each digital value Δx[n]. As shown in FIGS. 19 and 20, when the second control point P5 that minimizes the second maximum error in the right-side coordinate region XR of the i-th segment is obtained, the error between the mechanical angle estimate θ(Δx[n]) corrected by the second Bézier curve and the true mechanical angle θe[n] approaches zero.

[0111] When the first control point P2 that minimizes the first maximum error in the left coordinate region XL and the second control point P5 that minimizes the second maximum error in the right coordinate region XR are obtained for the i-th segment through the above processing, the processing unit 21 proceeds to the next step S11. In step S11, the processing unit 21 executes a thirteenth process in which the value of Δx of the first control point P2 that minimizes the first maximum error and the value of Δx of the second control point P5 that minimizes the second maximum error are stored in the storage unit 22 as learned values ​​(thirteenth step).

[0112] Processing unit 21 performs the fifth to thirteenth processes described above for all 48 segments, thereby obtaining, for each of the 48 segments, the Δx value of first control point P2 that results in the smallest first maximum error and the Δx value of second control point P5 that results in the smallest second maximum error. As a result, when the learning process is completed, the Δx value of first control point P2 that results in the smallest first maximum error and the Δx value of second control point P5 that results in the smallest second maximum error for each of the 48 segments are stored in storage unit 22 as learned values.

[0113] Next, the angle estimation process executed by the processing unit 21 in this embodiment will be described. The processing unit 21 acquires the sensor signals Hu, Hv, and Hw output from the magnetic sensors 11, 12, and 13. Specifically, the processing unit 21 acquires digital values ​​of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw by digitally converting each of the U-phase sensor signal Hu, the V-phase sensor signal Hv, and the W-phase sensor signal Hw at a predetermined sampling frequency using an A / D converter.

[0114] The processing unit 21 then identifies the current section number and pole pair number based on the digital values ​​of the sensor signals Hu, Hv, and Hw obtained at the current sampling timing. For example, in FIG. 3, it is assumed that point PHu located on the waveform of the U-phase sensor signal Hu, point PHv located on the waveform of the V-phase sensor signal Hv, and point PHw located on the waveform of the W-phase sensor signal Hw are the digital values ​​of the sensor signals Hu, Hv, and Hw obtained at the current sampling timing. The processing unit 21 identifies the current section (section number) by comparing feature data such as the magnitude relationship and positive / negative signs of the digital values ​​of points PHu, PHv, and PHw with feature data of each section included in the learning data stored in the memory unit 22. In the example of FIG. 3, section 9 is identified as the current section. It is also assumed that pole pair number "2" is identified as the pole pair number at the current sampling timing.

[0115] Then, the processing unit 21 identifies the current segment number based on the identified current section number and pole pair number. For example, the processing unit 21 identifies the current segment number using the formula "segment number = 12 × pole pair number + section number." Assuming that the section number "9" is identified as the current section number and the pole pair number "2" is identified as the current pole pair number as described above, the processing unit 21 identifies the segment number "33" as the current segment number (see FIG. 2).

[0116] Then, the processing unit 22 reads out the normalization coefficient k[i] and the angle reset value θres[i] corresponding to the identified segment number "i" from the learning data stored in the memory unit 22, and calculates the estimated mechanical angle value θ using the mechanical angle estimation formula expressed by equation (1). Here, the digital value of the sensor signal corresponding to the identified segment is used as Δx, which is substituted into the mechanical angle estimation formula. For example, as described above, if segment number "33" is identified as the current segment number, the processing unit 21 reads out the normalization coefficient k

[33] and the angle reset value θres

[33] from the memory unit 22, and substitutes the digital value of point PHv (see FIG. 3) into equation (1) as Δx, thereby calculating the estimated mechanical angle θ corresponding to the digital value of point PHv.

[0117] Then, processing unit 21 executes a fourteenth process to correct the mechanical angle estimate θ based on the learned values ​​stored in storage unit 22 (fourteenth step). Specifically, after calculating the mechanical angle estimate θ as described above, processing unit 21 reads from storage unit 22 the learned values ​​corresponding to the identified segment number "i," i.e., the Δx value of first control point P2 that minimizes the first maximum error and the Δx value of second control point P5 that minimizes the second maximum error. Processing unit 21 then corrects the mechanical angle estimate θ using a first Bézier curve and a second Bézier curve based on the coordinates of origin P1, vertex P3, and end point P4 in addition to these first control point P2 and second control point P5. The mechanical angle estimate θ obtained after such correction using the Bézier curves has extremely high accuracy, with an error from the true mechanical angle θe that is extremely close to zero.

[0118] As already mentioned, in the basic patent method disclosed in Japanese Patent No. 6233532, if the sensor signals output from the magnetic sensors 11, 12, and 13 contain in-phase signals such as third-, fifth-, and seventh-order harmonic signals, the estimation accuracy of the mechanical angle based on the above formula (1) (accuracy of the mechanical angle estimated value θ) will decrease even if the first, second, and third correction processes are performed. In this regard, according to the present embodiment, it is possible to obtain an extremely accurate mechanical angle estimated value θ with an error from the true mechanical angle θe that is very close to zero, without performing the first, second, and third correction processes on the sensor signals output from the magnetic sensors 11, 12, and 13. Furthermore, with the third correction process employed in the basic patent method, the degree of curvature of the divided signal differs for each segment, resulting in large variations in the error that occurs between the estimated mechanical angle θ and the true mechanical angle θe for each segment. In this regard, with this embodiment, even if the degree of curvature of the divided signal differs for each segment, it is possible to obtain an extremely accurate estimated mechanical angle θ for each segment, with the error from the true mechanical angle θe being as close to zero as possible. Therefore, according to this embodiment, the technical problems inherent in the basic patent method as described above can be solved, and the angle error occurring between the estimated mechanical angle value θ and the true mechanical angle value θe can be further reduced, thereby improving the accuracy of detecting the mechanical angle of the rotating shaft.

[0119] (Variation) The present invention is not limited to the above-described embodiment, and the configurations described in this specification can be combined as appropriate within a range that does not contradict each other. For example, in the above embodiment, the first curve and the second curve are Bézier curves, but the first curve and the second curve may be B-spline curves. Alternatively, the first curve and the second curve may be any curve that can be calculated from at least three points.

[0120] In the above embodiment, the sensor magnet 120 is used as a magnet for position detection, i.e., a magnet that rotates in synchronization with the rotor shaft 110 of the motor 100, but the rotor magnet attached to the rotor of the motor 100 may also be used as a magnet for position detection. The rotor magnet is also a magnet that rotates in synchronization with the rotor shaft 110, and has multiple magnetic pole pairs.

[0121] In the above embodiment, the sensor group 10 includes three magnetic sensors 11, 12, and 13, but the number of magnetic sensors is not limited to three and may be N (N is a multiple of 3). Also, in the above embodiment, the sensor magnet 120 has four magnetic pole pairs, but the number of pole pairs of the sensor magnet 120 is not limited to four. Similarly, when a rotor magnet is used as a magnet for position detection, the number of pole pairs of the rotor magnet is not limited to four. [Explanation of symbols]

[0122] 1... Angle detection device, 10... Sensor group, 11, 12, 13... Magnetic sensor, 20... Signal processing unit, 21... Processing unit, 22... Storage unit, 100... Motor, 110... Rotor shaft, 120... Sensor magnet, 200... Encoder

Claims

1. An angle detection method for detecting a mechanical angle of a rotation shaft, comprising: a first step of acquiring, as three sensor signals, signals output from three magnetic sensors that detect a change in magnetic flux due to rotation of the rotary shaft, the three sensor signals having a phase difference of 120° in electrical angle from one another; a second step of extracting, over one mechanical angle cycle, intersection points where two of the three sensor signals intersect with each other and zero-cross points where each of the three sensor signals intersects with a reference signal level; a third step of generating a linear function θ(Δx) representing a line connecting the intersection points and the zero crossing points adjacent to each other, wherein Δx is a length from a start point of the line to an arbitrary point on the line, and θ is a mechanical angle corresponding to the arbitrary point on the line; a fourth step of searching for a point on the straight line where the error between the mechanical angle θ calculated based on the linear function θ(Δx) and the mechanical angle θe acquired from an encoder attached to the rotary shaft is maximum, as a maximum error point, and acquiring the length from the start point of the straight line to the maximum error point as Δx1; a fifth step of calculating a first curve based on an origin, a vertex, and a first control point among points in a two-axis coordinate system with the Δx as the horizontal axis and the error as the vertical axis, wherein the origin is a point where the Δx and the error are zero, the vertex is a point where the Δx is the Δx1 and the error is the maximum value, and the first control point is a point where the Δx is a value between zero and Δx1 and the error is the maximum value; a sixth step of correcting, based on the first curve, a mechanical angle θ calculated based on the linear function θ(Δx) for a point between the start point of the line and the maximum error point among a plurality of points on the line; a seventh step of determining a maximum error between the mechanical angle θ corrected in the sixth step and the mechanical angle θe as a first maximum error; an eighth step of changing the value of Δx of the first control point in a direction that reduces the first maximum error, and then returning to the fifth step a predetermined number of times; a ninth step of calculating a second curve based on the vertex, the end point, and a second control point among the points in the two-axis coordinate system, wherein the end point is a point where Δx corresponds to the maximum length Δxm of the straight line and the error is zero, and the second control point is a point where Δx is a value between Δx1 and Δxm and the error is the maximum value; a tenth step of correcting, based on the second curve, a mechanical angle θ calculated based on the linear function θ(Δx) for a point between the end point of the straight line and the maximum error point among a plurality of points on the straight line; an eleventh step of determining a maximum error between the mechanical angle θ corrected in the tenth step and the mechanical angle θe as a second maximum error; a twelfth step of changing the value of Δx of the second control point in a direction that reduces the second maximum error, and then returning to the ninth step a predetermined number of times; a thirteenth step of storing, as learned values, the value of Δx of the first control point at which the first maximum error is smallest and the value of Δx of the second control point at which the second maximum error is smallest; a fourteenth step of correcting the mechanical angle θ based on the learned value; An angle detection method comprising:

2. The angle detection method according to claim 1 , wherein the first curve and the second curve are Bezier curves or B-spline curves.

3. 3. The angle detection method according to claim 1, wherein an initial value of Δx of the first control point is half the value of Δx1.

4. The angle detection method according to claim 1 , wherein an initial value of Δx of the second control point is half the value of a difference between Δx1 and Δxm.

5. An angle detection device for detecting a mechanical angle of a rotation shaft, three magnetic sensors that detect a change in magnetic flux due to rotation of the rotary shaft; a signal processing unit that processes signals output from the three magnetic sensors; Equipped with The signal processing unit a first process for acquiring signals output from the three magnetic sensors as three sensor signals, the three sensor signals having a phase difference of 120° in electrical angle from each other; a second process of extracting, over one mechanical angle period, intersection points where two of the three sensor signals intersect with each other and zero-cross points where each of the three sensor signals intersects with a reference signal level; a third process for generating a linear function θ(Δx) representing a line connecting the intersection points and the zero crossing points adjacent to each other, wherein the Δx is a length from a start point of the line to an arbitrary point on the line, and the θ is a mechanical angle corresponding to the arbitrary point on the line; a fourth process of searching, among points on the straight line, for a point at which an error between the mechanical angle θ calculated based on the linear function θ(Δx) and the mechanical angle θe acquired from an encoder installed on the rotation shaft is maximum, as a maximum error point, and acquiring a length from the start point of the straight line to the maximum error point as Δx1; a fifth process for calculating a first curve based on an origin, a vertex, and a first control point among points in a two-axis coordinate system having the Δx as the horizontal axis and the error as the vertical axis, wherein the origin is a point where the Δx and the error are zero, the vertex is a point where the Δx is the Δx1 and the error is the maximum value, and the first control point is a point where the Δx is a value between zero and Δx1 and the error is the maximum value; a sixth process of correcting, based on the first curve, a mechanical angle θ calculated based on the linear function θ(Δx) for a point between the start point of the line and the maximum error point among a plurality of points on the line; a seventh process for determining a maximum error between the mechanical angle θ corrected by the sixth process and the mechanical angle θe as a first maximum error; an eighth process in which the value of Δx of the first control point is changed in a direction in which the first maximum error becomes smaller, and then the process returns to the fifth process and is repeated a predetermined number of times; a ninth process for calculating a second curve based on the vertices, end points, and second control points among the points in the two-axis coordinate system, wherein the end points are points where Δx corresponds to the maximum length Δxm of the straight line and the error is zero, and the second control points are points where Δx is a value between Δx1 and Δxm and the error is the maximum value; a tenth process of correcting, based on the second curve, a mechanical angle θ calculated based on the linear function θ(Δx) for a point between an end point of the straight line and the maximum error point among a plurality of points on the straight line; an eleventh process for determining a maximum error between the mechanical angle θ corrected by the tenth process and the mechanical angle θe as a second maximum error; a twelfth process in which the value of Δx of the second control point is changed in a direction in which the second maximum error is reduced, and then the process returns to the ninth process, and is repeated a predetermined number of times; a thirteenth process of storing, as learned values, the value of Δx of the first control point at which the first maximum error is smallest and the value of Δx of the second control point at which the second maximum error is smallest; a fourteenth process of correcting the mechanical angle θ based on the learned value; Angle detection device that performs the above.

6. The angle detection device according to claim 5 , wherein the first curve and the second curve are Bezier curves or B-spline curves.

7. 7. The angle detection device according to claim 5, wherein an initial value of Δx of the first control point is half the value of Δx1.

8. The angle detection device according to claim 5 , wherein an initial value of Δx of the second control point is half the value of the difference between Δx1 and Δxm.

Citation Information

Patent Citations

  • Control device for waste gas denitration

    JP1987033532A

  • Method for preparing free curve

    JP1995302355A

  • Improved phase signal formation method and device for a phase sensor located on a camshaft of an internal combustion engine

    JP2008510092A

  • Apparatus for correction of position data, encoder, motor system, and position data correction method

    JP2011196868A

  • Sensor system, sensor correction device, sensor correction method, and program

    JP2017156164A