Motor control device and motor control method

The motor control device addresses gain switching shocks by using a switching command unit and gain change calculation to ensure smooth transitions, maintaining stability and reducing shocks in motor systems with multiple axes or transient states.

WO2025141672A1PCT designated stage expired Publication Date: 2025-07-03MITSUBISHI ELECTRIC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/046512
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

Existing motor control devices struggle to switch control gains without causing shocks due to differences in torque and speed commands, leading to instability and overshoot, especially when multiple constraint conditions are not adequately addressed.

Method used

A motor control device with a switching command unit, constraint value determination unit, and gain change calculation unit that sequentially calculates control gains based on constraint conditions, ensuring smooth transitions and reducing shocks during gain switching.

Benefits of technology

The device effectively switches control gains while maintaining stability and followability, minimizing shocks and trajectory distortions, even in complex motor systems with multiple axes or transient states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023046512_03072025_PF_FP_ABST
    Figure JP2023046512_03072025_PF_FP_ABST
Patent Text Reader

Abstract

A motor control device (1) that controls a motor connected to a driven body to be controlled comprises: a switching command unit (31) that commands switching of a control gain to be used in motor control; a constraint value determination unit (33) that determines, on the basis of control state amounts indicating a control state when the motor is controlled and constraint conditions for the control state, a constraint value for the control state amounts when switching the control gain; and a gain change calculation unit (34) which, on the basis of a pre-change control gain (230), which is the control gain before the control gain is switched in accordance with a switching command that is a command by the switching command unit, a post-change control gain (240), which is the control gain after the control gain is switched in accordance with the switching command, and the constraint value determined by the constraint value determination unit, sequentially calculates a control gain to be used in the control of the motor from the start to the completion of the switching of the control gain.
Need to check novelty before this filing date? Find Prior Art

Description

Motor control device and motor control method

[0001] The present disclosure relates to a motor control device and a motor control method having a gain switching function.

[0002] A motor control device controls a motor according to commands received from a controller or commands generated by itself, so that a driven object connected to the motor follows a position command or a speed command, or so that the force or torque applied to the driven object follows the command. The tracking ability is determined by the control gains of the position controller, speed controller, etc., that the motor control device has. Generally, setting the control gain to a high gain improves tracking ability, but this can lead to unstable control, overshooting, and resonance.

[0003] In motor control devices, a technique for switching control gain settings in response to the operation of a driven object connected to a motor is known to achieve both the required tracking capability and stability. However, if the control gain setting is switched instantaneously, a difference occurs in the torque command or speed command before and after the control gain switching, which may cause a shock to the machine.

[0004] To address this issue, Patent Document 1 discloses a motor control device that can suppress shock caused by torque changes that accompany gain changes.

[0005] Japanese Patent Application Laid-Open No. 2006-74885

[0006] However, in the motor control device described in Patent Document 1, although the control gain is switched by setting constraints on the torque, it is difficult to switch the control gain while also setting constraints on the motor speed conditions, for example, and if a difference occurs in the speed command in addition to the torque command, it is not possible to fully reduce the shock to the machine before and after switching the control gain.

[0007] The present disclosure has been made in consideration of the above, and aims to provide a motor control device that is capable of changing the control gain used in controlling the motor while satisfying multiple constraints when switching the control gain depending on the state of the motor.

[0008] In order to solve the above-mentioned problems and achieve the object, the present disclosure provides a motor control device that controls a motor connected to a driven body that is an object to be controlled, and is characterized by comprising: a switching command unit that commands switching of a control gain used in controlling the motor; a constraint value determination unit that determines a constraint value of a control state quantity when switching the control gain based on a control state quantity that indicates the control state when the motor is controlled and a constraint condition on the control state; and a gain change calculation unit that sequentially calculates a control gain to be used in controlling the motor from the start to the completion of switching of the control gain based on a pre-change control gain that is the control gain before switching the control gain in accordance with a switching command that is a command from the switching command unit, a post-change control gain that is the control gain after switching the control gain in accordance with the switching command, and the constraint value determined by the constraint value determination unit.

[0009] The motor control device according to the present disclosure has the advantage that, when switching the control gain used in controlling the motor in accordance with the state of the motor, the control gain can be changed while satisfying a plurality of constraints.

[0010] FIG. 10 is a diagram showing an example of the configuration of a motor control system according to the first embodiment. FIG. 11 is a diagram showing a modified example of the motor control system according to the first embodiment. FIG. 12 is a diagram showing an example of the configuration of a control gain change unit according to the first embodiment. FIG. 13 is a diagram for explaining the operation of the control gain change unit according to the first embodiment. FIG. 14 is a diagram for explaining a gain change calculation unit of the control gain change unit according to the first embodiment. FIG. 15 is a diagram for explaining the operation of the control gain change unit according to the second embodiment. FIG. 16 is a diagram showing an example of the configuration of a switching command unit of a motor control device according to the third embodiment. FIG. 17 is a diagram showing an example of the configuration of a motor control system according to the fourth embodiment. FIG. 18 is a diagram showing an example of the configuration of a first control gain change unit and a second control gain change unit of a motor control device according to the fourth embodiment. FIG. 19 is a diagram showing an example of the configuration of the control gain change unit of a motor control device according to the fifth embodiment.

[0011] A motor control device and a motor control method according to embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0012] First Embodiment. Figure 1 is a diagram showing an example configuration of a motor control system according to a first embodiment. The motor control system 100 according to the first embodiment includes a motor control device 1 having a gain switching function and a motor 70. A detector 80 is attached to the motor 70, and the detector 80 detects the position of the motor 70. The motor control device 1 controls the motor 70 while switching the control gain based on the position detection result by the detector 80. The motor 70 drives, for example, a drive shaft of a machine tool.

[0013] The motor control device 1 includes a command generating unit 10 , a position control unit 20 , a gain switching unit 30 , a speed control unit 40 , a current control unit 50 , and a speed calculation unit 60 .

[0014] The command generating unit 10 generates a command for controlling the motor 70. The command generating unit 10 includes a position command generating unit 11 that generates a position command for the motor 70.

