The present invention relates to a device that controls a motor and a method for calculating a magnetic pole position of the motor.
Conventionally, in a motor control device that controls a synchronous motor using a permanent magnet as a magnetic pole, a magnetic pole position of the motor is calculated on the basis of an angle signal output from an angle sensor such as a resolver attached to the motor, and the motor is controlled on the basis of the calculation result. Accurate calculation of the magnetic pole position of the motor leads to improvement of output torque accuracy of the motor, and thus, leads to suppression of vehicle vibration in a motor mounted on an electric vehicle, for example. Therefore, a technique enabling calculation of a magnetic pole position of a motor with high accuracy is required.
In general, a calculation result of a magnetic pole position based on an angle signal includes an offset error that always occurs with respect to a true value, and a periodic error that periodically occurs according to rotation of the motor. Among these errors, while an offset error can be easily corrected by a known method, it may be difficult to correct a periodic error. In particular, while a phase difference between a sine wave signal (sine signal) and a cosine wave signal (cosine signal) output from an angle sensor is ideally 90 degrees, deviation of this phase difference from 90 degrees leads to occurrence of a periodic error that is difficult to correct in the calculation result of the magnetic pole position of the motor. As a result, a periodic error also occurs in a calculated value of the number of motor revolutions, and fluctuation may be induced in an output torque of the motor.
For improving calculation accuracy of a magnetic pole position of a motor, for example, a technique described in PTL 1 is known. PTL 1 describes a device that corrects a sine signal and a cosine signal output from a magnetic sensor according to a rotation angle of a rotation body on the basis of magnetic sensor correction information set in advance such that a value of the sine signal or the cosine signal approaches a value of a reference sine signal or cosine signal of the magnetic sensor.
In the technique described in Patent Literature 1, when a difference between the value of the sine signal or the cosine signal output from the magnetic sensor and the value of the reference sine signal or cosine signal is large, a correction amount becomes so large that a corrected sine signal or cosine signal may deviate greatly from an original value. In this case, since a magnetic pole position of the motor calculated from the corrected sine signal and cosine signal largely deviates from an original magnetic pole position, the magnetic pole position of the motor cannot be calculated with high accuracy.
A motor control device according to the present invention is connected to an angle sensor that outputs a sine wave signal and a cosine wave signal that change according to a magnetic pole position of a motor, and that calculates the magnetic pole position on the basis of the sine wave signal and the cosine wave signal output from the angle sensor to control the motor using the magnetic pole position, the motor control device including: a phase difference calculation unit that calculates a difference between phases of the sine wave signal and the cosine wave signal; and a phase change unit that changes and corrects the phases of the sine wave signal and the cosine wave signal, respectively, by the same amount so that the phase difference being corrected becomes 90 degrees in terms of an electrical angle on the basis of the phase difference calculated by the phase difference calculation unit.
A magnetic pole position calculation method according to the present invention is a method for calculating a magnetic pole position of a motor on the basis of a sine wave signal and a cosine wave signal that change according to the magnetic pole position, the method including the steps of: calculating a difference between phases of the sine wave signal and the cosine wave signal; changing and correcting the phases of the sine wave signal and the cosine wave signal, respectively, by the same amount so that the phase difference being corrected becomes 90 degrees in terms of an electrical angle on the basis of the phase difference calculated; and calculating the magnetic pole position on the basis of the sine wave signal and the cosine wave signal whose phases have been corrected.
According to the present invention, a magnetic pole position of a motor can be calculated with high accuracy.
In the following, an embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, an example of application to a motor drive system used while being mounted on an electric vehicle such as an electric car or a hybrid car will be described.
The motor control device 100 calculates a torque command value corresponding to a target torque required of the motor 300 by a vehicle, and generates a semiconductor switch signal for controlling operation of a plurality of semiconductor switch elements 201 included in the inverter 200 on the basis of the torque command value. Then, by outputting the generated semiconductor switch signal to the inverter 200, the motor control device controls the operation of each semiconductor switch element 201 of the inverter 200 to control the motor 300. Details of the motor control device 100 will be described later.
The inverter 200 has an inverter circuit including a plurality of semiconductor switch elements 201, a gate drive circuit 202, a smoothing capacitor 203, and a current sensor 204. The gate drive circuit 202 generates a gate drive signal for controlling each semiconductor switch element 201 of the inverter circuit on the basis of the semiconductor switch signal input from the motor control device 100, and outputs the gate drive signal to each semiconductor switch element 201. The inverter circuit is provided with the semiconductor switch elements 201 corresponding to upper arms and lower arms of a U phase, a V phase, and a W phase, respectively, in which each semiconductor switch element 201 is switched at predetermined timing according to the gate drive signal input from the gate drive circuit 202 to convert direct current power supplied from the high voltage battery 400 into three-phase alternating current power and output the converted power to the motor 300.
The smoothing capacitor 203 smooths the direct current power supplied from the high voltage battery 400 to the inverter 200. The current sensor 204 detects an alternating current flowing from the inverter 200 to each phase of the motor 300, and outputs a current detection signal corresponding to a magnitude of the current of each phase to the motor control device 100.
The motor 300 is a synchronous motor rotationally driven by supply of the three-phase alternating current power from the inverter 200, and is electrically connected to the inverter 200. The motor 300 has an angle sensor 301, a rotor 302, and a stator 303. When the three-phase alternating current power input from the inverter 200 is applied to each of three-phase armature coils provided in the stator 303, the three-phase alternating current flows in the motor 300, so that an armature magnetic flux is generated in each phase armature coil. An attraction force and a repulsive force are generated between the armature magnetic flux of each armature coil and a magnet magnetic flux of a permanent magnet arranged in the rotor 302, whereby a torque is generated in the rotor 302, and the rotor 302 is rotationally driven.
The angle sensor 301 outputs a sine wave signal and a cosine wave signal that change according to a magnetic pole position of the motor 300, i.e., a rotation angle of the rotor 302, to the motor control device 100 connected to the angle sensor 301. Note that for the angle sensor 301, for example, a resolver including an iron core and a winding can be used. Alternatively, a magnetoresistive element such as a GMR element, a Hall element, or the like can be used as the angle sensor 301.
The high voltage battery 400 is a direct current power source, and is electrically connected to the inverter 200. The direct current power stored in the high voltage battery 400 is converted into the three-phase alternating current power of variable voltage and variable frequency by the inverter 200 on the basis of the semiconductor switch signal output from the motor control device 100, and is supplied to the motor 300.
The motor control device 100 has functional blocks of a phase difference calculation unit 101, a phase change unit 102, an angle calculation unit 103, a number of revolutions calculation unit 104, a torque command value calculation unit 105, and a semiconductor switch signal calculation unit 106. The motor control device 100 includes, for example, a microcomputer, and can implement these functional blocks by executing a predetermined program in the microcomputer. Alternatively, some or all of these functional blocks may be realized using a hardware circuit such as a logic IC or an FPGA.
The phase difference calculation unit 101 calculates a phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301. Details of a phase difference calculation method by the phase difference calculation unit 101 will be described later.
The phase change unit 102 corrects the phases of the sine wave signal and the cosine wave signal on the basis of the phase difference between the sine wave signal and the cosine wave signal calculated by the phase difference calculation unit 101. Details of a method for correcting the phases of the sine wave signal and the cosine wave signal by the phase change unit 102 will be described later.
The angle calculation unit 103 calculates a magnetic pole position of the motor 300 on the basis of the sine wave signal and the cosine wave signal whose phases have been corrected by the phase change unit 102. Here, for example, the magnetic pole position of the motor 300 can be calculated from the corrected phases of the sine wave signal and the cosine wave signal by a known calculation formula using a trigonometric function.
The number of revolutions calculation unit 104 calculates the number of revolutions (rotation speed) of the motor 300 by measuring a change amount per unit time of the magnetic pole position calculated by the angle calculation unit 103.
The torque command value calculation unit 105 calculates a torque command value for the motor 300 on the basis of the target torque of the motor 300 input from a host control device (not illustrated).
The semiconductor switch signal calculation unit 106 calculates a semiconductor switch signal for each semiconductor switch element 201 on the basis of the torque command value calculated by the torque command value calculation unit 105, the magnetic pole position and the revolution of the motor 300 calculated by the angle calculation unit 103 and the number of revolutions calculation unit 104, respectively, and the current detection signal input from the current sensor 204. The semiconductor switch signal calculation unit 106 can generate, as a semiconductor switch signal, a three-phase pulse train signal having a pulse width corresponding to the three-phase alternating current power to be output to the motor 300, for example, by performing known PWM calculation.
The semiconductor switch signal calculated by the semiconductor switch signal calculation unit 106 is output from the motor control device 100 to the inverter 200. In the inverter 200, the gate drive signal is generated by the gate drive circuit 202 on the basis of this semiconductor switch signal, so that the operation of each semiconductor switch element 201 is controlled to perform conversion from the direct current power to the three-phase alternating current power. Thus, the drive of the motor 300 is controlled in the motor drive system.
Next, details of the phase difference calculation unit 101 and the phase change unit 102 in the motor control device 100 will be described below with reference to
A graph 21 illustrated in the upper left of
When the drive control of the motor 300 is performed according to the semiconductor switch signal generated by the semiconductor switch signal calculation unit 106 on the basis of the above calculation results, a fluctuating torque that is not included in the torque command value may be generated in the motor 300 as illustrated in a graph 24 of
On the other hand, in the motor drive system of the present embodiment, the phase difference calculation unit 101 and the phase change unit 102 are provided in the motor control device 100, and the phases of the sine wave signal and the cosine wave signal are corrected using these units so that the phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301 becomes 90 degrees. The angle calculation unit 103 calculates a magnetic pole position of the motor 300 using the sine wave signal and the cosine wave signal whose phases have been corrected. This prevents generation of a fluctuating error as shown in the graph 22, thereby suppressing generation of torque fluctuation in the motor 300.
In the motor control device 100, the phase difference calculation unit 101 detects a zero cross point for each of the sine wave signal and the cosine wave signal output from the angle sensor 301. The zero cross point is a point at which an amplitude of the sine wave signal or the cosine wave signal indicates zero, i.e., a point at which a signal voltage crosses zero and changes from positive to negative or from negative to positive. The phase difference calculation unit 101 can calculate a phase difference between the sine wave signal and the cosine wave signal on the basis of an interval between the respective detected zero cross points.
For example, as illustrated in
Therefore, the phase difference calculation unit 101 can calculate a phase difference θdiff between the sine wave signal and the cosine wave signal by the following Formula (1).
The phase difference calculation unit 101 can obtain these signal periods from the intervals between the zero cross points detected for the sine wave signal and the cosine wave signal. Then, when a difference between the signal periods is within a predetermined threshold, the number of revolutions of the motor 300 can be regarded as constant. Therefore, the phase difference calculation unit 101 observes periods of the sine wave signal and the cosine wave signal input from the angle sensor 301, and when the difference is within the predetermined threshold, the phase difference calculation unit can calculate the phase difference using Formula (1) on the basis of the interval between the respective zero cross points detected from the sine wave signal and the cosine wave signal.
Note that the phase difference calculation unit 101 may calculate the phase difference between the sine wave signal and the cosine wave signal by a method other than the above. Any calculation method can be used as long as a phase difference between the sine wave signal and the cosine wave signal can be appropriately obtained.
In the motor control device 100, on the basis of the phase difference between the sine wave signal and the cosine wave signal calculated by the phase difference calculation unit 101, the phase change unit 102 changes and corrects the phases of the sine wave signal and the cosine wave signal, respectively, by the same amount so that the corrected phase difference becomes 90 degrees in terms of an electrical angle. Specifically, the phases of the sine wave signal and the cosine wave signal are respectively changed in the following manner in a case where the phase difference calculated by the phase difference calculation unit 101 is less than 90 degrees and a case where the phase difference is larger than 90 degrees.
It is assumed that the phases of the present (before correction) sine wave signal and cosine wave signal are θ sin0 [deg] and θcos0 [deg], respectively, and that the phase difference calculated by the phase difference calculation unit 101 according to the above-described Formula (1) is θdiff [deg]. At this time, when the phase difference θdiff is less than 90 degrees, the phase change unit 102 can calculate the corrected sine wave signal A and cosine wave signal B by, for example, the following Formulas (2) and (3).
With a half of a value obtained by subtracting the phase difference θdiff from 90 degrees according to Formulas (2) and (3) as a phase correction value, the phase change unit 102 sets a value obtained by subtracting the phase correction value from the phase θ sin0 of the present sine wave signal as the corrected sine wave signal A, and sets a value obtained by adding the phase correction value to the phase θcos0 of the present cosine wave signal as the corrected cosine wave signal B. As a result, for example, as illustrated in
When the phase difference θdiff is larger than 90 degrees, the phase change unit 102 can calculate the corrected sine wave signal A and cosine wave signal B by the following Formulas (4) and (5), for example.
With a half of a value obtained by subtracting 90 degrees from the phase difference θdiff according to Formulas (4) and (5) as a phase correction value, the phase change unit 102 sets a value obtained by adding the phase correction value to the phase θ sin0 of the present sine wave signal as the corrected sine wave signal A, and sets a value obtained by subtracting the phase correction value from the phase θcos0 of the present cosine wave signal as the corrected cosine wave signal B. As a result, it is possible to obtain the corrected cosine wave signal B by changing the phase of the original cosine wave signal to delay from the present angle by the phase correction value and the corrected sine wave signal A by changing the phase of the original sine wave signal to advance from the present angle by the phase correction value.
In a case where an error is included in the phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301, before the phase change by the phase change unit 102, for example, as illustrated in
When the phase difference θdiff is less than 90 degrees, the phase change unit 102 calculates the corrected sine wave signal A and cosine wave signal B using Formulas (2) and (3). On the other hand, when the phase difference θdiff is larger than 90 degrees, the phase change unit calculates the corrected sine wave signal A and cosine wave signal B using Formulas (4) and (5). In other words, in any case, the correction is performed by changing the phases of the sine wave signal and the cosine wave signal by the same amount so that the phase difference between the corrected sine wave signal A and cosine wave signal B becomes 90 degrees in terms of an electrical angle. As a result, there exists an angular offset between the angle sensor 301 and the rotor 302, so that even when an offset error is included in each of the phases of the sine wave signal and the cosine wave signal output from the angle sensor 301 due to this angular offset, an average value of offset errors during one rotation of the rotor 302 can be set to zero in the calculated values of the magnetic pole position obtained by the angle calculation unit 103. Therefore, even when there is an offset error, the magnetic pole position of the motor 300 can be calculated with high accuracy by matching with the true value of the angle of the rotor 302.
In the motor control device 100, as described above, the phase difference calculation unit 101 detects the zero cross point for each of the sine wave signal and the cosine wave signal output from the angle sensor 301, and calculates periods of the sine wave signal and the cosine wave signal from an interval of each zero cross point. Then, when a difference between these signal periods is within a predetermined threshold, a phase difference between the sine wave signal and the cosine wave signal is calculated by Formula (1). This is because the phase difference cannot be correctly calculated in a state where the number of revolutions of the motor 300 is changed because the periods of the sine wave signal and the cosine wave signal are also changed. In other words, when the number of revolutions of the motor 300 is calculated on the basis of a magnetic pole position calculated using a phase difference calculated in a state where the number of revolutions of the motor 300 is changed, it is not possible to determine whether fluctuation included in the calculation result is caused by fluctuation of the phase difference or by the change in the number of revolutions of the motor 300. Therefore, the phase difference calculation unit 101 preferably calculates a phase difference between the sine wave signal and the cosine wave signal when a change in the number of revolutions of the motor 300 can be regarded as being within a certain range.
For example, as illustrated in
On the other hand, when the number of revolutions of the motor 300 shifts from high rotation to low rotation, a difference between the period T2+T1 of the sine wave signal and the period T1+T3 of the cosine wave signal is (T2+T1)-(T1+T3). When the period difference is within the predetermined threshold, the phase difference calculation unit 101 calculates a phase difference between the sine wave signal and the cosine wave signal, and when the period difference exceeds the threshold, the phase difference calculation unit does not calculate a phase difference.
At the low rotation when the number of revolutions of the motor 300 is low, a difference between the period T5+T4 of the sine wave signal and the period T4+T5 of the cosine wave signal is zero, so that, by replacing T1 and T2 with T4 and T5 in Formula (1), the phase difference θdiff can be calculated using Formula (1) similarly to the case of high rotation.
The above threshold is determined by how much a phase difference between the sine wave signal and the cosine wave signal needs to be brought close to an ideal value of 90 degrees. Specifically, a threshold of a period difference for performing the phase difference calculation of the sine wave signal and the cosine wave signal by the phase difference calculation unit 101 is determined according to a degree to which a fluctuating error due to phase difference deviations is allowed at a magnetic pole position obtained from the corrected sine wave signal A and cosine wave signal B calculated by the above Formulas (2), (3) or (4), (5) and according to a degree to which torque fluctuation of the motor 300 caused by the fluctuating error needs to be suppressed.
For example, assuming that the period difference between the sine wave signal and the cosine wave signal is X, the phase difference θdiff between the sine wave signal and the cosine wave signal can be calculated by the following Formula (6) obtained by modifying Formula (1). Assuming that X=0 in Formula (6), the Formula becomes the same as Formula (1).
According to one embodiment of the present invention described in the foregoing, the following functions and effects are obtained.
(1) The motor control device 100 is connected to the angle sensor 301 that outputs a sine wave signal and a cosine wave signal that change according to a magnetic pole position of the motor 300, and that calculates the magnetic pole position on the basis of the sine wave signal and the cosine wave signal output from the angle sensor 301 to control the motor 300 using the magnetic pole position. The motor control device 100 includes the phase difference calculation unit 101 that calculates a difference between phases of the sine wave signal and the cosine wave signal, and the phase change unit 102 that changes and corrects the phases of the sine wave signal and the cosine wave signal, respectively, by the same amount so that the phase difference being corrected becomes 90 degrees in terms of an electrical angle on the basis of the phase difference calculated by the phase difference calculation unit 101. With this configuration, a magnetic pole position of the motor 300 can be calculated with high accuracy.
(2) In a case where the phase difference θdiff is less than 90 degrees, with a half of a value obtained by subtracting the phase difference θdiff from 90 degrees according to Formulas (2) and (3) as a phase correction value, the phase change unit 102 corrects the phases of the sine wave signal and the cosine wave signal, respectively, by adding the phase correction value to the phase of the cosine wave signal and subtracting the phase correction value from the phase of the sine wave signal. In addition, in a case where the phase difference θdiff is larger than 90 degrees, with a half of a value obtained by subtracting 90 degrees from the phase difference θdiff according to Formulas (4) and (5) as a phase correction value, the phase change unit corrects the phases of the sine wave signal and the cosine wave signal, respectively, by subtracting the phase correction value from the phase of the cosine wave signal and adding the phase correction value to the phase of the sine wave signal. With this configuration, the phases of the sine wave signal and the cosine wave signal can be appropriately corrected in each of the case where the phase difference between the sine wave signal and the cosine wave signal is less than 90 degrees and the case where the phase difference is larger than 90 degrees.
(3) When a period difference between the sine wave signal and the cosine wave signal is within a predetermined threshold, the phase difference calculation unit 101 calculates a phase difference θdiff between the sine wave signal and the cosine wave signal on the basis of an interval between a zero cross point of the sine wave signal and a zero cross point of the cosine wave signal according to Formula (6). With this configuration, an error included in the phase difference between the sine wave signal and the cosine wave signal can be accurately obtained.
(4) The motor control device 100 includes the angle calculation unit 103 that calculates the magnetic pole position on the basis of the sine wave signal and the cosine wave signal whose phases have been corrected by the phase change unit 102. With this configuration, the calculation of the magnetic pole position of the motor 300 can be realized with high accuracy using the sine wave signal and the cosine wave signal whose phases have been corrected so that the corrected phase difference becomes 90 degrees in terms of an electrical angle.
(5) The motor control device 100 includes the number of revolutions calculation unit 104 that calculates the number of revolutions of the motor 300 on the basis of the magnetic pole position calculated by the angle calculation unit 103, and the semiconductor switch signal calculation unit 106 that calculates a semiconductor switch signal for controlling operation of the plurality of semiconductor switch elements 201 on the basis of the magnetic pole position calculated by the angle calculation unit 103, the number of revolutions of the motor 300 calculated by the number of revolutions calculation unit 104, and a torque command value input from the torque command value calculation unit 105. The motor 300 is connected to the inverter 200 including the plurality of semiconductor switch elements 201, and the inverter 200 converts direct current power into alternating current power and outputs the alternating current power to the motor 300 by switching the plurality of semiconductor switch elements 201, respectively, at predetermined timings on the basis of the semiconductor switch signal output from the semiconductor switch signal calculation unit 106. With this configuration, the motor 300 can be appropriately controlled using the magnetic pole position of the motor 300 calculated with high accuracy, and fluctuation in an output torque of the motor 300 can be suppressed.
Note that while in the embodiment described in the foregoing, the description has been made of the example of application to the motor drive system used while being mounted on an electric vehicle such as an electric car or a hybrid car, the present invention is not limited thereto. The present invention can be applied to a motor control device used in any motor drive system as long as a motor control device is connected to a motor having an angle sensor, and calculates a magnetic pole position on the basis of a sine wave signal and a cosine wave signal output from the angle sensor to control the motor.
In addition, the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2022/012723 | 3/18/2022 | WO |