Semiconductor equipment
Patent Information
- Application Number
- JP2025062726
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-04
- Publication Date
- 2026-10-16
AI Technical Summary
【0009】 一実施形態によれば、モータに供給される電流の制御の精度低下を抑制する半導体装置が実現される。
Smart Images

Figure 2026169057000001_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to a semiconductor device. [Background technology]
[0002] Conventionally, techniques for controlling motors using semiconductor devices are known. For example, Patent Document 1 describes a semiconductor device for controlling a motor. The semiconductor device performs calculations using the current value supplied from the inverter to the motor and the rotational angle position of the motor rotor, and controls the inverter using PWM (Pulse Width Modulation) based on the calculation results. [Prior art documents] [Patent Documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-57101 [Overview of the project] [Problems that the invention aims to solve]
[0004] The semiconductor device receives a signal from an encoder electrically connected to the motor and obtains the rotational angle position. Because the transmission of the signal from the encoder takes a relatively long time, there is a difference between the rotational angle position obtained by the semiconductor device and the actual rotational angle position at the time the semiconductor device performs the above calculation. Due to the effect of this difference, errors occur in the calculation results, and the accuracy of controlling the current supplied to the motor decreases.
[0005] Due to the circumstances described above, there is a need for a semiconductor device that suppresses the degradation of accuracy in controlling the current supplied to the motor.
[0006] Further challenges and novel features will become apparent from the description and accompanying drawings in this specification. [Means for solving the problem]
[0007] A semiconductor device according to one embodiment includes a first AD converter, a first rotation angle acquisition circuit, a first PWM timer, and a processor. The first AD converter detects a first current value supplied from a first inverter to a first motor. The first rotation angle acquisition circuit acquires a first rotation angle position of the rotor of the first motor from a first encoder electrically connected to the first motor. The processor generates a first current control signal by performing a first calculation based on the first current value detected by the first AD converter and the most recently acquired first rotation angle position. The first PWM timer has a first counter and generates a first PWM signal using a modulated wave based on the first current control signal and a first carrier signal based on the value of the first counter, and then outputs the first PWM signal to the first inverter. The processor, within one cycle of the first carrier signal, executes: (a) a process to cause the first AD converter to start detecting the first current value; (b) a process to start the first calculation in response to the completion of the detection of the first current value; and (c) a process to cause the first rotation angle acquisition circuit to start acquiring the first rotation angle position in response to the execution of the first calculation.
[0008] Another embodiment of the semiconductor device comprises an AD converter, a rotation angle acquisition circuit, a PWM timer, three or more N combinations, and a processor. Each of the N combinations corresponds to each of the N inverters and each of the N motors. The AD converter detects the current value supplied from the corresponding inverter to the corresponding motor. The rotation angle acquisition circuit acquires the rotation angle position of the rotor of the corresponding motor from an encoder electrically connected to the corresponding motor. The processor generates a current control signal by performing calculations based on the current value detected by the AD converter and the most recently acquired rotation angle position. The PWM timer has a counter and generates a PWM signal using a modulated wave based on the current control signal and a carrier signal based on the value of the counter, and then outputs the PWM signal to the inverter. The processor, within one cycle of the carrier signal, executes the following: (g) a process to cause the N AD converters to start detecting the current values supplied to the N motors; (h) a process to start the calculation corresponding to the first motor in response to the completion of the detection of the current values supplied to the N motors; and (i) a process to cause the first rotation angle acquisition circuit to start acquiring the rotation angle position from the encoder electrically connected to the first motor in response to the execution of the calculation corresponding to the first motor. Furthermore, within one cycle, when k is changed in increments of 1 from 1 to N-1, the processor repeatedly executes the following: (j) a process to start the calculation corresponding to the k+1 motor in response to the completion of the calculation corresponding to the k-th motor; and (k) a process to cause the k+1 rotation angle acquisition circuit to start acquiring the rotation angle position from the k+1 encoder in response to the execution of the calculation corresponding to the k+1 motor. [Effects of the Invention]
[0009] According to one embodiment, a semiconductor device is realized that suppresses a decrease in the accuracy of controlling the current supplied to the motor. [Brief explanation of the drawing]
[0010] [Figure 1] FIG. 1 is a diagram schematically showing a configuration of a motor control system according to an embodiment. [Figure 2] FIG. 2 is a diagram showing in detail the configuration of the motor control system according to the embodiment. [Figure 3] FIG. 3 is a configuration diagram of a current control system corresponding to one motor. [Figure 4] FIG. 4 is a time chart of current control processing corresponding to one motor. [Figure 5] FIG. 5 is a flowchart of processing related to control of one motor in an MCU. [Figure 6] FIG. 6 is a flowchart of current control processing corresponding to one motor. [Figure 7] FIG. 7 is a time chart of current control processing corresponding to two motors. [Figure 8] FIG. 8 is a flowchart of processing related to control of two motors in the MCU. [Figure 9] FIG. 9 is a time chart of current control processing corresponding to three or more motors. [Figure 10] FIG. 10 is a flowchart of processing related to control of three or more motors in the MCU. [Figure 11] FIG. 11 is a diagram showing the results of comparing the relationship between magnetic flux and current in a motor between a reference method and a proposed method. [Figure 12] FIG. 12 is a diagram showing a modification of the embodiment. [Figure 13] FIG. 13 is a diagram showing a configuration example of a motor control system that controls one motor. [Figure 14] FIG. 14 is a diagram showing the relationship between magnetic flux, current, and torque in a motor. [Figure 15] FIG. 15 is a diagram showing a time chart of each processing in control of one motor according to the reference method. [Figure 16] FIG. 16 is a diagram showing a configuration example of a motor control system that controls three motors. [Figure 17] FIG. 17 is a diagram showing a time chart of each processing in control of three motors according to the reference method. [Figure 18]This diagram illustrates the difference between current and magnetic flux in a motor. [Modes for carrying out the invention]
[0011] The embodiments will now be described. First, the history of the inventors' research will be explained. After that, the embodiments of the semiconductor device proposed in this application will be described.
[0012] In the following embodiments, identical or corresponding components are denoted by the same reference numerals, and repeated descriptions are omitted unless necessary.
[0013] Furthermore, in the following embodiments, the MCU is an example of a "semiconductor device" in this application. The CPU is an example of a "processor" in this application. The encoder interface is an example of a "rotational angle position acquisition circuit" in this application.
[0014] (History of the inventor's research) The inventor's research process will now be explained.
[0015] Figure 13 shows an example configuration of a motor control system that controls a single motor. The motor control system includes, for example, an MCU (Micro Control Unit) 50, an inverter 60, a motor 70, and an encoder 80, as shown in Figure 13. The MCU 50 includes, for example, a CPU (Central Processing Unit) 51, a non-volatile memory 52, a PWM timer 53, an AD converter 54, a rotation angle acquisition circuit 55, and a bus 56. The non-volatile memory 52, the PWM timer 53, the AD converter 54, and the rotation angle acquisition circuit 55 are electrically connected to the bus 56 and can communicate with each other. The CPU 51 is equipped with a volatile cache memory 511. The non-volatile memory 52 stores the program PR5. The rotation angle acquisition circuit 55 includes an encoder interface (hereinafter also referred to as encoder IF) 550. The CPU 51 reads the program PR5 from the non-volatile memory 52 and executes it to perform various processes related to motor control. The PWM timer is a timer circuit designed for PWM control. A PWM timer circuit contains a PWM counter. The PWM counter value increases and decreases periodically and corresponds to the PWM carrier signal.
[0016] The CPU 51 transmits a control signal to the PWM timer 53. The PWM timer 53 generates a PWM signal based on the control signal and transmits it to the inverter 60. The inverter 60 is PWM controlled by the PWM signal and supplies current to the motor 70. The AD converter 54 detects the U-phase, V-phase, and W-phase current values supplied to the motor 70 by performing an AD conversion. The analog signal representing the current value is generated, for example, by a current sensor. The encoder IF 550 receives a signal from the encoder 80 that can identify the rotational angle position of the motor 70's rotor and acquires the rotational angle position. The CPU 51 uses the detected current value and the acquired rotational angle position to perform a predetermined calculation (hereinafter also referred to as current control calculation), generates a control signal based on the calculation result, and transmits it to the PWM timer 53.
[0017] Figure 14 shows the relationship between magnetic flux, current, and torque in a motor. Here, as shown in Figure 14, we assume that a current I [A] flows in a direction rotated by an angle δ from the direction of the rotational angular position θ, which represents the direction of the magnetic flux Φ, that is, the direction of the motor rotor, which can be considered as a bar magnet. In this case, the torque T [N·m] generated in the motor rotor is expressed as the product of the magnetic flux Φ [Wb] of the motor rotor and the current component Isin(δ) which is orthogonal to the direction of the magnetic flux Φ. That is, the equation T = ΦIsin(δ) holds. The CPU performs current control calculations using the detected current value and the acquired rotational angular position θ in order to efficiently generate torque in the motor rotor (minimizing losses) and control the rotational speed of the motor rotor as commanded.
[0018] Serial communication is generally used to transmit signals from encoder 80 to encoder IF550. Therefore, the time required to acquire the rotational angle position of the motor rotor tends to be relatively long. As a general reference method, one can consider starting the acquisition of the rotational angle position used for current control calculations at period n of the PWM carrier signal at the beginning of the previous period (n-1). The timing of the beginning of period (n-1) corresponds, for example, to the point in the waveform representing the PWM counter value that is the trough, that is, the point in time when the peak value of the PWM carrier signal is at its lowest value.
[0019] Figure 15 shows a time chart of each process in the control of a single motor using the standard method. In the standard method, for example, as shown in Figure 15, at time Ta, the beginning of period n, the CPU 51 instructs the AD converter 54 to start detecting the U-phase, V-phase, and W-phase current values flowing to the motor. Also at the same time Ta, the CPU 51 instructs the encoder IF 550 to start acquiring the rotational angle position θ of the motor rotor from the encoder 80. Next, at time Tb, when the detection of current values is completed, the CPU 51 starts a current control calculation using the detected current values and the rotational angle position acquired in the previous period. The current control calculation is completed at time Tc. At time Tc, the acquisition of the rotational angle position is still ongoing. The acquisition of the rotational angle position is completed at time Td. After that, at time Te, the period n of the PWM carrier signal ends.
[0020] Next, let's consider the case where one MCU controls multiple motors.
[0021] Figure 16 shows an example configuration of a motor control system that controls three motors. As shown in Figure 16, when controlling three motors, in addition to the MCU, three sets of combinations of inverters, motors, and encoders are required. That is, the motor control system has first, second, and third inverters 61, 62, and 63, first, second, and third motors 71, 72, and 73, and first, second, and third encoders 81, 82, and 83.
[0022] The MCU50 basically has the same configuration as shown in Figure 13, and includes a CPU 51 equipped with a cache memory 511 and a non-volatile memory 52 where program PR5 is stored. However, the MCU50 has a combination of a PWM timer, an AD converter, and a rotation angle acquisition circuit corresponding to each of the three motors.
[0023] Specifically, the MCU 50 has a first PWM timer 531, a first AD converter 541, and a first rotation angle acquisition circuit 551, each corresponding to the first motor 71. The first rotation angle acquisition circuit 551 includes a first encoder IF 5511. The MCU 50 also has a second PWM timer 532, a second AD converter 542, and a second rotation angle acquisition circuit 552, each corresponding to the second motor 72. The second rotation angle acquisition circuit 552 includes a second encoder IF 5521. Similarly, the MCU 50 has a third PWM timer 533, a third AD converter 543, and a third rotation angle acquisition circuit 553, each corresponding to the third motor 73. The third rotation angle acquisition circuit 553 includes a third encoder IF 5531.
[0024] Figure 17 shows the time charts for each process in the control of three motors using the reference method. In the reference method, for example, as shown in Figure 17, at the start time Taa of period n-1, the CPU 51 causes each AD converter to start detecting the current value of each motor. That is, the CPU 51 causes the first to third AD converters 541, 542, 543 to start detecting the current values i1(n-1), i2(n-1), i3(n-1) flowing through the first to third motors 71, 72, 73.
[0025] At time Tab, when each AD converter has finished detecting the current value of each motor, the CPU 51 instructs each encoder IF to start acquiring the rotational angle position of each motor rotor from each encoder. That is, the CPU 51 instructs the first to third encoders IF5511, 5521, and 5531 to start acquiring the rotational angle positions θ1(n-1), θ2(n-1), and θ3(n-1) of each motor rotor.
[0026] The CPU 51 cannot start current control calculations until it has acquired the current value. Furthermore, the CPU 51 cannot perform multiple current control calculations in parallel. Therefore, the CPU 51 starts current control calculations at time Tab, after the detection of the current value for each motor has been completed. First, at time Tab, the CPU 51 starts the current control calculation corresponding to the first motor 71. This current control calculation ends at time Tac. At time Tac, the CPU 51 starts the current control calculation corresponding to the second motor 72. This current control calculation ends at time Tad. At time Tad, the CPU 51 starts the current control calculation corresponding to the third motor 73. This current control calculation ends at time Taf.
[0027] On the other hand, the acquisition of rotational angular positions θ1(n-1), θ2(n-1), and θ3(n-1) is completed at time Tae. Note that the timing for starting the acquisition of rotational angular positions may be time Taa. Also, the time Tae, at which the acquisition of rotational angular positions is completed, may be before or after time Taf.
[0028] The same process is performed in the next period n. At the start time Tba of period n, the CPU 51 causes each AD converter to begin detecting the current value of each motor. That is, the CPU 51 causes the first to third AD converters 541, 542, and 543 to begin detecting the current values i1(n), i2(n), and i3(n) flowing through the first to third motors 71, 72, and 73.
[0029] At time Tbb, when each AD converter has finished detecting the current value of each motor, the CPU 51 instructs each encoder IF to start acquiring the rotational angle position of each motor rotor from each encoder. That is, the CPU 51 instructs the first to third encoders IF5511, 5521, and 5531 to start acquiring the rotational angle positions θ1(n), θ2(n), and θ3(n) of each motor rotor.
[0030] CPU 51 starts the current control calculation for the first motor 71 at time Tbb. This current control calculation finishes at time Tbc. CPU 51 starts the current control calculation for the second motor 72 at time Tbc. This current control calculation finishes at time Tbd. CPU 51 starts the current control calculation for the third motor 73 at time Tbd. This current control calculation finishes at time Tbf.
[0031] On the other hand, the acquisition of rotational angular positions θ1(n), θ2(n), and θ3(n) is completed at time Tbe.
[0032] In the time chart shown in Figure 17, the current control calculation for the third motor 73, which is the third motor in period n, starts at time Tbd. The start of period n is at time Tba. The current control calculation is performed sequentially for each motor. Here, time T is the time from time Tae, when the rotation angle is obtained in period n-1, to time Tbd, when the current control calculation for the third motor 73, which is the third motor in period n, starts. interval Let's assume that time T interval This is longer than the time from acquiring the rotation angle to starting the current control calculation in the case of the first motor 71 or the second motor 72. Also, the time required for the current control calculation of the first motor 71 is T current Let's assume that the current control calculation for the third motor 73 is performed starting from the time Tbb when the current control calculation for the first motor 71 begins, which is 2 × T current It will start with a delay.
[0033] Figure 18 is a diagram illustrating the difference in current relative to magnetic flux in a motor. The left diagram in Figure 18 shows the state of the motor rotor of the third motor 73 at time Tba. The right diagram in Figure 18 also shows the state of the motor rotor of the third motor 73.
[0034] At time Tba, the direction of the magnetic flux Φ(Tba) of the motor rotor in the third motor 73 is the direction of the rotational angular position θ3(n-1). On the other hand, the timing at which the current control calculation corresponding to the third motor 73 is started is, that is, from time Tba to time T interval Consider the direction of the magnetic flux Φ of the motor rotor at time Tbd, after time T has elapsed. At time Tbd, the direction of the magnetic flux Φ is, interval During this time, the orientation changes from the rotational angular position θ3(n-1) to a position rotated further by Θ3. In this case, the direction of the current I that should flow through the third motor 73, as determined by current control calculation, is 90-Θ3 degrees, perpendicular to the magnetic flux Φ(Tba). However, the actual direction of the magnetic flux of the motor rotor is the direction of the magnetic flux Φ, not the past magnetic flux Φ(Tba). Therefore, the current component perpendicular to the magnetic flux Φ becomes Isin(90-Θ3), and the generated torque T is reduced from the assumed ΦI.
[0035] From the above, the following can be understood: If the acquisition of rotational angle position is started too early, the rotational angle position used in the current control calculation will be relatively old information. As a result, the accuracy of the current control calculation decreases, and especially during acceleration and deceleration of the motor rotor, the difference between the AC current that should be supplied to the motor and the AC current calculated by the current control calculation becomes large. As a result, the potential of the motor cannot be fully utilized, and the torque generated in the motor rotor may be small. In addition, controllers such as MCUs often perform calculations with a single CPU because cost reduction is a priority, and basically cannot perform current control calculations in parallel. Therefore, if the number of motors controlled by the controller is multiple, multiple current control calculations will be performed sequentially. And the later the order in which the CPU performs the current control calculation, the lower the accuracy of the torque control of the motor corresponding to that current control calculation becomes.
[0036] Based on the above-mentioned findings, the inventors have devised the semiconductor device proposed in this application. The embodiments of the semiconductor device proposed in this application are described below.
[0037] (Embodiment) <Overview of Embodiments> In this embodiment, to solve the above problems, the timing for starting to acquire the rotational angle position of the motor rotor is set later than the typical timing. Specifically, the controller detects the current value supplied from the inverter to the motor and performs a current control calculation using the detected current value and the most recently acquired rotational angle position. At this time, the controller starts detecting the rotational angle position to be used in the current control calculation for the next cycle at a predetermined timing during the current control calculation. This optimizes the rotational angle position used in the current control calculation to newer information that is closer in time to the actual rotational angle position, making it possible to increase the torque generated in the motor rotor.
[0038] <Motor control system configuration> Figure 1 is a schematic diagram showing the configuration of a motor control system according to an embodiment. As shown in Figure 1, the motor control system 1000 according to the embodiment comprises a robot controller 100 and a robot 200. The robot controller 100 has an MCU and a plurality of inverters. The robot 200 is, for example, a vertical articulated robot or an arm-type robot. The robot 200 has a plurality of motors. These plurality of motors are used for the joint mechanism of the arm, the axial rotation mechanism of the arm, the gripping mechanism at the end of the arm, etc. The MCU controls the plurality of inverters. Each of the plurality of inverters supplies current to each of the plurality of motors. Note that the MCU is an example of a semiconductor device that functions as a controller. The MCU can be replaced with other types of semiconductor devices that function as controllers.
[0039] Figure 2 is a diagram showing in detail the configuration of a motor control system according to an embodiment. As shown in Figure 2, the motor control system 1000 has an MCU 10. The motor control system 1000 also has a first inverter 21, a second inverter 22, ..., a sixth inverter 26. The motor control system 1000 also has a first motor 31, a second motor 32, ..., a sixth motor 36. The first inverter 21, the second inverter 22, ..., and the sixth inverter 26 receive control from the MCU 10 and supply current to the first motor 31, the second motor 32, ..., and the sixth motor 36, respectively. Note that the MCU 10 is an example of a "semiconductor device" in this application.
[0040] The motor control system 1000 has a first encoder 41, a second encoder 42, ..., and a sixth encoder 46. The first encoder 41, the second encoder 42, ..., and the sixth encoder 46 are electrically connected to the first motor 31, the second motor 32, ..., and the sixth motor 36, respectively. The first encoder 41 outputs a signal that can determine the rotational angle position of the motor rotor of the first motor 31. Similarly, the second encoder 42, ..., and the sixth encoder 46 each output a signal that can determine the rotational angle position of the motor rotors of the second to sixth motors 32, ..., 36, respectively.
[0041] The MCU 10 includes a CPU 11 and a non-volatile memory 12. The non-volatile memory 12 may be, for example, a ROM, a PROM (Programmable Read Only Memory), etc. A predetermined program PR1 is stored in the non-volatile memory 12. The MCU 10 also includes a first PWM timer 131, a second PWM timer 132, ..., a sixth PWM timer 136. The MCU 10 also includes a first AD converter 141, a second AD converter 142, ..., a sixth AD converter 146. The MCU 10 also includes a first rotation angle acquisition circuit 151, a second rotation angle acquisition circuit 152, ..., a sixth rotation angle acquisition circuit 156. The first rotation angle acquisition circuit 151 includes a first encoder IF 1511. Similarly, the second to sixth rotation angle acquisition circuits each include a corresponding second encoder IF 1521, ..., a sixth encoder IF 1561. Furthermore, the MCU10 has a bus 16. The CPU11 is an example of a "processor" in this application.
[0042] The CPU 11, non-volatile memory 12, first to sixth PWM timers 131, ..., 136, first to sixth AD converters 141, ..., 146, and first to sixth rotation angle acquisition circuits 151, ..., 156 are electrically connected to the bus 16. Each of these elements constituting the MCU 10 can transmit signals or data bidirectionally via the bus 16. In this example, the non-volatile memory 12 is located inside the MCU 10 and electrically connected to the CPU 11. However, the non-volatile memory 12 may be located outside the MCU 10 and electrically connected to the CPU 11.
[0043] The first to sixth inverters 21, ... 26 and the first to sixth motors 31, ... 36 are of the three-phase AC type. The first PWM timer 131 transmits three-phase PWM signals, namely the U-phase PWM signal, the V-phase PWM signal, and the W-phase PWM signal, to the first inverter 21. Similarly, the second to sixth PWM timers 132, ... 136 each transmit three-phase PWM signals to the second to sixth inverters 22, ... 26. The first inverter 21 also supplies three-phase current, namely the U-phase current, the V-phase current, and the W-phase current, to the first motor 31. Similarly, the second to sixth inverters 22, ... 26 each supply three-phase current to the second to sixth motors 32, ... 36.
[0044] The first AD converter 141 detects the three phase current values supplied from the first inverter 21 to the first motor 31. Similarly, the second to sixth AD converters 142, ..., 146 each detect the three phase current values supplied from the second to sixth inverters 22, ..., 26 to each motor. The first encoder IF 1511 acquires the rotational angle position from the first encoder 41. Similarly, the second to sixth encoders IF 152, ..., 156 each acquire the rotational angle position from the second to sixth encoders 42, ..., 46.
[0045] The CPU 11 reads and executes program PR1 from non-volatile memory 12, that is, it performs various processes related to motor control by following program PR1 stored in non-volatile memory 12. For example, the CPU 11 receives input of motor output command MD1. Motor output command MD1 represents the output of each of the first to sixth motors 31, ..., 36, i.e., command signals such as torque or rotational speed. The CPU 11 receives the three-phase current values from the first inverter 21 detected by the first AD converter 141 and the rotational angle position of the motor rotor of the first motor 31 from the first encoder IF1511.
[0046] The CPU 11 performs a first current control calculation for the first motor 31 based on the input output command for the first motor 31, the three-phase current values from the first inverter 21, and the rotational angle position of the motor rotor of the first motor 31. The first current control calculation for the first motor 31 is a calculation to obtain information for controlling the three-phase AC current that should be supplied from the first inverter 21 to the first motor 31. Based on the information obtained in the first current control calculation, the CPU 11 generates a first current control signal so that the three-phase AC current is supplied from the first inverter 21 to the first motor 31 and transmits it to the first PWM timer 131.
[0047] The information obtained in the first current control calculation is, for example, the PWM duty cycle in PWM control. The first current control signal is, for example, a signal representing this PWM duty cycle. In PWM control, determining the PWM duty cycle is equivalent to determining the modulation wave for the first carrier signal. The first PWM timer 131 adjusts the first carrier signal and the modulation wave based on this first current control signal to generate a three-phase PWM signal and output it to the first inverter 21. The CPU 11 performs the same processing for the second to sixth motors 32, ..., 36.
[0048] <Current control processing for a single motor> Figure 3 is a diagram of the current control system corresponding to one motor. The current control system shown in Figure 3 represents only the system for controlling the first motor 31 in the motor control system 1000 shown in Figure 2. Figure 4 is a time chart of the current control process corresponding to one motor.
[0049] Figure 5 is a flowchart of the process related to the control of one motor in the MCU. The process related to the control of the first motor 31 in the MCU 10 consists of the processes shown in Figure 5, for example. For the sake of simplicity, the process flow for approximately one cycle of the carrier signal for one motor will be described here. This process includes the process related to current control calculations.
[0050] In step S01, the three-phase current values of the first motor 31 are detected. Specifically, the CPU 11 instructs the first AD converter 141 to start detecting the first current values of the U-phase, V-phase, and W-phase of the first motor 31. The detection of the first current values ends after a certain amount of time has elapsed since the start of detection. In the time chart shown in Figure 4, the detection of the first current values starts at time T11 and ends at time T12.
[0051] In step S02, upon completion of the detection of the first current value, the first current control calculation corresponding to the first motor 31 is initiated. Specifically, when the detection of the first current value in step S01 is completed, the CPU 11 executes a process to start the first current control calculation corresponding to the first motor 31. In the time chart shown in Figure 4, the first current control calculation starts at time T12 and ends at time T14.
[0052] In step S03, the acquisition of the first rotational angle position is initiated in response to the execution of the first current control calculation. Specifically, the CPU 11 triggers a process in which the first encoder IF 1511 starts acquiring the first rotational angle position, using one of the timings in the first current control calculation as a trigger.
[0053] In this example, the first current control calculation calculates cos{θ1(n-2)} and sin{θ1(n-2)} using the first rotational angular position θ1(n-2) at period n-2 of the first motor 31. Specifically, the CPU 11 performs the calculation of cos{θ1(n-2)} and sin{θ1(n-2)} using the first rotational angular position θ1(n-2) as part of the first current control calculation. This part of the calculation corresponds to the last calculation that requires the use of the first rotational angular position θ1(n-2). Once this part of the calculation is completed, the first rotational angular position θ1(n-2) is no longer needed. After this part of the calculation is completed, the CPU 11 instructs the first encoder IF1511 to start acquiring a new first rotational angular position θ1(n-1).
[0054] This allows the previous, older first rotation angle position θ1(n-2) to be overwritten, saving memory capacity. In the time chart shown in Figure 4, this part of the calculation is performed between time T12 and time T13.
[0055] In step S04, the acquisition of the first rotational angular position θ1(n-1) at period n-1 in the first motor 31 is initiated. Specifically, the first encoder IF1511 in the first rotational angle acquisition circuit 151 executes a process to start the transmission of the first rotational angular position θ1(n-1) to the first encoder 41. The acquisition of the first rotational angular position θ1(n-1) starts at time T13 between time T12 and time T14 and ends at time T16, for example, after time T15, which is the start of the next period n.
[0056] The CPU 11, as a result of the first current control calculation, determines, for example, the PWM duty cycle for PWM control in the first PWM timer 131. The CPU 11 transmits a first current control signal representing the determined PWM duty cycle to the first PWM timer 131. The first PWM timer 131 sets and updates the PWM duty cycle based on the received first current control signal. This determines the modulation wave for the first PWM carrier signal, which is represented by the value of the PWM counter inside the first PWM timer 131. The first PWM timer 131 generates a first PWM signal based on the first PWM carrier signal and the PWM duty cycle (modulation wave) and transmits it to the first inverter 21.
[0057] Figure 6 is a flowchart of the current control process corresponding to one motor. The current control process consists of the steps shown in Figure 6, for example. For simplicity of explanation, the current control process for one cycle of the carrier signal for one motor will be described here.
[0058] In step S11, a process is performed to detect the three-phase current values. Specifically, the CPU 11 executes a process to start the AD conversion (detection) of the three-phase currents flowing to the first motor 31 by the first AD converter 141 at the timing when the PWM counter value of the first PWM timer 131 is at its lowest point. The three-phase currents are the U-phase current, V-phase current, and W-phase current supplied from the first inverter 21 to the first motor 31. The PWM counter value corresponds to the PWM carrier signal, and the timing when the PWM counter value is at its lowest point corresponds to the timing when the amplitude of the PWM carrier signal is at its minimum. This timing is the start of the period of the PWM carrier signal. Once the AD conversion by the first AD converter 141 is completed, the CPU 11 executes a process to obtain the three-phase current values flowing to the first motor 31 from the first AD converter 141 at a period of n-1.
[0059] Once the AD conversion in step S11 is complete, the processing steps move to step S12, and the CPU 11 starts the current control calculation. The current control calculation uses the three-phase current value i(n-1) in period n-1 and the rotational angle position θ(n-2) in the previous period n-2.
[0060] In step S12, the process of calculating cos{θ(n-2)} and sin{θ(n-2)} from the rotational angle position θ with period n-2 is performed. Specifically, the CPU 11 starts acquiring the rotational angle position θ(n-2) at period n-2 in the PWM carrier signal and executes the process of calculating cos{θ(n-2)} and sin{θ(n-2)} based on the acquired rotational angle position θ(n-2).
[0061] In step S13, the process of acquiring the rotational angle position θ(n-1) with period n is initiated. Specifically, when cos{θ(n-2)} and sin{θ(n-2)} are calculated in step S12, the CPU 11 executes a process to generate a software interrupt. The CPU 11 also executes a process to start the transmission of the rotational angle position θ(n-1), which is used for current control calculations with period n of the PWM carrier signal, from the first encoder 41 to the first encoder IF1511. In other words, the CPU 11 executes a process to start the first encoder IF1511. The first encoder IF1511 sends a command to the first encoder 41 requesting the rotational angle position θ(n-1).
[0062] The first encoder IF1511 begins transmitting a signal from the first encoder 41 that can identify the rotational angular position θ(n-1). The first encoder IF1511 continues transmitting a signal that can identify the rotational angular position θ(n-1) in the next step S14 and beyond.
[0063] In step S14, a process is performed to convert the three-phase current values into d-axis and q-axis current values. Specifically, the CPU 11 performs a process to convert the U-phase current value, V-phase current value, and W-phase current value obtained in step S11 into d-axis current value and q-axis current value.
[0064] In step S15, a process is performed to implement PI control of the d-axis and q-axis currents. Specifically, the CPU 11 executes a process to implement PI control of the d-axis current and the q-axis current.
[0065] In step S16, a process is performed to convert the voltage values of the d-axis and q-axis into three-phase voltage values. Specifically, the CPU 11 performs a process to convert the d-axis voltage value and q-axis voltage value into U-phase voltage value, V-phase voltage value, and W-phase voltage value.
[0066] In step S17, the three-phase voltage values are converted to PWM duty cycles. Specifically, the CPU 11 performs the process of converting the U-phase voltage value, V-phase voltage value, and W-phase voltage value to the PWM duty cycle for PWM control of the inverter. Once the processing in step S17 is completed, the current control calculation is finished.
[0067] In step S18, a process is performed to update the PWM duty cycle. Specifically, when the CPU 11 finishes the current control calculation, it sets and updates the PWM duty cycle converted in step S17 to the first PWM timer 131. The first PWM timer 131 outputs a PWM signal with the updated PWM duty cycle to the first inverter 21. The first inverter 21 outputs voltage to the U-phase, V-phase, and W-phase input wiring of the first motor 31, supplying current to each phase of the first motor 31.
[0068] According to the current control process for a single motor described above, the acquisition of the rotational angle position of the motor rotor is initiated when the current control calculation is performed, for example, triggered by one of the timings in the current control calculation. In other words, compared to the reference method, the timing at which the acquisition of the rotational angle position is initiated is shifted later in time. Therefore, the rotational angle position used when performing the current control calculation is information from a time closer to the timing of the calculation, and errors due to time differences in the rotational angle position can be reduced. In other words, the decrease in the accuracy of the current control calculation can be suppressed.
[0069] <Current control processing for two motors> The flow of current control processing for the two motors will be explained with reference to the diagram. Here, the current control system is assumed to be the current control system consisting of the elements related to the control of the first and second motors 31 and 32, as shown in Figure 2.
[0070] Figure 7 is a time chart of the current control process corresponding to two motors. Figure 7 shows the time chart for approximately two cycles of the carrier signal (PWM counter value) for the current control process of the two motors. Note that one cycle of the carrier signal is assumed to be, for example, about 10 μs.
[0071] Figure 8 is a flowchart of the process related to the control of two motors by the MCU. Figure 8 shows the flow of the current control process for one period of the carrier signal with period n-1. In reality, this current control process for one period is repeated for each period number of the carrier signal.
[0072] In step S21, the process of detecting the three-phase current values in the two motors is performed. Specifically, the CPU 11 executes the process of detecting the three-phase current values in each of the first and second motors 31 and 32. Here, at the beginning of period n-1, the CPU 11 executes the process of instructing the first AD converter 141 and the second AD converter 142 to start AD conversion (detection) of the three-phase current values of each motor. The AD conversion of the three-phase current values in the two motors, i.e., the first and second motors 31 and 32, i.e., the first and second current values, is performed in parallel. When these AD conversions are completed, the detection of the first three-phase current value i1(n-1) in the first motor 31 and the second three-phase current value i2(n-1) in the second motor 32 is completed. In the time chart shown in Figure 7, the detection of the first current value of the first motor and the second current value of the second motor begins at time T21 and ends at time T22.
[0073] In step S22, upon completion of current value detection for the two motors, the CPU 11 initiates a first current control calculation corresponding to the first motor 31. Specifically, when the CPU 11 completes the detection of the first and second current values for the first and second motors 31 and 32, it initiates a first current control calculation corresponding to the first motor 31. The first current control calculation uses the first rotational angular position θ1(n-2) of the first motor 31, which was acquired starting in the previous period n-2, and the first current value i1(n-1) of the first motor 31, which was acquired in period n-1.
[0074] Furthermore, once the CPU 11 has completed the first current control calculation corresponding to the first motor 31, it obtains the PWM duty cycle. The CPU 11 transmits a first current control signal representing the obtained PWM duty cycle to the first PWM timer 131. The first PWM timer 131 sets and updates the PWM duty cycle based on the received first current control signal. The first PWM timer 131 generates a first PWM signal based on the updated PWM duty cycle and outputs it to the first inverter 21. In the time chart shown in Figure 7, the first current control calculation corresponding to the first motor starts at time T22 and ends at time T24.
[0075] In step S23, a part of the calculation is performed in the first current control calculation corresponding to the first motor, using the first rotational angular position of the first motor that was most recently acquired. Specifically, the following occurs: The CPU 11 performs a part of the calculation using the first rotational angular position θ1(n-2) of the first motor 31 at a predetermined timing in the first current control calculation corresponding to the first motor 31. The calculation using the first rotational angular position θ1(n-2) is, for example, an calculation to calculate cosθ1(n-2) and sinθ1(n-2). In the time chart shown in Figure 7, this calculation starts at a time between time T22 and time T23 and ends at time T23.
[0076] In step S24, upon completion of the calculation using the rotational angle position of the first motor, the acquisition of the rotational angle position of the first motor at period n-1 is initiated. Specifically, upon completion of the calculation using the first rotational angle position θ1(n-2), the CPU 11 executes the following process. The CPU 11 instructs the first encoder IF1511 to start acquiring the first rotational angle position θ1(n-1) of the first motor 31 at period n-1. In the time chart shown in Figure 7, the acquisition of the first rotational angle position θ1(n-1) starts at time T23 and ends at time T28, for example, after time T27, which is the start of the next period n.
[0077] Furthermore, the acquisition of the first rotational angular position θ1(n-1) from the first encoder 41 is completed before the first current control calculation corresponding to the first motor 31 in the next period n of the carrier signal begins. That is, after the acquisition of the first rotational angular position θ1(n-1) of the first motor 31 in period n-1 is completed, the time interval T interval With this, the current control calculation corresponding to the first motor 31 in period n is started. In the time chart shown in Figure 7, the first current control calculation corresponding to the first motor in period n starts at time T29 when the detection of the current value in period n is completed and ends at time T32.
[0078] In step S25, the current control calculation for the second motor is started in response to the completion of the current control calculation for the first motor. Specifically, when the CPU 11 finishes the first current control calculation for the first motor 31, it executes a process to start the second current control calculation for the second motor 32. When the CPU 11 finishes the second current control calculation for the second motor 32, it sends a second current control signal representing the obtained PWM duty cycle to the second PWM timer 132. The second PWM timer 132 sets and updates the PWM duty cycle based on the received second current control signal. The second PWM timer 132 generates a second PWM signal based on the updated PWM duty cycle and outputs it to the second inverter 22. In the time chart shown in Figure 7, the current control calculation for the second motor is started at time T24.
[0079] In step S26, the current control calculation for the second motor is performed using the rotational angular position of the second motor, which was most recently acquired. Specifically, the following occurs: At a predetermined timing during the calculation of the second current control calculation for the second motor 32, the CPU 11 executes a process that uses the second rotational angular position θ2(n-2) of the second motor 32 at a period of n-2. The calculation using the rotational angular position θ2(n-2) is, for example, an operation to calculate cos{θ2(n-2)} and sin{θ2(n-2)}.
[0080] In step S27, upon completion of the calculation using the rotational angle position of the second motor, the acquisition of the rotational angle position of the second motor at period n-1 begins. Specifically, upon completion of the calculation using the second rotational angle position θ2(n-2), the CPU 11 executes the following process: The CPU 11 instructs the second encoder IF1521 to begin acquiring the second rotational angle position θ2(n-1) of the second motor 32 at period n-1. In the time chart shown in Figure 7, the acquisition of the second rotational angle position of the second motor at period n-1 begins at time T25, between time T24 and time T26.
[0081] Note that the acquisition of the second rotational angular position θ2(n-1) from the second encoder 42 is completed before the start of the second current control calculation corresponding to the second motor 32 in the next cycle n of the carrier signal. That is, after the acquisition of the second rotational angular position θ2(n-1) of the second motor 32 in cycle n-1 is completed, a time interval T interval is provided, and the second current control calculation corresponding to the second motor 32 in cycle n is started. In the time chart shown in FIG. 7, the acquisition of the second rotational angular position of the second motor in cycle n-1 starts at time T25, exceeds time T27 which is the start of the next cycle n, and ends at time T31. In addition, the second current control calculation in cycle n for the second motor starts at time T31 after a time T interval has elapsed, and ends at time T34.
[0082] Note that, as can be understood from the time chart shown in FIG. 7, the processing related to the control of the first and second motors in cycle n is the same as the processing in cycle n-1. That is, the start and end timings for the detection of the first and second current values i1(n), i2(n), the first and second current control calculations, and the acquisition of the first and second rotational angular positions θ1(n), θ2(n) are the same as those in cycle n-1.
[0083] In the current control processing for two motors, according to the reference method, the acquisition of the rotational angular positions of the two motors is performed in parallel at the start of a cycle or at the timing when the AD conversion of the current values is completed. Regarding the current control calculations, the calculation for the second motor is started after the calculation for the first motor is completed. Therefore, in the reference method, for the second motor, the time from the completion of the acquisition of the rotational angular position to the start of the current control calculation using the acquired rotational angular position becomes longer. That is, the error of the rotational angular position used for the current control calculation in the second motor is larger than the error in the first motor, and the accuracy of current control is also further degraded.
[0084] On the other hand, according to the proposed method, the acquisition of the rotational angle position of the motor rotor is initiated in response to the execution of the current control calculation, for example, triggered by one of the timings in the current control calculation. In the proposed method, the timing at which the acquisition of the rotational angle position is initiated is shifted later in time compared to the reference method. Also, for both the first and second motors, the time from when the acquisition of the rotational angle position is completed until the current control calculation using the acquired rotational angle position is started is constant. Therefore, the rotational angle position used when performing the current control calculation is information from a time closer to the timing of the calculation, regardless of the order in which the motors are subjected to the current control calculation. For both the first and second motors, errors due to time differences in the rotational angle position can be similarly reduced, and the degradation of accuracy in the current control calculation can be kept at the same level.
[0085] <Current control processing for three or more motors> The flow of current control processing for N motors (three or more) will be explained with reference to the diagram. Here, the current control system is assumed to be the current control system consisting of the elements related to the control of the first to sixth motors 31, ... 36 in the motor control system shown in Figure 2.
[0086] Figure 9 shows a time chart for current control processing for three or more motors. As an example of controlling multiple motors, Figure 9 shows a time chart for two cycles of the carrier signal (PWM counter value) for current control processing for three motors. Note that one cycle of the carrier signal is assumed to be approximately 10 μs.
[0087] Figure 10 is a flowchart related to the control of three or more motors by an MCU. Figure 10 shows the flow for the current control process for one period of the carrier signal with a period of n-1. In reality, this current control process for one period is repeated for each period number of the carrier signal.
[0088] In step S31, the three-phase current values of N motors are detected. In this example, we assume that six motors are being controlled (N=6). Specifically, in this step, the CPU 11 performs the process of detecting the three-phase current values of each of the N motors (six in this example). Here, at the beginning of period n-1, the CPU 11 performs the process of instructing each AD converter corresponding to the first to sixth motors 31, ..., 36 to start the AD conversion (detection) of the three-phase current values of the corresponding motors. Once the AD conversion of the three-phase current values of the N motors is completed, the detection of the three-phase current values i1(n-1), i2(n-1), ..., iN(n-1) of the first to third motors is completed.
[0089] In step S32, a process is performed to start a current control calculation corresponding to the first motor in response to the completion of current value detection for N motors. Specifically, when the CPU 11 has finished detecting the current values for the first to N motors, it executes a process to start a current control calculation corresponding to the first motor 31, which is the first motor. The current control calculation corresponding to the first motor 31 uses the rotational angle position θ1(n-2) of the first motor 31 acquired in the previous period n-2 and the current value i1(n-1) of the first motor 31 acquired in period n-1. When the CPU 11 has finished the current control calculation corresponding to the first motor 31, it sets and updates the obtained PWM duty cycle in the first PWM timer 131. The first PWM timer 131 generates a PWM signal based on the updated PWM duty cycle and outputs it to the first inverter 21.
[0090] In step S33, the current control calculation for the first motor is performed using the rotational angular position of the first motor, which was most recently acquired. Specifically, the CPU 11 performs a calculation using the rotational angular position θ1(n-2) of the first motor 31 at a predetermined timing during the current control calculation for the first motor 31. The calculation using the rotational angular position θ1(n-2) is, for example, a calculation to calculate cosθ1(n-2) and sinθ1(n-2).
[0091] In step S34, upon completion of the calculation using the rotational angle position of the first motor at period n-2, the acquisition of the rotational angle position of the first motor at period n-1 begins. Specifically, upon completion of the calculation using the rotational angle position θ1(n-2), the CPU 11 executes a process to start the acquisition of the rotational angle position θ1(n-1) at period n-1 by the first encoder IF1511.
[0092] Furthermore, the acquisition of the rotational angle position θ1(n-1) from the first encoder 41 is completed before the current control calculation corresponding to the first motor 31 in the next period n of the carrier signal begins. That is, after the acquisition of the rotational angle position θ1(n-1) of the first motor 31 in period n-1 is completed, the time interval T interval With this in place, the current control calculation corresponding to the first motor 31 with period n is initiated.
[0093] The timing at which the acquisition of the rotational angle position is initiated during the current control calculation remains unchanged in principle. Furthermore, it is assumed that the time required for current value detection, the time required for current control calculation, and the time required for acquisition of the rotational angle position are all constant. In this case, time T interval This value becomes a common constant value in the current control process of each motor.
[0094] In step S35, k is set to 1. Specifically, CPU 11 executes the process of setting k to 1.
[0095] In step S36, upon completion of the current control calculation for the kth motor, the CPU 11 initiates the current control calculation for the (k+1)th motor. Specifically, when the CPU 11 completes the current control calculation for the kth motor, it initiates the current control calculation for the (k+1)th motor. When the CPU 11 completes the current control calculation for the (k+1)th motor, it sets and updates the obtained PWM duty cycle in the (k+1)th PWM timer. The (k+1)th PWM timer generates a PWM signal based on the updated PWM duty cycle and outputs it to the (k+1)th inverter.
[0096] In step S37, a calculation is performed using the rotational angular position of the (k+1)th motor at period n-2. This calculation is for calculating cos{θ(k+1)(n-2)} and sin{θ(k+1)(n-2)} using the rotational angular position θ(k+1)(n-2). Specifically, the CPU 11 performs calculation processing to calculate cos{θ(k+1)(n-2)} and sin{θ(k+1)(n-2)} using the rotational angular position θ(k+1)(n-2) in the current control calculation.
[0097] In step S38, upon completion of the calculation using the rotational angle position of the (k+1)th motor with period n-2, the acquisition of the rotational angle position of the (k+1)th motor with period n-1 begins. Specifically, upon completion of the calculation using the rotational angle position θ(k+1)(n-2), the CPU 11 executes a process to start the acquisition of the rotational angle position θ(k+1)(n-1) with period n-1 at the (k+1)th encoder IF.
[0098] Furthermore, the acquisition of the rotational angle position θ(k+1)(n-1) from the k+1th encoder is completed before the current control calculation corresponding to the k+1th motor in the next period n of the carrier signal begins. That is, from the completion of the acquisition of the rotational angle position θ(k+1)(n-1) of the k+1th motor in period n-1, time T interval After an interval of n, the current control calculation corresponding to the k+1th motor in period n is initiated.
[0099] In step S39, a process of determining whether k+1=N is satisfied is performed. Specifically, the CPU 11 executes the process of determining whether k+1=N is satisfied. In this determination, if it is determined that k+1=N is satisfied (S39: Yes), the current control process ends. On the other hand, if it is determined that k+1=N is not satisfied, that is, k+1<N (S39: No), the processing step proceeds to step S40.
[0100] In step S40, a process of incrementing the value of k by 1 is performed. Specifically, the CPU 11 executes the process of incrementing the value of k by 1, that is, the process of making k←k+1. When the increment process of k is completed, the processing step proceeds to step S36.
[0101] When the current control process corresponding to the N motors in cycle n-1 is completed, the current control process corresponding to the N motors is repeatedly performed in the next cycle n. The current control process in cycle n is a process similar to the processes from step S31 to S40.
[0102] Thereby, first, in cycle n-1, current values i1(n-1), i2(n-1), i3(n-1), ..., iN(n-1) are acquired. Next, the current control calculation corresponding to the first motor is started. During this calculation, cosθ1(n-2) and sinθ1(n-2) are calculated based on the rotational angular position θ1(n-2) of the first motor whose acquisition was started in the previous cycle n-2 and acquired. Then, in response to this calculation, acquisition of the rotational angular position θ1(n-1) of the first motor from the first encoder is started.
[0103] Next, in period n-1, once the current control calculation for the first motor is completed, the current control calculation for the second motor begins. During this calculation, cosθ2(n-2) and sinθ2(n-2) are calculated based on the rotational angle position θ2(n-2) of the second motor, which was acquired starting in the previous period n-2. Then, in accordance with this calculation, the acquisition of the rotational angle position θ2(n-1) of the second motor begins from the second encoder.
[0104] Next, in period n-1, once the current control calculation for the second motor is completed, the current control calculation for the third motor begins. During this calculation, cosθ3(n-2) and sinθ3(n-2) are calculated based on the rotational angle position θ3(n-2) of the third motor, which was acquired starting in the previous period n-2. Then, in accordance with this calculation, the acquisition of the rotational angle position θ3(n-1) of the third motor begins from the third encoder.
[0105] In a period of n-1, the current control calculation process described above is repeated for the number of motors, i.e., N motors. Subsequently, the same process is performed in a period of n.
[0106] At a cycle of n, current values i1(n), i2(n), i3(n), ..., iN(n) are acquired. Next, the current control calculation corresponding to the first motor is started. During this calculation, cosθ1(n-1) and sinθ1(n-1) are calculated based on the rotational angle position θ1(n-1) of the first motor, which was acquired starting in the previous cycle n-1. Then, in accordance with this calculation, the acquisition of the rotational angle position θ1(n) of the first motor from the first encoder begins.
[0107] Next, after the current control calculation for the first motor is completed in period n, the current control calculation for the second motor is started. During this calculation, cosθ2(n-1) and sinθ2(n-1) are calculated based on the rotational angle position θ2(n-1) of the second motor, which was acquired starting in the previous period n-1. Then, in accordance with this calculation, the acquisition of the rotational angle position θ2(n) of the second motor is started from the second encoder.
[0108] Next, after the current control calculation for the second motor is completed in period n, the current control calculation for the third motor is started. During this calculation, cosθ3(n-1) and sinθ3(n-1) are calculated based on the rotational angle position θ3(n-1) of the third motor, which was acquired starting in the previous period n-1. Then, in accordance with this calculation, the acquisition of the rotational angle position θ3(n) of the third motor is started from the third encoder.
[0109] In a period of n, the current control calculation process described above is repeated for the number of motors being controlled, i.e., N motors. Then, in a period of n+1, the same process is performed.
[0110] In this way, the same current control process is repeatedly performed for each motor or inverter according to the sequence of the PWM carrier signal period.
[0111] To summarize, the following applies: In current control calculations, the MCU10 generates a software interrupt and starts communication with the encoder when it finishes using the rotation angle position θ(n-2) acquired in the previous period n-1. The communication time between the MCU10 and the encoder is shorter than the time of one period of the PWM carrier signal. Therefore, it is possible to acquire the rotation angle position θ(n-1) at period n-1 before the current control calculation for period n of the PWM carrier signal begins. Furthermore, by triggering communication with the encoder when the current control calculation is performed, even if the number of motors increases, the time T from acquiring the rotation angle position to starting the current control calculation is maintained. intervalThis allows the rotational angle position to be kept constant. In other words, current control calculations are performed using the rotational angle position acquired at a constant time interval or phase interval. Therefore, not only is high precision possible, but high stability is also possible in motor current control.
[0112] Figure 11 shows a comparison of the relationship between magnetic flux and current in a motor using the standard method and the proposed method. The standard method is a method based on general principles. In the standard method, the timing for starting to acquire the rotational angle position from the encoder is the same as the timing for starting the PWM carrier signal, i.e., the timing for starting to detect the current value. The timing for starting to acquire the rotational angle position is the same for all motors. On the other hand, the proposed method is the method proposed in this embodiment. In the proposed method, the timing for starting to acquire the rotational angle position from the encoder is a predetermined timing during the current control calculation performed after the detection of the current value. The current control calculation is performed sequentially for each motor. Therefore, the timing for starting to acquire the rotational angle position differs for each motor, and as described above, the time T from the completion of acquiring the rotational angle position to the start of the current control calculation differs. interval It is constant.
[0113] The upper part of Figure 11 shows the relationship between the direction of magnetic flux φ and the direction of current I for the first, third, and fifth motors with the same period n, when current control processing is performed using the standard method. The lower part of Figure 11 shows the relationship between the direction of magnetic flux φ and the direction of current I for the first, third, and fifth motors with the same period n, when current control processing is performed using the proposed method. Here, the motor rotor is considered to be a bar magnet with a north pole at one end and a south pole at the other. Also, in Figure 11, the motor rotor is assumed to be rotating counterclockwise (leftward). Furthermore, for convenience, the direction of the rotational angle position of the motor rotor and the direction of the magnetic flux φ of the motor rotor are assumed to be the same.
[0114] First, let's refer to the upper part of Figure 11 and consider the case of the reference method. Initially, let's focus on the first motor. The direction of the magnetic flux Φ of the motor rotor at the time of the current control calculation corresponding to the first motor (solid arrow) is shifted by an angle Θ1 relative to the direction of the acquired rotational angular position θ1(n-1) of the motor rotor (dashed arrow). This shift of angle Θ1 is caused by the rotation of the motor rotor over time, including the time required to acquire the rotational angular position and the time from the acquisition of the rotational angular position to the start of the current control calculation. The timing at which the acquisition of the rotational angular position begins is fixed to the start of the period of the PWM carrier signal. Therefore, compared to the proposed method described later, the time from the acquisition of the rotational angular position to the start of the current control calculation is longer.
[0115] When current I flows in a direction perpendicular to the direction of the actual magnetic flux Φ of the motor rotor (solid arrow), the motor rotor rotates with the correct torque without loss. However, in the current control calculation for the first motor, the acquired rotational angle position θ1(n-1) is used instead of the rotational angle position that represents the actual direction of the motor rotor (direction of magnetic flux Φ). In this current control calculation, the PWM duty cycle is calculated so that current I flows in a direction perpendicular to the direction of rotational angle position θ1(n-1), that is, in a direction rotated (90-Θ1) degrees from the direction of magnetic flux Φ. Therefore, the current component flowing in a direction perpendicular to the actual direction of magnetic flux Φ is current Isin(90-Θ1). In other words, a loss equivalent to the angle Θ1 occurs in the torque of the motor rotor.
[0116] Next, let's focus on the third motor. The direction of the actual magnetic flux Φ of the motor rotor at the time the current control calculation for the third motor is performed (solid arrow) is shifted by an angle Θ3 relative to the direction of the acquired rotational angular position θ3(n-1) of the motor rotor (dashed arrow). This shift of angle Θ3 is caused by the rotation of the motor rotor over time, including the time required to acquire the rotational angular position and the time from the acquisition of the rotational angular position to the start of the current control calculation. The timing at which the acquisition of the rotational angular position begins is fixed to the beginning of the PWM carrier signal cycle. Current control calculations are performed sequentially for each motor. Therefore, the timing at which the current control calculation for the third motor begins is later than the timing at which the current control calculation for the first motor begins. Thus, angle Θ3 is basically larger than angle Θ1.
[0117] In the current control calculation for the third motor, the PWM duty cycle ratio is calculated so that the current I flows in a direction perpendicular to the direction of the acquired rotational angle position θ3(n-1), that is, in a direction rotated 90-Θ3 degrees from the direction of the magnetic flux Φ. Therefore, the current component flowing in a direction perpendicular to the actual direction of the magnetic flux Φ is the current Isin(90-Θ3). In other words, a loss equivalent to the angle Θ3, which is greater than the angle Θ1, occurs in the motor rotor torque.
[0118] Next, let's focus on the fifth motor. The direction of the magnetic flux Φ of the motor rotor at the time the current control calculation for the fifth motor is performed is shifted by an angle Θ5 relative to the direction of the acquired rotational angular position θ5(n-1) of the motor rotor (dashed arrow). This shift of angle Θ5 is caused by the rotation of the motor rotor over time, including the time required to acquire the rotational angular position and the time from the acquisition of the rotational angular position to the start of the current control calculation. The current control calculation is performed sequentially for each motor. Therefore, the timing at which the current control calculation for the fifth motor begins is later than the timing at which the current control calculation for the third motor begins. Thus, angle Θ5 is basically larger than angle Θ3.
[0119] In the current control calculation for the fifth motor, the PWM duty cycle ratio is calculated so that the current I flows in a direction perpendicular to the direction of the acquired rotational angle position θ5(n-1), that is, in a direction rotated 90-Θ5 degrees from the direction of the magnetic flux Φ. Therefore, the current component flowing in a direction perpendicular to the actual direction of the magnetic flux Φ is the current Isin(90-Θ5). In other words, a loss equivalent to the angle Θ5, which is greater than the angle Θ3, occurs in the motor rotor torque.
[0120] Thus, in the reference method, the timing for starting to acquire the rotational angle position is fixed to the start of the PWM carrier signal cycle. Therefore, a discrepancy is likely to occur between the acquired rotational angle position and the actual rotational angle position at the time of current control calculation. Furthermore, the later a motor is subjected to current control calculation, the lower the accuracy of its current control. Consequently, the more motors controlled by the MCU, the greater the decrease in current control accuracy, and the more likely the motor's operation is to become unstable.
[0121] Next, let's consider the case of the proposed method, referring to the lower part of Figure 11. First, let's focus on the first motor. With respect to the direction of the acquired rotational angular position θ1(n-1) of the motor rotor, the direction of the actual magnetic flux Φ of the motor rotor at the time of performing the current control calculation corresponding to the first motor is the angle Θ interval It's shifted by only that much. Angle Θ interval The discrepancy is caused by the motor rotor rotating during the time elapsed, which is the sum of the time required to acquire the rotational angle position and the time from the acquisition of the rotational angle position to the start of the current control calculation. The timing at which the acquisition of the rotational angle position begins is the timing at which the previous current control calculation is performed. The timing at which the current control calculation is performed is, for example, the timing at which the calculation using the rotational angle position θ1(n-2), which was acquired starting in the previous period n-2, has finished.
[0122] In the current control calculation for the first motor, the acquired rotational angle position θ1(n-1) is used, rather than the rotational angle position representing the actual orientation of the motor rotor (the direction of the magnetic flux Φ). In this current control calculation, the direction perpendicular to the direction of the rotational angle position θ1(n-1), i.e., the direction of the magnetic flux Φ, is (90-Θ interval The PWM duty cycle is calculated so that the current I flows in the direction rotated by ) degrees. Therefore, the current component flowing in a direction perpendicular to the actual magnetic flux Φ is the current Isin(90-Θ). interval ) means that the torque of the motor rotor is affected by the angle Θ. interval A loss equivalent to the deviation occurs.
[0123] Next, we focus on the third motor. Given the direction of the acquired rotational angle position θ3(n-1) of the motor rotor, the direction of the actual magnetic flux Φ of the motor rotor at the time of the current control calculation corresponding to the third motor is the angle Θ. interval It is only off by a small amount. In the proposed method, the timing at which the acquisition of the rotational angle position begins is set to the timing at which the current control calculation is performed in the previous period n-2. Therefore, the angle shift from the rotational angle position θ3(n-1) to the direction of the magnetic flux Φ is the same as in the case of the first motor, and the angle Θ interval That is the case.
[0124] In the current control calculation for the third motor, the direction perpendicular to the direction of the acquired rotational angle position θ3(n-1), i.e., the direction of the magnetic flux Φ, is used as 90-Θ. interval The PWM duty cycle is calculated so that the current I flows in the direction of the rotation. Therefore, the current component flowing in a direction perpendicular to the actual magnetic flux Φ is the current Isin(90-Θ). interval ) This means that, similar to the first motor, the torque of the motor rotor is affected by the angle Θ interval A loss equivalent to the deviation occurs.
[0125] Next, we focus on the fifth motor. Given the direction of the acquired rotational angle position θ5(n-1) of the motor rotor, the direction of the actual magnetic flux Φ of the motor rotor at the time of performing the current control calculation corresponding to the fifth motor is the angle Θ. intervalIt is only off by a small amount. In the proposed method, the timing at which the acquisition of the rotational angle position begins is set to the timing at which the current control calculation is performed in the previous period n-2. Therefore, the angle shift from the rotational angle position θ5(n-1) to the direction of the magnetic flux Φ is the same as in the case of the first and second motors, and the angle Θ interval That is the case.
[0126] In the current control calculation for the fifth motor, the direction perpendicular to the direction of the acquired rotational angle position θ5(n-1), i.e., the direction of the magnetic flux Φ, is used as 90-Θ. interval The PWM duty cycle is calculated so that the current I flows in the direction of the rotation. Therefore, the current component flowing in a direction perpendicular to the actual magnetic flux Φ is the current Isin(90-Θ). interval ) This means that, similar to the first and third motors, the torque of the motor rotor is affected by the angle Θ interval A loss equivalent to the deviation occurs.
[0127] Thus, in the proposed method, the timing for starting to acquire the rotational angle position is set to coincide with the timing for performing the current control calculation corresponding to the motor. Therefore, the time T from acquiring the rotational angle position to starting the current control calculation is interval This can be kept constant. As a result, the loss in the torque of each motor rotor is constant regardless of the order in which the current control calculations are performed, at angle Θ. interval This is the loss equivalent to the misalignment. In other words, the amount of misalignment angle does not accumulate. Therefore, even when controlling the current of multiple motors with a single MCU, the torque loss of each motor rotor can be kept within a certain level.
[0128] Furthermore, the proposed method exhibits a smaller discrepancy between the acquired rotational angle position and the actual rotational angle position at the time of current control calculation compared to the reference method. This characteristic does not change with the number of motors controlled by the MCU. Therefore, even if the number of motors controlled by a single MCU increases, the decrease in current control accuracy can be kept small, resulting in more stable motor operation.
[0129] <Modified examples of embodiments> Modifications of the embodiment will be described.
[0130] Figure 12 shows a modified example of the embodiment. In this modified example of the embodiment, as shown in Figure 12, the first encoder IF1511 is provided outside the MCU 10 instead of inside the MCU 10. In the example shown in Figure 12, an FPGA (Field Programmable Gate Array) 90 is connected between the MCU 10 and the first encoder 41. The FPGA 90 includes an external interrupt control circuit 91 and the first encoder IF1511. A CLK (clock) signal line, a TXD (transmit data) signal line, an RXD (receive data) signal line, and an EN (enable) signal line are wired between the first encoder 41 and the first encoder IF1511.
[0131] When detecting the rotational angle position θ1, the MCU10 outputs an IO signal to the external interrupt control circuit 91 in order to perform a software interrupt. Upon receiving the IO signal, the external interrupt control circuit 91 requests the first encoder IF1511 to transmit a signal that can identify the rotational angle position θ1 from the first encoder 41. Based on this request, the first encoder IF1511 communicates with the first encoder 41 and causes the first encoder 41 to transmit a signal that can identify the rotational angle position θ1. The first encoder IF1511 obtains the rotational angle position θ1 from the transmitted signal and transmits it to the MCU10. The first rotational angle acquisition circuit 151 in the MCU10 acquires the rotational angle position θ1.
[0132] Note that FPGA90 is just one example of a logic circuit device and may be replaced by other logic circuit devices. For example, other programmable semiconductor devices may be used instead of FPGA90. PLD (Programmable Logic Device), CPLD (Complex Programmable Logic Device), etc., may be used instead of FPGA90. Alternatively, ASIC (Application Specific Integrated Circuit) may be used instead of FPGA90.
[0133] According to a modified version of this embodiment, the encoder interface (IF) is located outside the MPU, and the MCU acquires signals from the encoder via the encoder interface. This simplifies the configuration of the MCU, particularly by reducing the number of terminals, and thus lowers the manufacturing cost of the MCU. Furthermore, by separating the encoder interface from the MCU and configuring it as a programmable device, the user can use an encoder interface with desired characteristics or performance. Desired characteristics or performance include, for example, the ability to transmit data at higher speeds.
[0134] Here, we summarize one of the problems and this embodiment and its modifications, which may serve as a solution. When controlling multiple motors using a single MCU, if communication with the encoder is started in synchronization with the trough of the waveform representing the PWM counter value, the torque of the motor that subsequently performs current control calculations decreases. This can lead to a decrease in control performance in applications that require the control of multiple motors. However, by initiating communication with the encoder triggered by the current control calculation, as in the proposed method, the time from acquiring the rotation angle position of the motor rotor to starting the current control calculation can be kept constant. As a result, the decrease in the torque of the motor that subsequently performs current control calculations can be suppressed. According to this embodiment and its modifications, the decrease in control performance in applications that require the control of multiple motors can be suppressed.
[0135] The present invention has been described in detail above based on embodiments. However, it goes without saying that the present invention is not limited to the above embodiments and can be modified in various ways without departing from its essence.
[0136] For example, a robot has multiple rotational mechanisms, opening and closing mechanisms, etc., and many motors are used in these mechanisms. Examples of robots include industrial robots, humanoid robots, exploration robots, rescue robots, etc. Therefore, the MCU according to the above embodiment is suitable for controlling multiple motors included in a robot. [Explanation of symbols]
[0137] 10…MCU, 11…CPU, 12…Non-volatile memory, 16…Bus, 21…First inverter, 22…Second inverter, 26…Sixth inverter, 31…First motor, 32…Second motor, 36…Sixth motor, 41…First encoder, 42…Second encoder, 46…Sixth encoder, 50…MCU, 51…CPU, 52…Non-volatile memory, 53…PWM timer, 54…AD converter, 55…Rotation angle acquisition circuit, 56…Bus, 6 0...Inverter, 61...First Inverter, 62...Second Inverter, 63...Third Inverter, 70...Motor, 71...First Motor, 72...Second Motor, 73...Third Motor, 80...Encoder, 81...First Encoder, 82...Second Encoder, 83...Third Encoder, 90...FPGA, 91...External Interrupt Control Circuit, 100...Robot Controller, 111...Cache Memory, 131...First PWM Timer, 132...Second PWM timer, 136...6th PWM timer, 141...1st AD converter, 142...2nd AD converter, 146...6th AD converter, 151...1st rotation angle acquisition circuit, 152...2nd rotation angle acquisition circuit, 156...6th rotation angle acquisition circuit, 511...Cache memory, 531...1st PWM timer, 532...2nd PWM timer, 533...3rd PWM timer, 541...1st AD converter, 542...2nd AD converter, 543...3rd AD converter, 550… Encoder IF, 551… First rotation angle acquisition circuit, 552… Second rotation angle acquisition circuit, 553… Third rotation angle acquisition circuit, 1000… Motor control system, 1511… First encoder IF, 1521… Second encoder IF, 1561… Sixth encoder IF, 5511… First encoder IF, 5521… Second encoder IF, 5531… Third encoder IF, PR1… Program, PR5… Program
Claims
1. The first AD converter, The first rotation angle acquisition circuit, The first PWM timer, Processor and Equipped with, The first AD converter detects a first current value supplied from the first inverter to the first motor, The first rotation angle acquisition circuit acquires the first rotation angle position of the rotor of the first motor from a first encoder electrically connected to the first motor. The processor generates a first current control signal by performing a first calculation based on the first current value detected by the first AD converter and the most recently acquired first rotation angle position. The first PWM timer has a first counter and generates a first PWM signal using a modulated wave based on the first current control signal and a first carrier signal based on the value of the first counter, and then outputs the first PWM signal to the first inverter. The aforementioned processor, Within one cycle of the first carrier signal, (a) A process to cause the first AD converter to start detecting the first current value, (b) A process to start the first calculation in response to the completion of the detection of the first current value, (c) A process to cause the first rotation angle acquisition circuit to start acquiring the first rotation angle position in response to the execution of the first calculation, Execute Semiconductor equipment.
2. In the semiconductor device described in claim 1, The second AD converter, The second rotation angle acquisition circuit, The second PWM timer, Furthermore, The second AD converter detects the second current value supplied from the second inverter to the second motor, The second rotation angle acquisition circuit acquires the second rotation angle position of the rotor of the second motor from a second encoder electrically connected to the second motor. The processor generates a second current control signal by performing a second calculation based on the second current value detected by the second AD converter and the most recently acquired second rotational angle position. The second PWM timer has a second counter, and generates a second PWM signal using a modulated wave based on the second current control signal and a second carrier signal based on the value of the second counter, and then outputs the second PWM signal to the second inverter. The processor, within one cycle of the second carrier signal, (d) A process to cause the second AD converter to start detecting the second current value, (e) A process to start the second calculation in response to the completion of the detection of the second current value, (f) A process to cause the second rotation angle acquisition circuit to start acquiring the second rotation angle position in response to the execution of the second calculation, Further execution, The process described in (f) above is performed after the process described in (c) above has been completed. Semiconductor equipment.
3. In the semiconductor device described in claim 2, The process in (c) above is a process that starts acquiring the first rotational angle position in response to the completion of a calculation using the most recently acquired first rotational angle position, The process described in (f) above is a process that starts acquiring the second rotational angle position in response to the completion of a calculation using the most recently acquired second rotational angle position. Semiconductor equipment.
4. In the semiconductor device described in claim 1, The process in (c) above is a process that starts acquiring the first rotational angle position in response to the completion of a calculation using the most recently acquired first rotational angle position. Semiconductor equipment.
5. In the semiconductor device described in claim 1, The first inverter and the first motor are of the three-phase AC type. The first current value includes the current values of each phase, The first current control signal and the first PWM signal each include signals for each phase. Semiconductor equipment.
6. In the semiconductor device described in claim 1, The time required to acquire the first rotational angle position is longer than the time required for the first calculation. Semiconductor equipment.
7. In the semiconductor device described in claim 1, The duration of one cycle of the carrier signal is longer than the time required to acquire the first rotational angle position. Semiconductor equipment.
8. In the semiconductor device described in claim 1, The first rotation angle acquisition circuit includes a first encoder interface. Semiconductor equipment.
9. In the semiconductor device described in claim 1, The first rotation angle acquisition circuit acquires the first rotation angle position via an external encoder interface. Semiconductor equipment.
10. In the semiconductor device described in claim 2, The processor executes the processes (a) through (f) according to a program stored in a non-volatile memory electrically connected to the processor. Semiconductor equipment.
11. In the semiconductor device according to claim 10, The non-volatile memory is provided inside the semiconductor device. Semiconductor equipment.
12. A combination of an AD converter, a rotation angle acquisition circuit, and a PWM timer, with 3 or more N combinations, Processor and Equipped with, Each of the N combinations corresponds to each of the N inverters and each of the N motors. The AD converter detects the current value supplied from the corresponding inverter to the corresponding motor. The rotation angle acquisition circuit acquires the rotation angle position of the rotor of the corresponding motor from an encoder electrically connected to the corresponding motor. The processor generates a current control signal by performing calculations based on the current value detected by the AD converter and the most recently acquired rotational angle position. The PWM timer has a counter, and generates a PWM signal using a modulated wave based on the current control signal and a carrier signal based on the value of the counter, and then outputs the PWM signal to the inverter. The aforementioned processor, Within one cycle of the carrier signal, (g) A process to cause the N AD converters to start detecting the current values supplied to the N motors, (h) A process to start the calculation corresponding to the first motor in response to the completion of detection of the current values supplied to the N motors, (i) In response to the execution of the calculation corresponding to the first motor, the first rotation angle acquisition circuit is instructed to start acquiring the rotation angle position from the encoder electrically connected to the first motor, Execute, Within the aforementioned cycle, When k is varied from 1 to N-1 in increments of 1, (j) A process to start the calculation corresponding to the (k+1)th motor in response to the completion of the calculation corresponding to the kth motor, (k) In response to the execution of the calculation corresponding to the (k+1)th motor, the (k+1)th rotation angle acquisition circuit is instructed to start acquiring the rotation angle position from the (k+1)th encoder, Repeated execution Semiconductor equipment.
13. In the semiconductor device according to claim 12, The process in (i) above is a process that starts acquiring the rotational angle position corresponding to the first motor in response to the completion of a calculation using the rotational angle position corresponding to the first motor that was acquired most recently. The process described in (k) above is a process that starts acquiring the rotational angle position corresponding to the (k+1)th motor in response to the completion of a calculation using the rotational angle position corresponding to the (k+1)th motor that was acquired most recently. Semiconductor equipment.
14. In the semiconductor device according to claim 12, The aforementioned N motors are included in the robot. Semiconductor equipment.
Citation Information
Patent Citations
Semiconductor device, motor drive system, and motor startup method
JP2022057101A