[0015] Position control unit 20 controls the position of motor 70 so as to follow the position command output from position command generation unit 11. Position control unit 20 includes a position deviation calculation unit 21 that calculates a position deviation, which is the difference between the position command and the position of motor 70 (denoted as position FB in FIG. 1 ) fed back from detector 80, and a speed command calculation unit 22 that calculates a speed command based on the position deviation. The position command output from position command generation unit 11 may command the position of a driven body connected to motor 70. In this case, detector 80 determines the position of the driven body from the position of motor 70 and feeds back the position of the driven body to position deviation calculation unit 21.

[0016] Gain switching unit 30 controls the change of the control gain used by position control unit 20. Hereinafter, the control gain used by position control unit 20 will be referred to as the position control gain. Gain switching unit 30 is provided to enable motor control device 1 to switch the position control gain while maintaining physical constraints, thereby mitigating shock to motor 70. Gain switching unit 30 includes a switching command unit 31 that commands the switching of the position control gain, and a control gain change unit 32 that changes the position control gain used by position control unit 20 upon receiving a command from switching command unit 31.

[0017] The speed control unit 40 generates a current command based on the speed command output from the position control unit 20 and a feedback value of the speed of the motor 70 (denoted as speed FB in FIG. 1 ) output from a speed calculation unit 60 described later.

[0018] The current control unit 50 supplies a desired current to the motor 70 based on the current command output from the speed control unit 40 and a feedback value of the current flowing through the motor 70 (shown as current FB in FIG. 1 ), thereby operating the motor 70. As a result, the motor 70 is controlled to the position commanded by the command generation unit 10. The feedback value of the current flowing through the motor 70 is measured, for example, by a current sensor (not shown).

[0019] The speed calculation unit 60 calculates the speed of the motor 70 (hereinafter referred to as speed feedback or speed FB) from the position of the motor 70 (hereinafter referred to as position feedback or position FB) fed back from the detector 80. In FIG. 1, "s" represents a Laplace operator, and the speed calculation unit 60 converts the position feedback into speed feedback by differentiating it. Note that the speed calculation unit 60 may calculate the speed feedback from the amount of change in the position feedback at regular intervals instead of using the Laplace transform.

[0020] The position command may be generated by a command value generating device 2 and transmitted to the motor control device 1x as shown in Fig. 2. Fig. 2 is a diagram showing a modified example of the motor control system according to the first embodiment. In Fig. 2, components common to the motor control system 100 are assigned the same reference numerals. The operation of the motor control system 101 shown in Fig. 2 is the same as that of the motor control system 100.

[0021] Next, the operation of the motor control device 1 of the motor control system 100 will be described.

[0022] When the motor 70 is driven at a constant speed, the position deviation D [rad] is obtained by dividing the speed command ω [rad / s] by the position control gain G [rad / s]. That is, the relationship D=ω / G holds.

[0023] If the fluctuation in position error when the position control gain G is switched during a constant speed is ΔD [rad], the speed command at the time of switching is ω1 [rad / s], the position control gain before the switching is G1, and the position control gain after the switching is G2, the fluctuation amount ΔD of the position error can be expressed by the following equation (1): When the position control gain G is switched, the speed and torque respond abruptly to compensate for the fluctuation amount ΔD of the position error, causing a shock to the motor 70.

[0024]

[0025] In order to mitigate the shock to the motor 70 when switching the position control gain G, the control gain changer 32 of the gain switching unit 30 calculates a position control gain based on the constraint value of the control state quantity selected as the constraint target and the switching command output by the switching commander 31, and outputs the calculated position control gain to the position control unit 20. The switching commander 31 generates a switching command specifying a switching interval for the position control gain and outputs the switching command to the control gain changer 32. The switching commander 31 determines the switching interval based on, for example, a speed command and a speed FB. The switching commander 31 may determine the switching interval based on either the speed command or the speed FB. The switching commander 31 may also determine the switching interval based on a feedback value of the current flowing through the motor 70 (current FB), a feedback value of the position of the motor 70 (position FB), or the like.

[0026] The control gain changing unit 32 will be described in detail below with reference to Fig. 3 and Fig. 4. Fig. 3 is a diagram illustrating an example of the configuration of the control gain changing unit 32 according to the first embodiment. Fig. 4 is a diagram illustrating the operation of the control gain changing unit 32 according to the first embodiment.

[0027] As shown in FIG. 3, the control gain change unit 32 includes a constraint value determination unit 33 that determines a constraint value, and a gain change calculation unit 34 that calculates a position control gain.

[0028] The constraint value determiner 33 determines a constraint value based on a control state quantity 210 and a constraint condition 220. The control state quantity 210 indicates the control state when the motor 70 is controlled by the motor control device 1. Examples of the control state quantity 210 include a position error, a speed command, and an acceleration command. Speed ​​feedback may be used instead of a speed command. Acceleration feedback may be used instead of an acceleration command. The same applies to other commands. The constraint condition 220 is a constraint condition on the constraint state quantity 210. Examples of the constraint condition 220 include an instantaneous value, a maximum value, and a minimum value. The constraint value determiner 33 determines a constraint value by combining the constraint state quantity 210 and the constraint condition 220. The constraint value determiner 33 determines, for example, a constraint value for the instantaneous value of the current command and the amount of fluctuation in the position error. The constraint value determiner 33 determines the constraint value according to, for example, an instruction from a higher-level controller connected to the motor control device 1, the illustration of which is omitted from FIG. 1 . The upper controller instructs the constraint value determination unit 33 on a combination of the constraint state quantity 210 and the constraint condition 220 and specific values ​​of the constraint condition 220 based on the operating parameters, operating conditions, etc. of the motor 70. The upper controller may determine the constraint value in accordance with an instruction from a user. For example, the upper controller may receive a designation of the combination of the constraint state quantity 210 and the constraint condition 220 and a designation of specific values ​​of the constraint condition 220 from the user via a user interface composed of a display device, an input device, etc., and determine the constraint value.

[0029] Gain change calculation unit 34 calculates a position control gain based on the switching command, pre-change control gain 230, post-change control gain 240, and the constraint value determined by constraint value determination unit 33. Specifically, gain change calculation unit 34 calculates a position control gain such that, among the control state quantities indicating the state of motor 70, the control state quantity corresponding to the constraint value satisfies the constraint indicated by the constraint value.

