Motor Control Device
The motor control device corrects rotation angle detection errors using magnetic field calculations and equations to enhance accuracy, addressing inaccuracies from disturbance flux and installation errors.
Patent Information
- Application Number
- JP2021030398
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2024-11-07
- Estimated Expiration
- 2041-02-26
AI Technical Summary
Motor control devices face inaccuracies in detecting the rotation angle of a rotor due to disturbance magnetic flux generated by the stator coil current, leading to errors in rotation angle detection and control.
A motor control device that includes a rotation angle detection magnet and a magnetic sensor to detect the magnetic field changes, with a control unit that calculates and corrects the rotation angle using equations to account for disturbance magnetic flux and installation errors, enhancing detection accuracy.
The device effectively suppresses calculation errors caused by disturbance magnetic flux, enabling precise detection and control of the motor rotation angle.
Smart Images

Figure 0007579040000001 
Figure 0007579040000002 
Figure 0007579040000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a motor control device. [Background technology]
[0002] Conventionally, motor control devices are known that employ a magnetic sensing element (e.g., a magnetoresistance effect element) to detect the rotation angle of the rotor of a motor and appropriately control the motor. In such motor control devices, the magnetic sensing element is affected by disturbance magnetic flux generated due to the current flowing through the stator coil, and the phase of the electric signal generated by the magnetic sensing element is shifted from the phase of the ideal electric signal, which may cause an error between the detected rotation angle of the rotor and the actual rotation angle. Therefore, the motor control device faces the challenge of how to accurately detect the rotation angle of the rotor.
[0003] To address this issue, for example, Patent Document 1 discloses a rotation angle detection device that aims to more appropriately detect the rotation angle of a motor. This rotation angle detection device uses an MR sensor (Magneto Resistive Sensor), which is a magnetoresistance effect element, to control motor drive based on changes in the magnetic field of a magnet attached to the output shaft of the motor, and also calculates an error angle caused by disturbance magnetic flux due to current flowing through a coil or the like as a correction angle, and corrects the rotation angle by subtracting the correction angle from the rotation angle detected through the MR sensor. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2017-143603 A Summary of the Invention [Problem to be solved by the invention]
[0005] The present invention provides a motor control device that can suppress a decrease in the calculation accuracy of the rotation angle caused by disturbance magnetic flux, and can more appropriately detect and control the rotation angle of a motor. [Means for solving the problem]
[0006] In order to solve the above problems, a motor control device is provided that detects the rotation angle of the rotor in a motor having a stator around which a coil through which a three-phase AC current flows and a rotor provided inside the stator, and controls driving of the motor, the motor control device comprising: a rotation angle detection magnet attached to an end of an output shaft that penetrates the rotor; a magnetic sensor that is provided facing the rotation angle detection magnet and detects changes in a magnetic field accompanying rotation of the rotation angle detection magnet and outputs an electric signal; and a control unit that is attached to a board electrically connected to the magnetic sensor and controls rotation of the rotor, the control unit calculating the rotation angle of the rotation angle detection magnet as the rotation angle of the rotor based on the electric signal output by the magnetic sensor, and when controlling the power supply to the coil in accordance with the calculated rotation angle, corrects the calculated rotation angle by a phase current magnetic field correction amount (θc1) calculated by equation (1) to control the rotation angle. Furthermore, the control unit corrects the calculated rotation angle using the power supply current magnetic field correction amount (θc2) calculated by equation (2) as an error angle caused by the disturbance magnetic flux due to the DC current flowing through the circuit on the board, and controls the rotation angle. A motor control device is provided. θc1=Asin(N1*θαβ_me+B)+Csin(N2*θαβ_me+D) …Equation (1) N1 and N2 are the principal component orders of the error angle caused by the disturbance magnetic flux due to the three-phase AC current, A and C are the error amplitudes at orders N1 and N2, B and D are the initial phase shift angles in orders N1 and N2, θαβ_me is an angle obtained by converting a phase angle calculated based on two-phase currents obtained by αβ-converting the three-phase current values flowing through the coil into a mechanical angle. θc2=Esin(θmr+F) …(2) Here, E is the error amplitude in the first order, F is the initial phase shift angle in the first order. θmr is the rotation angle of the rotor calculated based on the electrical signal output by the magnetic sensor. According to this, the phase current magnetic field correction amount is calculated using equation (1) based on the phase angle calculated based on the two-phase current obtained by αβ conversion of the three-phase current value flowing through the coil, and the rotation angle is corrected and controlled, thereby suppressing the decrease in the calculation accuracy of the rotation angle caused by disturbance magnetic flux, and providing a motor control device that can more appropriately detect and control the motor rotation angle. In addition, by correcting the rotation angle by taking into account the power supply current magnetic field correction amount calculated as the error angle caused by the disturbance magnetic flux due to the DC current flowing through the circuit on the board, the rotation angle of the motor can be detected more appropriately.
[0008] Furthermore, the control unit may calculate B and D in formula (1) using formula (3). B = b + Δθ, D = d - Δθ … Equation (3) Here, Δθ is the mounting error angle between the magnetic pole direction of the magnet for detecting the rotation angle attached to the output shaft and the magnetic pole direction of the rotor. b and d are the error component phase shift angles at Δθ=0 in the order N1 and the order N2. According to this, by calculating the phase current magnetic field correction amount and correcting the rotation angle taking into account the mounting error angle between the magnetic pole direction of the rotation angle detection magnet and the magnetic pole direction of the rotor, the rotation angle of the motor can be detected more appropriately.
[0009] Furthermore, the control unit may calculate F in formula (2) using formula (4). F=f-Δθ …Equation (4) Here, Δθ is the mounting error angle between the magnetic pole direction of the magnet for detecting the rotation angle attached to the output shaft and the magnetic pole direction of the rotor. f is the error component phase shift angle at Δθ=0 in the first order. According to this, by calculating the power supply current magnetic field correction amount and correcting the rotation angle taking into account the installation error angle between the magnetic pole direction of the rotation angle detection magnet and the magnetic pole direction of the rotor, the rotation angle of the motor can be detected more appropriately. Effect of the Invention
[0010] As described above, according to the present invention, it is possible to provide a motor control device that can suppress a decrease in the calculation accuracy of the rotation angle caused by disturbance magnetic flux and more appropriately detect and control the rotation angle of the motor. [Brief description of the drawings]
[0011] [Figure 1] 1 is a functional block diagram of a motor control device according to a first embodiment of the present invention. [Diagram 2] 1 is a cross-sectional view of a motor control device according to a first embodiment of the present invention. [Diagram 3] 1 is a perspective view showing a configuration of a magnetic sensor and a magnet for detecting a rotation angle in a motor control device according to a first embodiment of the present invention; [Figure 4] 4 is a flowchart showing a correction angle calculation method (phase current magnetic field correction) of the motor control device according to the first embodiment of the present invention. [Diagram 5] FIG. 2 is an explanatory diagram for explaining disturbance magnetic flux caused by a direct current flowing through a circuit on a substrate in the motor control device of the first embodiment according to the present invention. [Figure 6] 4 is a flowchart showing a correction angle calculation method (power supply current magnetic field correction) of the motor control device according to the first embodiment of the present invention. [Figure 7] FIG. 11 is an explanatory diagram for explaining an attachment error angle between the magnetic pole direction of a rotation angle detection magnet and the magnetic pole direction of a rotor in a motor control device according to a modified example of the first embodiment of the present invention. [Figure 8] FIG. 4 is a functional block diagram of a motor control device according to a modified example of the first embodiment of the present invention. [Figure 9] 6 is a flowchart showing a correction angle calculation method (phase current magnetic field correction) of a motor control device according to a second embodiment of the present invention. [Figure 10] 4 is a flowchart showing a correction angle calculation method (power supply current magnetic field correction) of the motor control device according to the first embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Each embodiment will be described below with reference to the drawings. <First Example> A motor control device 100 in this embodiment will be described with reference to Figures 1 to 6. The motor control device 100 is a device that drives and controls a three-phase electric motor M, and includes a rotation angle detection magnet 40 attached to an end of an output shaft M4 of the three-phase electric motor M, and a substrate 90 provided opposite the rotation angle detection magnet 40.
[0013] The three-phase electric motor M (hereinafter, motor M) is a three-phase brushless motor. The motor M has a cylindrical case M5, a stator M1 attached to the inner peripheral surface of the case M5, a stator coil M2 wound around the core of the stator M1 and through which a three-phase AC current flows, a rotor M3 provided inside the stator M1, and an output shaft M4 penetrating the rotor M3 (FIG. 2). The output shaft M4 is rotatably supported by the case M5 via two bearings, and each of its two ends penetrates the case M5. The rotor M3 has a cylindrical permanent magnet fixed to the outer peripheral surface of the output shaft M4. This permanent magnet is a multi-pole magnet in which multiple magnetic poles (N poles, S poles) with different polarities are alternately magnetized along the circumferential direction, and for example, the permanent magnet of this embodiment has four pairs of magnetic poles (four pole pairs, eight poles).
[0014] The rotation angle detection magnet 40 is attached to the end of the output shaft M4 that passes through the rotor M3, on the substrate 90 side. The rotation angle detection magnet 40 has a cylindrical shape, and is magnetized so that one side of the semi-cylinder is the N pole and the other side is the S pole. The substrate 90 is provided facing the rotation angle detection magnet 40, and includes a magnetic sensor 30 and a control unit 10. The magnetic sensor 30 is provided on the axis of the output shaft M4 facing the rotation angle detection magnet 40, detects a change in the magnetic field caused by the rotation of the rotation angle detection magnet 40, and outputs electric signals (S1, S2, S3, S4). The magnetic sensor 30 is an MR sensor (magnetoresistance effect sensor). The magnetic sensor 30 detects the magnetic field (magnetic pole direction) of the rotation angle detection magnet 40 as a substitute for the magnetic field (magnetic pole direction) of the rotor M3.
[0015] The rotation angle detection magnet 40, which is a two-pole magnet with a radially magnetized N pole and S pole, forms a magnetic field (dash line) that exits from the N pole and enters the S pole, as shown in FIG. 3. The magnetic sensor 30 is fixed to the substrate 90, and the rotation angle detection magnet 40 is fixed to the tip of the output shaft M4. Therefore, when the motor M operates and the output shaft M4 rotates, the magnetic field of the rotation angle detection magnet 40 rotates relative to the magnetic sensor 30, causing a change in the density and direction of the magnetic flux. That is, the magnetic field generated by the rotation angle detection magnet 40, which is a permanent magnet, rotates as the output shaft M4 rotates. Then, the magnetic sensor 30 detects the change in the magnetic field as the magnetic flux crosses. Note that the magnetic field / magnetic field shown in this figure is a schematic representation of a part of the magnetic field.
[0016] The rotation angle detection magnet 40 applies a magnetic field to the magnetic sensor 30 in the direction indicated by the dotted arrow D1 from the north pole to the south pole. For example, when the output shaft M4 rotates by a rotation angle θ in the rotation direction, the rotation angle detection magnet 40 and the magnetic pole direction also rotate by the rotation angle θ in the direction indicated by the dotted arrow D2. As a result, the direction of the magnetic field applied to the magnetic sensor 30 changes from the direction indicated by the dotted arrow D1 to the direction indicated by the dotted arrow D2, which is rotated by the rotation angle θ around the axis. In this way, the direction of the magnetic field applied to the magnetic sensor 30 changes according to the rotation angle θ of the output shaft M4.
[0017] The magnetic sensor 30 includes two bridge circuits each composed of four magnetoresistance elements. The four magnetoresistance elements are connected to form a Wheatstone bridge. When no magnetic field is applied, the magnetoresistance elements show the same resistance value. Since the electrical resistance of the magnetoresistance elements changes in response to a change in the magnetic field, when the magnetic field changes, the magnetoresistance elements change their voltage accordingly and output it. Between the two bridge circuits, the magnetic pole directions of the magnetoresistance elements are arranged to be shifted by 90 degrees overall, and the magnetic detection directions differ by 90 degrees. Then, the waveforms of the voltages output by the two bridge circuits are sine and cosine waveforms that are out of phase with each other by 90 degrees. In addition, the output of each bridge circuit is the voltage of the midpoint potential of the two magnetoresistance elements in each bridge circuit. Therefore, the magnetic sensor 30 outputs four electrical signals, a sine signal (S1) and a -sine signal (S2) based on a sine waveform, and a cosine signal (S3) and a -cosine signal (S4) based on a cosine waveform, according to the direction of the magnetic field (rotation angle θ) applied from the rotation angle detection magnet 40. These electrical signals are input to the control unit 10.
[0018] The control unit 10 is attached to a substrate 90 electrically connected to the magnetic sensor 30, and includes an inverter (motor drive circuit) 20 and a microprocessor. The inverter 20 is connected to a three-phase (U, V, W) stator coil M2. The inverter 20 has three arms connected in parallel, each arm having two switching elements such as field effect transistors connected in series. Each switching element is switched on based on a switching command Sc that defines a duty ratio generated by the microprocessor, thereby converting a DC current supplied from a DC power source such as a battery into a three-phase AC current. The inverter 20 is connected to the stator coils of each phase of the motor M via a bus bar. The AC power is supplied to the stator coil M2 via the bus bar.
[0019] The microprocessor calculates a current command value corresponding to a target torque T* supplied from the outside, performs feedback control based on the rotation angle of the rotor M3 detected by the magnetic sensor 30, generates a switching command Sc, and controls the rotation of the rotor M3. A current corresponding to the switching command Sc is supplied to the motor M through the inverter 20, causing the motor M to generate a rotational force corresponding to the target torque T*. The functions of the microprocessor will be described in more detail.
[0020] As shown in FIG. 1, the microprocessor includes a current command value calculation unit 11, a current feedback (F / B) control unit 12, a two-phase / three-phase conversion unit 13, a PWM conversion unit 14, a three-phase / two-phase conversion unit 15, a correction angle calculation unit 16, a rotation angle calculation unit 17, and a subtractor 18.
[0021] The rotation angle calculation unit 17 calculates the rotation angle θ of the rotor M3 based on the four electric signals output by the magnetic sensor 30. The rotation angle calculation unit 17 takes in the electric signals S1 to S4 output by the magnetic sensor 30 at a predetermined sampling period. For example, the rotation angle calculation unit 17 calculates the difference between the electric signals S1 and S2 and the difference between the electric signals S3 and S4, and detects the rotation angle θ of the rotor M3 by calculating an arctangent value based on these two difference values.
[0022] The three-phase / two-phase conversion unit 15 detects actual current values Iu, Iv, and Iw supplied to the stator coil M2 via a shunt resistor provided in a power supply path between the inverter 20 and the motor M. The three-phase / two-phase conversion unit 15 converts the three-phase current values Iu, Iv, and Iw into two-phase vector components using the rotation angle θ of the rotor M3. That is, the three-phase / two-phase conversion unit 15 converts the α-axis current value Iα and the β-axis current value Iβ in the α / β coordinate system of fixed coordinates in which the U-phase axis and the α-axis coincide, and the α-axis current value Iα and the β-axis current value Iβ into the d-axis current value Id and the q-axis current value Iq in the d / q coordinate system of rotating coordinates according to the rotation angle θ of the motor M. The α-axis current value Iα and the β-axis current value Iβ are actual current values supplied to the motor M in the α / β coordinate system. Also, the d-axis current value Id and the q-axis current value Iq are actual current values supplied to the motor M in the d / q coordinate system.
[0023] The current command value calculation unit 11 calculates a d-axis current command value Id* and a q-axis current command value Iq* based on an externally applied target torque T*. The d-axis current command value Id* and the q-axis current command value Iq* correspond to target values of the currents supplied to the motor M in the d / q coordinate system.
[0024] The current F / B control unit 12 receives the d-axis current command value Id* and the q-axis current command value Iq* generated by the current command value calculation unit 11, and the d-axis current value Id and the q-axis current value Iq generated by the three-phase / two-phase conversion unit 15. The current F / B control unit 12 obtains a d-axis current deviation by subtracting the d-axis current value Id from the d-axis current command value Id*, and obtains a q-axis current deviation by subtracting the q-axis current value Iq from the q-axis current command value Iq*. The current F / B control unit 12 generates a d-axis voltage command value Vd* by performing current feedback control based on the d-axis current deviation so that the d-axis current value Id follows the d-axis current command value Id*. The current F / B control unit 12 also generates a q-axis voltage command value Vq* by performing current feedback control based on the q-axis current deviation so that the q-axis current value Iq follows the q-axis current command value Iq*.
[0025] The two-phase / three-phase conversion unit 13 receives the d-axis voltage command value Vd* and the q-axis voltage command value Vq* generated by the current F / B control unit 12. The two-phase / three-phase conversion unit 13 converts the d-axis voltage command value Vd* and the q-axis voltage command value Vq* into voltage command values Vu*, Vv*, and Vw* for each of the three phases in a three-phase coordinate system using the rotation angle θ of the rotor M3.
[0026] The PWM conversion unit 14 receives the voltage command values Vu*, Vv*, Vw* for each of the three phases generated by the two-phase / three-phase conversion unit 13. The PWM conversion unit 14 generates duty command values for each of the three phases corresponding to the voltage command values Vu*, Vv*, Vw* for each of the three phases, and generates a switching command Sc for each switching element of the inverter 20 based on the duty command value. The inverter 20 switches in response to the switching command Sc, so that a three-phase AC current required for the motor M to generate a target torque T* is supplied to the stator coil M2.
[0027] The microprocessor includes a correction angle calculation unit 16 and a subtractor 18 for the purpose of suppressing the influence of leakage magnetic flux generated by nearby components on the magnetic sensor 30 (MR sensor) used in the motor control device 100. Examples of components that may generate leakage magnetic flux include a bus bar through which a three-phase AC current flows from the inverter 20 to the stator coil M2, the stator coil M2, a circuit arranged on the substrate 90 through which a DC current flows, and a power line through which power is supplied from a battery. The leakage magnetic flux generated from these components is applied to the magnetic sensor 30 as disturbance magnetic flux. In addition, the magnetic flux generated from these components interferes with the magnetic flux generated from the rotation angle detection magnet 40, distorting the magnetic field of the rotation angle detection magnet 40, and there is a risk of an error occurring between the rotation angle of the rotor M3 detected through the magnetic sensor 30 and the actual rotation angle.
[0028] The correction angle calculation unit 16 receives the α-axis current value Iα, the β-axis current value Iβ, and the q-axis current value Iq generated by the three-phase / two-phase conversion unit 15, the rotation angle θ before correction calculated by the rotation angle calculation unit 17, and the power supply current value Ip, and calculates a phase current magnetic field correction amount θc1 as an angle for correcting possible errors. Note that, while the output shaft M4 rotates once, the magnetic sensor 30 generates one period of electric signals (S1 to S4). On the other hand, since a sine wave voltage corresponding to the number of pole pairs of the permanent magnet of the rotor M3 is applied to the stator coil M2 per rotation of the output shaft M4, a sine wave current corresponding to the number of pole pairs of the permanent magnet of the rotor M3 flows per rotation of the output shaft M4. Therefore, in this embodiment, if the number of pole pairs is four, the electrical angle is 1 / 4 of the output shaft M4, and the disturbance magnetic flux rotates four times per one rotation of the output shaft M4.
[0029] The error angle caused by the disturbance magnetic flux can be approximately expressed using a sine function based on a predetermined theoretical formula. Using this, the correction angle calculation unit 16 calculates the error angle caused by the disturbance magnetic flux due to the three-phase current as a correction angle for the rotation angle θ detected by the magnetic sensor 30. The correction angle is calculated as the phase current magnetic field correction amount θc1 by formula (1). θc1=Asin(N1*θαβ_me+B)+Csin(N2*θαβ_me+D) …Equation (1)
[0030] Here, N1 and N2 are the orders of the main components of the error angle caused by the disturbance magnetic flux due to the three-phase AC current. The main components refer to those whose amplitudes at the orders are larger than those of the other frequency components. The orders N1 and N2 are constants that are uniquely determined due to the structure of the motor M. The orders N1 and N2 are calculated by using a predetermined theoretical formula based on the resultant vector of the magnetic flux generated from the rotation angle detection magnet 40 and the magnetic flux (disturbance magnetic flux) generated from the bus bar or the like. When the permanent magnet of the rotor M3 has four pole pairs, the order N1 is "3" and the order N2 is "5". The influence of the third-order frequency component and the fifth-order frequency component appears as an error in the rotation angle θ. In this example, in the formula (1), the first term on the right side represents the third-order frequency component of the angle error, and the second term on the right side represents the fifth-order frequency component of the angle error.
[0031] A is the error amplitude in the order N1, and C is the error amplitude in the order N2. These error amplitudes A and C are variables determined by the magnitude of the current supplied to the motor M. B is the initial phase shift angle in the order N1, and D is the initial phase shift angle in the order N2. The initial phase shift angle is the amount of phase shift of the N1-order component and the N2-order component of the angle error expressed as a sine wave with respect to a reference waveform. The initial phase shift angle is a constant uniquely determined due to the structure of the motor M, and is stored in a storage device such as a memory (not shown). In this specification, the waveform of an electric signal (for example, a sine signal) generated by the magnetic sensor 30 in response to a change in the direction of the magnetic field by the rotation angle detection magnet 40 is taken as the reference waveform.
[0032] θαβ_me is an angle obtained by converting a phase angle (electrical angle) calculated based on two-phase currents, i.e., the α-axis current value Iα and the β-axis current value Iβ, obtained by αβ conversion of the three-phase current values Iu, Iv, and Iw flowing through the stator coil M2 by the three-phase / two-phase conversion unit 15, into a mechanical angle. In other words, when the permanent magnet of the rotor M3 has four pole pairs, θαβ_me is an angle four times the phase angle calculated based on the α-axis current value Iα and the β-axis current value Iβ.
[0033] When the motor control device 100 is used in an electric power steering device of a vehicle, the three-phase current pattern changes depending on the assist direction. When the motor M is vector-controlled, the generated motor torque is proportional to the q-axis current value Iq, and the direction of the motor torque is related to the sign (positive or negative) of the q-axis current, so it is preferable that the correction angle calculation unit 16 changes the correction amount depending on the sign of the q-axis current value Iq. That is, by calculating θαβ (electrical angle) as Atan(Iα / Iβ) when the q-axis current value Iq is positive (or zero), and by calculating θαβ (electrical angle) as Atan(Iα / -Iβ) when the q-axis current value Iq is negative, an appropriate correction amount is calculated even if the current pattern is switched.
[0034] The subtractor 18 calculates the final rotation angle θ (after correction) by subtracting the phase current magnetic field correction amount θc1 calculated as the correction angle by the correction angle calculation unit 16 from the rotation angle θ before correction calculated by the rotation angle calculation unit 17. Since the phase current magnetic field correction amount θc1 is also an error caused by disturbance magnetic flux, by subtracting the phase current magnetic field correction amount θc1 as the correction angle from the rotation angle θ detected through the magnetic sensor 30, the angle error included in the detected rotation angle θ is removed.
[0035] A method for calculating the phase current magnetic field correction amount in the control unit 10 will be described with reference to the flowchart in Fig. 4. In the flowchart, "S" means a step. In S100, the correction angle calculation unit 16 reads out the initial phases B and D stored in a storage device such as a memory (not shown).
[0036] In S102, the three-phase / two-phase conversion unit 15 calculates the αβ current, i.e., the α-axis current value Iα, the β-axis current value Iβ, and their composite current value Iαβ, from the three-phase current. In S104, the correction angle calculation unit 16 calculates the error amplitude A in the order N1 and the error amplitude C in the order N2 from the magnitude of the composite current value Iαβ. In S106, the correction angle calculation unit 16 calculates the current phase from the signs of the αβ current and the q-axis current value Iq from the αβ current. In S108, the correction angle calculation unit 16 calculates θαβ_me from the rotation angle θ (before correction) and the current phase output by the rotation angle calculation unit 17. In S110, the correction angle calculation unit 16 calculates the phase current magnetic field correction amount θc1 as the correction angle using equation (1). In S112, the subtractor 18 subtracts the phase current magnetic field correction amount θc1 from the rotation angle θ before correction to calculate the final rotation angle θ (after correction).
[0037] In this way, when the control unit 10 calculates the rotation angle θ of the rotation angle detection magnet 40 as the rotation angle of the rotor M3 based on the electric signal output by the magnetic sensor 30 and controls the power supply to the stator coil M2 according to the calculated rotation angle, the control unit 10 corrects and controls the calculated rotation angle using the phase current magnetic field correction amount (θc1) calculated by formula (1). According to this, by calculating the phase current magnetic field correction amount using formula (1) based on the phase angle calculated based on the two-phase current (Iα, Iβ) obtained by αβ conversion of the three-phase current value flowing through the stator coil M2, and correcting and controlling the rotation angle θ, it is possible to provide a motor control device 100 that can suppress a decrease in the calculation accuracy of the rotation angle caused by disturbance magnetic flux and more appropriately detect and control the rotation angle of the motor M.
[0038] The above describes a case where leakage flux generated from components that may generate leakage flux, such as the bus bar through which three-phase AC current flows and the stator coil M2, becomes disturbance magnetic flux. Below, a case will be described where leakage flux generated from components that may generate leakage flux, such as a circuit arranged on the substrate 90 through which DC current flows, is applied to the magnetic sensor 30 as disturbance magnetic flux.
[0039] As shown in Fig. 5, when the motor control device 100 is mounted on a vehicle as an electric power steering device, the magnetic sensor 30 and the control unit 10 may be arranged on the same substrate 90 and electrically connected to each other in order to save space. A direct current (power supply current) flows from an external battery to the inverter 20 through wiring provided on the substrate 90, and may cause disturbance magnetic flux to the nearby magnetic sensor 30. In this case, it is preferable that the control unit 10 corrects and controls the rotation angle θ using the power supply current magnetic field correction amount (θc2) calculated by equation (2) in addition to the phase current magnetic field correction amount (θc1). θc2=Esin(θmr+F) …(2)
[0040] Here, E is the error amplitude in the primary (DC). This error amplitude E is a variable determined by the magnitude of the power supply current value Ip. The relationship between the power supply current value Ip and the error amplitude E is grasped in advance and stored in a storage device such as a memory (not shown). F is the initial phase shift angle in the primary. The initial phase shift angle is the amount of phase shift of the primary component (DC component) of the angle error expressed as a sine wave with respect to a reference waveform. The initial phase shift angle is a constant uniquely determined due to the structure of the motor M, and is stored in a storage device such as a memory (not shown).
[0041] θmr is the rotation angle θ of the rotor M3 calculated by the rotation angle calculation unit 17 based on the electrical signals (S1, S2, S3, S4) output by the magnetic sensor 30. In this manner, the correction angle calculation unit 16 receives the rotation angle θ before correction calculated by the rotation angle calculation unit 17 and the power supply current value Ip, and calculates the power supply current magnetic field correction amount (θc2) as an angle for correcting possible errors.
[0042] A method of calculating the power supply current magnetic field correction amount θc2 in the control unit 10 will be described with reference to the flowchart of FIG. 6. In S200, the correction angle calculation unit 16 reads out the initial phase shift angle F stored in a storage device such as a memory (not shown). In S202, the correction angle calculation unit 16 calculates the error amplitude E by referring to the memory from the power supply current value Ip. In S204, the correction angle calculation unit 16 obtains the rotation angle θ before correction calculated by the rotation angle calculation unit 17 and calculates the power supply current magnetic field correction amount θc2 as the correction angle by equation (2). In S206, the subtractor 18 subtracts the power supply current magnetic field correction amount θc2 from the rotation angle θ before correction to calculate the final rotation angle θ (after correction).
[0043] In this way, by correcting the rotation angle θ taking into account the power supply current magnetic field correction amount θc2 calculated as an error angle caused by disturbance magnetic flux due to DC current flowing through circuits on the board, etc., the rotation angle of the motor M can be detected more appropriately.
[0044] <Modification of the first embodiment> A motor control device 100 in this embodiment will be described with reference to Figs. 7 to 10. The motor control device 100 is a device for driving and controlling the motor M, and has the same configuration as the above embodiment. The rotation angle detection magnet 40 is attached to the end of the output shaft M4 of the motor M. However, as shown in Fig. 7, the magnetic pole direction of the rotation angle detection magnet 40 and the magnetic pole direction of the rotor M3 may not coincide during the manufacturing process, resulting in an attachment error angle Δθ. In this case, even if the actual rotation angle of the rotor M3 is θrotor, the magnetic sensor 30 detects it as θSensorMag to which the attachment error angle Δθ has been added in the case of this figure. The attachment error angle Δθ may be subtracted conversely. In this way, if the attachment error angle Δθ between the magnetic pole direction of the rotation angle detection magnet 40 attached to the output shaft M4 and the magnetic pole direction of the rotor M3 is not zero, the magnetic sensor 30 cannot accurately detect the rotation angle θ of the motor M, and therefore it is necessary to perform correction and control. The mounting error angle Δθ is checked for each motor control device and stored in its own memory (not shown).
[0045] It is preferable that the correction angle calculation unit 16 calculates the phase current magnetic field correction amount θc1 taking into account the installation error angle Δθ by calculating B and D in equation (1) using equation (3). Note that b and d are the error component phase shift angles at Δθ=0 in the orders N1 and N2. B = b + Δθ, D = d - Δθ … Equation (3)
[0046] The error component phase shift angle is obtained by checking before shipment. For example, the error component phase shift angle is obtained from the rotation angle θ output by the magnetic sensor 30 when the rotor M3 is controlled to be positioned at a reference angle (for example, zero degrees). The obtained error component phase shift angle is stored in the storage device of the control unit 10 and is incorporated when the correction angle calculation unit 16 calculates the phase current magnetic field correction amount θc1 by equation (1).
[0047] In this way, by calculating the phase current magnetic field correction amount θc1 taking into account the mounting error angle Δθ between the magnetic pole direction of the rotation angle detection magnet 40 and the magnetic pole direction of the rotor M3 and correcting the rotation angle θ, the rotation angle θ of the motor M can be detected more appropriately.
[0048] Moreover, it is preferable that the correction angle calculation unit 16 calculates the power supply current magnetic field correction amount θc2 taking into account the installation error angle Δθ by calculating F in equation (2) using equation (4). Note that f is the error component phase shift angle at Δθ=0 in the primary (DC). F=f-Δθ …Equation (4)
[0049] In this way, by calculating the power supply current magnetic field correction amount θc2 and correcting the rotation angle in consideration of the installation error angle Δθ between the magnetic pole direction of the rotation angle detection magnet 40 and the magnetic pole direction of the rotor M3, it is possible to more appropriately detect the rotation angle θ of the motor M. By using this method, the installation angle error of the sensor magnet can be corrected electrically and software-wise, so the correction work can be performed more efficiently compared to mechanical correction (for example, re-installing the sensor magnet).
[0050] The correction using the phase current magnetic field correction amount θc1 and the power supply current magnetic field correction amount θc2 that take into account the disturbance magnetic flux, and the correction that takes into account the installation error angle Δθ can be combined as shown in Fig. 8. In Fig. 8(A), the correction that takes into account the installation error angle Δθ is performed first, and then the correction that takes into account the disturbance magnetic flux is performed. When the magnetic sensor 30 detects the rotation angle θSensorMag, the correction angle calculation unit 16 calculates θ' using equation (5). θ'=θSensorMag±Δθ …Equation (5)
[0051] Thereafter, the correction angle calculation unit 16 calculates equations (6) and (7), thereby enabling the motor control device 100 to perform control that incorporates correction using the phase current magnetic field correction amount θc1 and the power supply current magnetic field correction amount θc2 that take into account the disturbance magnetic flux, as well as correction that takes into account the installation error angle Δθ. θ''=θ'+θc1 …Equation (6) θout=θ''+θc2 ...Equation (7)
[0052] In addition, when performing correction taking into account the disturbance magnetic flux first and then the mounting error angle Δθ as in (B) of this figure, it is necessary to change equation (3) to the following equation (3'), where Pn is the number of pole pairs of rotor M3. B=b+Pn*Δθ, D=d-Pn*Δθ…Equation (3')
[0053] A method for calculating the phase current magnetic field correction amount in the control unit 10 will be described with reference to the flowchart in Fig. 9. In the flowchart, "S" denotes a step. In S300, the correction angle calculation unit 16 calculates an initial phase shift angle B in the order N1 and an initial phase shift angle D in the order N2 from the initial phases b and d and the installation error angle Δθ stored in a storage device such as a memory (not shown). S302 to S312 are the same as S102 to S112 described above, and therefore description thereof will be omitted.
[0054] A method for calculating the power supply current magnetic field correction amount θc2 in the control unit 10 will be described with reference to the flowchart in Fig. 10. In S400, the correction angle calculation unit 16 calculates the initial phase shift angle F in the first order from the initial phase f stored in a storage device such as a memory (not shown) and the installation error angle Δθ. S402 to S406 are the same as S202 to S206 described above, so their explanation will be omitted.
[0055] The present invention is not limited to the illustrated examples, and may be implemented in any configuration that does not deviate from the scope of the claims. That is, the present invention has been particularly illustrated and described mainly with respect to specific embodiments, but those skilled in the art may make various modifications to the above-described embodiments in terms of the number and other details of the configuration without departing from the scope of the technical idea and purpose of the present invention. [Explanation of symbols]
[0056] 100 Motor control device 10 Control section 11 Current command value calculation section 12 Current F / B control section 13 2-phase / 3-phase converter 14 PWM conversion section 15 3-phase / 2-phase conversion section 16 Correction angle calculation section 17 Rotation angle calculation section 20 Inverter 30 Magnetic Sensor 40 Magnet for detecting rotation angle 90 Substrate 91 Connector M Three-phase electric motor M1 Stator M2 stator coil M3 Rotor M4 output shaft M5 Case
Claims
1. 1. A motor control device that detects a rotation angle of a rotor provided inside a motor having a stator around which a coil through which a three-phase AC current flows and controls driving of the motor, a magnet for detecting a rotation angle attached to an end of an output shaft passing through the rotor; a magnetic sensor provided opposite the rotation angle detection magnet, which detects a change in a magnetic field caused by the rotation of the rotation angle detection magnet and outputs an electric signal; a control unit that is attached to a substrate electrically connected to the magnetic sensor and controls rotation of the rotor; Equipped with The control unit calculates the rotation angle of the rotation angle detection magnet as the rotation angle of the rotor based on the electric signal output by the magnetic sensor, and when controlling the power supply to the coil in accordance with the calculated rotation angle, corrects and controls the calculated rotation angle using a phase current magnetic field correction amount (θc1) calculated by equation (1), and further The control unit corrects and controls the calculated rotation angle by a power supply current magnetic field correction amount (θc2) calculated by equation (2) as an error angle caused by a disturbance magnetic flux due to a DC current flowing through a circuit on the substrate. A motor control device comprising: θc1=Asin(N1*θαβ_me+B)+Csin(N2*θαβ_me+D)...Formula (1) N1 and N2 are the principal component orders of the error angle caused by the disturbance magnetic flux due to the three-phase AC current, A and C are the error amplitudes at orders N1 and N2, B and D are the initial phase shift angles in orders N1 and N2, θαβ_me is an angle obtained by converting a phase angle calculated based on two-phase currents obtained by αβ-converting the three-phase current values flowing through the coil into a mechanical angle. θc2=Esin(θmr+F)…(2) where E is the error amplitude in the first order. F is the initial phase shift angle in the first order, θmr is the rotation angle of the rotor calculated based on the electrical signal output by the magnetic sensor.
2. 2. The motor control device according to claim 1, wherein the control unit calculates B and D in formula (1) using formula (3). B=b+Δθ, D=d−Δθ…Equation (3) Here, Δθ is an attachment error angle between the magnetic pole direction of the rotation angle detection magnet attached to the output shaft and the magnetic pole direction of the rotor, b and d are the error component phase shift angles at Δθ=0 in the order N1 and the order N2.
3. 3. The motor control device according to claim 1, wherein the control unit calculates F in equation (2) using equation (4). F=f−Δθ…Equation (4) Here, Δθ is an attachment error angle between the magnetic pole direction of the rotation angle detection magnet attached to the output shaft and the magnetic pole direction of the rotor, f is the error component phase shift angle at Δθ=0 in the first order.
Citation Information
Patent Citations
Rotation angle detection device
JP2017143603A
Magnetic pole direction detection device
JP2019097257A
