Motor control device and magnetic pole position calculation method
By calculating and correcting the phase difference between the sine wave signal and the cosine wave signal output by the angle sensor in the motor control device, it restores it to an electrical angle of 90 degrees, the problem of deviation of the position of the motor magnetic pole in the prior art is solved, and the problem of deviation of the motor magnetic pole position in the prior art is realized High-precision magnetic pole position calculation and vibration suppression.
Patent Information
- Application Number
- CN202280090856.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-11-19
AI Technical Summary
When the existing motor control device corrects the sinusoidal signal and cosine signal output by the magnetic sensor, the correction amount is too large, resulting in the calculated motor magnetic pole position deviation, and it is impossible to calculate the magnetic pole position with high accuracy, which in turn causes the motor rotation speed and output rotation. Periodic error and vibration of moments.
通过在电动机控制装置中引入相位差运算部和相位变化部,运算并校正角度传感器输出的正弦波信号和余弦波信号的相位差,使其恢复到90度的电气角,从而高精度计算电动机的磁极位置。
The high-precision calculation of the motor magnetic pole position is achieved, which reduces periodic errors and vibrations in the rotation speed and output torque, and improves the accuracy and stability of the motor.
Smart Images

Figure CN118985089A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a device for controlling a motor and a method for calculating the magnetic pole position of the motor. Background Art
[0002] In the past, in a motor control device that controls a synchronous motor using permanent magnets for magnetic poles, the magnetic pole position of the motor is calculated based on an angle signal output from an angle sensor such as a rotary transformer mounted on the motor, and the motor is controlled based on the calculation result. Calculating the magnetic pole position of the motor with high accuracy improves the output torque accuracy of the motor, and thus, for example, in a motor mounted on an electric vehicle, the vibration of the vehicle is suppressed. Therefore, a technology that can calculate the magnetic pole position of the motor with high accuracy is required.
[0003] Typically, the calculation result of the magnetic pole position based on the angle signal contains an offset error that is always generated relative to the true value and a periodic error that is periodically generated according to the rotation of the motor. Among these errors, the offset error can be easily corrected by a known method, but the periodic error is sometimes difficult to correct. In particular, the phase difference between the sine wave signal (sine signal) and the cosine wave signal (cosine signal) output by the angle sensor is ideally 90 degrees, but if the phase difference deviates from 90 degrees, it will cause a periodic error in the calculation result of the magnetic pole position of the motor that is difficult to correct. As a result, the calculated value of the motor speed also produces a periodic error, which may induce vibration in the output torque of the motor.
[0004] Regarding the improvement of the calculation accuracy of the magnetic pole position of the motor, for example, a known technology is described in Patent Document 1. Patent Document 1 describes a device for correcting a sine signal and a cosine signal based on preset magnetic sensor correction information so that the value of the sine signal or cosine signal output by the magnetic sensor according to the rotation angle of the rotating body is close to the value of the reference sine signal or cosine signal of the magnetic sensor. Prior art literature Patent Literature
[0005] Patent Document 1: Japanese Patent Application Publication No. 2018-185287 Summary of the invention Technical problem to be solved by the invention
[0006] In the technology described in Patent Document 1, when the difference between the value of the sine signal or cosine signal output by the magnetic sensor and the value of the reference sine signal or cosine signal is large, the correction amount becomes too large, and the corrected sine signal or cosine signal has a large deviation from the original value. In this case, the magnetic pole position of the motor calculated based on the corrected sine signal and cosine signal deviates greatly from the original magnetic pole position, so the magnetic pole position of the motor cannot be calculated with high accuracy. Technical means for solving technical problems
[0007] The motor control device of the present invention is connected to an angle sensor that outputs a sine wave signal and a cosine wave signal that change according to the magnetic pole position of the motor, calculates the magnetic pole position based on the sine wave signal and the cosine wave signal output from the angle sensor, and uses the magnetic pole position to control the motor. The motor control device includes: a phase difference calculation unit that calculates the phase difference between the sine wave signal and the cosine wave signal; and a phase change unit that corrects the phase of the sine wave signal and the cosine wave signal by the same amount based on the phase difference calculated by the phase difference calculation unit, so that the corrected phase difference is an electrical angle of 90 degrees. The magnetic pole position calculation method of the present invention is a method for calculating the magnetic pole position based on a sine wave signal and a cosine wave signal that change according to the magnetic pole position of the motor, calculating the phase difference between the sine wave signal and the cosine wave signal, and based on the calculated phase difference, making the phase of the sine wave signal and the cosine wave signal change by the same amount for correction so that the corrected phase difference is an electrical angle of 90 degrees, and calculating the magnetic pole position based on the sine wave signal and the cosine wave signal after the phase is corrected. Effects of the Invention
[0008] According to the present invention, the magnetic pole position of the motor can be calculated with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 It is a diagram showing a configuration of a motor drive system including a motor control device according to an embodiment of the present invention. Figure 2 This is a diagram illustrating the relationship between the angle sensor error and torque vibration. Figure 3 It is an explanatory diagram of a method of calculating the phase difference in the phase difference calculation unit. Figure 4 It is a diagram for explaining a method of phase correction between a sine wave signal and a cosine wave signal in a phase changing unit. Figure 5This is a diagram showing a comparison example between a calculated value and a true value of a rotor angle obtained from a sine wave signal and a cosine wave signal before and after a phase change, respectively. Figure 6 This is a diagram for explaining a method of detecting a phase difference when the motor speed changes. DETAILED DESCRIPTION
[0010] Hereinafter, a mode for carrying out the present invention will be described in detail with reference to the drawings. In this embodiment, an application example of a motor drive system mounted on an electric vehicle such as an electric car or a hybrid car will be described.
[0011] Figure 1 It is a diagram showing a configuration of a motor drive system including a motor control device according to an embodiment of the present invention. Figure 1 The illustrated motor drive system includes a motor control device 100 , an inverter 200 , a motor 300 , and a high-voltage battery 400 .
[0012] The motor control device 100 calculates a torque command value corresponding to the target torque requested from the vehicle to the motor 300, and generates a semiconductor switch signal for controlling the operation of a plurality of semiconductor switch elements 201 included in the inverter 200 based on the torque command value. Then, the generated semiconductor switch signal is output to the inverter 200 to control the operation of each semiconductor switch element 201 of the inverter 200, thereby controlling the motor 300. The details of the motor control device 100 will be described later.
[0013] The inverter 200 includes an inverter circuit composed of 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 according to a semiconductor switch signal input from the motor control device 100, and outputs the gate drive signal to each semiconductor switch element 201. In the inverter circuit, semiconductor switch elements 201 are provided corresponding to the upper arm and the lower arm of the U phase, the V phase, and the W phase, respectively. According to the gate drive signal input from the gate drive circuit 202, each semiconductor switch element 201 is switched at a predetermined timing, thereby converting the DC power supplied from the high-voltage battery 400 into three-phase AC power and outputting it to the motor 300.
[0014] Smoothing capacitor 203 smoothes DC power supplied from high voltage battery 400 to inverter 200. Current sensor 204 detects AC current flowing from inverter 200 to each phase of motor 300, and outputs a current detection signal corresponding to the magnitude of the current of each phase to motor control device 100.
[0015] The motor 300 is a synchronous motor that is driven to rotate by the supply of three-phase AC 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 AC power input from the inverter 200 is applied to the three-phase armature coils provided on the stator 303, the three-phase AC current is conducted in the motor 300, and armature magnetic flux is generated in the armature coils of each phase. An attractive force and a repulsive force are generated between the armature magnetic flux of each armature coil and the magnetic flux of the permanent magnets arranged on the rotor 302, thereby generating a torque on the rotor 302, and the rotor 302 is driven to rotate.
[0016] The angle sensor 301 outputs a sine wave signal and a cosine wave signal that change according to the magnetic pole position of the motor 300, that is, the rotation angle of the rotor 302, to the motor control device 100 connected to the angle sensor 301. The angle sensor 301 can use, for example, a rotary transformer composed of an iron core and a winding. Alternatively, a magnetoresistive element such as a GMR element or a Hall element can also be used as the angle sensor 301.
[0017] The high-voltage battery 400 is a DC power source and is electrically connected to the inverter 200. The DC power stored in the high-voltage battery 400 is converted into a three-phase AC power with a variable voltage and a variable frequency by the inverter 200 according to the semiconductor switch signal output from the motor control device 100, and is provided to the motor 300.
[0018] The motor control device 100 includes functional blocks such as a phase difference calculation unit 101, a phase change unit 102, an angle calculation unit 103, a rotation speed calculation unit 104, a torque command value calculation unit 105, and a semiconductor switch signal calculation unit 106. The motor control device 100 is composed of, for example, a microcomputer, and these functional blocks can be implemented by executing a predetermined program in the microcomputer. Alternatively, some or all of these functional blocks can be implemented using hardware circuits such as logic ICs and FPGAs.
[0019] The phase difference calculation unit 101 calculates the phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301. The method of calculating the phase difference by the phase difference calculation unit 101 will be described in detail later.
[0020] The phase changing unit 102 corrects the phases of the sine wave signal and the cosine wave signal, respectively, based on the phase difference between the sine wave signal and the cosine wave signal calculated by the phase difference calculating unit 101. The phase correction method of the sine wave signal and the cosine wave signal by the phase changing unit 102 will be described in detail later.
[0021] Angle calculation unit 103 calculates the magnetic pole position of motor 300 based on the sine wave signal and cosine wave signal whose phases are corrected by phase changing unit 102. Here, the magnetic pole position of motor 300 can be calculated based on the phases of the corrected sine wave signal and cosine wave signal by using a known calculation formula using a trigonometric function, for example.
[0022] The rotation speed calculation unit 104 calculates the rotation speed (rotation speed) of the motor 300 by measuring the amount of change per unit time of the magnetic pole position calculated by the angle calculation unit 103 .
[0023] The torque command value calculation unit 105 calculates a torque command value for the motor 300 based on a target torque of the motor 300 input from a higher-level control device (not shown).
[0024] The semiconductor switch signal calculation unit 106 calculates the semiconductor switch signal for each semiconductor switch element 201 based on the torque command value calculated by the torque command value calculation unit 105, the magnetic pole position and the rotation speed of the motor 300 calculated by the angle calculation unit 103 and the rotation speed calculation unit 104, and the current detection signal input from the current sensor 204. The semiconductor switch signal calculation unit 106 can generate a three-phase pulse train signal having a pulse width corresponding to the three-phase AC power to be output to the motor 300 as a semiconductor switch signal by performing a known PWM calculation, for example.
[0025] 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 circuit 202 generates a gate drive signal based on the semiconductor switch signal, thereby controlling the operation of each semiconductor switch element 201 and converting the DC power into the three-phase AC power. In this way, the drive of the motor 300 is controlled in the motor drive system.
[0026] Next, refer to Figure 2 to Figure 4 The phase difference calculation unit 101 and the phase change unit 102 in the motor control device 100 will be described in detail.
[0027] Figure 2 This is a diagram illustrating the relationship between the angle sensor error and torque vibration.
[0028] Figure 2The graph 21 shown in the upper left corner of is an example of a sine wave signal and a cosine wave signal before correction output from the angle sensor 301. The phase difference between these signals is ideally 90 degrees, but sometimes it does not reach 90 degrees in practice due to errors or characteristic deviations of components included in the angle sensor 301 or the motor control device 100. Such a phase difference deviation will cause a vibration error such as the graph 22 in the calculation result of the magnetic pole position of the motor 300 calculated by the angle calculation unit 103. In addition, a vibration error such as the graph 23 will also occur in the calculation result of the rotation speed of the motor 300 calculated by the rotation speed calculation unit 104.
[0029] According to the above-mentioned calculation results, 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, in the motor 300, as shown in FIG. Figure 2 As shown in the graph of FIG24 , a vibration torque not included in the torque command value may be generated. Such torque vibration may deteriorate the ride comfort and operability in a vehicle equipped with a motor drive system.
[0030] On the other hand, in the motor drive system of the present embodiment, a phase difference calculation unit 101 and a 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 by using them respectively so that the phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301 is 90 degrees. In the angle calculation unit 103, the sine wave signal and the cosine wave signal after the phase correction are used to calculate the magnetic pole position of the motor 300. Thus, the vibration error as shown in the graph 22 is prevented from being generated, and the torque vibration in the motor 300 is suppressed.
[0031] Figure 3 It is a diagram for explaining a method of calculating a phase difference by the phase difference calculation unit 101 .
[0032] In the motor control device 100, the phase difference calculation unit 101 detects the zero crossing point for the sine wave signal and the cosine wave signal output from the angle sensor 301. The zero crossing point refers to the point where the amplitude of the sine wave signal or the cosine wave signal is expressed as 0, that is, the point where the signal voltage crosses zero and changes from positive to negative or from negative to positive. The phase difference calculation unit 101 can calculate the phase difference between the sine wave signal and the cosine wave signal based on the intervals between the detected zero crossing points.
[0033] For example, Figure 3As shown, consider the case where the zero crossing points P1 and P3 are detected for the cosine wave signal, and the zero crossing points P2 and P4 are detected for the sine wave signal. In this case, the interval from the initial zero crossing point P1 to the next zero crossing point P2 is set to T1, and the interval from the second zero crossing point P1 to the next zero crossing point P3 is set to T2. If the speed of the motor 300 is constant, the interval from the third zero crossing point P3 to the next zero crossing point P4 is the same as the interval T1 between the zero crossing points P1 and P2. Therefore, the interval between the zero crossing points P1 and P3 of the cosine wave signal and the interval between the zero crossing points P2 and P4 of the sine wave signal are both obtained as T1+T2.
[0034] Therefore, the phase difference calculation unit 101 can calculate the phase difference θdiff between the sine wave signal and the cosine wave signal using the following equation (1). θdiff=180×T1÷ (T1+T2) · · · (1)
[0035] In the phase difference calculation unit 101, the signal periods of the sine wave signal and the cosine wave signal can be obtained based on the intervals of the zero crossing points detected for the sine wave signal and the cosine wave signal. Furthermore, if the difference of the signal periods is within a predetermined threshold, it can be considered that the rotation speed of the motor 300 is constant. Therefore, the phase difference calculation unit 101 respectively observes the periods of the sine wave signal and the cosine wave signal input from the angle sensor 301, and when the difference is within a predetermined threshold, the phase difference calculation can be performed based on the intervals of the zero crossing points detected from the sine wave signal and the cosine wave signal, using formula (1).
[0036] 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 may be used as long as the phase difference between the sine wave signal and the cosine wave signal can be appropriately calculated.
[0037] Figure 4 It is a diagram for explaining a method of phase correction of a sine wave signal and a cosine wave signal by the phase shifting unit 102 .
[0038] In the motor control device 100, the phase changing unit 102 changes the phases of the sine wave signal and the cosine wave signal by the same amount and performs correction so that the corrected phase difference becomes an electrical angle of 90 degrees, based on the phase difference between the sine wave signal and the cosine wave signal calculated by the phase difference calculating unit 101. Specifically, when the phase difference calculated by the phase difference calculating unit 101 is less than 90 degrees and when it is greater than 90 degrees, the phases of the sine wave signal and the cosine wave signal are changed as follows.
[0039] The phases of the current (before correction) sine wave signal and cosine wave signal are respectively set to θsin0[deg] and θcos0[deg], and the phase difference calculated by the above formula (1) in the phase difference calculation unit 101 is set to θ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 respectively by the following formulas (2) and (3), for example. A=SIN (θsin0- (90-θdiff) ÷2) · · · (2) B=COS (θsin0+ (90-θdiff) ÷2) · · · (3)
[0040] According to equations (2) and (3), the phase changing unit 102 uses half of the value obtained by subtracting the phase difference θdiff from 90 degrees as the phase correction value, subtracts the phase correction value from the current phase θsin0 of the sine wave signal as the corrected sine wave signal A, and adds the phase correction value to the current phase θcos0 of the cosine wave signal as the corrected cosine wave signal B. As a result, for example Figure 4 As shown, the corrected cosine wave signal B which advances the phase of the original cosine wave signal by the phase correction value from the current angle and the corrected sine wave signal A which retards the phase of the original sine wave signal by the phase correction value from the current angle can be obtained.
[0041] When the phase difference θdiff is larger than 90 degrees, the phase shifter 102 can calculate the corrected sine wave signal A and cosine wave signal B using the following equations (4) and (5), respectively. A=SIN (θsin0+ (θdiff-90) ÷2) · · · (4) B=COS (θsin0- (θdiff-90) ÷2) · · · (5)
[0042] According to equations (4) and (5), the phase changing unit 102 uses half of the value obtained by subtracting 90 degrees from the phase difference θdiff as the phase correction value, adds the phase correction value to the phase θsin0 of the current sine wave signal as the corrected sine wave signal A, and subtracts the phase correction value from the phase θcos0 of the current cosine wave signal as the corrected cosine wave signal B. As a result, the corrected cosine wave signal B in which the phase of the original cosine wave signal is delayed by the phase correction value from the current angle and the corrected sine wave signal A in which the phase of the original sine wave signal is advanced by the phase correction value from the current angle can be obtained.
[0043] Figure 5 The diagram shows a comparison example between a calculated value and a true value of the angle (magnetic pole position) of the rotor 302 obtained from the sine wave signal and the cosine wave signal before and after the phase change.
[0044] When the phase difference between the sine wave signal and the cosine wave signal output from the angle sensor 301 contains an error, before the phase shifting unit 102 performs the phase shift, for example Figure 5 As shown in (a), the calculated value obtained by the angle calculation unit 103 fluctuates up and down with respect to the true value of the angle of the rotor 302. On the other hand, after the phase shift unit 102 performs the phase shift, for example, Figure 5 As shown in (b), the calculated value obtained by the angle calculation unit 103 can be made to coincide with the true value of the angle of the rotor 302. Thus, the magnetic pole position of the motor 300 can be calculated with high accuracy.
[0045] When the phase difference θdiff is less than 90 degrees, the phase change unit 102 uses equations (2) and (3) to calculate the corrected sine wave signal A and cosine wave signal B, respectively. On the other hand, when the phase difference θdiff is greater than 90 degrees, the corrected sine wave signal A and cosine wave signal B are calculated using equations (4) and (5). That is, in either case, the phases of the sine wave signal and the cosine wave signal are changed by the same amount to perform correction so that the phase difference between the corrected sine wave signal A and the cosine wave signal B is an electrical angle of 90 degrees. Thus, even if there is an angle offset between the angle sensor 301 and the rotor 302, and the phases of the sine wave signal and the cosine wave signal output from the angle sensor 301 contain offset errors due to the angle offset, the average value of the offset error generated by one rotation of the rotor 302 can be made zero in the calculated value 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 so as to match the true value of the angle of the rotor 302 .
[0046] Figure 6 This is a diagram for explaining a method of detecting a phase difference when the motor speed changes.
[0047] In the motor control device 100, the phase difference calculation unit 101 detects the zero crossing points of the sine wave signal and the cosine wave signal output from the angle sensor 301, and calculates the periods of the sine wave signal and the cosine wave signal according to the intervals between the zero crossing points as described above. Furthermore, when the difference between the periods of these signals is within a predetermined threshold value, the phase difference between the sine wave signal and the cosine wave signal is calculated by formula (1). This is because the periods of the sine wave signal and the cosine wave signal also change when the rotation speed of the motor 300 changes, so the phase difference cannot be accurately calculated. That is, if the rotation speed of the motor 300 is calculated based on the magnetic pole position calculated using the phase difference calculated when the rotation speed of the motor 300 changes, it is impossible to determine whether the vibration contained in the calculation result is caused by the vibration of the phase difference or by the change in the rotation speed of the motor 300. Therefore, in the phase difference calculation unit 101, it is preferred to calculate the phase difference between the sine wave signal and the cosine wave signal when the change in the rotation speed of the motor 300 is considered to be within a certain range.
[0048] For example, Figure 6 As shown, when the motor 300 rotates at a high speed and the rotation speed is relatively high, the intervals of the zero crossing points of the sine wave signal and the cosine wave signal input from the angle sensor 301 to the phase difference calculation unit 101 are T1, T2, and T1, respectively. In this case, the difference between the period T2+T1 of the sine wave signal and the period T1+T2 of the cosine wave signal is 0, and the phase difference θdiff can be calculated by formula (1).
[0049] On the other hand, when the rotation speed of the motor 300 is transferred from high speed rotation to low speed rotation, the 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 a predetermined threshold, the phase difference calculation unit 101 calculates the phase difference between the sine wave signal and the cosine wave signal, and when it exceeds the threshold, the phase difference calculation is not performed.
[0050] In addition, when the motor 300 is rotating at a low speed, the difference between the period T5+T4 of the sine wave signal and the period T4+T5 of the cosine wave signal is 0. By replacing T1 and T2 with T4 and T5 respectively in formula (1), the phase difference θdiff can be calculated using formula (1) in the same way as during high-speed rotation.
[0051] The above threshold value is determined by how close the phase difference between the sine wave signal and the cosine wave signal needs to be to the ideal value, i.e., 90 degrees. That is, the threshold value of the period difference used by the phase difference calculation unit 101 to perform the phase difference calculation of the sine wave signal and the cosine wave signal is determined based on how much the vibration error caused by the phase difference deviation between the sine wave signal A and the cosine wave signal B in the magnetic pole position calculated by the above equations (2), (3) or (4), (5) needs to be allowed, and how much the torque vibration of the motor 300 generated thereby needs to be suppressed.
[0052] For example, when 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) which is a modification of formula (1). If X=0 in formula (6), it is the same as formula (1). θdiff=180×T1÷ (T1+T2+X) · · · (6)
[0053] According to one embodiment of the present invention described above, the following effects are achieved.
[0054] (1) The motor control device 100 is connected to an angle sensor 301 that outputs a sine wave signal and a cosine wave signal that change according to the magnetic pole position of the motor 300, calculates the magnetic pole position based on the sine wave signal and the cosine wave signal output from the angle sensor 301, and uses the magnetic pole position to control the motor 300. The motor control device 100 includes: a phase difference calculation unit 101 that calculates the phase difference between the sine wave signal and the cosine wave signal; and a phase change unit 102 that changes the phase of the sine wave signal and the cosine wave signal by the same amount based on the phase difference calculated by the phase difference calculation unit 101, and corrects the phase difference so that the corrected phase difference is an electrical angle of 90 degrees. Therefore, the magnetic pole position of the motor 300 can be calculated with high accuracy.
[0055] (2) When the phase difference θdiff is less than 90 degrees, the phase changing unit 102 uses equations (2) and (3) to set half of the value obtained by subtracting the phase difference θdiff from 90 degrees as a phase correction value, adds the phase correction value to the phase of the cosine wave signal, and subtracts the phase correction value from the phase of the sine wave signal, thereby correcting the phases of the sine wave signal and the cosine wave signal, respectively. In addition, when the phase difference θdiff is greater than 90 degrees, according to equations (4) and (5), half of the value obtained by subtracting 90 degrees from the phase difference θdiff is set as a phase correction value, subtracts the phase correction value from the phase of the cosine wave signal, and adds the phase correction value to the phase of the sine wave signal, thereby correcting the phases of the sine wave signal and the cosine wave signal, respectively. Therefore, when the phase difference between the sine wave signal and the cosine wave signal is less than 90 degrees and when it is greater than 90 degrees, the phases of the sine wave signal and the cosine wave signal can be appropriately corrected, respectively.
[0056] (3) When the period difference between the sine wave signal and the cosine wave signal is within a predetermined threshold value, the phase difference calculation unit 101 calculates the phase difference θdiff between the sine wave signal and the cosine wave signal based on the interval between the zero crossing point of the sine wave signal and the zero crossing point of the cosine wave signal by using equation (6). Therefore, the error included in the phase difference between the sine wave signal and the cosine wave signal can be accurately obtained.
[0057] (4) The motor control device 100 includes an angle calculation unit 103 that calculates the magnetic pole position based on the sine wave signal and the cosine wave signal whose phases have been corrected by the phase changing unit 102. Therefore, by using the sine wave signal and the cosine wave signal whose phases have been corrected so that the corrected phase difference is an electrical angle of 90 degrees, the magnetic pole position of the motor 300 can be calculated with high accuracy.
[0058] (5) The motor control device 100 includes: a rotation speed calculation unit 104 that calculates the rotation speed of the motor 300 based on the magnetic pole position calculated by the angle calculation unit 103; and a semiconductor switch signal calculation unit 106 that calculates a semiconductor switch signal for controlling the operation of the plurality of semiconductor switch elements 201 based on the magnetic pole position calculated by the angle calculation unit 103, the rotation speed of the motor 300 calculated by the rotation speed calculation unit 104, and the torque command value input from the torque command value calculation unit 105. The motor 300 is connected to an inverter 200 having a plurality of semiconductor switch elements 201. The inverter 200 switches the plurality of semiconductor switch elements 201 at a predetermined timing based on the semiconductor switch signal output from the semiconductor switch signal calculation unit 106, thereby converting DC power into AC power and outputting it to the motor 300. Therefore, the motor 300 can be appropriately controlled using the magnetic pole position of the motor 300 calculated with high accuracy, thereby suppressing vibration in the output torque of the motor 300.
[0059] In the above-described embodiment, an application example of a motor drive system used in an electric vehicle such as an electric vehicle or a hybrid vehicle is described, but the present invention is not limited thereto. As long as it is connected to a motor having an angle sensor and the magnetic pole position is calculated based on the sine wave signal and cosine wave signal output from the angle sensor to control the motor, the present invention can be applied to a motor control device used in any motor drive system.
[0060] In addition, the present invention is not limited to the above-mentioned embodiment, and various changes can be made within the scope not departing from the gist of the present invention. Description of symbols
[0061] 100…motor control device, 101…phase difference calculation unit, 102…phase change unit, 103…angle calculation unit, 104…rotation speed calculation unit, 105…torque command value calculation unit, 106…semiconductor switch signal calculation unit, 200…inverter, 201…semiconductor switch element, 202…gate drive circuit, 203…smoothing capacitor, 204…current sensor, 300…motor, 301…angle sensor, 302…rotor, 303…stator, 400…high-voltage battery.
Claims
1. A motor control device connected to an angle sensor that outputs a sine wave signal and a cosine wave signal that vary according to a magnetic pole position of a motor, calculates the magnetic pole position based on the sine wave signal and the cosine wave signal output from the angle sensor, and controls the motor using the magnetic pole position, the motor control device comprising: a phase difference calculation unit for calculating a phase difference between the sine wave signal and the cosine wave signal; as well as A phase changing unit changes the phases of the sine wave signal and the cosine wave signal by the same amount based on the phase difference calculated by the phase difference calculating unit to correct the phase difference so that the corrected phase difference becomes an electrical angle of 90 degrees.
2. The motor control device according to claim 1, characterized in that: When the phase difference is less than 90 degrees, the phase varying unit uses half of a value obtained by subtracting the phase difference from 90 degrees as a phase correction value, adds the phase correction value to the phase of the cosine wave signal, and subtracts the phase correction value from the phase of the sine wave signal, thereby respectively correcting the phases of the sine wave signal and the cosine wave signal. When the phase difference is greater than 90 degrees, the phase changing unit uses half of the value obtained by subtracting 90 degrees from the phase difference as a phase correction value, subtracts the phase correction value from the phase of the cosine wave signal, and adds the phase correction value to the phase of the sine wave signal, thereby correcting the phases of the sine wave signal and the cosine wave signal, respectively.
3. The motor control device according to claim 1, characterized in that: The phase difference calculation unit calculates the phase difference between the sine wave signal and the cosine wave signal based on an interval between a zero crossing point of the sine wave signal and a zero crossing point of the cosine wave signal when the period difference between the sine wave signal and the cosine wave signal is within a predetermined threshold.
4. The motor control device according to any one of claims 1 to 3, characterized in that: An angle calculation unit is included that calculates the magnetic pole position based on the sine wave signal and the cosine wave signal whose phases have been corrected by the phase changing unit.
5. The motor control device according to claim 4, characterized in that: include: a rotation speed calculation unit that calculates the rotation speed of the motor based on the magnetic pole position calculated by the angle calculation unit; as well as a semiconductor switch signal calculation unit that calculates semiconductor switch signals for controlling the operation of a plurality of semiconductor switch elements based on the magnetic pole position calculated by the angle calculation unit, the speed of the motor calculated by the speed calculation unit, and an input torque command value, The motor is connected to an inverter having the plurality of semiconductor switching elements. The inverter switches the plurality of semiconductor switching elements at predetermined timings according to the semiconductor switching signal output from the semiconductor switching signal calculation unit, thereby converting DC power into AC power and outputting the AC power to the motor.
6. A method for calculating a magnetic pole position, wherein the magnetic pole position is calculated based on a sine wave signal and a cosine wave signal that vary according to the magnetic pole position of a motor, wherein the method is characterized in that: calculating the phase difference between the sine wave signal and the cosine wave signal, According to the calculated phase difference, the phases of the sine wave signal and the cosine wave signal are changed by the same amount for correction so that the corrected phase difference is an electrical angle of 90 degrees, and the magnetic pole position is calculated based on the sine wave signal and the cosine wave signal with the corrected phases.