[0030] The pre-change control gain 230 is the position control gain before the gain switching unit 30 switches the position control gain used by the position control unit 20, and corresponds to the pre-switching position control gain G1 described above. The post-change control gain 240 is the position control gain after the gain switching unit 30 switches the position control gain used by the position control unit 20, and corresponds to the post-switching position control gain G2 described above. The method for determining the post-change control gain 240 is not critical. For example, the post-change control gain 240 may be specified by the control program of the motor control device 1, or may be determined by the switching command unit 31 based on the state of the motor 70. The switching command unit 31 may also be determined based on the operating state of the driven body connected to the motor 70. The amount of change in the control gain may be fixed, and the post-change control gain 240 may be calculated from the pre-change control gain 230.

[0031] A specific example of the operation of the control gain changing unit 32 will be described with reference to Fig. 4. According to Fig. 4, the section from the switching start time to the switching completion time is the position control gain switching section. <1> and section <2> Here, as an example, a case will be described in which the constraint values ​​are the instantaneous value of the current command and the amount of fluctuation in the position error, the pre-change control gain 230 is set to G1, the post-change control gain 240 is set to G2, and the position control gain is switched during the constant speed section. The switching command unit 31 sends a switching command to the gain change calculation unit 34 during the constant speed section. The switching command unit 31 detects the constant speed section based on the position command, the speed command, the speed feedback, etc.

[0032] The constraints, ie, the instantaneous value of the current command I [A] and the fluctuation amount ΔD [rad] of the position deviation, are defined as in the following equations (2) and (3). <1> Then, the current command is set to a constant value (I res ), and when the amount of change in position deviation ΔD satisfies ΔD / 2, the section <2> Transition to the section <2> In this case, the current command is set to a negative constant value (-I res )

[0033]

[0034]

[0035] When the motor 70 connected to the driven body is a surface magnet type synchronous motor, the current I [A] and torque T [N m] are proportional to each other, so if the torque constant of the motor 70 is Kt [N m / A], the torque T can be expressed as T = Kt I. In this case, the first integral of the torque T is the speed ω(t) [rad / s], and the second integral is the position deviation D(t) [rad]. Therefore, the speed ω(t) and the position deviation D(t) are determined by the moment of inertia J of the motor 70. m [kg m 2 ] and the moment of inertia J of the driven body L [kg m 2 ], and the position control gain before the change G1 and the position control gain after the change G2, can be expressed by the following equations (4) and (5).

[0036]

[0037]

[0038] The time required for this switching, 2Δt, can be expressed by the following equation (6).

[0039]

[0040] Here, the speed ω2 during switching of the position control gain may be calculated by inputting the speed FB or speed command when ΔD(Δt) is satisfied to the control gain change unit 32 as shown in Fig. 5 and having this latched by the gain change calculation unit 34 of the control gain change unit 32, or a value calculated in advance from the following equation (7) may be used. Note that the speed command and speed FB input to the switching command unit 31 are omitted in Fig. 5.

[0041]

[0042] As described above, since the relationship D = ω / G holds, the position control gain G(t) can be calculated using this relationship and ω(t) and D(t) expressed by the above equations (4) and (5). The gain change calculation unit 34 calculates the position control gain G(t) according to the following equation (8). The control gain change unit 32 outputs the position control gain G(t) calculated by the gain change calculation unit 34 to the position control unit 20 as a position control gain switching value. Upon receiving the position control gain switching value from the control gain change unit 32, the position control unit 20 changes the position control gain used by the speed command calculation unit 22 to the received position control gain switching value.

[0043]

[0044] In this way, the motor control device 1 switches the position control gain by sequentially updating the position control gain used by the speed command calculation unit 22 of the position control unit 20 to the position control gain switching value calculated by the control gain change unit 32.

[0045] In FIG. 4, the control gain switching period from the switching start time to the switching completion time is the period <1> and section <2> However, the control gain switching period is not limited to this and may include three or more periods as long as the control gain can be updated sequentially or stepwise from the switching start time to the switching completion time.

[0046] Furthermore, the gain change calculation unit 34 of the control gain change unit 32 may calculate the position control gain sequentially for each control cycle, or may calculate the position control gain before starting the change and create a lookup table. That is, the control gain change unit 32 may calculate a position control gain switching value for each control cycle of the motor 70 in the section where the position control gain is switched and output the value to the position control unit 20, thereby gradually changing the position control gain. Furthermore, the control gain change unit 32 may gradually change the position control gain by repeatedly outputting the position control gain switching value to the position control unit 20 according to a lookup table created in advance.

[0047] Note that the method for selecting the constraint value is not limited to the above. For example, the instantaneous value of the current command may be used as the constraint value in the acceleration section of the motor 70, and the instantaneous value of the current command and the maximum value of the speed command may be used as the constraint values ​​in the constant speed section. The position control gain may be changed sequentially while changing the constraint value according to the operating conditions of the motor. Furthermore, although the above equation (8) was derived on the assumption that the motor 70 is a rigid body and the control system is in a steady state, the position control gain may be switched taking into account a model that reflects the state of the mechanical system or a transient state.

[0048] In this embodiment, a configuration for switching the position control gain in simple position feedback control has been described as an example, but it is also possible to switch the feedforward gain in two-degree-of-freedom control that combines feedback control and feedforward control in a similar manner.

[0049] As described above, the motor control device 1 according to the present embodiment sequentially determines and updates the position control gain used in controlling the motor 70 from the start to the completion of switching of the position control gain during a constant speed section in which the motor 70 is driven at a constant speed, based on the pre-change control gain, which is the position control gain before the change, the post-change control gain, which is the position control gain after the change, and the constraint value of the control state variable indicating the state of the controlled motor 70. According to the first embodiment, the motor control device 1 controls the driven object, which is the controlled object, using the position control gain so that it follows a command, and updates the position control gain while taking into account the constraint value determined based on multiple constraint conditions on the control state variable. This makes it possible to sequentially switch the position control gain while maintaining the constraint condition on the control state variable even while the motor 70 is being driven, thereby further reducing shock to the motor 70 compared to the conventional technology disclosed in Patent Document 1 and the like.

