The present invention relates to an angle detection method and an angle detection device.
Conventionally, a configuration including an absolute angle position sensor such as an optical encoder and a resolver is known as a motor capable of accurately controlling a rotational position. However, the absolute angle position sensor is large in size and high in cost. Therefore, Patent Literature 1 discloses a position estimation method of estimating a rotational position of a motor using three inexpensive and small magnetic sensors without using an absolute angle position sensor.
In the position estimation method described in Patent Literature 1, the mechanical angle of the rotation shaft can be estimated with high accuracy using three inexpensive and small magnetic sensors, but higher accuracy is sometimes required from the market.
One aspect of an angle detection method of the present invention is an angle detection method for detecting a mechanical angle of a rotation shaft, the angle detection method including: acquiring signals output from three magnetic sensors that detect a change in magnetic flux due to rotation of the rotating shaft as sensor signals, the three sensor signals having a phase difference of 120° in an electrical angle; extracting an intersection point at which two sensor signals among the three sensor signals intersect with each other and a zero-cross point at which each of the three sensor signals intersect with a reference signal level over one mechanical angle cycle; generating a linear function θ(Δx) representing a straight line connecting the intersection point and the zero-cross point adjacent to each other, wherein Δx is a length from a start point of the straight line to an arbitrary point on the straight line, and θ is a mechanical angle corresponding to an arbitrary point on the straight line; calculating, as a first angle error, a deviation between a mechanical angle θ calculated based on the linear function θ(Δx) and a mechanical angle θe acquired from an encoder installed on the rotation shaft for a plurality of points on the straight line; storing the first angle error calculated for a plurality of points on the straight line as a learned value; and generating a first angle error function for calculating a first angle error corresponding to an arbitrary point on the straight line based on the first angle error calculated for a plurality of points on the straight line.
One aspect of an angle detection device of the present invention is an angle detection device that detects a mechanical angle of a rotation shaft, the angle detection device including: three magnetic sensors configured to detect a change in magnetic flux due to rotation of the rotation shaft; and a signal processing unit configured to process signals output from the three magnetic sensors. The signal processing unit is configured to execute: acquiring signals output from the three sensor signals as sensor signals, the three sensor signals having a phase difference of 120° in an electrical angle from each other; extracting an intersection point at which two sensor signals among the three sensor signals intersect with each other and a zero-cross point at which each of the three sensor signals intersect with a reference signal level over one mechanical angle cycle; generating a linear function θ(Δx) representing a straight line connecting the intersection point and the zero-cross point adjacent to each other, wherein Δx is a length from a start point of the straight line to an arbitrary point on the straight line, and θ is a mechanical angle corresponding to an arbitrary point on the straight line; calculating, as a first angle error, a deviation between a mechanical angle θ calculated based on the linear function θ(Δx) and a mechanical angle θe acquired from an encoder installed on the rotation shaft for a plurality of points on the straight line; storing the first angle error calculated for a plurality of points on the straight line as a learned value; and generating a first angle error function for calculating a first angle error corresponding to an arbitrary point on the straight line based on the first angle error calculated for a plurality of points on the straight line.
According to the above aspect of the present invention, an angle detection method and an angle detection device capable of improving estimation accuracy (detection accuracy) of a mechanical angle of a rotation shaft are provided.
An embodiment of the present invention will be described in detail below with reference to the drawings.
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 (P is an integer of 1 or more) magnetic pole pairs. In the present embodiment, as an example, the sensor magnet 120 has four magnetic pole pairs. The magnetic pole pair means a pair of an N pole and an S pole. That is, in the present embodiment, the sensor magnet 120 has four pairs of N poles and S poles, and has a total of eight magnetic poles.
The angle detection device 1 includes a sensor group 10 and a signal processing unit 20. Although not illustrated in
The sensor group 10 includes three magnetic sensors 11, 12, and 13. On the circuit board, the magnetic sensors 11, 12, and 13 face the sensor magnet 120 and are disposed at predetermined intervals along the rotation direction of the sensor magnet 120. In the present embodiment, the magnetic sensors 11, 12, and 13 are disposed at 30° intervals along the rotation direction of the sensor magnet 120. Each of the magnetic sensors 11, 12, and 13 is an analog output type magnetic sensor including a magnetoresistive element such as a Hall element or a linear Hall IC.
When the rotor shaft 110 rotates, the sensor magnet 120 rotates in synchronization with the rotor shaft 110. Each of the three magnetic sensors 11, 12, and 13 detects a magnetic flux change due to the rotation of the rotor shaft 110, that is, the rotation of the sensor magnet 120, and outputs an analog signal indicating a detection result of the magnetic flux change to the signal processing unit 20.
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 the present 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 ¼ of one mechanical angle cycle, that is, 90° in the mechanical angle. The analog signals output from the magnetic sensors 11, 12, and 13 have a phase difference of 120° from one another in electrical angle.
Hereinafter, each analog signal output from the three magnetic sensors 11, 12, and 13 to the signal processing unit 20 is referred to as a sensor signal. In the following description, the sensor signal output from the magnetic sensor 11 may be referred to as a U-phase sensor signal Hu, the sensor signal output from the magnetic sensor 12 may be referred to as a V-phase sensor signal Hv, and the sensor signal output from the magnetic sensor 13 may be referred to as a W-phase sensor signal Hw.
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 shaft, 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.
The processing unit 21 is a microprocessor such as a microcontroller unit (MCU), for example. 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 input to the processing unit 21. The processing unit 21 is communicably connected to the storage unit 22 via a communication bus (not illustrated). The processing unit 21 executes at least the following two processing according to a program stored in the storage unit 22.
The processing unit 21 executes learning processing of acquiring learning data necessary for estimating the mechanical angle of the rotor shaft 110 as offline processing. The offline processing is processing executed before the angle detection device 1 is shipped from a manufacturing factory or before the angle detection device 1 is incorporated in a system on the customer side and is actually operated. In the learning processing, 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 an output signal AS of an encoder 200 (see
In addition, the processing unit 21 executes, as online processing, angle estimation processing of estimating a 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 processing. The online processing is processing executed when the angle detection device 1 is incorporated in a system on the customer side and is actually operated.
The storage unit 22 includes a nonvolatile memory that stores programs necessary for causing the processing unit 21 to execute various processing, various setting data, the above-described learning data, and the like, and a volatile memory used as a temporary storage destination of data when the processing unit 21 executes various processing. The nonvolatile memory is, for example, an electrically erasable programmable read-only memory (EEPROM), a flash memory, or the like. The volatile memory is, for example, a random access memory (RAM) or the like.
Hereinafter, before describing learning processing and angle estimation processing executed by the processing unit 21 of the angle detection device 1 configured as described above, a position estimation method disclosed in JP 6233532 B2 will be briefly described in order to facilitate understanding of the present invention. In the following description, the position estimation method disclosed in JP 6233532 B2 may be referred to as a basic patent method. For details of the basic patent method, refer to JP 6233532 B2. In the following, for convenience of description, the basic patent method will be described using each element illustrated in
First, learning processing executed by the processing unit 21 in the basic patent method will be described.
The processing unit 21 acquires signals output from the magnetic sensors 11, 12, and 13 as the sensor signals Hu, Hv, and Hw in a state where the sensor magnet 120 is rotated together with the rotor shaft 110. Specifically, an A/D converter is built in the processing unit 21, 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 at a predetermined sampling frequency by the A/D converter.
At the time of execution of the learning processing, the rotor shaft 110 may be rotated by controlling energization of the motor 100 via a motor control device (not illustrated). Alternatively, the rotor shaft 110 may be connected to a rotating machine not illustrated, and the rotating machine may rotate the rotor shaft 110.
Based on the digital values of the sensor signals Hu, Hv, and Hw, the processing unit 21 extracts an intersection point at which two sensor signals among the three sensor signals intersect each other and a zero-cross point at which each of the three sensor signals intersects a reference signal level over one mechanical angle cycle. The reference signal level is, for example, a ground level. When the reference signal level is the ground level, the digital value of the reference signal level is “0”.
As illustrated in
For example, a magnetic pole pair provided in a range of 0° to 90° in mechanical angle is assigned a pole pair number “0”. A magnetic pole pair provided in the range of 90° to 180° in mechanical angle is assigned a pole pair number “1”. A magnetic pole pair provided in the range of 180° to 270° in mechanical angle is assigned a pole pair number “2”. A magnetic pole pair provided in the range of 270° to 360° in mechanical angle is assigned a pole pair number “3”.
For example, in a case where the sensor signal Hu is used as a reference, the processing unit 21 recognizes the zero-cross point obtained at the sampling timing (time t1) at which the mechanical angle is 0° among the zero-cross points of the sensor signal Hu as the start point of the pole pair region associated with the pole pair number “0”. In addition, the processing unit 21 recognizes the zero-cross point obtained at the sampling timing (time t2) at which the mechanical angle is 90° among the zero-cross points of the sensor signal Hu as the end point of the pole pair region associated with the pole pair number “0”. That is, the processing unit 21 determines the interval between the zero-cross point obtained at the time t1 and the zero-cross point obtained at the time t2 as the pole pair region associated with the pole pair number “0”.
The processing unit 21 also recognizes the zero-cross point obtained at the sampling timing (time t2) at which the mechanical angle is 90° among the zero-cross points of the sensor signal Hu as the start point of the pole pair region associated with the pole pair number “1”. Further, the processing unit 21 recognizes the zero-cross point obtained at the sampling timing (time t3) having the mechanical angle of 180° among the zero-cross points of the sensor signal Hu as the end point of the pole pair region associated with the pole pair number “1”. That is, the processing unit 21 determines the interval between the zero-cross point obtained at the time t2 and the zero-cross point obtained at the time t3 as the pole pair region associated with the pole pair number “1”.
The processing unit 21 also recognizes the zero-cross point obtained at the sampling timing (time t3) at which the mechanical angle is 180° among the zero-cross points of the sensor signal Hu as the start point of the pole pair region associated with the pole pair number “2”. In addition, the processing unit 21 recognizes the zero-cross point obtained at the sampling timing (time t4) having the mechanical angle of 270° among the zero-cross points of the sensor signal Hu as the end point of the pole pair region associated with the pole pair number “2”. That is, the processing unit 21 determines the interval between the zero-cross point obtained at the time t3 and the zero-cross point obtained at the time t4 as the pole pair region associated with the pole pair number “2”.
The processing unit 21 also recognizes the zero-cross point obtained at the sampling timing (time t4) at which the mechanical angle is 270° among the zero-cross points of the sensor signal Hu as the start point of the pole pair region associated with the pole pair number “3”. In addition, the processing unit 21 recognizes the zero-cross point obtained at the sampling timing (time t5) having the mechanical angle of 360° among the zero-cross points of the sensor signal Hu as the end point of the pole pair region associated with the pole pair number “3”. That is, the processing unit 21 determines the interval between the zero-cross point obtained at time t4 and the zero-cross point obtained at time t5 as the pole pair region associated with the pole pair number “3”.
As illustrated in
In
The processing unit 21 determines the interval between the zero-cross point P1 and the intersection point P2 as a section assigned with the section number “0”. The processing unit 21 determines the interval between the intersection point P2 and the zero-cross point P3 as a section assigned with the section number “1”. The processing unit 21 determines the interval between the zero-cross point P3 and the intersection point P4 as a section assigned with the section number “2”. The processing unit 21 determines the interval between the intersection point P4 and the zero-cross point P5 as a section assigned with the section number “3”. The processing unit 21 determines the interval between the zero-cross point P5 and the intersection point P6 as a section assigned with the section number “4”. The processing unit 21 determines the interval between the intersection point P6 and the zero-cross point P7 as a section assigned with the section number “5”.
The processing unit 21 determines the interval between the zero-cross point P7 and the intersection point P8 as a section assigned with the section number “6”. The processing unit 21 determines the interval between the intersection point P8 and the zero-cross point P9 as a section assigned with the section number “7”. The processing unit 21 determines the interval between the zero-cross point P9 and the intersection point P10 as a section assigned with the section number “8”. The processing unit 21 determines the interval between the intersection point P10 and the zero-cross point P11 as a section assigned with the section number “9”. The processing unit 21 determines the interval between the zero-cross point P11 and the intersection point P12 as a section assigned with the section number “10”. The processing unit 21 determines the interval between the intersection point P12 and the zero-cross point P13 as the section assigned with the section number “11”.
Note that in the following description, for example, the section assigned with the section number “0” will be referred to as “0th section”, and the section assigned with the section number “11” will be referred to as “11th section”.
As illustrated in
As illustrated in
Note that, in the following description, for example, a segment to which the segment number “0” is assigned will be referred to as a “1st segment”, and a segment to which a segment number “11” is assigned will be referred to as a “11th segment”.
The processing unit 21 generates a linear function θ(Δx) representing each segment. Δx is a length (digital value) from the start point of the segment to any point on the segment, and θ is a mechanical angle corresponding to any point on the segment. In
For example, the linear function θ(Δx) representing the segment is expressed by the following Expression (1). In the following Expression (1), “i” is a segment number and is an integer from 0 to 47. In the following description, the linear function θ(Δx) expressed by the following Expression (1) may be referred to as a mechanical angle estimation expression, and the mechanical angle θ calculated by the following Expression (1) may be referred to as a mechanical angle estimation value.
θ(Δx)=k[i]×Δx+θres[i] (1)
In the above Expression (1), k[i] is a coefficient called a normalization coefficient. In other words, k[i] is a coefficient representing the slope of the ith segment. The normalization coefficient k[i] is expressed by the following Expression (2). In the following Expression (2), ΔXnorm[i] is a deviation of the digital value between the start point and the end point of the ith segment. In
k[i]=θnorm[i]/ΔXnorm[i] (2)
In the above Expression (2), θnorm[i] is a deviation of the mechanical angle between the start point and the end point of the ith segment, and is expressed by the following Expression (3). In the following Expression (3), t[i] is the time between the start point and the end point of the ith segment, t[0] is the time between the start point and the end point of the 0th segment, and t[47] is the time between the start point and the end point of the 47th segment. In
θnorm[i]={t[i]/(t[0]+. . . +t[47])}×360 [degM] (3)
In the above Expression (1), θres[i] is a constant called an angle reset value of the ith segment (an intercept of the linear function θ(Δx)). When the segment number “i” is “0”, the angle reset value θres[i] is expressed by the following Expression (4). When the segment number “i” is any one of “1” to “47”, the angle reset value θres[i] is expressed by the following Expression (5). Instead of obtaining θnorm[i] from t[i] as described above, θnorm[i] may be obtained from the mechanical angle true value (mechanical angle indicated, for example, by an output signal of an encoder attached to the rotor shaft 110).
θres[i]=0 [degM] (4)
θres[i]=Σ(θnorm[i−1]) (5)
By performing the learning processing as described above, the processing unit 21 acquires the correspondence relationship among the pole pair number, the section number, and the segment number, the feature data of each section, and the mechanical angle estimation expression of each segment, and stores the acquired data in the storage unit 22 as learning data. Note that the feature data of each section is a magnitude relationship among the digital values of the sensor signals Hu, Hv, and Hw included in each section, positive and negative signs, and the like. In addition, the normalization coefficient k[i] and the angle reset value θres[i] constituting the mechanical angle estimation expression of each segment are stored in the storage unit 22 as learning data.
Next, angle estimation processing 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 the 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 by the A/D converter.
Then, the processing unit 21 specifies 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
Then, the processing unit 21 specifies the current segment number based on the specified current section number and pole pair number. For example, the processing unit 21 specifies the current segment number by an expression of “segment number=12×pole pair number+section number”. As described above, it is assumed that a section number “9” is specified as the current section number, and a pole pair number “2” is specified as the current pole pair number. In this case, the processing unit 21 specifies the segment number “33” as the current segment number (see
The processing unit 21 reads the normalization coefficient k[i] and the angle reset value θres[i] corresponding to the specified segment number “i” from the learning data stored in the storage unit 22, and calculates the mechanical angle estimation value θ by the mechanical angle estimation expression represented by the above Expression (1). Here, the digital value of the sensor signal corresponding to the specified segment is used as Δx to be substituted into the mechanical angle estimation expression. For example, as described above, when the segment number “33” is specified as the current segment number, the processing unit 21 reads the normalization coefficient k[33] and the angle reset value θres[33] from the storage unit 22, and substitutes the digital value (see
The above is the basic procedure for estimating the mechanical angle in the basic patent method on which the present invention is based.
In the basic patent method, correction processing of the sensor signals Hu, Hv, and Hw is performed in order to improve the estimation accuracy of the mechanical angle (accuracy of the mechanical angle estimation value θ). For example, as illustrated in
Therefore, when acquiring the digital values of the sensor signals Hu, Hv, and Hw at the time of execution of the learning processing and the angle estimation processing, the processing unit 21 in the basic patent method first executes the first correction processing for removing the in-phase signals from the sensor signals Hu, Hv, and Hw based on the following Expressions (6), (7), and (8).
Hiu0=Hu−(Hv+Hw)/2 (6)
Hiv0=Hv−(Hu+Hw)/2 (7)
Hiw0=Hw−(Hu+Hv)/2 (8)
In Expression (6), Hiu0 is a digital value of the U-phase sensor signal obtained by performing the first correction processing on the U-phase sensor signal Hu. In Expression (7), Hiv0 is a digital value of the V-phase sensor signal obtained by performing the first correction processing on the V-phase sensor signal Hv. In Expression (8), Hiw0 is a digital value of the W-phase sensor signal obtained by performing the first correction processing on the W-phase sensor signal Hw.
After executing the first correction processing, the processing unit 21 in the basic patent method executes the second correction processing for matching the amplitude values with respect to the sensor signals Hiu0, Hiv0, and Hiw0 based on the following Expressions (9) to (14).
Hiu1(ppn)=au_max(ppn)×Hiu1(ppn)+bu (9)
Hiu1(ppn)=au_min(ppn)×Hiu1(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)
The processing unit 21 performs the second correction processing on the positive digital value of the U-phase sensor signal Hiu0 by the above Expression (9) using the information stored in the storage unit 22. Furthermore, the processing unit 21 performs the second correction processing on the negative digital value of the U-phase sensor signal Hiu0 by the above Expression (10) using the information stored in the storage unit 22.
The processing unit 21 performs the second correction processing on the positive digital value of the V-phase sensor signal Hiv0 by the above Expression (11) using the information stored in the storage unit 22. Furthermore, the processing unit 21 performs the second correction processing on the negative digital value of the V-phase sensor signal Hiv0 by the above Expression (12) using the information stored in the storage unit 22.
The processing unit 21 performs the second correction processing on the positive digital value of the W-phase sensor signal Hiw0 by the above Expression (13) using the information stored in the storage unit 22. Furthermore, the processing unit 21 performs the second correction processing on the negative digital value of the W-phase sensor signal Hiw0 by the above Expression (14) using the information stored in the storage unit 22.
In Expressions (9) and (10), Hiu1 is a digital value of the U-phase sensor signal obtained by performing the second correction processing on the U-phase sensor signal Hiu0. In Expressions (11) and (12), Hiv1 is a digital value of the V-phase sensor signal obtained by performing the second correction processing on the V-phase sensor signal Hiv0. In Expressions (13) and (14), Hiw1 is a digital value of the W-phase sensor signal obtained by performing the second correction processing on the W-phase sensor signal Hiw0.
In Expressions (9) to (14), ppn is the pole pair number from 0 to 3. In Expressions (9), (11), and (13), each of au_max(ppn), av_max(ppn), and aw_max(ppn) is a positive-side gain correction value for a positive digital value of one electrical angle cycle corresponding to each magnetic pole pair stored in the storage unit 22 in advance. In Expressions (10), (12), and (14), each of au_min(ppn), av_min(ppn), and aw_min(ppn) is a negative-side gain correction value for a negative-side digital value of one electrical angle cycle corresponding to each magnetic pole pair stored in advance in the storage unit 22. In Expressions (9) to (14), bu, by, and bw each are the offset correction values of the phases 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) each are correction values for each pole pair. Therefore, the number of positive-side gain correction values is 12 (=3 phases x 4 pole logarithms). Similarly, the number of negative-side gain correction values is 12.
After executing the second correction processing, the processing unit 21 in the basic patent method executes third correction processing for linearizing a part (divided signal) of the sensor signal corresponding to each segment with respect to the sensor signals Hiu1, Hiv1, and Hiw1. In
The processing unit 21 performs the third correction processing for changing the scale of each sensor signal by using a value stored in advance in the storage unit 22 as a coefficient on the sensor signals Hiu1, Hiv1, and Hiw1. By performing the third correction processing, the substantially S-shaped shape of the divided signal corresponding to each segment can be linearized. Here, the value stored in the storage unit 22 is a value designed in advance. In the third correction processing, calculation processing is performed by a correction formula such as a quadratic function, a cubic function, or a trigonometric function using a value designed in advance.
As an example, the processing unit 21 executes the third correction processing on the sensor signals Hiu1, Hiv1, and Hiw1 based on the following Expressions (15) to (17). In the following Expressions (15) to (17), a and b are coefficients stored in the storage unit 22 in advance.
Hiu2=b×tan(a×Hiu1) (15)
Hiv2=b×tan(a×Hiv1) (16)
Hiw2=b×tan(a×Hiw1) (17)
In Expression (15), Hiu2 is a digital value of the U-phase sensor signal obtained by performing the third correction processing on the U-phase sensor signal Hiu1. In Expression (16), Hiv2 is a digital value of the V-phase sensor signal obtained by performing the third correction processing on the V-phase sensor signal Hiv1. In Expression (17), Hiw2 is a digital value of the W-phase sensor signal obtained by performing the third correction processing on the W-phase sensor signal Hiw1.
As described above, in the basic patent method, the in-phase noise included in the sensor signals Hu, Hv, and Hw can be reduced by the first correction processing. In addition, in the basic patent method, the mutual variation of each sensor signal can be corrected by the second correction processing. Here, the mutual variation is, for example, a variation in an amplitude value and an offset component of each sensor signal. Further, in the basic patent method, the curve portion of the waveform of each sensor signal can be linearized by the third correction processing. In particular, since the length of a part (divided signal) of the sensor signal corresponding to the segment is made uniform by performing the second correction processing, it is easy to apply uniform calculation processing to all the divided signals in the third correction processing. Therefore, by performing the second correction processing before the third correction processing, the curved portion of the waveform can be further linearized.
As a result, in the basic patent method, the signal portion (divided signal) necessary for the calculation of the mechanical angle estimation value θ based on the above Expression (1) is further linearized, and the difference between the mechanical angle estimation value θ and the mechanical angle true value (mechanical angle indicated, for example, by an output signal of an encoder attached to the rotor shaft 110) can be reduced, so that highly accurate mechanical angle estimation can be performed.
As illustrated in
As illustrated in
An object of the present invention is to further reduce the angle error between the mechanical angle estimation value θ and the mechanical angle true value as compared with the basic patent method described above, thereby achieving improvement in the mechanical angle detection accuracy of the rotation shaft.
Hereinafter, in order to solve the above technical problems, learning processing and angle estimation processing executed by the processing unit 21 of the angle detection device 1 according to the present embodiment will be described.
First, learning processing executed by the processing unit 21 of the angle detection device 1 according to the present embodiment will be described.
As illustrated in
Subsequently, based on the digital values of the sensor signals Hu, Hv, and Hw, the processing unit 21 extracts an intersection point at which two sensor signals among the three sensor signals intersect each other and a zero-cross point at which each of the three sensor signals intersects a reference signal level over one mechanical angle cycle (step S2). Then, the processing unit 21 generates a linear function θ(Δx) representing a straight line (segment) connecting the intersection point and the zero-cross point adjacent to each other, that is, a mechanical angle estimation expression of each segment (step S3).
Since the processing from step S1 to step S3 is the same as the learning processing in the basic patent method, detailed description thereof will be omitted. Note that the first correction processing, the second correction processing, and the third correction processing in the basic patent method may be performed on the sensor signals Hu, Hv, and Hw acquired in step S1, and the processing in and after step S2 may be performed based on the sensor signals Hiu2, Hiv2, and Hiw2 obtained after the third correction processing is performed.
By executing the processing from step S1 to step S3, the processing unit 21 acquires the correspondence relationship among the pole pair number, the section number, and the segment number, the feature data of each section, and the mechanical angle estimation expression of each segment, and stores the acquired data in the storage unit 22 as learning data. Note that the feature data of each section is a magnitude relationship among the digital values of the sensor signals Hu, Hv, and Hw included in each section, positive and negative signs, and the like. In addition, the normalization coefficient k[i] and the angle reset value θres[i] constituting the mechanical angle estimation expression of each segment are stored in the storage unit 22 as learning data.
Subsequently, the processing unit 21 calculates, as a first angle error, a deviation between the mechanical angle estimation value θ calculated based on the mechanical angle estimation expression and the mechanical angle θe acquired from the output signal AS of the encoder 200 installed on the rotor shaft 110 for a plurality of points on the segment (step S4). Hereinafter, the mechanical angle θe acquired from the encoder 200 may be referred to as a mechanical angle true value. As an example, as illustrated in
In
The processing unit 21 calculates the mechanical angle estimation value θ corresponding to the kth attention point by substituting “k×ΔXnorm[i]/8” into Δx of the above Expression (1), and calculates a deviation between the mechanical angle true value θe obtained from the encoder 200 at the same sampling timing as the kth attention point and the calculated mechanical angle estimation value θ as a first angle error θerrk. In
Since the 8 first angle errors θerr are obtained for each of the 12 segments included in one pole pair region by executing the processing in step S4 as described above, a total of 96 first angle errors θerr are obtained for one pole pair region as illustrated in
Subsequently, the processing unit 21 generates, for each segment, a first angle error function for calculating the first angle error θerr corresponding to an arbitrary point on the segment based on the first angle errors θerr calculated for the nine attention points on the segment (step S6). The first angle error function is expressed by the following Expression (18). In the following Expression (18), “x” has the same meaning as Δx, and is a length (digital value) from the start point of the ith segment to an arbitrary point (see
Subsequently, the processing unit 21 calculates, as a second angle error, a deviation between a value obtained by subtracting a first angle error θer1 calculated based on the first angle error function expressed by the above Expression (18) from the mechanical angle estimation value θ calculated based on the mechanical angle estimation expression for a plurality of points on the segment and the mechanical angle true value θe acquired from the encoder 200 (step S7). The plurality of points on the segment used in step S7 may be the same as or different from the nine attention points used in step S4. With the processing in step S7, it is possible to further learn the angle error (second angle error) in the state of using the first angle error obtained in step S4. For each segment, the processing unit 21 stores the second angle error calculated for the plurality of points on the segment in the storage unit 22 as a learned value (step S8).
Finally, the processing unit 21 generates, for each segment, a second angle error function for calculating a second angle error corresponding to an arbitrary point on the segment based on the second angle error calculated for a plurality of points on the segment (step S9). The second angle error function is expressed by the same expression as the above Expression (18).
The processing unit 21 acquires the correspondence relationship among the pole pair number, the section number, and the segment number, the feature data of each section, and the mechanical angle estimation expression of each segment by performing the processing from step S1 to step S3 in the learning processing as described above, and stores the acquired data in the storage unit 22 as learning data. In addition, the processing unit 21 generates a first angle error function for calculating a first angle error corresponding to an arbitrary point on each segment and a second angle error function for calculating a second angle error corresponding to an arbitrary point on each segment by performing the processing from step S4 to step S9 in the learning processing as described above, and stores each learned value necessary for the generation in the storage unit 22 as learning data.
Next, angle estimation processing executed by the processing unit 21 in the present 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 the 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 by the A/D converter.
Then, the processing unit 21 specifies 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
Then, the processing unit 21 specifies the current segment number based on the specified current section number and pole pair number. For example, the processing unit 21 specifies the current segment number by an expression of “segment number=12×pole pair number+section number”. As described above, it is assumed that a section number “9” is specified as the current section number, and a pole pair number “2” is specified as the current pole pair number. In this case, the processing unit 21 specifies the segment number “33” as the current segment number (see
The processing unit 21 reads the normalization coefficient k[i] and the angle reset value θres[i] corresponding to the specified segment number “i” from the learning data stored in the storage unit 22, and calculates the mechanical angle estimation value θ by the mechanical angle estimation expression represented by the following Expression (19). Here, the digital value of the sensor signal corresponding to the specified segment is used as Δx to be substituted into the mechanical angle estimation expression. In Expression (19), θer1 is a first angle error obtained by substituting Δx into the first angle error function obtained by the learning processing, and θer2 is a second angle error obtained by substituting Δx into the second angle error function obtained by the learning processing.
θ(Δx)=k[i]×Δx+θres[i]−(θer1+6er2) (19)
For example, as described above, when the segment number “33” is specified as the current segment number, the processing unit 21 reads the normalization coefficient k[33] and the angle reset value θres[33] from the storage unit 22, calculates the first angle error θer1 and the second angle error θer2 corresponding to the digital value of the point PHv by substituting the digital value of the point PHv (see
0(Δx)=k[i]×Δx+θres[i]−θer1 (20)
As illustrated in
From these results, according to the present invention, it is possible to reduce the angle error as compared with the basic patent method.
As described above, the angle detection device 1 according to the present embodiment includes the three magnetic sensors 11, 12, and 13 that detect magnetic flux changes due to the rotation of the rotor shaft 110, and the signal processing unit 20 that processes signals output from the three magnetic sensors. The processing unit 21 of the signal processing unit 20 executes a process of acquiring signals output from three sensor signals as the sensor signals Hu, Hv, and Hw, where the three sensor signals Hu, Hv, and Hw have a phase difference of 120° in electrical angle from each other (step S1), a process of extracting an intersection point at which two sensor signals among the three sensor signals Hu, Hv, and Hw intersect each other and a zero-cross point at which each of the three sensor signals Hu, Hv, and Hw intersects a reference signal level over one mechanical angle cycle (step S2), and a process of generating a linear function θ(Δx) representing a straight line (segment) connecting the intersection points adjacent to each other and the zero-cross point, where Δx is a length from a start point of the segment to an arbitrary point on the segment, and θ is a mechanical angle corresponding to an arbitrary point on the segment (step S3), a process of calculating a deviation between the mechanical angle θ calculated based on the linear function θ(Δx) and the mechanical angle θe acquired from the encoder 200 installed in the rotor shaft 110 for a plurality of points on the segment as a first angle error (step S4), a process of storing the first angle error calculated for the plurality of points on the segment as a learned value (step S5), and a process of generating a first angle error function for calculating a first angle error corresponding to an arbitrary point on the segment based on the first angle error calculated for the plurality of points on the segment (step S6).
According to the present embodiment as described above, as compared with the basic patent method disclosed in JP 6233532 B2, the angle error between the mechanical angle estimation value θ and the mechanical angle true value θe can be further reduced, and accordingly, the detection accuracy of the mechanical angle of the rotation shaft can be improved.
In the present embodiment, the processing unit 21 further has: a process of calculating, as a second angle error, a deviation between a value obtained by subtracting the first angle error calculated based on the first angle error function from the mechanical angle θ calculated based on the linear function θ(Δx) for a plurality of points on the segment and the mechanical angle θe acquired from the encoder 200 (step S7); a process of storing, as a learned value, the second angle error calculated for the plurality of points on the segment (step S8); and a process of generating a second angle error function for calculating a second angle error corresponding to an arbitrary point on the segment based on the second angle error calculated for the plurality of points on the segment (step S9).
According to this, since the mechanical angle estimation value θ is corrected using both the first angle error and the second angle error, the angle error between the mechanical angle estimation value θ and the mechanical angle true value θe can be further reduced as compared with the case where the mechanical angle estimation value θ is corrected using only the first angle error.
In the present embodiment, the intervals between the plurality of points on the segment are equal intervals.
According to this, for example, the first angle error and the second angle error at an arbitrary point on the segment can be accurately calculated by the linear interpolation expression as expressed by Expression (18), and the accuracy of the mechanical angle estimation value θ can be improved by correcting the mechanical angle estimation value θ using at least one of the first angle error and the second angle error.
The present invention is not limited to the above embodiments, and the configurations described in the present description can be appropriately combined within a range not conflicting with one another.
For example, in the embodiment described above, the case where the mechanical angle estimation value θ is corrected by Expression (19) using both the first angle error and the second angle error has been exemplified. However, even when the mechanical angle estimation value θ is corrected using only the first angle error (when Expression (20) is used), there is no large difference in the angle error between the mechanical angle estimation value θ and the mechanical angle true value θe. Therefore, the mechanical angle estimation value θ may be corrected by Expression (20) using only the first angle error. In this case, among the learning processing illustrated in
In the above embodiment, the case has been exemplified where the processing unit 21 calculates the deviation between the mechanical angle estimation value θ and the mechanical angle true value θe as the first angle error θerr for the nine attention points on the segment. However, the number of attention points arranged on the segment is not limited to nine. In the above embodiment, the segment is equally divided into eight by the nine attention points disposed at equal intervals. However, the intervals between the plurality of attention points disposed on the segment may not be equal intervals. The number of divisions of the segment is not limited to eight.
In the above embodiment, the case where the sensor magnet 120 is used as a magnet for position detection, that is, a magnet that rotates in synchronization with the rotor shaft 110 of the motor 100 has been exemplified. However, the rotor magnet attached to the rotor of the motor 100 may 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 a plurality of magnetic pole pairs.
In the above embodiment, the case where the sensor group 10 includes the three magnetic sensors 11, 12, and 13 has been exemplified, but the number of magnetic sensors is not limited to three and may be N (N is a multiple of 3). Further, in the above embodiment, the case where the sensor magnet 120 has four magnetic pole pairs has been exemplified, but the number of pole pairs of the sensor magnet 120 is not limited to four. Similarly, when the rotor magnet is used as a magnet for position detection, the number of pole pairs of the rotor magnet is not limited to four.
Number | Date | Country | Kind |
---|---|---|---|
2021-090841 | May 2021 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2022/010670 | 3/10/2022 | WO |