Motor control device, and program
The motor control device addresses erroneous detection by using a series circuit and voltage detection to calculate current values during specific periods, enhancing motor control accuracy and reliability.
Patent Information
- Application Number
- JP2024044131
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-19
- Publication Date
- 2025-10-02
AI Technical Summary
Existing motor control devices face challenges in accurately detecting motor current values due to erroneous detection during periods when upper arm switching elements are in the ON state, leading to potential miscontrol of motor operations.
A motor control device with a series circuit of switching elements and a voltage detection unit between the second switching element and ground point, calculating current values based on detected voltages during specific periods to correct for temperature drift and ensure accurate motor control.
The solution effectively suppresses erroneous detection and enables precise motor control by accounting for temperature changes and duty ratio variations, ensuring accurate current calculation and motor operation.
Smart Images

Figure 2025144385000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a motor control device and a program. [Background technology]
[0002] There are known motor control devices that control motors used in electric power steering devices and the like. Such motor control devices may detect the current value of the AC current flowing through each phase of a drive inverter. By detecting the current value of the current flowing through each phase of the inverter, it is possible to estimate the rotational position of the motor and control the rotational speed of the motor.
[0003] Patent Document 1 describes a motor control device that includes a three-phase brushless motor, an inverter including a series-connected circuit of an upper arm switching element and a lower arm switching element for each phase, and a current detector provided between the lower arm switching element of each phase of the inverter and a ground point. Patent Document 1 describes that the difference between the sum of first current detection values detected when the upper arm switching elements of all phases are in the on state and the sum of second current detection values detected when the lower arm switching elements of all phases are in the on state is calculated, and if the difference is smaller than a threshold, offset correction of the detection output of the current detector is performed based on the first current detection value. According to Patent Document 1, performing such offset correction prevents offset correction based on an erroneous current detection value when a switching element has a short circuit. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Laid-Open No. 2017-169346 Summary of the Invention [Problem to be solved by the invention]
[0005] Here, as in Patent Document 1, the period during which the upper arm switching elements of all phases are in the ON state (the period during which no current flows through the shunt resistors of all phases) is determined by the duty ratio of the PMW signal. For example, if the period during which the upper arm switching elements of all phases are in the ON state is short, it becomes difficult to detect the voltage and current during that period, and there is a risk that detected values during a period other than the period during which the upper arm switching elements of all phases are in the ON state will be erroneously detected as detected values during the period during which the upper arm switching elements of all phases are in the ON state. Therefore, there is a need to suppress erroneous detection and appropriately control the motor.
[0006] The present invention has been made in view of the above, and has an object to provide a motor control device and a program that can suppress erroneous detection and appropriately control a motor. [Means for solving the problem]
[0007] A motor control device according to the present disclosure includes an inverter in which a series circuit having a first switching element and a second switching element is provided for each phase of the motor, and which applies an AC voltage to each phase of the motor; a voltage detection unit provided between the second switching element of each of the series circuits and a ground point, and which detects the voltage between the second switching element and the ground point; and a current calculation unit which calculates a current value between the second switching element and the ground point based on the voltage detected by the voltage detection unit, and when the length of a first period in which the first switching elements of all the series circuits are in an on state is equal to or longer than a predetermined length, the current calculation unit calculates the current value in a second period after the period in which the voltage was detected in the second period based on the voltage detected by the voltage detection unit during the first period and the voltage detected by the voltage detection unit during a second period in which the second switching elements of all the series circuits are in an on state.
[0008] The program disclosed herein is a program that causes a computer to execute a control method for a motor control device having a series circuit having a first switching element and a second switching element, each series circuit being provided for each phase of the motor, an inverter that applies an AC voltage to each phase of the motor, and a voltage detection unit that is provided between the second switching element of each series circuit and a ground point and detects the voltage between the second switching element and the ground point, the program causing the computer to execute a step of calculating a current value between the second switching element and the ground point based on the voltage detected by the voltage detection unit, and in the step of calculating the current value, if the length of a first period in which the first switching elements of all the series circuits are in an on state is equal to or longer than a predetermined length, the current value in the second period after the period in which the voltage was detected in the second period is calculated based on the voltage detected by the voltage detection unit during the first period and the voltage detected by the voltage detection unit during a second period in which the second switching elements of all the series circuits are in an on state. [Effects of the Invention]
[0009] According to the present invention, it is possible to suppress erroneous detection and appropriately control the motor. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a schematic circuit diagram of a motor system according to this embodiment. [Figure 2] FIG. 2 is a schematic block diagram of the control device. [Figure 3] FIG. 3 is a graph showing an example of a PWM signal when the motor is operating. [Figure 4] FIG. 4 is a flowchart illustrating the process flow for calculating the current value according to this embodiment. [Figure 5] FIG. 5 is a graph showing another example of a PWM signal when the motor is operating. DETAILED DESCRIPTION OF THE INVENTION
[0011] Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention is not limited to the embodiments described below.
[0012] (Motor system) FIG. 1 is a schematic circuit diagram of a motor system according to this embodiment. As shown in FIG. 1, the motor system 1 according to this embodiment includes a motor 10 and a motor control device 11 that controls the motor 10. The motor system 1 is used, for example, in an electric steering device for a vehicle, and applies a steering assist force to the steering shaft of the vehicle. That is, the motor 10 is driven by the motor control device 11, and the driving force of the motor 10 applies a steering assist force to the steering shaft. However, the use of the motor system 1 is not limited to this and may be any use.
[0013] (Motor) The motor 10 is a multi-phase AC motor. The motor 10 may have any number of phases, but in this embodiment, the motor 10 has three phases: U phase, V phase, and W phase, and can be said to be a three-phase AC motor.
[0014] (Motor control device) 1, motor control device 11 includes power supply unit 12, inverter 14, inverter drive circuit 16, resistor unit 18, voltage detection unit 20, and control device 22. Motor control device 11 converts DC current from power supply unit 12 to AC current using inverter 14, and supplies the converted AC current to motor 10 to drive motor 10.
[0015] (Power supply part) The power supply unit 12 is a power supply that supplies a current to the inverter 14. The power supply unit 12 supplies a direct current to the inverter 14.
[0016] (inverter) The inverter 14 is a circuit that converts the direct current supplied from the power supply unit 12 into alternating current and supplies the alternating current to the motor 10. The inverter 14 has a plurality of switching elements that apply a voltage (supply a current) to the motor 10. In this embodiment, the inverter 14 has switching elements T1U, T1V, T1W, T2U, T2V, and T2W. As the switching elements T1U, T1V, T1W, T2U, T2V, and T2W, for example, FETs (field effect transistors), more specifically MOSFETs (metal oxide semiconductor field effect transistors), may be used.
[0017] The switching elements T1U and T2U are connected in series to the power supply unit 12. Specifically, the drain of the switching element T1U is connected to the positive side of the power supply unit 12, the source of the switching element T1U is connected to the drain of the switching element T2U, and the source of the switching element T2U is connected to the negative side of the power supply unit 12. A connection point between the source of the switching element T1U and the drain of the switching element T2U is connected to the U-phase (the stator coil of the U-phase) of the motor 10. The gates of the switching elements T1U and T2U are connected to the inverter drive circuit 16. The control device 22 controls input of PWM (Pulse Width Modulation) signals from the inverter drive circuit 16 to the gates of the switching elements T1U and T2U, whereby the switching elements T1U and T2U are switched on (a state in which a current passes) and off (a state in which a current is blocked).
[0018] The switching elements T1V and T2V are connected in series to the power supply unit 12. The switching elements T1V and T2V are connected to the power supply unit 12 in parallel with the switching elements T1U and T2U. Specifically, the drain of the switching element T1V is connected to the positive side of the power supply unit 12, the source of the switching element T1V is connected to the drain of the switching element T2V, and the source of the switching element T2V is connected to the negative side of the power supply unit 12. The connection point between the source of the switching element T1V and the drain of the switching element T2V is connected to the V-phase (V-phase stator coil) of the motor 10. The gates of the switching elements T1V and T2V are connected to the inverter drive circuit 16. The control device 22 controls the input of PWM signals from the inverter drive circuit 16 to the gates of the switching elements T1V and T2V, thereby switching the switching elements T1V and T2V between on and off.
[0019] The switching elements T1W and T2W are connected in series to the power supply unit 12. The switching elements T1W and T2W are connected to the power supply unit 12 in parallel with the switching elements T1U and T2U and the switching elements T1V and T2V. Specifically, the drain of the switching element T1W is connected to the positive side of the power supply unit 12, the source of the switching element T1W is connected to the drain of the switching element T2W, and the source of the switching element T2W is connected to the negative side of the power supply unit 12. The connection point between the source of the switching element T1W and the drain of the switching element T2W is connected to the W-phase (W-phase stator coil) of the motor 10. The gates of the switching elements T1W and T2W are connected to the inverter drive circuit 16. The control device 22 controls the input of PWM signals from the inverter drive circuit 16 to the gates of the switching elements T1W and T2W, thereby switching the switching elements T1W and T2W on and off.
[0020] Hereinafter, when there is no need to distinguish between the switching elements T1U, T1V, and T1W, they will be referred to as switching element T1 (first switching element), and when there is no need to distinguish between the switching elements T2U, T2V, and T2W, they will be referred to as switching element T2 (second switching element). In this case, the switching elements T1 and T2 are connected in series to the power supply unit 12, and the connection point between the source of the switching element T1 and the drain of the switching element T2 can be said to be connected to one of the phases of the motor 10. The switching elements T1 and T2 can be said to form a series circuit connected to one of the phases of the motor 10. That is, for example, the switching elements T1U and T2U can be said to form a series circuit connected to the U phase of the motor 10, the switching elements T1V and T2V can be said to form a series circuit connected to the V phase of the motor 10, and the switching elements T1W and T2W can be said to form a series circuit connected to the W phase of the motor 10.
[0021] In this embodiment, a body diode is connected in parallel to each of the switching elements T1 and T2, but this is not an essential configuration.
[0022] (Inverter drive circuit) The inverter drive circuit 16 is connected to the inverter 14 and is controlled by the control device 22 to drive the switching elements T1 and T2. The inverter drive circuit 16 is connected to the gate of each switching element T1 and outputs a PWM signal to the gate of the switching element T1 to drive the switching element T1. The inverter drive circuit 16 is also connected to the gate of each switching element T2 and outputs a PWM signal to the gate of the switching element T2 to drive the switching element T2.
[0023] (Resistance part) The resistance units 18 are resistors connected to the switching elements T2 of each phase (in each series circuit). The resistance units 18 are provided between the switching elements T2 of each phase and the ground point. That is, in this embodiment, the resistance units 18 include a resistance unit 18U provided between the U-phase switching element T2U and the ground point, a resistance unit 18V provided between the V-phase switching element T2V and the ground point, and a resistance unit 18W provided between the W-phase switching element T2W and the ground point. The resistance units 18 may be, for example, shunt resistors.
[0024] (Voltage detection section) The voltage detection unit 20 is provided between the switching element T2 of each phase (of each series circuit) and the ground point, and detects the voltage between the switching element T2 of each phase and the ground point. In this embodiment, the voltage detection unit 20 is connected to the switching element T2 in parallel with the resistance unit 18. That is, the voltage detection unit 20 is connected to a point between the switching element T2 and the resistance unit 18 and a point between the resistance unit 18 and the ground point, and detects the voltage between the switching element T2 and the ground point. In this embodiment, the voltage detection unit 20 includes a voltage detection unit 20U provided between the U-phase switching element T2U and the ground point, a voltage detection unit 20V provided between the V-phase switching element T2V and the ground point, and a voltage detection unit 20W provided between the W-phase switching element T2W and the ground point.
[0025] The voltage detection unit 20 may be any device capable of detecting a voltage, and may be a device that outputs a signal indicating the detected voltage. For example, in this embodiment, the voltage detection unit 20 includes an amplifier circuit (differential amplifier circuit) that amplifies an input voltage. In the voltage detection unit 20, the voltage between the switching element T2 and the ground point is input to the amplifier circuit, which then amplifies and outputs the input voltage. In this embodiment, the voltage detection unit 20 also includes an AD conversion circuit. In this case, the voltage, which is an analog signal amplified by the amplifier circuit, is converted into a digital signal by the AD conversion circuit and output from the voltage detection unit 20 as a signal indicating the amplified voltage value.
[0026] (Control device) FIG. 2 is a schematic block diagram of the control device. The control device 22 is a device (microcomputer) that controls the motor 10. As shown in FIG. 2, the control device 22 has a storage unit 30 and a control unit 32. The storage unit 30 is a memory that stores various information such as the calculation contents and programs of the control unit 32, and includes at least one of a main storage device such as a RAM (Random Access Memory) and a ROM (Read Only Memory), and an external storage device such as an HDD (Hard Disk Drive). The program for the control unit 32 stored in the storage unit 30 may be stored in a recording medium that can be read by the control device 22.
[0027] The control unit 32 is a calculation device and includes a calculation circuit such as a CPU (Central Processing Unit). The control unit 32 includes a current calculation unit 40 and an element control unit 42. The control unit 32 implements the current calculation unit 40 and the element control unit 42 by reading and executing a program (software) from the storage unit 30. The control unit 32 may implement these processes using a single CPU, or may be provided with multiple CPUs and execute the processes using the multiple CPUs. At least a portion of the processes of the current calculation unit 40 and the element control unit 42 may be implemented using hardware circuits.
[0028] The current calculation unit 40 calculates the current value between the switching element T2 and the ground point based on the voltage detected by the voltage detection unit 20. The element control unit 42 controls the switching elements T1 and T2 based on the current value calculated by the current calculation unit 40. Specifically, the element control unit 42 sets a PWM signal to be input to the switching elements T1 and T2 based on the current value calculated by the current calculation unit 40, and causes the inverter drive circuit 16 to output the set PWM signal to the switching elements T1 and T2. The processing contents of the current calculation unit 40 and the element control unit 42 will be described in more detail below.
[0029] (Motor control) Next, the control of the motor 10 by the motor control device 11 will be described.
[0030] (Motor start-up control) When starting the motor 10, the motor control device 11 causes the voltage detection unit 20 to detect voltages when no current flows between the switching element T2 of each phase and the ground point (i.e., the resistor unit 18 of each phase). The current calculation unit 40 calculates the correspondence between voltage and current values for each phase, using the voltage detected by the voltage detection unit 20 when no current flows through the resistor unit 18 of each phase as a reference. The correspondence here refers to information indicating the correspondence between the voltage detected by the voltage detection unit 20 and the value of the current flowing through the resistor unit 18. The correspondence may be information in the form of an equation in which the voltage is a variable and the current value is a solution. By using this correspondence, the current calculation unit 40 can calculate the current value from the voltage detected by the voltage detection unit 20 when starting the motor 10. Note that the start-up of motor 10 refers to the state before AC current is applied to motor 10 to operate it (a state in which AC current is not applied to motor 10), and refers to the preparation period for applying AC voltage to motor 10 to start operation.
[0031] In this embodiment, the current calculation unit 40 sets a correspondence relationship such that the current value becomes 0 A with respect to the voltage value detected by the voltage detection unit 20 when no current flows through the resistance unit 18 of each phase. More specifically, in this embodiment, the current calculation unit 40 acquires a signal indicating the amplified voltage value output from the voltage detection unit 20, and sets a correspondence relationship such that the current value becomes 0 A with respect to the voltage value indicated by that signal. For example, the correspondence relationship may be as shown in the following formula (1).
[0032] I=a (Vb) (1)
[0033] Here, I is the current value (A) and V is the voltage (V). a is a coefficient indicating the proportional relationship between the voltage and the current value, and is a preset fixed value. b is a coefficient set based on the voltage detected by the voltage detection unit 20 when no current flows through the resistance unit 18 of each phase, and may be the voltage value detected by the voltage detection unit 20 in that state. In this embodiment, b is set to a value such that the left side of equation (1) becomes 0 (A), assuming that V is the voltage value detected by the voltage detection unit 20 when no current flows through the resistance unit 18 of each phase (the voltage value amplified by the amplifier circuit and output from the voltage detection unit 20). For example, if a is 16 (mV / A) and V is 2.5 (V), b is 2.5 (V).
[0034] In this way, by setting the correspondence based on the voltage detected when no current flows through the resistance section 18, it is possible to take into account individual differences in detection by the voltage detection section 20, such as the degree of voltage amplification by the voltage detection section 20, and the current value can be appropriately calculated from the voltage detected by the voltage detection section 20.
[0035] In this embodiment, if the voltage detected by the voltage detection unit 20 when no current flows through the resistor units 18 of each phase is within a first predetermined range, the current calculation unit 40 sets the correspondence relationship using that voltage value. On the other hand, if the voltage detected by the voltage detection unit 20 when no current flows through the resistor units 18 of each phase is outside the first predetermined range, the current calculation unit 40 does not set the correspondence relationship using that voltage value. In other words, if the voltage detected by the voltage detection unit 20 is an abnormal value outside the first predetermined range, the current calculation unit 40 does not set the correspondence relationship using that voltage value. If the detected voltage is outside the first predetermined range, the voltage detection unit 20 may be caused to detect the voltage again when no current flows through the resistor units 18 of each phase, and the correspondence relationship may be calculated, or the motor 10 may be stopped from starting due to an abnormality. In this way, by calculating the correspondence relationship using a voltage within the first predetermined range, the correspondence relationship may be prevented from being set using an abnormal voltage, and the current value can be appropriately calculated.
[0036] Here, the first predetermined range may be set arbitrarily. For example, if the voltage detection unit 20 is designed to amplify a voltage of 0 V to a predetermined voltage value (e.g., 2.5 V), the first predetermined range may be set to a range from a lower limit voltage value obtained by subtracting a predetermined value (e.g., 0.1 V) from the predetermined voltage value to an upper limit voltage value obtained by adding a predetermined value (e.g., 0.1 V) to the predetermined voltage value.
[0037] (Control of motor operation) During operation of the motor 10, the motor control device 11 converts the DC current from the power supply unit 12 into AC current by supplying a PWM signal to the switching elements T1 and T2 while supplying DC current from the power supply unit 12. This converts the DC current from the power supply unit 12 to AC current and supplies it to each phase of the motor 10. This drives the motor 10. Specifically, the motor control device 11 causes the current calculation unit 40 to calculate the value of the current flowing between the switching element T2 of each phase and the ground point (i.e., the resistor unit 18 of each phase) when a current is flowing between the switching element T2 of each phase and the ground point (i.e., the resistor unit 18 of each phase). The current calculation unit 40 calculates the current value based on the voltage detected by the voltage detection unit 20 when a current is flowing through the resistor unit 18 of each phase and the correspondence relationship between the voltage and the current value. That is, when the correspondence relationship is as shown in equation (1), the current calculation unit 40 uses the voltage detected by the voltage detection unit 20 as V in equation (1) and calculates I in equation (1) as the current value.
[0038] Based on the current value calculated by the current calculation unit 40, the motor control device 11 then sets, via the element control unit 42, the PWM signals to be supplied to each of the switching elements T1 and T2 for a period following the period during which the voltage used to calculate the current value was detected. Specifically, based on the current value calculated by the current calculation unit 40, the element control unit 42 sets the duty ratio (in this example, the ratio of the period during which a high-level signal is applied to one cycle of the PWM signal) of the PWM signals to be supplied to each of the switching elements T1 and T2. The element control unit 42 then causes the inverter drive circuit 16 to supply the set PWM signals to each of the switching elements T1 and T2. As a result, the set PWM signals are supplied to each of the switching elements T1 and T2, and AC current is supplied to each phase of the motor 10. Note that the element control unit 42 may set the PWM signals based not only on the current value calculated by the current calculation unit 40 but also on the rotor rotation angle (phase) of the motor 10 detected by a sensor (not shown) that detects the rotor rotation angle (phase).
[0039] An example of a method for setting a PWM signal will be described in more detail below. FIG. 3 is a graph showing an example of a PWM signal during motor operation. In this embodiment, the element control unit 42 sets the duty ratio of the PWM signal based on a reference waveform L and an adjustment value H. The reference waveform L is a waveform that serves as a reference for setting the duty ratio of the PWM signal. The reference waveform L is a preset waveform whose value changes over time. In this embodiment, the reference waveform L has a triangular waveform as shown in FIG. 3, and the duty ratio can be said to be set using a triangular wave comparison method. Specifically, the reference waveform L according to this embodiment is a waveform in which the value rises linearly with a predetermined slope over time, reaches a maximum value, then falls linearly with a predetermined slope over time, and reaches a minimum value, then rises linearly with a predetermined slope again. This cycle is repeated. In this embodiment, the slopes of the reference waveform L when rising and when falling are preset and remain constant. The rising slope and falling slope of the reference waveform L may be set arbitrarily, but it is preferable that the absolute value of the rising slope and the absolute value of the falling slope are the same value.
[0040] The adjustment value H is a value corresponding to the value of the reference waveform L (a value of the same dimension as the value on the vertical axis of the reference waveform L in FIG. 3), and is a value indicating the timing for switching the PWM signal between on (high) and off (low). The adjustment value H is set based on the current value calculated by the current calculation unit 40, and its value changes depending on the current value calculated by the current calculation unit 40. The adjustment value H is set for each phase of the motor 10. In this embodiment, as shown in FIG. 3, an adjustment value HU for the U phase, an adjustment value HV for the V phase, and an adjustment value WH for the W phase are set as the adjustment value H.
[0041] In this embodiment, the element control unit 42 sets the duty ratio of the PWM signal by setting the timings for turning the PWM signal on and off based on the value of the reference waveform L, which changes over time, and the adjustment value H, which is set based on the current value. For example, in the example of FIG. 3 , the element control unit 42 switches the PWM signal to the U-phase switching element T2U from on to off at timing t1U, when the value of the reference waveform L changes from a value less than the U-phase adjustment value HU to a value equal to the adjustment value HU, as indicated by line L2U. Then, the element control unit 42 switches the PWM signal to the U-phase switching element T1U from off to on at timing t2U, a predetermined period after timing t1U, as indicated by line L1U. Then, the element control unit 42 switches the PWM signal to the U-phase switching element T1U from on to off at timing t3U, when the value of the reference waveform L changes from a value higher than the U-phase adjustment value HU to a value equal to the adjustment value HU, as indicated by line L1U. Then, as indicated by line L2U, at timing t4U, which is a predetermined period after timing t3U, element control unit 42 switches the PWM signal to switching element T2U from OFF to ON.
[0042] Similarly, in the example of FIG. 3 , the element control unit 42 switches the PWM signal to the V-phase switching element T2V from ON to OFF at time t1V when the value of the reference waveform L changes from a value less than the V-phase adjustment value HV to a value equal to the adjustment value HV, as indicated by line L2V. Then, as indicated by line L1V, the element control unit 42 switches the PWM signal to the V-phase switching element T1V from OFF to ON at time t2V, a predetermined period after time t1V. Then, as indicated by line L1V, the element control unit 42 switches the PWM signal to the switching element T1V from ON to OFF at time t3V when the value of the reference waveform L changes from a value higher than the V-phase adjustment value HV to a value equal to the adjustment value HV, as indicated by line L1V. Then, as indicated by line L2V, the element control unit 42 switches the PWM signal to the switching element T2V from OFF to ON at time t4V, a predetermined period after time t3V.
[0043] Similarly, in the example of FIG. 3 , the element control unit 42 switches the PWM signal to the W-phase switching element T2W from ON to OFF at timing t1W when the value of the reference waveform L changes from a value less than the W-phase adjustment value HW to a value equal to the adjustment value HW, as indicated by line L2W. Then, as indicated by line L1W, the element control unit 42 switches the PWM signal to the W-phase switching element T1W from OFF to ON at timing t2W, a predetermined period after timing t1W. Then, as indicated by line L1W, the element control unit 42 switches the PWM signal to the switching element T1W from ON to OFF at timing t3W when the value of the reference waveform L changes from a value higher than the W-phase adjustment value HW to a value equal to the adjustment value HW, as indicated by line L1W. Then, as indicated by line L2W, the element control unit 42 switches the PWM signal to the switching element T2W from OFF to ON at timing t4W, a predetermined period after timing t3W.
[0044] However, the PWM signals to each switching element T1, T2 in Figure 3 are just an example, and are set appropriately according to the current value calculated by the current calculation unit 40 (in this example, the adjustment value H set based on that current value).
[0045] (Temperature drift of voltage detection section) As described above, the PWM signals to each of the switching elements T1 and T2 are set based on the current value calculated by the current calculation unit 40. As described above, the current calculation unit 40 calculates the current value based on the voltage detected by the voltage detection unit 20 at the timing when current flows through the resistor unit 18 of each phase and the correspondence relationship set when the motor 10 is started. However, when the motor 10 starts operating, the temperature of the voltage detection unit 20 also rises as the temperature of the motor 10 rises. The voltage detection unit 20 may have a characteristic (temperature drift characteristic) in which the voltage it outputs changes depending on the temperature, and there is a risk that the correspondence relationship between the voltage and current value set when the motor 10 is started and the correspondence relationship between the actual voltage and current value during operation will differ. For example, the voltage detection unit 20 amplifies and outputs the input voltage (the voltage at the resistance unit 18), but the degree of voltage amplification changes with temperature, and the signal (signal indicating the amplified voltage) output to the current calculation unit 40 may deviate from the actual voltage value at the resistance unit 18. As a result, the calculated current value may also deviate from the current value that actually flowed through the resistance unit 18. This may result in the motor not being able to be controlled appropriately when a temperature change occurs.
[0046] In contrast, in this embodiment, the voltage detection unit 20 is caused to detect voltages even when no current is flowing through the resistor units 18 of each phase. Then, in this embodiment, the current calculation unit 40 calculates a current value based on a voltage detected when no current is flowing through the resistor units 18 of each phase and a voltage detected when current is flowing through the resistor units 18 of each phase. More specifically, the current calculation unit 40 calculates a current value in a second period W2b that follows the second period W2a based on a voltage detected in a first period W1a (a period when no current is flowing through the resistor units 18 of each phase) described below, a voltage detected in a second period W2a (a period when current is flowing through the resistor units 18 of each phase) described below, and the above-mentioned correspondence relationship. Specifically, as described below, the current calculation unit 40 calculates a current value in the second period W2b by offset-correcting the current value in the second period W2a with the current value in the first period W1a. This allows the current value to be calculated taking into account the voltage at times when no current is flowing through the resistance section 18 of each phase, thereby taking into account temperature drift characteristics and preventing the calculated current value from deviating from the current value that actually flowed through the resistance section 18.
[0047] However, the period during which no current flows through the resistor unit 18 of each phase is determined by the duty ratio of the PWM signal set before that period. Therefore, the period during which no current flows through the resistor unit 18 of each phase may be short, making it difficult to detect the voltage during that period. For example, there is a risk that the voltage during the period during which current flows through the resistor unit 18 may be erroneously detected as the voltage during the period during which no current flows through the resistor unit 18 of each phase. If this erroneous detection occurs, the current value may not be calculated appropriately, and the motor may not be controlled appropriately. In response to this, in this embodiment, a process is performed to calculate the current value so that the voltage during the period during which no current flows through the resistor unit 18 of each phase can be appropriately used. This will be described in detail below.
[0048] (Calculation of current value) Hereinafter, a period during which the switching elements T1 (switching elements T1U, T1V, and T1W in this example) of all phases (all series circuits) are in the ON state, in other words, a period during which the PWM signals to the switching elements T1 of all phases are ON, will be referred to as a first period W1. During the first period W1, the switching elements T2 of all phases are in the OFF state (the PWM signals to the switching elements T2 of all phases are OFF). During the first period W1, no current flows through the resistance units 18 of all phases (between the switching elements T2 of all phases and the ground). Furthermore, a period during which the switching elements T2 (switching elements T2U, T2V, and T2W in this example) of all phases are in the ON state, in other words, a period during which the PWM signals to the switching elements T2 of all phases are ON, will be referred to as a second period W2. During the second period W2, the switching elements T1 of all phases are in the OFF state (the PWM signals to the switching elements T1 of all phases are OFF). In the second period W2, current flows through the resistance units 18 of all phases (between the switching elements T2 of all phases and the ground point).
[0049] Furthermore, one cycle of the reference waveform L (in the example of FIG. 3, the period from when the reference waveform reaches its minimum value to when it next reaches its minimum value) is defined as one period. The first period W1 and second period W2 in a given period Pa are defined as the first period W1a and second period W2a, respectively, and the following explanation will be given using as an example a case where voltages are detected in the first period W1a and second period W2a. Note that the first period W1 and second period W2 in the period Pb next to period Pa are defined as the first period W1b and second period W2b, respectively.
[0050] (When the first period is longer than the specified length) If the length (time length) of the first period W1a is equal to or longer than a predetermined length, the current calculation unit 40 calculates the current value flowing through the resistance unit 18 of each phase in the second period W2b of the next cycle Pb based on the voltage detected by the voltage detection unit 20 during the first period W1a and the voltage detected by the voltage detection unit 20 during the second period W2a. That is, when the length (time length) of the first period W1a is equal to or longer than a predetermined length, the current calculation unit 40 calculates the value of the current flowing through the resistance unit 18U during the second period W2b based on the voltages detected by the voltage detection unit 20U during the first period W1a and the second period W2a, calculates the value of the current flowing through the resistance unit 18V during the second period W2b based on the voltages detected by the voltage detection unit 20V during the first period W1a and the second period W2a, and calculates the value of the current flowing through the resistance unit 18W during the second period W2b based on the voltages detected by the voltage detection unit 20W during the first period W1a and the second period W2a. Then, the current calculation unit 40 sets the PWM signals to the switching elements T1 and T2 of each phase during the period after the second period W2b (the period following the period Pb in this example) based on the current values of each phase during the second period W2b calculated by the current calculation unit 40. Specifically, the current calculation unit 40 causes the voltage detection unit 20 of each phase to detect the voltage in the resistor unit 18 during the first period W1a and the second period W2a. The current calculation unit 40 then determines whether the length of the first period W1a during which the voltage detection unit 20 of each phase performed detection is equal to or greater than a predetermined length. If the length is equal to or greater than the predetermined length, the current calculation unit 40 calculates the value of the current flowing through the resistor unit 18 of each phase during the second period W2b based on the voltages detected by the voltage detection unit 20 during the first period W1a and the second period W2a. The length of the first period W1a can be determined from the duty ratio of the PWM signal output during the first period W1a. The predetermined length may be set arbitrarily.
[0051] The timing during the first period W1a when the voltage detection unit 20 of each phase detects voltage may be any timing when no current flows through any of the resistor units 18, but may be, for example, a timing between a predetermined time before the reference waveform L reaches its maximum value and a predetermined time after the reference waveform L reaches its maximum value, preferably the timing when the reference waveform L reaches its maximum value. Furthermore, the timing during the second period W2a here may be any timing when current flows through all of the resistor units 18, but may be, for example, a timing between a predetermined time before the reference waveform L reaches its minimum value and a predetermined time after the reference waveform L reaches its minimum value, preferably the timing when the reference waveform L reaches its minimum value.
[0052] The current calculation unit 40 may calculate the current value during the second period W2b using any method based on the voltages detected by the voltage detection unit 20 during the first period W1a and the second period W2a. In this embodiment, however, the current calculation unit 40 calculates the current value during the second period W2b by performing offset correction using the voltage detected during the first period W1a. Specifically, the current calculation unit 40 calculates the current value during the first period W1a based on the voltages detected by the voltage detection unit 20 during the first period W1a, and calculates the current value during the second period W2a based on the voltages detected by the voltage detection unit 20 during the second period W2a. In other words, the current calculation unit 40 calculates the current value during the first period W1a based on the voltages detected by the voltage detection unit 20 during the first period W1a and the corresponding relationship, and calculates the current value during the second period W2a based on the voltages detected by the voltage detection unit 20 during the second period W2a and the corresponding relationship. The current calculation unit 40 then calculates the current value during the second period W2b from the difference between the calculated current value during the second period W2a and the calculated current value during the first period W1a. For example, in this embodiment, the current calculation unit 40 subtracts the calculated current value during the first period W1a from the calculated current value during the second period W2a, and sets the resulting value as the current value during the second period W2b. That is, the current calculation unit 40 offsets the current value during the second period W2a with the current value during the first period W1a to calculate the current value during the second period W2b. This allows the temperature drift characteristics to be appropriately taken into account, allowing the current value to be calculated appropriately.
[0053] However, the offset correction method is not limited to this. For example, the current calculation unit 40 may correct the correspondence relationship based on the voltage detected by the voltage detection unit 20 during the first period W1a. That is, for example, the current calculation unit 40 corrects the correspondence relationship (coefficient b in equation (1) in this example) so that the current value becomes 0 A for the voltage detected by the voltage detection unit 20 during the first period W1a. Then, the current calculation unit 40 may calculate the current value during the second period W2b based on the voltage detected by the voltage detection unit 20 during the second period W2a and the corrected correspondence relationship.
[0054] (If the first period is less than the specified length) If the length of a first period W1a, during which no current flows through any of the resistor sections 18, is less than a predetermined length, the current calculation section 40 calculates the current value using the voltage detected during the first period W1 (the period before period Pa) that precedes the first period W1a. That is, for example, if the length of the current first period W1a is less than the predetermined length but there is a first period W1 that is equal to or longer than the predetermined length and in which voltage detection was performed before the first period W1a, the current calculation section 40 may calculate the current value during the second period W2b based on the voltage detected during the first period W1 and the voltage detected during the current second period W2a. The calculation method for the current value in this case may be the same as the calculation method when the length of the first period W1a is equal to or longer than the predetermined length. If there are multiple first periods W1 before the current first period W1a in which the time length is equal to or greater than the predetermined length and voltage detection was performed, it is preferable to calculate a moving average of the voltages detected in the previous first periods W1 and treat this moving average voltage (moving average voltage) as the voltage detected in the current first period W1a. In this case, the moving average voltage may be used to offset correct the current value in the second period W2a. The moving average voltage refers to the arithmetic mean of the voltages detected in a predetermined number of first periods W1 before the voltage detected in the current first period W1a. Furthermore, if there are multiple first periods W1 before the current first period W1a in which the time length is equal to or greater than the predetermined length and voltage detection was performed, the voltage in the latest first period W1 (closest to the current first period W1a) among those first periods W1 may be used. Furthermore, if the length of the current first period W1a is less than a predetermined length and there is no first period W1 prior to the current first period W1a whose time length is equal to or greater than the predetermined length and in which voltage detection was performed, the current value may be calculated based on the voltage detected at startup and the voltage detected in the current second period W2.
[0055] As described above, in this embodiment, offset correction is performed to calculate the current value during the second period W2b using the voltage detected during the previous first period W1, which is equal to or longer than a predetermined length, rather than using the voltage during the short first period W1a. This makes it possible to perform offset correction using the voltage during the first period W1, which has a low risk of false detection, rather than using the voltage during the short first period W1a, which has a high risk of false detection. Therefore, this embodiment makes it possible to calculate the current value during operation by appropriately using the voltage during the period when no current flows through the resistor 18 of each phase, while also taking into account the temperature drift characteristics.
[0056] In the above description, the voltage detection unit 20 for each phase detects the voltage at a timing during the first period W1a regardless of the length of the first period W1a, but this is not limited to this. For example, the voltage detection unit 20 for each phase may detect the voltage at a timing during the first period W1a only if the length of the first period W1a is equal to or greater than a predetermined length, and may not detect the voltage at a timing during the first period W1a if the length of the first period W1a is less than the predetermined length.
[0057] In the above description, the current value for the second period W2b of the next cycle Pb is calculated from the voltage for the first period W1a (or an earlier first period W1) and the voltage for the second period W1b, but this is not limiting. For example, the current value for the second period W2 of a cycle further after cycle Pb may be calculated from the voltage for the first period W1a (or an earlier first period W1) and the voltage for the second period W1b.
[0058] (When the voltage in the first period is within the second predetermined range) Furthermore, when the voltage detected by the voltage detection unit 20 in the first period W1a is within a second predetermined range, the current calculation unit 40 calculates the value of the current flowing through the resistance unit 18 of each phase in the second period W2b based on the correspondence between the voltage detected by the voltage detection unit 20 in the first period W1a and the voltage detected by the voltage detection unit 20 in the second period W2a. That is, in this embodiment, when the length of the first period W1a is equal to or longer than a predetermined length and the voltage detected in the first period W1a is within the second predetermined range, the current calculation unit 40 calculates the current value in the second period W2b based on the voltages detected by the voltage detection unit 20 in the first period W1a and the second period W2a. That is, the current calculation unit 40 calculates the current value in the second period W2b by offset-correcting the current value in the second period W2a with the current value in the first period W1a. Then, based on the current values of each phase in the second period W2b calculated by the current calculation unit 40, the current calculation unit 40 sets the PWM signals to the switching elements T1 and T2 of each phase in the period after the second period W2b (the period after the cycle Pb).
[0059] The second predetermined range may be set arbitrarily, but is preferably wider than the first predetermined range used to calculate the correspondence when starting the motor 10. For example, if the voltage detection unit 20 is designed to amplify a voltage of 0 V to a predetermined voltage value (e.g., 2.5 V), the second predetermined range may be set to a range from a lower limit voltage value obtained by subtracting a value (e.g., 0.2 V) larger than the predetermined value in the first predetermined range from the predetermined voltage value to an upper limit voltage value obtained by adding a value (e.g., 0.2 V) larger than the predetermined value in the first predetermined range to the predetermined voltage value. Furthermore, if the voltage value detected by the voltage detection unit 20 when starting the motor 10 and no current flows through the resistor units 18 of each phase is defined as a starting voltage value, the second predetermined range may be set to a range from a lower limit voltage value obtained by subtracting a predetermined value (e.g., 0.1 V) from the starting voltage value to an upper limit voltage value obtained by adding a predetermined value (e.g., 0.1 V) to the starting voltage value.
[0060] The second predetermined range may be constant or may be varied. In this case, for example, the higher the temperature of motor 10, the wider the second predetermined range may be. In this case, for example, a temperature sensor may be provided in motor 10 or motor control device 11, and the second predetermined range may be wider when the temperature detected by the temperature sensor is higher by a predetermined temperature or more than that at the time of startup of motor 10 than when the temperature detected by the temperature sensor is not higher by the predetermined temperature or more than that at the time of startup of motor 10. Furthermore, the second predetermined range may be gradually widened as the temperature detected by the temperature sensor increases.
[0061] (When the voltage in the first period is outside the second predetermined range) If the voltage detected by the voltage detection unit 20 in the first period W1a is outside the second predetermined range, the current calculation unit 40 calculates the current value using the voltage detected in the first period W1 that precedes the first period W1a. For example, if the voltage detected in the current first period W1a is outside the second predetermined range, but there is a first period W1 prior to the first period W1a in which the duration was equal to or longer than the predetermined length and the voltage was within the second predetermined range, the current calculation unit 40 may calculate the current value in the second period W2b based on the correspondence between the voltage detected in the first period W1 and the voltage detected in the current second period W2a. In other words, the current calculation unit 40 offsets the current value in the second period W2a with the current value in the first period W1 that precedes the first period W1a to calculate the current value in the second period W2b. In addition, if there are multiple first periods W1 before the current first period W1a whose time length is equal to or longer than the predetermined length and whose voltage is within the second predetermined range, it is preferable to use the voltage in the latest first period W1 (closest to the current first period W1) among those first periods W1.
[0062] As described above, in this embodiment, offset correction is performed using the voltage during the first period W1a only if the voltage is within the second predetermined range. This makes it possible to perform offset correction using the voltage during the first period W1a, which is a normal value, rather than using the voltage during the first period W1a, which is likely to be an abnormal value. Therefore, this embodiment makes it possible to calculate the current value during operation by appropriately using the voltage during the period when no current flows through the resistor unit 18 of each phase, while also taking into account temperature drift characteristics. Furthermore, by using a first period W1a that is equal to or longer than a predetermined length and has a voltage within the second predetermined range, it is possible to more appropriately use the voltage during the period when no current flows through the resistor unit 18 of each phase.
[0063] In the above description, both the process of determining whether to use the voltage in the first period W1a depending on the length of the first period W1a and the process of determining whether to use the voltage in the first period W1 depending on the magnitude of the voltage in the first period W1a were performed. However, this is not limiting, and only one of these processes may be performed.
[0064] (Number of voltage detections in the first period) In the above description, the number of voltage detections in the first period W1 and the second period W2 is the same. However, this is not limiting. The number of voltage detections in the first period W1 may be less than the number of voltage detections in the second period W2. That is, for example, the current calculation unit 40 may cause the voltage detection unit 20 to perform voltage detection in the second period W2 at predetermined intervals (e.g., every one period) and cause the voltage detection unit 20 to perform voltage detection in the first period W1 at intervals longer than the predetermined interval (e.g., every 10 periods). Then, after voltage detection in the first period W1 is performed, the voltage in the first period W1 may be used to perform the above-described process to offset-correct the current value in the second period W2. Thereafter, until the next voltage detection in the first period W1 is performed, the voltage in the same first period W1 may be used to perform offset correction. That is, in this case, the current calculation unit 40 may perform offset correction on the current value in the second period W2 using the voltage detected in the most recent first period W1. This reduces the processing load.
[0065] (Processing flow) Next, the process flow for calculating the current value described above will be described. FIG. 4 is a flowchart illustrating the process flow for calculating the current value according to this embodiment. As shown in FIG. 4, the motor control device 11 causes the voltage detection unit 20 of each phase to detect the voltage in the first period W1a and the voltage in the second period W2a (step S10). If the length of the first period W1a is equal to or longer than a predetermined period (step S12; Yes) and the voltage detected in the first period W1a is within a second predetermined range (step S14; Yes), the current calculation unit 40 of the motor control device 11 calculates the current value in the second period W2b after the voltage detection based on the voltage detected in the first period W1a and the voltage detected in the second period W2a (step S16). Based on the calculated current value in the second period W2b, the element control unit 42 of the motor control device 11 sets a PWM signal for the period after the second period W2b, outputs it to each switching element T1, T2, and controls the motor 10. On the other hand, if the length of the first period W1a is less than the predetermined period (step S12; No) or if the voltage detected in the first period W1a is outside the second predetermined range (step S14; No), the current calculation unit 40 does not perform offset correction using the voltage detected in the first period W1a (step S18). In this case, the current calculation unit 40 may calculate the current value in the second period W2 after the voltage detection using a moving average of the voltages detected in past first periods W1 and the voltage detected in the second period W2a. Furthermore, if there are multiple first periods W1 before the current first period W1 that have a duration equal to or longer than the predetermined length and in which voltage detection was performed, the current value in the second period W2b after the voltage detection may be calculated using the voltage in the latest first period W1 (closest to the current first period W1) among those first periods W1 and the voltage detected in the second period W2a. After step S16 or step S18 is performed, this process ends.
[0066] (Another example of a reference waveform) FIG. 5 is a graph showing another example of a PWM signal during motor operation. In the above description, the PWM signal was set using a triangular reference waveform L, but the shape of the reference waveform L is not limited to a triangular wave and may be any shape. For example, as shown in FIG. 5, the reference waveform L may be a sawtooth wave. Specifically, as shown in FIG. 5, the reference waveform L in this example has a waveform in which the value increases linearly with a predetermined slope over time, reaches a maximum value, then decreases to a minimum value, and then increases linearly again with a predetermined slope over time to a maximum value.
[0067] In this example, as indicated by line L1U, the element control unit 42 switches the PWM signal to the U-phase switching element T1U from ON to OFF at timing t1U when the value of the reference waveform L switches from the maximum value to the minimum value. Then, as indicated by line L2U, the element control unit 42 switches the PWM signal to the U-phase switching element T2U from OFF to ON at timing t2U, a predetermined period after timing t1U. Then, as indicated by line L2U, the element control unit 42 switches the PWM signal to the switching element T2U from ON to OFF at timing t3U when the value of the reference waveform L switches from a value lower than the U-phase adjustment value HU to a value equal to the adjustment value HU. Then, as indicated by line L1U, the element control unit 42 switches the PWM signal to the switching element T1U from OFF to ON at timing t4U, a predetermined period after timing t3U.
[0068] Similarly, in this example, as indicated by line L1V, at timing t1V when the value of reference waveform L switches from maximum to minimum, the element control unit 42 switches the PWM signal to V-phase switching element T1V from ON to OFF. Then, as indicated by line L2V, at timing t2V, a predetermined period after timing t1V, the element control unit 42 switches the PWM signal to V-phase switching element T2V from OFF to ON. Then, as indicated by line L2V, at timing t3V when the value of reference waveform L switches from a value lower than the V-phase adjustment value HV to a value equal to the adjustment value HV, the element control unit 42 switches the PWM signal to switching element T2V from ON to OFF. Then, as indicated by line L1V, at timing t4V, a predetermined period after timing t3V, the element control unit 42 switches the PWM signal to switching element T1V from OFF to ON.
[0069] Similarly, in this example, the element control unit 42 switches the PWM signal to the W-phase switching element T1W from ON to OFF at timing t1W when the value of the reference waveform L switches from the maximum value to the minimum value, as indicated by line L1W. Then, the element control unit 42 switches the PWM signal to the W-phase switching element T2W from OFF to ON at timing t2W, a predetermined period after timing t1W, as indicated by line L2W. Then, the element control unit 42 switches the PWM signal to the switching element T2W from ON to OFF at timing t3W when the value of the reference waveform L switches from a value lower than the W-phase adjustment value HW to a value equal to the adjustment value HW, as indicated by line L2W. Then, the element control unit 42 switches the PWM signal to the switching element T1W from OFF to ON at timing t4W, a predetermined period after timing t3W, as indicated by line L1W.
[0070] However, the PWM signals to each switching element T1, T2 in Figure 5 are just an example, and are set appropriately according to the current value calculated by the current calculation unit 40 (in this example, the adjustment value H set based on that current value).
[0071] (effect) As described above, the motor control device 11 according to the present disclosure includes an inverter 14 in which a series circuit having a switching element T1 (first switching element) and a switching element T2 (second switching element) is provided for each phase of the motor 10, and which applies an AC voltage to each phase of the motor 10; a voltage detection unit 20 provided between the switching element T2 of each series circuit and a ground point, and which detects the voltage between the switching element T2 and the ground point; and a current calculation unit 40 which calculates the current value between the switching element T2 and the ground point based on the voltage detected by the voltage detection unit 20. If the length of the first period W1a, during which the switching elements T1 of all series circuits (all phases) are in the ON state, is equal to or greater than a predetermined length, the current calculation unit 40 calculates the current value for the second period W2b, which follows the period during which the voltage was detected in the second period W2a, based on the voltage detected by the voltage detection unit 20 during the first period W1a and the voltage detected by the voltage detection unit 20 during the second period W2a, during which the switching elements T2 of all series circuits (phases) are in the ON state. According to this embodiment, offset correction can be performed using the voltage during the first period W1, which has a low risk of erroneous detection, rather than using the voltage during the short first period W1, which has a high risk of erroneous detection. Therefore, according to this embodiment, the current value during operation can be calculated by appropriately using the voltage during the period during which no current flows through the resistor units 18 of each phase, while also taking into account temperature drift characteristics. Therefore, according to the present disclosure, erroneous detection can be suppressed, and the motor can be appropriately controlled.
[0072] Furthermore, when the length of the first period W1a is less than the predetermined length, the current calculation unit 40 calculates the current value in a second period W2b that comes after the period in which the voltage was detected in the second period W2a, based on the voltage detected when the length of the first period W1 was equal to or greater than the predetermined length, which occurs before the period in which the length of the first period W1a is less than the predetermined length, and the voltage detected by the voltage detection unit 20 during the second period W2a. According to the present disclosure, when the length of the first period W1a is less than the predetermined length, the voltage detected when the length of the first period W1 was equal to or greater than the predetermined length is used, thereby making it possible to appropriately control the motor while suppressing erroneous detection.
[0073] The current calculation unit 40 sets a correspondence relationship such that, when the motor 10 is started, if the voltage detected by the voltage detection unit 20 is within a first predetermined range while no current is flowing between the switching element T2 and the ground, the voltage becomes 0 A. When the motor 10 is operating, the current calculation unit 40 calculates the current value during the second period W2b based on the voltage detected by the voltage detection unit 20 during the first period W1a, the voltage detected by the voltage detection unit 20 during the second period W2a, and the correspondence relationship. According to the present disclosure, the correspondence relationship is set such that the voltage detected at start-up becomes 0 A, and the current value during operation is calculated, so that the current during operation can be appropriately calculated taking into account individual differences in the performance of the voltage detection unit 20.
[0074] If the voltage detected by the voltage detection unit 20 in the first period W1a is within a second predetermined range that is wider than the first predetermined range, the current calculation unit 40 calculates a current value in the second period W2b based on the correspondence between the voltage detected by the voltage detection unit 20 in the first period W1a and the voltage detected by the voltage detection unit 20 in the second period W2a. If the voltage detected by the voltage detection unit 20 in the first period W1a is outside the second predetermined range, the current calculation unit 40 calculates a current value in the second period W2b that comes after the period in which the voltage was detected in the second period W1b based on the correspondence between the voltage detected in the first period W1 that fell within the second predetermined range before the period in which the voltage detection unit 20 detected the voltage in the first period W1a and the voltage detected by the voltage detection unit 20 in the second period W2a. According to the present disclosure, by making the second predetermined range wider than the first predetermined range, the temperature drift of the voltage detection unit 20 due to the temperature rise during operation of the motor 10 can be more appropriately taken into consideration, and the current during operation can be appropriately calculated.
[0075] If the voltage detected by the voltage detection unit 20 in the first period W1a is within a second predetermined range that is wider than the first predetermined range, the current calculation unit 40 corrects the correspondence relationship so that the voltage detected by the voltage detection unit 20 in the first period W1a is 0 A, and calculates the current value in the second period W2b that comes after the period in which the voltage was detected in the second period W1b based on the voltage detected by the voltage detection unit 20 in the second period W2a and the corrected correspondence relationship. According to the present disclosure, the motor can be appropriately controlled even when a temperature change occurs.
[0076] Although the embodiments and examples of the present invention have been described above, the embodiments are not limited to the contents of these embodiments. Furthermore, the above-described components include those that can be easily imagined by a person skilled in the art, those that are substantially the same, and those that are within the so-called equivalent range. Furthermore, the above-described components can be combined as appropriate. Furthermore, various omissions, substitutions, or modifications of the components can be made without departing from the spirit of the above-described embodiments. [Explanation of symbols]
[0077] 1 Motor System 10 Motor 11 Motor control device 12 Power supply section 14 Inverter 16 Inverter drive circuit 18 Resistor section 20 Voltage detection section 22 Control device 40 Current calculation section 42 Element control unit T1, T2 switching elements W1 1st period W2 2nd period
Claims
1. an inverter in which a series circuit having a first switching element and a second switching element is provided for each phase of the motor, and which applies an AC voltage to each phase of the motor; a voltage detection unit provided between the second switching element and a ground point in each of the series circuits, the voltage detection unit detecting a voltage between the second switching element and the ground point; a current calculation unit that calculates a current value between the second switching element and a ground point based on the voltage detected by the voltage detection unit; and The current calculation unit When the length of a first period during which the first switching elements of all the series circuits are in the on state is equal to or longer than a predetermined length, the current value in the second period, which is after the period during which the voltage is detected in the second period, is calculated based on the voltage detected by the voltage detection unit during the first period and the voltage detected by the voltage detection unit during a second period during which the second switching elements of all the series circuits are in the on state. Motor control device.
2. When the length of the first period is less than the predetermined length, the current value in the second period after the period in which the voltage was detected is calculated based on a voltage detected when the length of the first period is equal to or greater than the predetermined length and a voltage detected by the voltage detection unit during the second period, before the period in which the length of the first period is less than the predetermined length. The motor control device according to claim 1 .
3. The current calculation unit a correspondence relationship is set in which, when the voltage detected by the voltage detection unit is within a first predetermined range in a state where no current flows between the second switching element and the ground point at the time of starting the motor, the voltage is set to 0 A; During operation of the motor, the current value in the second period, which is after the period in which the voltage was detected in the second period, is calculated based on the voltage detected by the voltage detection unit in the first period, the voltage detected by the voltage detection unit in the second period, and the correspondence relationship.
3. The motor control device according to claim 1 or 2.
4. The current calculation unit when the voltage detected by the voltage detection unit in the first period is within a second predetermined range that is wider than the first predetermined range, calculate the current value in the second period that is after the period in which the voltage was detected in the second period based on the voltage detected by the voltage detection unit in the first period, the voltage detected by the voltage detection unit in the second period, and the correspondence relationship; When the voltage detected by the voltage detection unit in the first period is outside the second predetermined range, the current value in the second period after the period in which the voltage is detected in the second period is calculated based on the voltage detected in the first period that became within the second predetermined range before the period in which the voltage detection unit detected the voltage in the first period, the voltage detected by the voltage detection unit in the second period, and the correspondence relationship. The motor control device according to claim 3 .
5. The current calculation unit when the voltage detected by the voltage detection unit in the first period is within a second predetermined range that is wider than the first predetermined range, correcting the correspondence relationship so that the voltage detected by the voltage detection unit in the first period is set to 0 A, and calculating the current value in the second period that is after the period in which the voltage was detected in the second period based on the voltage detected by the voltage detection unit in the second period and the corrected correspondence relationship; The motor control device according to claim 3 .
6. an inverter in which a series circuit having a first switching element and a second switching element is provided for each phase of the motor, and which applies an AC voltage to each phase of the motor; a voltage detection unit provided between the second switching element and a ground point of each of the series circuits, the voltage detection unit detecting a voltage between the second switching element and the ground point, the program causing a computer to execute a control method for a motor control device, calculating a current value between the second switching element and a ground point based on the voltage detected by the voltage detection unit; In the step of calculating the current value, When the length of a first period during which the first switching elements of all the series circuits are in the on state is equal to or longer than a predetermined length, the current value in the second period, which is after the period during which the voltage is detected in the second period, is calculated based on the voltage detected by the voltage detection unit during the first period and the voltage detected by the voltage detection unit during a second period during which the second switching elements of all the series circuits are in the on state. program.
Citation Information
Patent Citations
Motor controller, and method for controlling motor drive circuit
JP2017169346A