[0050] Second Embodiment Next, a motor control device according to a second embodiment will be described. Note that components similar to those of the motor control device 1 according to the first embodiment will be described using the same names and symbols as in the first embodiment. A motor control device according to the second embodiment is obtained by changing the control gain change unit 32 of the motor control device 1 according to the first embodiment to a control gain change unit 32a shown in FIG. 6. Note that FIG. 6 is a diagram showing an example configuration of the control gain change unit of the motor control device according to the second embodiment. The control gain change unit 32a according to the second embodiment shown in FIG. 6 is obtained by replacing the constraint value determination unit 33 of the control gain change unit 32 according to the first embodiment shown in FIG. 3 with a constraint value determination unit 33a.

[0051] As described in the first embodiment, by sequentially transitioning the position control gain even while the motor 70 is being driven, it is possible to switch the position control gain while maintaining the constraints on the control state variable. However, since the position control gain is transitioned gradually over time when switching the position control gain, if the switch is performed just before the motor 70 is stopped, there is wasted time waiting for the position control gain switch to be completed. On the other hand, if motor operation is started before the position control gain switch is completed, the position control gain in the middle of transition is used, which causes distortion in the trajectory when interpolation with other axes is required. Therefore, as shown in FIG. 6 , the control gain change unit 32a according to the second embodiment shortens the time required to switch the position control gain by having the constraint value determiner 33a monitor the actual control state variable and change the constraint value used in calculating the position control gain when the control state variable falls within a predetermined threshold value. The actual control state quantity is a measurement value (feedback value) of the control state quantity selected by the constraint value determination unit 33 a when determining the constraint value, or a value calculated from the measurement value. For example, in the case where the constraint value is the instantaneous value of the current command and the fluctuation amount of the position deviation as described in the first embodiment, the instantaneous value of the current and the fluctuation amount of the position deviation correspond to the actual control state quantity.

[0052] Here, a case where the instantaneous value of the current command and the amount of fluctuation in the position error are used as constraint conditions, the speed FB is used as the monitoring target, and the threshold value is ω3 will be described with reference to Fig. 7. Fig. 7 is a diagram for explaining the operation of the control gain changing unit 32a according to the second embodiment.

[0053] Assuming that the switching start time is a constant speed, as in the first embodiment, when the motor 70 decelerates from time t2, the time at which the position control gain switching is normally completed is t4. However, the control gain changing unit 32a changes the current constraint value to a sufficiently large value when the speed FB is within ω3. This change causes the position control gain to instantly transition to the post-switching value G2. At this time, since the fluctuation of the position error is as shown in equation (1) above, if ω3 is sufficiently small, the motor 70 will not be shocked even if the position control gain is instantly switched. Note that while this example illustrates a case in which the constraint value is changed just before the motor 70 stops, it is also possible, for example, to monitor the speed FB as an actual control state variable and change the maximum value of the speed FB selected as the constraint value depending on the speed FB when the motor 70 is driven.

[0054] As described above, according to this embodiment, the actual control state quantity is monitored, and when the control state quantity satisfies a predetermined condition, that is, when the control state quantity is within a predetermined threshold value or exceeds the threshold value, the constraint value is changed, thereby making it possible to instantly complete the transition of the position control gain.

[0055] Third Embodiment Next, a motor control device according to a third embodiment will be described. Note that components similar to those of the motor control device 1 according to the first embodiment will be described using the same names and symbols as in the first embodiment. The motor control device according to the third embodiment is obtained by replacing the switching command unit 31 of the motor control device 1 according to the first embodiment with a switching command unit 31b shown in Figure 8. Note that Figure 8 is a diagram showing an example configuration of the switching command unit of the motor control device according to the third embodiment. As shown in Figure 8, the switching command unit 31b according to the third embodiment includes an operation analysis unit 311 that analyzes a machining program and outputs a switching command.

[0056] As described in the first embodiment, by sequentially transitioning the position control gain even while the motor 70 is being driven, it is possible to switch the position control gain while maintaining the constraints on the control state variable. However, for example, in a motor control device for a machine tool, switching the position control gain during cutting operation can cause trajectory distortion due to fluctuations in position deviation, resulting in a deterioration in machined surface accuracy. Therefore, the operation analysis unit 311 of the switching command unit 31b according to the third embodiment shown in FIG. 8 analyzes the machining program to determine whether the motor control device is in a machining operation or a non-machining operation. The operation analysis unit 311 outputs a switching command that permits switching of the position control gain during a non-machining operation and prohibits switching of the position control gain during a machining operation. That is, the switching command unit 31b commands the control gain change unit 32 to switch the position control gain during a non-machining operation.

[0057] The position command generator 11 shown in FIG. 1 generates a position command based on a machining program (G-code program) that determines the path of the drive target of the motor 70. The machining location is specified in the machining program, so by analyzing the machining program, it is possible to detect when a machining operation is in progress. In this embodiment, an example of detecting a machining operation has been described, but interpolation operations of multiple axes may also be detected. In other words, the switching command unit 31b may command switching of the position control gain during non-interpolation operation, in which no interpolation operation is being performed.

[0058] As described above, according to the third embodiment, the switching command unit 31b has the motion analysis unit 311, so that it is possible to switch the position control gain at a timing that does not affect the trajectory.

[0059] Although the example in which the switching command unit 31b shown in FIG. 8 is applied to the first embodiment has been described, it may also be applied to the second embodiment.

[0060] Fourth Embodiment Next, a motor control device according to a fourth embodiment will be described. In the first to third embodiments, the case of controlling a single motor 70 has been described, but in this embodiment, the case of controlling multiple motors will be described. As an example, a motor control system that performs synchronous operation on two axes will be described.

[0061] As described in the first embodiment, by sequentially transitioning the position control gain even while the motor 70 is being driven, it is possible to switch the position control gain while maintaining the constraints on the control state quantity. However, in a motor control device that controls multiple motors in synchronization, if different constraint values ​​are set for each motor control circuit, the calculated transition of the position control gain will be different between the axes, and synchronous operation may result in a distorted trajectory. Therefore, the motor control device according to the fourth embodiment switches the position control gain while maintaining synchronism by mutually referencing the calculated position control gain between the motor control circuits and ensuring the same gain transition.

