Motor control device and motor control program
The motor control device improves responsiveness and stability by synchronizing interrupt processing with constant communication cycles and prioritizing motor control tasks, addressing delays and load fluctuations in existing technologies.
Patent Information
- Application Number
- JP2023050703
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing motor control technologies experience delayed arithmetic processing results due to varying reaction times and load fluctuations, leading to reduced responsiveness and stability of motor control.
A motor control device with an interrupt processing unit that processes control information at a constant communication cycle, dividing tasks into shorter calculation periods synchronized with interrupt times, prioritizing motor-related tasks, and ensuring timely output to the inverter unit.
This approach enhances motor responsiveness and stability by shortening reaction times and stabilizing control processes, even with varying loads, while allowing use with slower processing speeds.
Smart Images

Figure 2024139799000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a motor control device and a motor control program. [Background technology]
[0002] Patent Document 1 discloses a technique for controlling a motor. The motor control technique disclosed in Patent Document 1 includes an external communication device that outputs an external signal for controlling the motor, and a motor control device (microcomputer) that controls the motor based on the external signal. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2011-96089 A Summary of the Invention [Problem to be solved by the invention]
[0004] The motor control technology disclosed in Patent Document 1 aims to improve the responsiveness of the motor by increasing the speed and stabilizing the communication between the external communication device and the motor control device, but does not address the period from when the motor control device receives an external signal to when it outputs the result of the arithmetic processing to the inverter unit connected to the motor. Depending on the timing of receiving the external signal from the external communication device, a delayed result of the arithmetic processing may be output to the inverter unit. This may result in a decrease in the responsiveness of the motor and the stability of the motor control.
[0005] The present disclosure has been made to solve the above-mentioned problems, and aims to provide a motor control device that can calculate and process path tasks related to motor control at the timing when control information for controlling the motor is received. [Means for solving the problem]
[0006] The motor control device of the present disclosure includes an interrupt processing unit that performs interrupt processing of the acquired control information after acquiring control information for controlling a motor that is received by a communication unit from an external communication device at a fixed communication period, an arithmetic processing unit that sets the arithmetic processing time of a path task that includes arithmetic processing items related to motor control to a time shorter than the communication period of the control information interrupted by the interrupt processing unit and synchronizes the arithmetic processing start time of the path task with the interrupt time of the control information by the interrupt processing unit, and a motor control unit that outputs the arithmetic processing result of the path task processed by the arithmetic processing unit to an inverter unit for controlling the motor. Effect of the Invention
[0007] According to the present disclosure, it is possible to perform calculation processing of a path task related to motor control at the timing when control information for controlling the motor is received. Therefore, the present disclosure can shorten the reaction time related to motor control, thereby improving the responsiveness of the motor and the stability of motor control. [Brief description of the drawings]
[0008] [Figure 1] 1 is a block diagram showing a configuration of a motor control system to which a motor control device according to a first embodiment is applied. [Diagram 2] FIG. 1 is a diagram showing a flow of a series of processes in a conventional motor control device. [Diagram 3] FIG. 2 is a diagram showing a flow of a series of processes of the motor control device according to the first embodiment. [Figure 4] 3 is a flowchart showing a motor control method according to the first embodiment. [Diagram 5] 5A and 5B are diagrams illustrating an example of a hardware configuration of the motor control device according to the first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings.
[0010] Embodiment 1 A motor control device 40 according to a first embodiment will be described with reference to FIGS. 1 to 5. FIG.
[0011] First, a motor control system 30 to which a motor control device 40 according to the first embodiment is applied will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the configuration of the motor control system 30 to which a motor control device 40 according to the first embodiment is applied.
[0012] As shown in FIG. 1, a motor control system 30 is connected to an external communication device 11, a motor 21, and a motor rotation detection unit 22.
[0013] The external communication device 11 transmits, for example, control information for controlling the motor 21 to the motor control system 30 at a fixed communication cycle. In addition, the external communication device 11 receives, for example, actual information related to the control of the motor 21 (hereinafter referred to as actual information) from the motor control system 30.
[0014] The control information is information including, for example, a target rotational position and a target rotational speed of the motor 21. The actual information is information including an actual rotational position and an actual rotational speed of the motor 21. The control information and the actual information are transmitted and received as signals.
[0015] The motor 21 is controlled based on the results of calculation processing of a path task, which will be described later, sent from the motor control system 30.
[0016] The motor rotation detection unit 22 detects actual information of the motor 21, for example, based on the magnetic field of a permanent magnet embedded in the rotor of the motor 21. The motor rotation detection unit 22 also transmits the detected actual information of the motor 21 to a motor control device 40 (described later) in the motor control system 30. As described above, the motor rotation detection unit 22 detects the actual information of the motor 21 based on the magnetic field of a permanent magnet embedded in the rotor of the motor 21, but may be, for example, an encoder.
[0017] The motor control system 30 includes a motor control device 40, a communication unit 31, a storage unit 32, and an inverter unit 33.
[0018] The communication unit 31 is connected to the motor control device 40 and the external communication device 11. After receiving control information of the motor 21 transmitted from the external communication device 11 at a fixed communication cycle, the communication unit 31 transmits this received control information of the motor 21 to the motor control device 40. In addition, after receiving actual information and fault information of the motor 21 transmitted from the motor control device 40, the communication unit 31 transmits this received actual information and fault information of the motor 21 to the external communication device 11.
[0019] The storage unit 32 stores the control information for the motor 21 transmitted from the external communication device 11 via the communication unit 31 and the motor control device 40. The storage unit 32 also stores the results of calculation processing of the path task or the results of calculation processing of a divided path task, which are calculated by the motor control device 40. It is noted that the motor control system 30 does not necessarily need to have the storage unit 32.
[0020] The inverter unit 33 converts a DC voltage into an AC voltage based on the calculation processing result of the path task transmitted from the motor control device 40, and then outputs the AC voltage to the motor 21. Therefore, the inverter unit 33 is capable of controlling the motor 21.
[0021] The motor control device 40 includes an interrupt processing unit 41, an arithmetic processing unit 42, a motor control unit 43, and a failure determination unit 44.
[0022] The interrupt processing unit 41 acquires the control information of the motor 21 that the communication unit 31 receives from the external communication device 11 at a fixed communication cycle, and then performs interrupt processing of the acquired control information. Specifically, the interrupt processing unit 41 outputs the acquired control information of the motor 21 to the storage unit 32, and stores the control information in the storage unit 32. The interrupt processing unit 41 also outputs (interrupts) the acquired control information of the motor 21 to the calculation processing unit 42, which will be described later, in synchronization with the fixed communication cycle in the communication unit 31.
[0023] The calculation processing unit 42 sets the calculation processing time of the path task including the calculation processing items related to the control of the motor 21 to a time shorter than the communication cycle of the control information interrupted by the interrupt processing unit 41. Furthermore, the calculation processing unit 42 synchronizes the calculation processing start time of the path task with the interrupt time of the control information by the interrupt processing unit 41. Then, the calculation processing unit 42 outputs the calculation processing result of the path task or the calculation processing result of the divided path task described later to the storage unit 32 and the inverter unit 33.
[0024] Here, when one path task interrupted by the interrupt processing unit 41 is a path task consisting of multiple calculation processing items of different types, the calculation processing unit 42 divides the path task by type of calculation processing item to generate divided tasks. Then, the calculation processing unit 42 synchronizes the calculation processing start time of the divided path task, which is a calculation processing item related to the control of the motor 21, among the divided divided tasks, with the interrupt time of the control information by the interrupt processing unit 41.
[0025] Furthermore, the calculation processing unit 42 performs calculation processing on divided path tasks which are calculation processing items relating to the control of the motor 21, giving priority to divided path tasks which are calculation processing items relating to items other than the control of the motor 21.
[0026] The motor control unit 43 outputs the calculation result of the path task or the calculation result of the divided path task, which has been calculated by the calculation processing unit 42, to the storage unit 32 and the inverter unit 33.
[0027] The failure determination unit 44 determines whether or not there is a failure in the internal circuit of the motor control device 40. Then, the failure determination unit 44 outputs the determination result as to whether or not there is a failure in the internal circuit to the external communication device 11 via the communication unit 31 as failure information.
[0028] Furthermore, the failure determination unit 44 determines whether or not the motor 21 is broken based on the actual information of the motor 21 detected by the motor rotation detection unit 22. Then, the failure determination unit 44 outputs the determination result as to whether or not the motor 21 is broken as failure information to the external communication device 11 via the communication unit 31. At this time, the failure determination unit 44 may determine whether or not the motor 21 is broken based on the control information of the motor 21 received by the communication unit 31 from the external communication device 11 at a constant communication cycle and the actual information of the motor 21 detected by the motor rotation detection unit 22.
[0029] It should be noted that the motor control device 40 does not necessarily have to include the failure determination unit 44.
[0030] Next, the operation of the motor control device 40 according to the first embodiment will be described with reference to Figs. 2 and 3 while comparing it with the operation of a conventional motor control device. Fig. 2 is a diagram showing the flow of a series of processes in the conventional motor control device. Fig. 3 is a diagram showing the flow of a series of processes in the motor control device 40 according to the first embodiment. Note that Figs. 2 and 3 show a series of processes from receiving an external signal (control information for the motor 21) to outputting the calculation processing result to the inverter unit 33.
[0031] Four operations are described in the vertical columns in Fig. 2. These four operations, in order from the top, indicate reception of an external signal indicating control information for the motor 21, storage, arithmetic processing, and output to the inverter unit 33. In the stages indicating arithmetic processing and the stages indicating output to the inverter unit 33, the upper stages indicate cases where the processing load is constant, and the lower stages indicate cases where the processing load is medium or high. Moreover, the horizontal direction in Fig. 2 indicates the passage of time moving to the right.
[0032] First, the external signal is received multiple times at a fixed communication period (also called a sampling period). The reception times of the external signal are indicated by A to D.
[0033] Next, these external signals are temporarily stored. At this time, the interrupt processing times (interrupt processing periods) A to D correspond to the receiving times A to D of the external signals.
[0034] Next, the calculation cycle of the calculation process is T. This calculation process processes path tasks composed of calculation process items a1 to a4 of different types one by one. For example, a4 is a calculation process item related to the control of the motor 21, and a1 to a3 are calculation process items related to items other than the control of the motor 21. The "o" marks written under each calculation process item indicate the interrupt frequency. The more "o" marks there are, the higher the interrupt frequency.
[0035] Next, output times (output periods) A to D to the inverter unit 33 correspond to the reception times A to D of the external signal. That is, the time from when the external signal is received to when the arithmetic processing result (DC voltage) is output to the inverter unit 33 is the response time (or processing speed) of the device.
[0036] In such a case, due to a load fluctuation caused by the interrupt processing of calculation processing item a4 in the immediately preceding calculation processing, the calculation processing start time of calculation processing item a4 in the immediate calculation processing is significantly delayed within the calculation cycle T. This causes the reaction time to vary, and a delayed calculation processing result is output to the inverter unit 33. This may result in a decrease in the responsiveness of the motor 21 and a decrease in the stability of the motor control.
[0037] In contrast, the vertical items in Fig. 3 also show the same four operations. These four operations, in order from the top, show reception of an external signal indicating control information for the motor 21 in the interrupt processing unit 41, storage in the storage unit 32, arithmetic processing in the arithmetic processing unit 42, and output to the inverter unit 33 in the motor control unit 43. In the stage showing the arithmetic processing in the arithmetic processing unit 42 and the stage showing the output to the inverter unit 33 in the motor control unit 43, the upper stage shows a case where the processing load is constant, and the lower stage shows a case where the processing load is medium or high. In addition, the horizontal direction in Fig. 3 shows the passage of time as it progresses to the right. Note that the explanation corresponding to A to D explained in Fig. 2 will be omitted.
[0038] The calculation processing unit 42 divides one path task (see FIG. 2) into the types of calculation processing items a1 to a4 in advance, and generates divided path tasks. The calculation processing time of each divided path task is set to t. This calculation processing time t is set to a time shorter than the communication cycle. The calculation processing unit 42 synchronizes the calculation processing start time of the divided path task that becomes the calculation processing item a4 related to the control of the motor 21 with the interrupt time of the external signal (control information) by the interrupt processing unit 41. Furthermore, the calculation processing unit 42 performs calculation processing of the divided path task that becomes the calculation processing item a4 related to the control of the motor 21 in priority over the divided path tasks that become the calculation processing items a1 to a3 other than the control of the motor 21.
[0039] Therefore, the motor control device 40 can perform arithmetic processing on the divided path task with the highest priority at the timing when the external signal is received. As a result, the motor control device 40 can shorten the reaction time related to the control of the motor 21, thereby improving the responsiveness of the motor 21. Furthermore, the motor control device 40 can suppress the variation in the reaction time, thereby improving the stability of the motor control. Furthermore, the motor control device 40 can also handle cases where the calculation period T of the calculation processing unit 42 is longer than the communication period of the external signal, so the motor control device 40 can be a microcomputer with a relatively slow processing speed.
[0040] Next, the motor control method according to the first embodiment will be described with reference to Fig. 4. Fig. 4 is a flowchart showing the motor control method according to the first embodiment.
[0041] As shown in FIG. 4, in step ST11, the interrupt processing unit 41 acquires control information for the motor 21 that the communication unit 31 receives from the external communication device 11 at a fixed communication cycle.
[0042] In step ST12, the interrupt processing unit 41 outputs the obtained control information of the motor 21 to the storage unit 32 or the arithmetic processing unit .
[0043] In step ST13, the calculation processing unit 42 sets the calculation processing time of the path task or divided path task including the calculation processing item related to the control of the motor 21 to a time shorter than the communication period of the control information interrupted by the interrupt processing unit 41.
[0044] In step ST14, the calculation processing unit 42 synchronizes the calculation processing start time of the path task or the divided path task with the interrupt time of the interrupt processing unit 41 of the control information.
[0045] In step ST15, the calculation processing unit 42 performs calculation processing on the path task or the divided path task, and then outputs the calculation processing result to the motor control unit 43. For example, the calculation processing unit 42 performs calculation processing on the path task or the divided path task based on the control information interrupted by the interrupt processing unit 41 or the control information read out from the storage unit 32 and the actual information of the motor 21 detected by the motor rotation detection unit 22.
[0046] In step ST16, the motor control unit 43 outputs to the inverter unit 33 a DC voltage according to the result of the calculation process of the path task or the divided path task, which has been processed by the calculation processing unit 42.
[0047] Next, an example of a hardware configuration of the motor control device 40 according to the first embodiment will be described with reference to Fig. 5. Figs. 5A and 5B are diagrams showing an example of a hardware configuration of the motor control device 40 according to the first embodiment.
[0048] 5A, motor control device 40 is configured by a computer, and the computer has a processor 51 and a memory 52. Memory 52 stores programs for causing the computer to function as interrupt processing unit 41, arithmetic processing unit 42, motor control unit 43, and fault determination unit 44. The functions of interrupt processing unit 41, arithmetic processing unit 42, motor control unit 43, and fault determination unit 44 are realized by processor 51 reading and executing the programs stored in memory 52.
[0049] 5B, the motor control device 40 may include a processing circuit 53. In this case, the processing circuit 53 may be realized by the interrupt processing unit 41, the calculation processing unit 42, the motor control unit 43, and the failure determination unit 44.
[0050] Alternatively, the motor control device 40 may have a processor 51, a memory 52, and a processing circuit 53 (not shown). In this case, some of the functions of the interrupt processing unit 41, the arithmetic processing unit 42, the motor control unit 43, and the failure determination unit 44 may be realized by the processor 51 and the memory 52, and the remaining functions may be realized by the processing circuit 53.
[0051] The processor 51 is, for example, one that uses at least one of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor, a microcontroller, or a digital signal processor (DSP).
[0052] The memory 52 uses, for example, at least one of a semiconductor memory or a magnetic disk. More specifically, the memory 52 uses at least one of a random access memory (RAM), a read only memory (ROM), a flash memory, an erasable programmable read only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a solid state drive (SSD), or a hard disk drive (HDD).
[0053] The processing circuit 53 uses, for example, at least one of an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), an FPGA (Field-Programmable Gate Array), a SoC (System-on-a-Chip), or a system LSI (Large-Scale Integration).
[0054] As described above, the motor control device 40 according to the first embodiment includes an interrupt processing unit 41 that performs interrupt processing of the acquired control information after the communication unit 31 acquires control information for controlling the motor 21 from the external communication device 11 at a fixed communication cycle, a calculation processing unit 42 that sets the calculation processing time of a path task including a calculation processing item related to the control of the motor 21 to a time shorter than the communication cycle of the control information interrupted by the interrupt processing unit 41 and synchronizes the calculation processing start time of the path task with the interrupt time of the control information by the interrupt processing unit 41, and a motor control unit 43 that outputs the calculation processing result of the path task calculated by the calculation processing unit 42 to the inverter unit 33 for controlling the motor 21. Therefore, the motor control device 40 can calculate and process the path task related to the control of the motor 21 at the timing of receiving the control information for controlling the motor 21. As a result, the motor control device 40 can shorten the reaction time related to the control of the motor 21, and can improve the responsiveness of the motor 21.
[0055] Furthermore, in the motor control device 40, when a path task interrupted by the interrupt processing unit 41 is a path task consisting of multiple arithmetic processing items of different types, the arithmetic processing unit 42 divides the path task into divided tasks by type of arithmetic processing item, and synchronizes the arithmetic processing start time of a divided path task that is a arithmetic processing item related to the control of the motor 21 with the interrupt time of the control information by the interrupt processing unit 41. Therefore, even if a load fluctuation occurs due to interrupt processing of a arithmetic processing item in the immediately preceding arithmetic processing, the motor control device 40 does not affect the arithmetic processing start time of the arithmetic processing item in the immediate arithmetic processing. As a result, the motor control device 40 can suppress the variation in reaction time, thereby improving the stability of motor control.
[0056] Furthermore, in the motor control device 40, the calculation processing unit 42 performs calculation processing on the divided path tasks which are calculation processing items relating to the control of the motor 21, giving priority to divided path tasks which are calculation processing items relating to items other than the control of the motor 21. Therefore, the motor control device 40 can increase the calculation frequency of the divided path tasks which are calculation processing items relating to the control of the motor 21, thereby further improving the responsiveness of the motor 21.
[0057] In addition, in the present disclosure, any of the components of the embodiments may be modified or omitted within the scope of the disclosure. [Explanation of symbols]
[0058] 11 external communication device, 21 motor, 22 motor rotation detection unit, 30 motor control system, 31 communication unit, 32 storage unit, 33 inverter unit, 40 motor control device, 41 interrupt processing unit, 42 arithmetic processing unit, 43 motor control unit, 44 failure determination unit, 51 processor, 52 memory, 53 processing circuit.
Claims
1. an interrupt processing unit that performs an interrupt process for the control information for controlling the motor after the control information is received by the communication unit from the external communication device at a fixed communication cycle; a processor that sets a processing time of a path task including a processing item related to motor control to a time shorter than a communication cycle of the control information interrupted by the interrupt processor, and synchronizes a processing start time of the path task with an interrupt time of the control information by the interrupt processor; a motor control unit that outputs a calculation result of the path task calculated by the calculation processing unit to an inverter unit for controlling the motor. A motor control device comprising:
2. The arithmetic processing unit is When one path task interrupted by the interrupt processing unit is a path task consisting of a plurality of arithmetic processing items of different types, the path task is divided according to the type of the arithmetic processing items to generate divided tasks; Among the divided path tasks, the calculation processing start time of a divided path task which is a calculation processing item related to motor control is synchronized with the interrupt time of the control information by the interrupt processing unit.
2. The motor control device according to claim 1.
3. The arithmetic processing unit is The divided path tasks that are calculation processing items related to motor control are processed with priority over the divided path tasks that are calculation processing items other than motor control.
3. The motor control device according to claim 2.
4. Computer, an interrupt processing unit that performs an interrupt process for the control information for controlling the motor after the control information is received by the communication unit from the external communication device at a fixed communication cycle; a processor that sets a processing time of a path task including a processing item related to motor control to a time shorter than a communication cycle of the control information interrupted by the interrupt processor, and synchronizes a processing start time of the path task with an interrupt time of the control information by the interrupt processor; a motor control unit that outputs the result of the path task calculated by the calculation processing unit to an inverter unit for controlling the motor; A motor control program to function as a
Citation Information
Patent Citations
Input / output device and control device
JP2011096089A