[0062] Fig. 9 is a diagram showing an example of the configuration of a motor control system according to the fourth embodiment. The motor control system 100c according to the fourth embodiment includes a motor control device 1c that controls a plurality of motors, and a plurality of motors 701 and 702. Detectors 801 and 802 are attached to the motors 701 and 702, respectively. Although Fig. 9 shows that the motor control device 1c controls two motors, it may control three or more motors.

[0063] Motor control device 1c includes command generator 10, switching command unit 31, position control units 201 and 202, first control gain change unit 321, second control gain change unit 322, speed control units 401 and 402, current control units 501 and 502, and speed calculation units 601 and 602. Position control units 201 and 202 have the same function as position control unit 20 of motor control device 1 according to the first embodiment. Speed ​​control units 401 and 402 have the same function as speed control unit 40 of motor control device 1 according to the first embodiment. Current control units 501 and 502 have the same function as current control unit 50 of motor control device 1 according to the first embodiment. Speed ​​calculation units 601 and 602 have the same function as speed calculation unit 60 of motor control device 1 according to the first embodiment.

[0064] In motor control device 1c, first control gain change unit 321 outputs position control gain #1 to second control gain change unit 322, and second control gain change unit 322 outputs position control gain #2 to first control gain change unit 321. First control gain change unit 321 refers to position control gain #2 calculated by second control gain change unit 322, and second control gain change unit 322 refers to position control gain #1 calculated by first control gain change unit 321.

[0065] FIG. 10 is a diagram illustrating an example of the configuration of a first control gain change unit 321 and a second control gain change unit 322 of a motor control device 1c according to the fourth embodiment.

[0066] The first control gain change unit 321 includes a constraint value determination unit 331 that determines a constraint value based on the control state quantity 211 and the constraint condition 221, a gain change calculation unit 341 that calculates a position control gain #1 based on the pre-change control gain 231, the post-change control gain 241, and the constraint value determined by the constraint value determination unit 331, and a gain transition determination unit 351 that selects the position control gain #1 or the position control gain #2 and outputs the selected value to the position control unit 201 as a position control gain switching value.

[0067] The second control gain change unit 322 includes a constraint value determination unit 332 that determines a constraint value based on the control state quantity 212 and the constraint condition 222, a gain change calculation unit 342 that calculates a position control gain #2 based on the pre-change control gain 232, the post-change control gain 242, and the constraint value determined by the constraint value determination unit 332, and a gain transition determination unit 352 that selects either the position control gain #1 or the position control gain #2 and outputs the selected value to the position control unit 202 as a position control gain switching value.

[0068] Control state quantities 211 and 212 are the same information as control state quantity 210 input to constraint value determination unit 33 included in control gain modification unit 32 of motor control device 1 according to the first embodiment. Constraint conditions 221 and 222 are the same information as constraint condition 220 input to constraint value determination unit 33 included in control gain modification unit 32 of motor control device 1 according to the first embodiment. Pre-change control gains 231 and 232 are the same information as pre-change control gain 230 input to gain change calculation unit 34 included in control gain modification unit 32 of motor control device 1 according to the first embodiment. Post-change control gains 241 and 242 are the same information as post-change control gain 240 input to gain change calculation unit 34 included in control gain modification unit 32 of motor control device 1 according to the first embodiment.

[0069] The constraint value determiners 331 and 332 have the same function as the constraint value determiner 33 of the control gain changer 32 of the motor control device 1 according to the first embodiment. The gain change calculators 341 and 342 have the same function as the gain change calculator 34 of the control gain changer 32 of the motor control device 1 according to the first embodiment.

[0070] Position control gain #1 calculated by gain change calculator 341 and position control gain #2 calculated by gain change calculator 342 are input to gain transition determiners 351 and 352. Gain transition determiners 351 and 352 select the position control gain #1 or position control gain #2 that has a gradual gain transition from the input position control gain #1 or position control gain #2, and output it as a position control gain switching value.

[0071] In this way, the first control gain change unit 321 and the second control gain change unit 322 mutually refer to the position control gains (position control gain #1, position control gain #2) calculated by each unit, select a position control gain with a gradual transition, and output it as the position control gain switching value.

[0072] In this embodiment, a motor control system that performs synchronous operation on two axes has been described, but the position control gain can also be changed in a similar manner when the number of axes to be subject to synchronous control is three or more.

[0073] As described above, according to the fourth embodiment, even in a motor control device having multiple motor control circuits with different constraint values ​​set, it is possible to switch the position control gain while maintaining the synchronism of the motor control.

[0074] Fifth Embodiment Next, a motor control device according to a fifth embodiment will be described. Note that components similar to those of the motor control device 1 according to the first embodiment will be described using the same names and symbols as in the first embodiment. The motor control device according to the fifth embodiment is obtained by replacing the control gain change unit 32 of the motor control device 1 according to the first embodiment with a control gain change unit 32d shown in FIG. 11. Note that FIG. 11 is a diagram showing an example configuration of the control gain change unit of the motor control device according to the fifth embodiment. As shown in FIG. 11, the control gain change unit 32d according to the fifth embodiment is obtained by adding a learning device 35 to the control gain change unit 32 according to the first embodiment shown in FIG.

[0075] As described in the first embodiment, by sequentially transitioning the position control gain even while the motor 70 is being driven, it is possible to switch the position control gain while maintaining the constraints on the control state variable. However, the transition of the position control gain in the first embodiment is derived on the assumption that the state is steady. In addition, time is required for the position control system to respond after the position control gain is reflected in the position control unit 20. Therefore, the transition of the position control gain may deviate slightly from the theoretical value, particularly when the time required for the transition of the position control gain is short. While the position control gain may be switched taking into account the transient state, this would result in a complex conversion formula, making it cumbersome to derive it for each constraint condition. Therefore, in the fifth embodiment, the difference between the control state variable selected as the constraint value and the actual control state variable, and the transition of the position control gain are learned, thereby switching the position control gain while taking into account the transient state.

[0076] In order to achieve switching of the position control gain while taking into consideration transient states, in this embodiment, machine learning is performed by the learning device 35 included in the control gain changing unit 32d, and the position control gain determined using a trained model obtained by machine learning is applied to the position control unit 20, thereby performing switching. Hereinafter, the phase in which the learning device 35 performs machine learning to generate a trained model will be referred to as the "learning phase," and the phase in which the trained model is used to infer the position control gain will be referred to as the "utilization phase." The operation will be described separately for the learning phase and the utilization phase.

[0077] <Learning Phase> In the learning phase, the learning device 35 generates a learned model through learning control using the constraint value determined by the constraint value determination unit 33, the position control gain output from the gain change calculation unit 34, the switching command output from the switching command unit 31, and the actual control state quantity.

[0078] FIG. 12 is a diagram illustrating a configuration example of a learning device that realizes the control gain change unit of the motor control device according to the fifth embodiment.

[0079] The learning device 35 realizing the control gain changing unit 32d according to the fifth embodiment includes a data acquiring unit 51 and a model generating unit 52. The model generating unit 52 includes a reward calculating unit 521 and a function updating unit 522.

[0080] The data acquiring unit 51 acquires the constraint value output from the constraint value determining unit 33, the switching command output from the switching commanding unit 31, the position control gain output from the gain change calculating unit 34, the actual control state quantity, the pre-change control gain, and the post-change control gain. Note that in the learning phase, the gain change calculating unit 34 calculates the position control gain by the method described in the first embodiment. The actual control state quantity acquired by the data acquiring unit 51 is the control state quantity corresponding to the acquired constraint value. For example, if the constraint value is the instantaneous value of the current command and the amount of variation in the position deviation, the data acquiring unit 51 acquires the instantaneous value of the current and the amount of variation in the position deviation as the actual control state quantities.

[0081] The model generation unit 52 generates a trained model by performing machine learning using learning data created based on a combination of the constraint value, the switching command, the position control gain, the actual control state variable, the pre-change control gain, and the post-change control gain acquired by the data acquisition unit 51. That is, the model generation unit 52 learns the relationship between each piece of data included in the learning data, and generates a trained model for inferring the position control gain from the constraint value, the switching command, the actual control state variable, the pre-change control gain, and the post-change control gain.

[0082] The learning algorithm used by the model generation unit 52 may be a known algorithm such as supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning. As an example, a case where reinforcement learning is applied to the learning algorithm used by the model generation unit 52 will be described. In reinforcement learning, an agent (acting subject) in a certain environment observes the current state (environmental parameters) and determines the action to be taken. The environment changes dynamically depending on the agent's actions, and the agent is given a reward according to the environmental changes. The agent repeats this process and learns the action course that will obtain the most reward through a series of actions. Q-learning and TD-learning are known as representative reinforcement learning methods. For example, in the case of Q-learning, a general update formula for the action value function Q(s, a) is expressed as the following formula (9):

[0083]

[0084] In formula (9), s t represents the state of the environment at time t, and a t represents the action at time t. t Therefore, the state is s t+1 It changes to r t+1 represents the reward given according to the change in state, γ represents the discount rate, and α represents the learning coefficient. Note that γ is in the range of 0<γ≦1, and α is in the range of 0<α≦1. In the model generation unit 52 of the learning device 35 according to this embodiment, the position control gain is t The constraint value, the switching command, the actual control state quantity, the control gain before the change, and the control gain after the change are in the state s t The model generation unit 52 generates the state s t Best action in a t Learn.

[0085] The update formula expressed by the above formula (9) increases the action value Q if the action value Q of the action a with the highest Q value at time t+1 is greater than the action value Q of the action a executed at time t, and decreases the action value Q in the opposite case. In other words, the action value function Q(s, a) is updated so that the action value Q of the action a at time t approaches the best action value at time t+1. As a result, the best action value in a certain environment is propagated sequentially to the action values ​​in previous environments.

[0086] The reward calculation unit 521 calculates a reward based on the pre-change control gain, post-change control gain, constraint value, switching command, and position control gain acquired by the data acquisition unit 51 .

[0087] Specifically, the reward calculation unit 521 calculates a reward r based on the constraint value and the actual control state quantity. For example, the reward calculation unit 521 increases the reward r (for example, gives a reward of "1") when the difference between the constraint value and the actual control state quantity decreases, and decreases the reward r (for example, gives a reward of "-1") when the difference between the constraint value and the actual control state quantity remains unchanged or increases.

[0088] The function update unit 522 updates the function for determining the position control gain to be applied to the position control unit 20 in accordance with the reward calculated by the reward calculation unit 521. The function update unit 522 outputs the learned model created by updating the function to the learned model storage unit 55. For example, when the learning algorithm is Q-learning, the action value function Q(s t , a t ) is used as a function for determining the position control gain to be applied to the position control unit 20.

[0089] The learning device 35 repeatedly executes the above-described learning. The learned model storage unit 55 stores the action value function Q(s t , a t ), i.e., stores the trained model.

[0090] 11 and 12 do not specify where the learned model storage unit 55 is provided, the learned model storage unit 55 may be provided inside the control gain change unit 32d or outside the control gain change unit 32d. When the learned model storage unit 55 is provided outside the control gain change unit 32d, the learned model storage unit 55 may be provided outside the motor control device. Furthermore, the learned model storage unit 55 may be provided inside the learning device 35.

[0091] Next, the operation of the learning device 35 will be described with reference to Fig. 13. Fig. 13 is a flowchart showing an example of the operation of the learning device according to the fifth embodiment.

[0092] In the learning device 35, first, the data acquiring unit 51 acquires learning data (step S11). Specifically, the data acquiring unit 51 acquires the pre-change control gain, the post-change control gain, the constraint value, the switching command, and the position control gain as learning data.

[0093] Next, the reward calculation unit 521 and the function update unit 522 of the model generation unit 52 update the function for determining the position control gain based on the learning data (steps S12 to S15).

[0094] Specifically, the reward calculation unit 521 calculates the difference between the constraint value and the actual control state quantity, and if the difference has decreased (step S12: Yes), the reward calculation unit 521 increases the reward (step S13).If the difference has not decreased (step S12: No), the reward calculation unit 521 decreases the reward (step S14).

[0095] Following step S13 or step S14, the function update unit 522 updates the action value function Q(s) stored in the trained model storage unit 55 based on the reward after the reward calculation unit 521 has increased or decreased the reward. t , a t ) is updated (step S15).

[0096] The learning device 35 repeatedly executes the above steps S11 to S15 to obtain the action value function Q(s t , a t The learned model storage unit 55 updates the action value function Q(s) after the learning device 35 has updated it a predetermined number of times. t , a t ) is stored as a trained model.

[0097] <Utilization Phase> Fig. 14 is a diagram showing an example of a control gain change unit implemented by utilizing a trained model. The control gain change unit 32e shown in Fig. 14 has a configuration in which the gain change calculation unit 34 of the control gain change unit 32 (see Fig. 3) according to the first embodiment is replaced with a gain change calculation unit 34e. The gain change calculation unit 34e includes an inference device 36 that infers a position control gain by utilizing the trained model generated by the learning device 35 described above. In other words, the gain change calculation unit 34e is implemented by the inference device 36.

[0098] Fig. 15 is a diagram showing an example of the configuration of an inference device 36 that realizes a motor control device according to embodiment 5. The inference device 36 includes a data acquisition unit 61 and an inference unit 62. The trained model storage unit 55 shown in Fig. 15 is the same as the trained model storage unit 55 shown in Fig. 12 and stores the trained model generated by the model generation unit 52 of the learning device 35 described above.

[0099] The data acquisition unit 61 acquires the constraint value output from the constraint value determination unit 33, the switching command output from the switching command unit 31, the actual control state quantity, the pre-change control gain, and the post-change control gain.

[0100] The inference unit 62 uses the learned model stored in the learned model storage unit 55 to infer the position control gain to be used by the position control unit 20. That is, the inference unit 62 infers the position control gain to be used by the position control unit 20 by inputting the constraint value, the switching command, the actual control state quantity, the pre-change control gain, and the post-change control gain acquired by the data acquisition unit 61 into the learned model as inference data.

[0101] In this embodiment, the position control gain is inferred using a learned model learned by the model generation unit 52 of the motor control device. However, it is also possible to obtain a learned model from a learning device that has performed learning using learning data acquired from another motor control device, and use this learned model to infer the position control gain.

[0102] 16 is a flowchart showing an example of the operation of the inference device 36 according to the fifth embodiment. The operation of the inference device 36 to infer a position control gain will be described with reference to the flowchart of FIG.

[0103] First, the data acquisition unit 61 acquires the constraint value, the switching command, the actual control state quantity, the pre-change control gain, and the post-change control gain as inference data (step S21).

[0104] Next, the inference unit 62 inputs the inference data acquired by the data acquisition unit 61 into the learned model stored in the learned model storage unit 55, and obtains the corresponding output from the learned model, thereby inferring a position control gain (step S22). That is, the learned model stored in the learned model storage unit 55 infers a position control gain to be used when the position control unit 20 calculates a speed command, based on the input constraint value, switching command, actual control state quantity, pre-change control gain, and post-change control gain.

[0105] When the inference of the position control gain is completed, the inference unit 62 outputs the position control gain obtained by the inference to the position control unit 20 (step S23). The position control gain output by the inference unit 62 to the position control unit 20 corresponds to the position control gain switching value described in the first embodiment.

[0106] The position control unit 20 updates the position control gain used by the speed command calculation unit 22 in the calculation process of the speed command based on the position control gain output from the inference unit 62 of the inference device 36 (step S24). That is, the position control unit 20 sets the position control gain output from the inference unit 62 as the position control gain used by the speed command calculation unit 22 in the calculation process of the speed command.

[0107] This makes it possible to realize a motor control device that can switch the position control gain while maintaining the constraints even while the motor 70 is being driven.

[0108] In the present embodiment, a case has been described in which reinforcement learning is applied to the learning algorithm used by the model generation unit 52 of the learning device 35, but the present invention is not limited to this. As for the learning algorithm, other than reinforcement learning, supervised learning, unsupervised learning, semi-supervised learning, etc. can also be applied.

[0109] Deep learning, which learns to extract feature quantities themselves, can also be used as the learning algorithm used in the model generation unit 52. The model generation unit 52 may also perform machine learning according to other known methods, such as neural networks, genetic programming, functional logic programming, and support vector machines.

[0110] The learning device 35 and the inference device 36 may be connected to the motor control device via a network and may be separate devices from the motor control device. The learning device 35 and the inference device 36 may also be built into the motor control device. Furthermore, the learning device 35 and the inference device 36 may exist on a cloud server.

[0111] The model generation unit 52 may also perform the above-described learning using learning data acquired from multiple motor control devices. The model generation unit 52 may acquire learning data from multiple motor control devices used in the same area, or may perform the above-described learning using learning data collected from multiple motor control devices operating independently in different areas. It is also possible to add or remove motor control devices from which learning data is collected during the learning process. Furthermore, a learning device that has learned the position control gains to be reflected in the position control unit 20 for a certain motor control device may be applied to another motor control device, and the position control gains to be reflected in the position control unit 20 for the other motor control device may be re-learned to update the learned model.

[0112] As described above, in the fifth embodiment, a trained model is generated by learning the relationship between the constraint value, the switching command, the actual control state variable, the pre-change control gain, the post-change control gain, and the position control gain, and the trained model is used to determine the position control gain to be applied to the speed command calculation in the position control unit. This makes it possible to realize a motor control device that can switch the control gain while taking into account transient states.

[0113] Next, the hardware configuration of the motor control device described in each embodiment will be described. The motor control device described in each embodiment is realized, for example, by the hardware shown in Fig. 17. Fig. 17 is a diagram showing an example of hardware that realizes the motor control device according to each embodiment.

[0114] That is, the motor control device described in each embodiment can be realized by a processor 91 and memory 92 shown in FIG. 17. An example of the processor 91 is a CPU (Central Processing Unit, also called a central processing unit, processing unit, arithmetic unit, microprocessor, microcomputer, or DSP (Digital Signal Processor)) or a system LSI (Large Scale Integration). An example of the memory 92 is a non-volatile or volatile semiconductor memory such as RAM (Random Access Memory), ROM (Read Only Memory), or flash memory, a magnetic disk, etc. An example of the display device 103 is a liquid crystal monitor, a display, etc. An example of the communication device 104 is a wireless LAN (Local Area Network) adapter, etc.

[0115] The motor control device described in each embodiment is realized by a processor 91 executing a program for realizing the function of each part of the motor control device. The program for realizing the function of each part of the motor control device is stored in advance in a memory 92. The processor 91 reads and executes this program from the memory 92 to realize the function of each part of the motor control device.

[0116] Although the embodiments have been described with respect to cases where each component of the motor control device is implemented using a general-purpose processor and memory, each component of the motor control device described in each embodiment may also be implemented using a dedicated processing circuit. Examples of dedicated processing circuits include a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), and an FPGA (Field Programmable Gate Array). Each component of the motor control device may also be implemented using a combination of two or more of these processing circuits. Furthermore, each component of the motor control device may also be implemented using a combination of the processor 91 and memory 92 shown in FIG. 17 with a dedicated processing circuit.

[0117] The configurations shown in the above embodiments are merely examples, and may be combined with other known technologies, or different embodiments may be combined with each other. It is also possible to omit or modify parts of the configurations as long as they do not deviate from the gist of the invention.

[0118] 1, 1c, 1x Motor control device, 2 Command value generation device, 10 Command generation unit, 11 Position command generation unit, 20, 201, 202 Position control unit, 21 Position deviation calculation unit, 22 Speed ​​command calculation unit, 30 Gain switching unit, 31, 31b Switching command unit, 32, 32a, 32d, 32e Control gain change unit, 33, 33a, 331, 332 Constraint value determination unit, 34, 34e, 341, 342 Gain change calculation unit, 35 Learning device, 36 Inference device, 40, 401, 402 Speed ​​control unit, 50, 501, 502 Current control unit, 51, 61 Data acquisition unit, 52 Model generation unit, 55 Learned model storage unit, 60, 601, 602 Speed ​​calculation unit, 62 Inference unit, 70, 701, 702 Motor, 80, 801, 802 Detector, 100, 100c, 101 Motor control system, 210, 211, 212 Control state quantity, 220, 221, 222 Constraint conditions, 230, 231, 232 Control gain before change, 240, 241, 242 Control gain after change, 311 Motion analysis unit, 321 First control gain change unit, 322 Second control gain change unit, 351, 352 Gain transition determination unit, 521 Reward calculation unit, 522 Function update unit.

Claims

1. A motor control device that controls a motor connected to a driven body to be controlled, comprising: a switching command unit that commands switching of a control gain used in the control of the motor; a constraint value determination unit that determines a constraint value of the control state quantity when switching the control gain based on a control state quantity indicating a control state when the motor is controlled and a constraint condition for the control state; a pre-change control gain that is the control gain before switching the control gain according to the switching command by the switching command unit, a post-change control gain that is the control gain after switching the control gain according to the switching command, and a gain change calculation unit that sequentially calculates the control gain used in the control of the motor from the start to the completion of the switching of the control gain based on the constraint value determined by the constraint value determination unit. A motor control device characterized by comprising the above.

2. The control state quantity includes one or more of a position deviation between a position command for the motor and an actual position of the motor, the position command or the actual position of the motor, a speed command for the motor or an actual speed of the motor, an acceleration command for the motor or an actual acceleration of the motor, a current command for the driven body or an actual current value flowing through the driven body, a torque command for the driven body or an actual torque of the driven body, and a jerk command for the driven body or an actual jerk of the driven body. The motor control device according to claim 1, characterized by the above.

3. The constraint condition is one or a combination of a plurality of instantaneous values, maximum values, minimum values, effective values, average values, and amounts of variation of the control state quantity for each control cycle. The motor control device according to claim 1 or 2, characterized by the above.

4. The constraint value determination unit changes the constraint value when the control state quantity satisfies a determined condition. The motor control device according to any one of claims 1 to 3, characterized by the above.

5. The motor control device is applied to a machine tool, and the switching command unit includes an operation analysis unit that determines whether or not the machine tool is in a machining operation, and commands switching of the control gain during a non-machining operation. The motor control device according to any one of claims 1 to 4, characterized by the above.

6. The switching instruction unit includes an operation analysis unit that determines whether the motor control device is in an interpolation operation, and commands the switching of the control gain during a non-interpolation operation. The motor control device according to any one of claims 1 to 4, characterized in that.

7. A plurality of the gain change calculation units are provided, and a plurality of control gains calculated by each of the plurality of gain change calculation units are compared, and based on the comparison result, one of the plurality of control gains to be compared is selected as the control gain to be used in the control of the motor. The motor control device according to any one of claims 1 to 6, characterized in that.

8. The gain change calculation unit calculates the control gain using a learned model generated by learning the relationship between the switching instruction, the control gain before the change, the control gain after the change, the constraint value, the actual control state quantity, and the control gain used in the control of the motor from the start to the completion of the switching of the control gain. The motor control device according to any one of claims 1 to 7, characterized in that.

9. A learning device that generates the learned model by learning the relationship between the switching instruction, the control gain before the change, the control gain after the change, the constraint value, the actual control state quantity, and the control gain. The motor control device according to claim 8, characterized in that it is provided.

10. The learning device repeatedly performs a process of updating a function for determining the control gain based on the difference between the constraint value and the actual control state quantity to generate the learned model. The motor control device according to claim 9, characterized in that.

11. The gain change calculation unit includes a data acquisition unit that acquires the switching instruction, the control gain before the change, the control gain after the change, the constraint value, and the actual control state quantity as inference data, and an inference unit that infers the control gain using the inference data acquired by the data acquisition unit and the learned model. The motor control device according to any one of claims 8 to 10, characterized in that it is provided.

12. A motor control method executed by a motor control device that controls a motor connected to a driven body to be controlled, the method comprising: a first step of receiving a switching command for instructing switching of a control gain used in controlling the motor; a second step of determining a constraint value of the control state quantity when switching the control gain based on a control state quantity indicating a control state when the motor is controlled and a constraint condition for the control state; and a third step of sequentially calculating a control gain used in controlling the motor from the start to the completion of switching of the control gain based on a pre-change control gain that is the control gain before switching the control gain according to the switching command received in the first step, a post-change control gain that is the control gain after switching the control gain according to the switching command, and the constraint value determined in the second step. A motor control method characterized by including the above steps.

Citation Information

Patent Citations

  • Control device of motor

    JP2006074885A

  • Motor control device, motor control method, learning device, learning method, and motor control system

    JP2021168548A