Motor control device and motor control method
Patent Information
- Application Number
- CN202610309587.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-03-13
- Filing Date
- 2026-03-13
- Publication Date
- 2026-09-15
Smart Images

Figure CN122764079A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a motor control device and a motor control method. Background Technology
[0002] Patent Document 1 discloses a motor control device that controls the position and speed of a driven body based on the position and speed detected by a motor encoder mounted on the motor and a separate detector mounted on the driven body driven by the motor.
[0003] [Existing Technical Documents]
[0004] [Patent Literature]
[0005] [Patent Document 1] International Publication No. 2022 / 172859 Summary of the Invention
[0006] When one detector malfunctions, the aforementioned motor control device switches to motor control based on a detector that is functioning correctly. In other words, the motor control device controls the motor by switching between semi-closed-loop control based on the position and speed detected by the motor encoder and full-closed-loop control based on the position and speed of the driven body detected by a separate detector. For example, during full-closed-loop control, if a separate detector or its feedback cable malfunctions, the motor control device switches from full-closed-loop control to semi-closed-loop control.
[0007] However, even when there are no abnormalities in the individual detector or feedback cable, the position detection value of the driven body detected by the individual detector may contain outliers. Therefore, when the position detection value of the driven body contains outliers, there is room for improvement in the existing technology for motor control in terms of eliminating the influence of the position detection value of the driven body.
[0008] This disclosure provides a motor control device for driving a driven object based on position commands. When the detected value of the driven object is determined to be an abnormal value, the device can eliminate the influence of the detected value of the driven object to control the motor.
[0009] A motor control device according to one aspect of this disclosure includes: an acquisition unit that acquires a motor position detection value detected by a motor encoder and a position detection value of the driven body detected by an external encoder of the driven body driven by the motor; an anomaly determination unit that determines whether the acquired position detection value of the driven body is an anomaly; a first addition unit that calculates a first deviation between a position command and the motor position detection value; an arithmetic unit that calculates a second deviation between the motor position detection value and the position detection value of the driven body; a second addition unit that calculates a third deviation between the first deviation and the second deviation; and a control unit that controls the motor based on the third deviation. The first addition unit, the second addition unit, and the control unit are connected in series in this order. When the anomaly determination unit determines that the position detection value of the driven body is an anomaly, zero is input to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and the motor position detection value is input to the other.
[0010] Furthermore, according to one aspect of this disclosure, the motor control method is a method executed by a motor control device, the motor control device comprising: an acquisition unit that acquires a motor position detection value detected by a motor encoder and a position detection value of the driven body detected by an external encoder of the driven body driven by the motor; an anomaly determination unit that determines whether the acquired position detection value of the driven body is an anomaly; a first addition unit that calculates a first deviation between a position command and the motor position detection value; an arithmetic unit that calculates a second deviation between the motor position detection value and the position detection value of the driven body; a second addition unit that calculates a third deviation between the first deviation and the second deviation; and a control unit that controls the motor based on the third deviation. The first addition unit, the second addition unit, and the control unit are connected in series in this order. When the anomaly determination unit determines that the position detection value of the driven body is an anomaly, zero is input to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and the motor position detection value is input to the other.
[0011] According to this disclosure, in a motor control device that uses position commands to drive a driven body, when the position detection value of the driven body is determined to be an abnormal value, the influence of the position detection value of the driven body is eliminated to perform motor control. Attached Figure Description
[0012] Figure 1 This is a diagram illustrating an example of a control system (in normal operation) according to the first embodiment.
[0013] Figure 2 This is a diagram illustrating an example of a control system (in case of an anomaly) according to the first embodiment.
[0014] Figure 3 This is a flowchart illustrating an example of a motor control method according to a first embodiment.
[0015] Figure 4 This is a diagram illustrating an example of the hardware structure of a motor control device and its peripheral components.
[0016] Figure 5 This is a diagram illustrating an example of a control system according to a second embodiment.
[0017] Figure 6 This is a flowchart illustrating an example of a motor control method according to a second embodiment.
[0018] Figure 7 This is a diagram illustrating an example of a control system according to a third embodiment.
[0019] Figure 8 This is a flowchart illustrating an example of a motor control method according to a third embodiment.
[0020] Figure 9 This is a diagram illustrating an example of a control system according to the fourth embodiment.
[0021] Figure 10 This is a flowchart illustrating an example of a motor control method according to a fourth embodiment. Detailed Implementation
[0022] The following describes in detail, with reference to the accompanying drawings, modes for implementing the control system, motor control device, and motor control method according to this disclosure (hereinafter referred to as "Embodiments"). However, this disclosure is not limited to these Embodiments. Furthermore, the Embodiments may be appropriately combined without causing any contradiction in the processing content. In addition, the same reference numerals are used for the same parts in the following Embodiments, and repeated descriptions are omitted.
[0023] First Implementation Method
[0024] <Structure of Control Systems>
[0025] Side reference Figure 1 and Figure 2 The structure of the control system 10 according to the first embodiment will be described. Figure 1 This is a diagram illustrating an example of a control system 10 (in normal operation) according to a first embodiment. Figure 2This is a diagram illustrating an example of the control system 10 (in case of an abnormality) according to the first embodiment. Additionally, Figure 1 and Figure 2 The connections between the constituent elements shown can be physical connections or logical connections.
[0026] like Figure 1 and Figure 2 As shown, the control system 10 includes a motor control device 100, a motor encoder 150, and an external encoder 151. The motor encoder 150 is mounted to the motor M. The external encoder 151 is mounted to the driven body driven by the motor M, or to the driven body side end of the power transmission component D that transmits power from the motor M to the driven body. In the following embodiment, a linear motion platform T (hereinafter referred to as "platform T") is used as an example of a driven body for explanation. Therefore, the motor control device 100 drives the motor M according to the position command C output by the upper control device 200, thereby controlling the position of the platform T. The position control of the platform T includes moving the platform T vertically by driving the motor M and controlling the height of the platform T, and moving the platform T horizontally and controlling the position of the platform T.
[0027] For example, the control system 10 performs position control when moving the platform T along, for example, the vertical (height) direction. In this case, the control system 10 provides a motor control device 100 and a motor M for a single axis in the vertical direction of the platform T. However, the position control of the control system 10 is not limited to this. When moving the driven body along, for example, three axes, the control system 10 provides a motor control device 100 and a motor M for each axis.
[0028] The power transmission component D is the mechanism that transmits the power from the motor M to the platform T. It can be a linear motion mechanism such as a gear rack or ball screw. For example, the rotation of the motor M is transmitted to the power transmission component D and converted into linear motion of the platform T, thereby adjusting the position of the platform T.
[0029] The rotational angular position of motor M is detected by motor encoder 150. The detected value of motor encoder 150 is an example of a motor position detection value, hereinafter referred to as "motor encoder value FBM". Furthermore, in this specification, motor control based on the deviation between the position command C from the upper control device 200 and the motor position detection value (motor encoder value FBM) is referred to as "semi-closed-loop control". That is, in semi-closed-loop control, the motor encoder value FBM is used for feedback control of the position of motor M.
[0030] The position of platform T is detected by external encoder 151. The detected value of external encoder 151 is an example of the position detection value of the driven body, hereinafter referred to as "external encoder value FBL". Furthermore, in this specification, motor control based on the deviation between the position command C from the upper control device 200 and the position detection value of the driven body (external encoder value FBL) is referred to as "full closed-loop control". That is, in full closed-loop control, the external encoder value FBL is used for feedback control of the driven body position.
[0031] In the feedback control of the driven body position, the motor control unit 100 controls the motor M according to the position command C. The position command C is output by the upper control unit 200, indicating the position (target position) that the platform T wants to achieve. In the full closed-loop control, the motor control unit 100 performs position control through the position control unit 1171 so that the deviation between the position command C and the external encoder value FBL is close to 0, and provides the motor M with a current corresponding to the position control through the current control unit 1172. In the semi-closed-loop control, the motor control unit 100 performs position control through the position control unit 1171 so that the deviation between the position command C and the motor encoder value FBM is close to 0, and provides the motor M with a current corresponding to the position control through the current control unit 1172.
[0032] The motor control device 100 includes a first acquisition unit 111, a second acquisition unit 112, an anomaly determination unit 113, a first addition unit 114, a second addition unit 115, a closed-loop calculation unit 116, a control unit 117, a first unit conversion unit 118, a second unit conversion unit 119, and a moving average filter 120.
[0033] The first acquisition unit 111 is connected to the motor encoder 150 via a connecting cable 153. The first acquisition unit 111 acquires the motor encoder value FBM detected by the motor encoder 150. The motor encoder value FBM is a pulse signal, and the first acquisition unit 111 converts the pulse signal (first pulse signal) into position information and outputs it to the first adder unit 114.
[0034] The second acquisition unit 112 is connected to the external encoder 151 via a connecting cable 154. The second acquisition unit 112 acquires the external encoder value FBL detected by the external encoder 151. The external encoder value FBL is a pulse signal, and the second acquisition unit 112 converts this pulse signal (second pulse signal) into position information and outputs it to the closed-loop calculation unit 116. The first acquisition unit 111 and the second acquisition unit 112 are an example of acquisition units that acquire the motor encoder value FBM and the external encoder value FBL.
[0035] The anomaly determination unit 113 determines whether an anomaly exists based on the external encoder value FBL and the second deviation (described later). Specifically, the anomaly determination unit 113 determines whether the external encoder value FBL is an abnormal value based on the pulse information of the ABZ phase of the second pulse signal, or determines whether the second deviation is abnormal based on the external encoder value FBL and the motor encoder value FBM, and outputs the anomaly determination result of the external encoder value FBL or the anomaly determination result of the second deviation to the closed-loop calculation unit 116. The anomaly determination conditions of the external encoder value FBL used by the anomaly determination unit 113 will be described later. The following are examples of determining whether an anomaly exists mainly based on the external encoder value FBL.
[0036] The first adder 114 receives the position command C and the motor encoder value FBM as input, and calculates the first deviation, which is the deviation between the position command C and the motor encoder value FBM. Specifically, the first adder 114 subtracts the motor encoder value FBM from the position command C to calculate the first deviation, and outputs it to the second adder 115.
[0037] The first adder 114, the second adder 115, and the control unit 117 are connected in series in this order. The second adder 115 receives a first deviation and a second deviation calculated by the closed-loop arithmetic unit 116 as inputs, and calculates a third deviation, which is the deviation between the first and second deviations. Specifically, the second adder 115 subtracts the second deviation from the first deviation to calculate the third deviation, and outputs it to the control unit 117. The control unit 117 is connected to the motor M via a connecting cable 152. The control unit 117 controls the motor M according to the third deviation. The control unit 117 includes a position control unit 1171 and a current control unit 1172. The position control unit 1171 controls the position of the platform T so that the third deviation converges to near 0 (zero) and the position of the platform T is approximately the target position. The current control unit 1172 controls the current supplied to the motor M in accordance with the position of the platform T controlled by the position control unit 1171.
[0038] The closed-loop arithmetic unit 116 includes a first switching unit 1161 and a third adding unit 1162. The first switching unit 1161 can be implemented by either a hard switch or a soft switch. During the period when the abnormality determination unit 113 determines that the external encoder value FBL is a normal value, such as Figure 1As shown, the first switching unit 1161 switches the connection destination of the switch to the contact A1 side. At this time, the first switching unit 1161 outputs the external encoder value FBL, and the third addition unit 1162 calculates the second deviation, that is, the deviation between the motor encoder value FBM and the external encoder value FBL. Specifically, the closed-loop calculation unit 116 calculates the second deviation by subtracting the motor encoder value FBM from the external encoder value FBL. For the second addition unit 115, the second deviation can be directly input, or the moving average value of the second deviation after processing by the moving average filter 120 can be input.
[0039] As a result, during the period when the external encoder value FBL is determined to be within the normal range, the third deviation is the deviation between the first and second deviations, and is the deviation between the position command C and the external encoder value FBL. Therefore, the control unit 117 performs full closed-loop control on the motor M based on the deviation between the position command C and the external encoder value FBL.
[0040] When the anomaly determination unit 113 determines that the external encoder value FBL is an anomaly, such as Figure 2 As shown, the first switching unit 1161 switches the connection destination of the switch from the contact A1 side to the contact A2 side. At this time, the first switching unit 1161 switches the value used in the calculation of the full closed-loop calculation unit 116 from the external encoder value FBL to the motor encoder value FBM, or substitutes the motor encoder value FBM into the external encoder value FBL. As a result, the third adding unit 1162 outputs 0 (zero) as the second deviation.
[0041] As a result, when the external encoder value FBL is determined to be an abnormal value, 0 (zero) is input from the full-loop calculation unit 116 to the second adder unit 115 to replace the second deviation. Furthermore, the motor encoder value FBM is also input from the first acquisition unit 111 to the first adder unit 114. As a result, when the external encoder value FBL is determined to be an abnormal value, the third deviation is equal to the deviation between the position command C and the motor encoder value FBM. Therefore, the control unit 117 performs semi-closed-loop control on the motor M based on the deviation between the position command C and the motor encoder value FBM.
[0042] The first unit conversion unit 118, the closed-loop calculation unit 116, and the second unit conversion unit 119 are connected in series in this order. The number of pulses detected when the motor M rotates one revolution differs between the motor encoder 150 and the external encoder 151. Therefore, a coefficient is set to match the number of pulses. Using this coefficient, the first unit conversion unit 118 converts the unit of the motor encoder value FBM to the unit of the external encoder value FBL, and the second unit conversion unit 119 converts the unit of the second deviation from the unit of the external encoder value FBL to the unit of the motor encoder value FBM. Therefore, the closed-loop calculation unit 116 performs calculations in the unit of the external encoder value FBL and outputs the calculation result in that unit. Furthermore, the second addition unit 115 performs calculations in the unit of the motor encoder value FBM and outputs the calculation result in that unit. The control unit 117 performs motor control in the unit of the motor encoder value FBM.
[0043] The moving average filter 120 outputs a moving average of a predetermined number of second deviations, calculated latest by the fully closed-loop calculation unit 116. The predetermined number can be one or more. When the predetermined number is one, the moving average filter 120 outputs the second deviation calculated latest by the fully closed-loop calculation unit 116. When the predetermined number is multiple, the moving average filter 120 outputs a moving average of multiple second deviations calculated latest by the fully closed-loop calculation unit 116.
[0044] When the moving average filter 120 outputs a second deviation, the second adder 115 calculates the deviation between the first deviation and the second deviation as a third deviation. When the moving average filter 120 outputs a moving average of the second deviation, the second adder 115 calculates the deviation between the moving average of the first deviation and the moving average of the second deviation as a third deviation.
[0045] <Operation of the motor control device>
[0046] The external encoder value FBL corresponds to the position of platform T. Here, motor encoder 150 can be mounted on motor M, and external encoder 151 can be mounted on platform T or at the end of power transmission component D on the platform T side. Therefore, motor encoder value FBL does not include errors caused by torsion, elongation, thermal expansion, etc., of power transmission component D between motor M and platform T, while external encoder 151 FBL includes errors caused by torsion, etc., of power transmission component D. Therefore, compared with semi-closed-loop control, full-closed-loop control directly detects the position of the object (driven body), thus achieving higher position control accuracy. Therefore, during the period when the external encoder value FBL is determined to be a normal value, control unit 117 performs motor control through full-closed-loop control with higher accuracy than semi-closed-loop control, thereby controlling the position of the driven body.
[0047] However, when the external encoder value FBL is determined to be an abnormal value, it is preferable to exclude the influence of the external encoder value FBL when performing motor control. Therefore, when the external encoder value FBL is determined to be an abnormal value, the control unit 117 switches the motor control from full closed-loop control to semi-closed-loop control to perform motor control and control the position of the driven body.
[0048] <Motor Control Methods>
[0049] An example of a motor control method according to the first embodiment that can be executed by the motor control device 100 using the above-described structure is given, with reference to... Figure 3 The explanation will be provided later. Figure 3 This is a flowchart of an example of a motor control method according to the first embodiment.
[0050] In step S10, the first acquisition unit 111 acquires the motor encoder value FBM detected by the motor encoder 150, and the second acquisition unit 112 acquires the external encoder value FBL detected by the external encoder 151.
[0051] Next, in step S11, the first unit converter 118 converts the unit of the acquired motor encoder value FBM to the unit of the external encoder value FBL. Next, in step S12, the anomaly determination unit 113 determines whether the acquired external encoder value FBL is an anomaly.
[0052] (Normal values)
[0053] In step S12, if the anomaly determination unit 113 determines that the acquired external encoder value FBL is a normal value (step S12, no), proceed to step S13. In step S13, the first switching unit 1161 of the full closed-loop calculation unit 116 outputs the external encoder value FBL (refer to...). Figure 1 The third addition unit 1162 of the fully closed-loop calculation unit 116 calculates the deviation between the motor encoder value FBM and the external encoder value FBL, and outputs the second deviation of the calculation result.
[0054] Next, in step S14, the second unit converter 119 converts the calculation result of the closed-loop calculation unit 116 from the unit of the external encoder value FBL to the unit of the motor encoder value FBM. That is, the second unit converter 119 converts the second deviation into the unit of the motor encoder value FBM.
[0055] Next, in step S15, the moving average filter 120 outputs the moving average of the second deviation based on the latest calculation results of the predetermined number of calculations by the closed-loop calculation unit 116. Next, in step S16, the first adder 114 calculates the first deviation, which is the deviation between the position command C and the motor encoder value FBM.
[0056] Next, in step S17, the second addition unit 115 calculates the third deviation, which is the deviation between the moving average of the first deviation and the second deviation. Next, in step S18, the control unit 117 controls the motor M based on the third deviation.
[0057] Next, in step S19, the control unit 117 determines whether the stop flag is set to ON. The stop flag is initially set to OFF, and is set to ON when the external encoder value FBL is determined to be an abnormal value. If the control unit 117 determines that the stop flag is set to OFF (step S19, NO), it directly terminates the process.
[0058] (Outlier cases)
[0059] In step S12, when the anomaly determination unit 113 determines that the acquired external encoder value FBL is an anomaly (step S12, yes), the process proceeds to step S21. In step S21, the full closed-loop calculation unit 116 switches the connection destination of the switch to the contact A2 side (refer to...). Figure 2 Then, the first switching unit 1161 switches the value used in the calculation of the full closed-loop calculation unit 116 from the external encoder value FBL to the motor encoder value FBM, or substitutes the motor encoder value FBM into the external encoder value FBL.
[0060] Next, in step S22, the closed-loop calculation unit 116 outputs 0 (zero) as the calculation result to replace the second deviation, and sets the stop flag to open.
[0061] Next, the motor control device 100 executes steps S14 to S20. At this time, the calculation result of the full closed-loop calculation unit 116 is set to 0 to replace the second deviation. Therefore, the moving average value of the second deviation is set to 0 or an approximate value of 0. In step S17, the third deviation becomes a value equal to or approximately equal to the deviation between the position command C and the motor encoder value FBM. In step S18, the control unit 117 performs semi-closed-loop control.
[0062] When the stop flag is set to on (step S19, yes), the control unit 117 stops driving the driven body (here, platform T) in step S20 and ends the process.
[0063] <Motor control device and peripheral hardware structure>
[0064] Reference Figure 4 An example illustrating the structure of the motor control device 100 and its peripheral hardware. Figure 4This is a diagram illustrating an example of a motor control device 100 and its peripheral hardware structure. The motor control device 100 is, for example, a servo amplifier, including a microcomputer 101, a power supply circuit 102, and receiving circuits 103 and 104.
[0065] Power circuit 102 is connected to motor M via connecting cable 152 and provides power to motor M. For example, connecting cable 152 is a motor power cable. Power circuit 102 provides motor M with the power required to control the position of platform T according to the target value based on position command C.
[0066] The receiving circuit 103 is connected to the motor encoder 150 via a connecting cable 153 and receives a first pulse signal from the motor encoder 150. For example, the connecting cable 153 is a motor encoder cable. The first pulse signal is a pulse wave representing the motor encoder value FBM detected by the motor encoder 150. Furthermore, a sensor (not shown) mounted on the motor M (fixed body) reads the change in magnetic force corresponding to the rotation of a magnet mounted on the motor M (rotor), thereby reading the rotational angle position information of the motor M and outputting it as the motor encoder value FBM.
[0067] The receiving circuit 104 is connected to the external encoder 151 via a connecting cable 154 and receives a second pulse signal from the external encoder 151. For example, the connecting cable 154 is an external encoder cable. The second pulse signal is a pulse wave representing the external encoder value FBL detected by the external encoder 151. Furthermore, a sensor (not shown) mounted on the platform T reads the change in magnetic force generated by a magnetic scale mounted on a fixed part as the platform moves, thereby reading the position information of the platform T and outputting it as the external encoder value FBL.
[0068] The microcomputer 101 acquires the first pulse signal and the second pulse signal received by the receiving circuits 103 and 104, and reads the program and parameters from the memory (not shown). The microcomputer 101 can be configured to perform motor control based on the first pulse signal and the second pulse signal according to the read program and parameters. Figure 1 Each part of the motor control device 100 shown can be implemented by a microcomputer 101, for example.
[0069] <Abnormality Detection Method>
[0070] like Figure 1As shown, both the external encoder value FBL and the motor encoder value FBM are input to the anomaly determination unit 113. When determining whether the external encoder value FBL is normal or abnormal, the motor control device 100 determines whether there is an anomaly within the device corresponding to (1) to (4) below. That is, if at least one of (1) to (4) is abnormal, it is considered that a cause has occurred for the external encoder value FBL to become an abnormal value. In this case, the anomaly detection unit 113 determines that the external encoder value FBL is an abnormal value.
[0071] (1) Is the external encoder 151 abnormal? (2) Is the connecting cable 154 of the external encoder 151 abnormal? (3) Does the second deviation exceed the predetermined deviation value (threshold)? (4) Does the output pulse frequency of the external encoder 151 exceed the predetermined frequency?
[0072] For example, in case (1), the anomaly determination unit 113 determines an anomaly by observing the transition state of phases A and B, and inputs the determination result to the first switching unit 1161. If the result is abnormal, it can be assumed that the external encoder 151 itself is faulty or that the program has an error. In case (2), the circuit breaker detection unit of the anomaly determination unit 113 performs circuit breaker determination for phases ABZ of the external encoder and circuit breaker determination for the connecting cable 154 between the external encoder 151 and the receiving circuit 104, and inputs the determination result to the first switching unit 1161. Furthermore, the observation and circuit breaker detection units for the transition state of phases A and B can be located outside the anomaly determination unit 113, and the results can be input to the anomaly determination unit 113.
[0073] For example, in case (3), the anomaly determination unit 113 calculates a second deviation based on the external encoder value FBL and the motor encoder value FBM, compares it with a threshold to determine whether there is an anomaly, and inputs the determination result to the first switching unit 1161. If the second deviation is abnormal, it can be considered that there is a component failure in the power transmission component D or an error in the parameter value setting. In case (4), the comparator of the anomaly determination unit 113 determines whether there is an anomaly by comparing it with a predetermined threshold, and inputs the determination result to the first switching unit 1161. Furthermore, the calculation unit for the external encoder value FBL and the motor encoder value FBM, as well as the comparison unit for the output pulse frequency, can be set outside the anomaly determination unit 113, and the result can be input to the anomaly determination unit 113.
[0074] (1) Abnormal situation of external encoder 151
[0075] In the event of an external encoder 151 malfunction, the external encoder value FBL will not be updated, and the receiving circuit 104 will be unable to receive the correct external encoder value FBL. In this case, if full closed-loop control is performed using the external encoder value FBL, the control may become unstable, making it difficult to drive the driven body normally. To avoid this situation, the malfunction determination unit 113 determines that the external encoder value FBL is an abnormal value in case (1). Based on this determination result, semi-closed-loop control is performed, so after switching to control using the normal motor encoder value FBM, the process can transition to stop (brake) handling in case of malfunction.
[0076] (2) Abnormalities in the connection cable 154 of the external encoder 151
[0077] If the connection cable 154 of the external encoder 151 is faulty, the receiving circuit 104 will be unable to receive the detected external encoder value FBL. In this case, if the external encoder value FBL is used for full closed-loop control, the control will become unstable. Therefore, in case (2), the fault determination unit 113 determines that the external encoder value FBL is an abnormal value.
[0078] (3) The second deviation exceeds the predetermined deviation value
[0079] If the second deviation exceeds a predetermined deviation value, the anomaly determination unit 113 determines that the external encoder value FBL is an abnormal value. For example, the parameters used for motor control are preset to predetermined values by the user or others. For example, when the motor M is connected to the platform T via a power transmission component D containing gears, the parameters set are the amount of gear movement when the motor M rotates one revolution and the amount of vertical movement of the platform T when the motor M rotates one revolution. These amounts of movement are determined during the assembly of the motor M, the power transmission component D, and the platform T, and will not change thereafter. However, if the settings for these parameters, such as the amount of movement, are not set to appropriate values, the motor control device 100 will be unable to perform motor control correctly.
[0080] Other examples where the setpoints for the parameters used in motor control are not set to appropriate values include situations where the direction of position increase of the motor encoder 150 set in the parameters is inconsistent with the direction of position increase of the external encoder 151. In such cases, the motor control device 100 cannot perform motor control correctly.
[0081] Furthermore, as another example of the second deviation exceeding a predetermined deviation value, a case in which a portion of the power transmission component D is damaged can be cited. When adjusting the power transmission component D, if the preset gear ratio or backlash significantly increases during motor control, it can be considered, for example, that a gear has broken, causing the power from the motor M to be unable to be transmitted to the platform T via the gears. In this case, the motor control device 100 will be unable to perform motor control correctly.
[0082] Furthermore, as other examples of the second deviation exceeding the predetermined deviation value, there are cases where the external encoder 151 is normal but a part of the receiving circuit 104 is damaged, or where the position information of the external encoder value FBL received by the receiving circuit 104 is corrupted, etc. In these cases, the motor control device 100 cannot correctly obtain the external encoder value FBL.
[0083] Therefore, in case (3), the motor control device 100 cannot properly operate the platform T, resulting in the deviation between the motor encoder value FBM and the external encoder value FBL, i.e., the second deviation, exceeding the predetermined deviation value. Therefore, in case (3), the anomaly determination unit 113 determines that the external encoder value FBL is an abnormal value.
[0084] (4) The output pulse frequency of the external encoder 151 exceeds the predetermined frequency.
[0085] If the output pulse frequency of the external encoder 151 exceeds the pulse frequency limit of the receiving circuit 104, the receiving circuit 104 cannot correctly receive the external encoder value FBL. As a result, the motor control device 100 cannot correctly operate the platform T. Therefore, in case (4), the abnormality determination unit 113 determines that the external encoder value FBL is an abnormal value.
[0086] Therefore, if the external encoder value FBL is determined to be an abnormal value according to the abnormality determination method of (1) to (4), the control unit 117 switches the motor control from full closed-loop control to semi closed-loop control to eliminate the influence of the external encoder value FBL and perform motor control.
[0087] <Second Implementation>
[0088] <Structure of Control Systems>
[0089] Next, refer to Figure 5 The structure of the control system 10 in the second embodiment will be explained. Figure 5 This is a diagram illustrating an example of a control system 10 according to a second embodiment.
[0090] exist Figure 5 The structure of the fully closed-loop arithmetic unit 116A in the motor control device 100 shown is similar to... Figure 1 and Figure 2 The structure of the fully closed-loop arithmetic unit 116 shown is different. The motor control device 100 and control system 10, except for this, have the same structure as the motor control device 100 and control system 10 of the first embodiment. Therefore, in the second embodiment, after describing the structure of the fully closed-loop arithmetic unit 116A, the motor control method according to the second embodiment will be described.
[0091] The closed-loop calculation unit 116A includes a first switching unit 1161, a third adding unit 1162, and a second switching unit 1163. The first switching unit 1161 and the second switching unit 1163 can be implemented using either a hard switch or a soft switch. During the period when the abnormality determination unit 113 determines that the external encoder value FBL is a normal value, the first switching unit 1161 switches the connection destination of the switch to the contact A1 side, and the second switching unit 1163 switches the connection destination of the switch to the contact B1 side. At this time, the external encoder value FBL is input to the first switching unit 1161, and the motor encoder value FBM is input to the second switching unit 1163. Therefore, the external encoder value FBL and the motor encoder value FBM are input to the third adding unit 1162, and the deviation between them is calculated as a second deviation. Specifically, the third adding unit 1162 subtracts the motor encoder value FBM from the external encoder value FBL to calculate the second deviation.
[0092] As a result, when the external encoder value FBL is determined to be normal, the first deviation and the second deviation (the moving average of the second deviation) are input to the second adder 115, and the third deviation, which is the deviation between the first deviation and the second deviation (the moving average of the second deviation), is calculated. The control unit 117 performs full closed-loop control on the motor M based on the deviation between the position command C and the external encoder value FBL, i.e., the third deviation.
[0093] When the anomaly determination unit 113 determines that the external encoder value FBL is an anomaly, such as Figure 5 As shown, the first switching unit 1161 switches the connection destination of the switch to the contact A2 side. And the second switching unit 1163 switches the connection destination of the switch to the contact B2 side. Therefore, for example, a fixed value X is input to the first switching unit 1161 and the second switching unit 1163. The fixed value X is an example of a predetermined identical value. Thus, the third adding unit 1162 outputs the difference of the same fixed value X, i.e., 0 (zero), as a second deviation.
[0094] Therefore, when the external encoder value FBL is determined to be an abnormal value, the first deviation and 0 are input to the second adder 115. As a result, when the external encoder value FBL is determined to be an abnormal value, the third deviation is equal to the deviation between the position command C and the motor encoder value FBM, and the control unit 117 performs semi-closed-loop control on the motor M.
[0095] <Motor Control Methods>
[0096] An example of a motor control method according to the second embodiment that can be executed by the motor control device 100 using the above-described structure is provided below. Figure 6 Let me explain. Figure 6 This is a flowchart illustrating an example of a motor control method according to the second embodiment. Additionally, in Figure 6 The step numbers and Figure 3 When the step numbers are the same, the processes represented by those step numbers are the same.
[0097] (Normal values)
[0098] Figure 6 Processing in steps S10 to S20 and Figure 3 The processing of steps S10 to S20 is the same, so the explanation is omitted. That is, during the period when the abnormality determination unit 113 determines that the acquired external encoder value FBL is a normal value, the motor control device 100 performs full closed-loop control.
[0099] (Outlier cases)
[0100] In step S12, when the anomaly determination unit 113 determines that the acquired external encoder value FBL is an anomaly (step S12, yes), the process proceeds to step S23. In step S23, the first switching unit 1161 switches the connection destination of the switch from the contact A1 side to the contact A2 side. Furthermore, the second switching unit 1163 switches the connection destination of the switch from the contact B1 side to the contact B2 side. Therefore, a predetermined value (e.g., a fixed value X) is input to the third addition unit 1162 (see reference). Figure 5 ).
[0101] Next, in step S22, the third addition unit 1162 calculates the difference between predetermined identical values, i.e., 0 (zero), outputs 0 as the second deviation of the calculation result, and sets the stop flag to open.
[0102] Next, the motor control device 100 executes steps S14 to S20. At this time, the calculation result of the full closed-loop calculation unit 116A is set to 0 (zero). Therefore, the moving average of the second deviation is set to 0 or an approximation of 0. In step S17, the third deviation is equal to or approximately equal to the deviation between the position command C and the motor encoder value FBM. In step S18, the control unit 117 performs semi-closed-loop control. Furthermore, in step S19, when the stop flag is determined to be on (step S19, Yes), in step S20, the control unit 117 stops the drive platform T and ends the process.
[0103] Third Implementation Method
[0104] <Structure of Control Systems>
[0105] Next, refer to Figure 7 The structure of the control system 10 according to the third embodiment will be explained. Figure 7 This is a diagram illustrating an example of a control system 10 according to a third embodiment.
[0106] exist Figure 7 The structure of the fully closed-loop arithmetic unit 116B in the motor control device 100 shown is similar to... Figure 1 and Figure 2 The structure of the fully closed-loop arithmetic unit 116 shown is different. Furthermore, the motor control device 100 includes a first selection unit 121. The motor control device 100 and the control system 10, except for these differences, have the same structure as the motor control device 100 and control system 10 of the first embodiment. Therefore, in the third embodiment, after explaining the structure of the fully closed-loop arithmetic unit 116B and the first selection unit 121, the motor control method according to the third embodiment will be described.
[0107] The closed-loop arithmetic unit 116B includes a third adder 1162. The motor encoder value FBM and the external encoder value FBL are input to the third adder 1162, and the deviation between the motor encoder value FBM and the external encoder value FBL, i.e., the second deviation, is calculated. Specifically, the third adder 1162 subtracts the motor encoder value FBM from the external encoder value FBL and outputs the second deviation.
[0108] The first selection unit 121 includes a switch, which can be implemented by either a hard switch or a soft switch. During the period when the anomaly determination unit 113 determines that the external encoder value FBL is a normal value, the first selection unit 121 selects contact D1 as the connection destination of the switch. At this time, a second deviation (a moving average of the second deviation) is input to the second addition unit 115. If the external encoder value FBL is determined to be an abnormal value, the first selection unit 121 switches the connection destination of the switch to the contact D2 side. At this time, a value of 0 (zero) is input as the second deviation to the second addition unit 115.
[0109] Therefore, during the period when the external encoder value FBL is determined to be normal, the second adder 115 calculates the third deviation, which is the deviation between the first deviation and the second deviation (the moving average of the second deviation). The control unit 117 performs full closed-loop control on the motor M based on the deviation between the position command C and the external encoder value FBL, i.e., the third deviation.
[0110] If the anomaly determination unit 113 determines that the external encoder value FBL is an anomaly, such as Figure 7As shown, the first selection unit 121 switches the connection destination of the switch to the contact D2 side and inputs a substitution value of 0 (zero).
[0111] Therefore, when the external encoder value FBL is determined to be an abnormal value, 0 is input as a second deviation to the second adder 115. Furthermore, the first adder 114 calculates the deviation between the position command C and the motor encoder value FBM as a first deviation. Therefore, when the external encoder value FBL is determined to be an abnormal value, the third deviation is equal to the deviation between the position command C and the motor encoder value FBM, and the control unit 117 performs semi-closed-loop control on the motor M.
[0112] <Motor Control Methods>
[0113] An example of a motor control method according to the third embodiment that can be executed by the motor control device 100 using the above-described structure is provided below. Figure 8 Let me explain. Figure 8 This is a flowchart illustrating an example of a motor control method according to a third embodiment. Additionally, when... Figure 8 The step numbers and Figure 3 When the step numbers are the same, the processes represented by those step numbers are the same.
[0114] (Normal values)
[0115] Figure 8 Processing in steps S10 to S20 and Figure 3 The processing of steps S10 to S20 is the same, so the explanation is omitted. That is to say, when the abnormality determination unit 113 determines that the acquired external encoder value FBL is a normal value, the motor control device 100 performs full closed-loop control.
[0116] (Outlier cases)
[0117] In step S12, when the anomaly determination unit 113 determines that the acquired external encoder value FBL is an anomaly (step S12, yes), the process proceeds to step S24. In step S24, the first selection unit 121 switches the connection destination of the switch to the contact D2 side, and inputs the substitution value 0 (zero) as the second deviation to the second addition unit 115 (see reference). Figure 7 ).
[0118] Next, in step S25, the first adder 114 calculates the first deviation, which is the deviation between the position command C and the motor encoder value FBM. Next, in step S26, the second adder 115 calculates the third deviation, which is the deviation between the first deviation and the input value 0. Furthermore, the full closed-loop calculation unit 116 activates the stop flag. Therefore, the third deviation is equal to the deviation between the position command C and the motor encoder value FBM, and in step S18, the control unit 117 performs semi-closed-loop control. In step S19, when it is determined that the stop flag is set to open (step S19, Yes), the control unit 117 stops the drive platform T in step S20 and ends this process.
[0119] <Fourth Implementation>
[0120] <Motor Control Device>
[0121] Regarding the structure of the motor control device 100 according to the fourth embodiment, refer to... Figure 9 Let me explain. Figure 9 This is a diagram illustrating an example of a control system 10 according to a fourth embodiment.
[0122] exist Figure 9 The structure of the fully closed-loop arithmetic unit 116B in the motor control device 100 according to the fourth embodiment shown is the same as... Figure 7 The structure of the closed-loop arithmetic unit 116B according to the third embodiment is the same. Furthermore, the motor control device 100 also includes a second selection unit 122 and a third selection unit 123. The structure of the motor control device 100 and the control system 10 is otherwise the same as that of the motor control device 100 and the control system 10 according to the first embodiment. Therefore, in the fourth embodiment, after describing the structure of the second selection unit 122 and the third selection unit 123, the motor control method according to the fourth embodiment will be described.
[0123] The second selection unit 122 and the third selection unit 123 include switches, which can be implemented by either a hard switch or a soft switch. When the abnormality determination unit 113 determines that the external encoder value FBL is a normal value, the second selection unit 122 selects contact E1 as the connection destination of the switch, and the third selection unit 123 selects contact F1.
[0124] Therefore, during the period when the external encoder value FBL is determined to be a normal value, the position command C and the motor encoder value FBM are input to the first adder 114, and the first deviation and the second deviation (the moving average of the second deviation) are input to the second adder 115.
[0125] Therefore, during the period when the external encoder value FBL is within the normal range, the second adder 115 calculates the third deviation, which is the deviation between the first deviation and the second deviation (the moving average of the second deviation). The control unit 117 performs full closed-loop control of the motor M based on the deviation between the position command C and the external encoder value FBL, i.e., the third deviation.
[0126] When determining that the external encoder value FBL is an anomalous value, such as Figure 9 As shown, the second selection unit 122 switches the connection destination of the switch to the contact E2 side. Therefore, the position command C and the substitution value 0 (zero) are input into the first addition unit 114.
[0127] Furthermore, when the external encoder value FBL is determined to be an abnormal value, the third selection unit 123 switches the connection destination of the switch to the contact F2 side. Therefore, the first deviation and the motor encoder value FBM are input to the second addition unit 115.
[0128] Therefore, when the external encoder value FBL is determined to be an abnormal value, the first deviation is equal to the position command C, and the third deviation is equal to the deviation between the position command C and the motor encoder value FBM. The control unit 117 performs semi-closed-loop control on the motor M.
[0129] <Motor Control Methods>
[0130] Regarding an example of the motor control method according to the fourth embodiment that can be executed by the motor control device 100 using the above-described structure, see [reference]. Figure 10 Let me explain. Figure 10 This is a flowchart illustrating an example of a motor control method according to the fourth embodiment. Additionally, when... Figure 10 The step numbers and Figure 3 When the step numbers are the same, the processes represented by those step numbers are the same.
[0131] (Normal values)
[0132] Figure 10 Processing in steps S10 to S20 and Figure 3 The processing of steps S10 to S20 is the same, so the explanation is omitted. That is, when the anomaly determination unit 113 determines that the acquired external encoder value FBL is a normal value, the motor control device 100 performs the same closed-loop control as in the first embodiment.
[0133] (Outlier cases)
[0134] In step S12, when the anomaly determination unit 113 determines that the acquired external encoder value FBL is an anomaly (step S12, yes), the process proceeds to step S27. In step S27, the second selection unit 122 switches the connection destination of the switch to the contact E2 side, and the first addition unit 114 inputs a substitution value of 0 (zero).
[0135] Next, in step S28, the third selection unit 123 switches the connection destination of the switch to the contact F2 side, and the motor encoder value FBM is input to the second addition unit 115 as the second deviation.
[0136] Next, in step S29, the first adder 114 calculates the deviation between the position command C and the substituted value 0 as the first deviation. At this time, the first deviation is equal to the position command C. Next, in step S30, the second adder 115 calculates the deviation between the first deviation and the motor encoder value FBM as the third deviation. Furthermore, the full closed-loop operation unit 116 activates the stop flag. Therefore, when the external encoder value FBL is determined to be an abnormal value, the third deviation is equal to the deviation between the position command C and the motor encoder value FBM, and in step S18, the control unit 117 performs semi-closed-loop control on the motor M. Furthermore, when it is determined in step S19 that the stop flag is set to open (step S19, Yes), in step S20, the control unit 117 stops the drive platform T and ends this process.
[0137] The following notes further disclose the above-described embodiments.
[0138] <Postscript> (1)
[0140] A motor control device, comprising: The acquisition unit acquires the motor position detection value detected by the motor encoder and the position detection value of the driven body detected by the external encoder of the driven body driven by the motor. An anomaly determination unit determines whether the obtained position detection value of the driven body is an anomaly value. The first addition unit calculates the deviation between the position command and the detected motor position, which is the first deviation. The calculation unit calculates the deviation between the motor position detection value and the driven body position detection value, i.e., the second deviation. The second addition unit calculates the deviation between the first deviation and the second deviation, i.e., the third deviation; and The control unit controls the motor based on the third deviation. The first adding unit, the second adding unit, and the control unit are connected in series in this order. When the anomaly determination unit determines that the position detection value of the driven body is an abnormal value, it inputs zero to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and inputs the motor position detection value to the other. (2)
[0142] As described in (1), when the position detection value of the driven body is determined to be an abnormal value, the calculation unit outputs zero by switching the value used in the calculation of the calculation unit from the position detection value of the driven body to the position detection value of the motor, or by substituting the position detection value of the motor into the position detection value of the driven body. (3)
[0144] In the motor control device described in (1), when the position detection value of the driven body is determined to be an abnormal value, the arithmetic unit is used to replace the position detection value of the driven body and the position detection value of the motor by inputting a predetermined identical value into the arithmetic unit, thereby causing the arithmetic unit to output zero. (4)
[0146] The motor control device as described in (1) includes a first selection unit. When the first selection unit determines that the position detection value of the driven body is an abnormal value, it inputs zero into the second addition unit to replace the second deviation calculated by the calculation unit. (5)
[0148] The motor control device as described in (1) includes: The second selection unit, when determining that the position detection value of the driven body is an abnormal value, inputs zero into the first addition unit to replace the motor position detection value; and The third selection unit, when determining that the position detection value of the driven body is an abnormal value, inputs the motor position detection value into the second addition unit to replace the second deviation calculated by the calculation unit. (6)
[0150] The motor control device as described in (2) or (3) includes a moving average filter that outputs the moving average of a predetermined number of the second deviations most recently calculated by the calculation unit. The second addition unit calculates the deviation between the moving average of the first deviation and the second deviation as the third deviation. (7)
[0152] The motor control device as described in any one of (1) to (6) includes: A first unit conversion unit converts the unit of the motor position detection value to the unit of the driven body position detection value; and A second unit conversion unit converts the unit of the second deviation into the unit of the motor position detection value. The first unit conversion unit, the arithmetic unit, and the second unit conversion unit are connected in series in this order. (8)
[0154] The motor control device as described in any one of (1) to (7), wherein the anomaly determination unit determines that the position detection value of the driven body is an abnormal value when it determines that the external encoder is abnormal, the connection cable of the external encoder is abnormal, the second deviation exceeds a predetermined deviation value, or the output pulse frequency of the external encoder exceeds a predetermined frequency. (9)
[0156] A motor control method, wherein the motor control method is executed by a motor control device. The motor control device includes: The acquisition unit acquires the motor position detection value detected by the motor encoder and the position detection value of the driven body detected by the external encoder of the driven body driven by the motor. An anomaly determination unit determines whether the obtained position detection value of the driven body is an anomaly value. The first addition unit calculates the deviation between the position command and the detected motor position, which is the first deviation. The calculation unit calculates the deviation between the motor position detection value and the driven body position detection value, i.e., the second deviation. The second addition unit calculates the deviation between the first deviation and the second deviation, i.e., the third deviation; and The control unit controls the motor based on the third deviation. The first adding unit, the second adding unit, and the control unit are connected in series in this order. The motor control method includes: when the anomaly determination unit determines that the position detection value of the driven body is an abnormal value, inputting zero to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and inputting the motor position detection value to the other.
[0157] <Functions and Effects>
[0158] According to Appendix (1), the motor control device includes: a first adder for calculating the deviation between the position command and the motor position detection value, i.e., the first deviation; an arithmetic unit for calculating the deviation between the position detection value of the driven body and the motor position detection value, i.e., the second deviation; a second adder for calculating the deviation between the first deviation and the second deviation, i.e., the third deviation; and a control unit. Here, "semi-closed-loop control" is motor control based on the deviation between the position command and the motor position detection value, i.e., the first deviation, and "full-closed-loop control" is motor control based on the deviation between the position command and the position detection value of the driven body. When the position detection value of the driven body is determined to be an abnormal value, zero is input to one of the first adder or the second adder connected in series with the control unit to replace the motor position detection value or the second deviation, and the motor position detection value is input to the other. Thus, the third deviation is equal to the first deviation. Therefore, the control unit can switch the motor control from full-closed-loop control to semi-closed-loop control, thereby eliminating the influence of the position detection value of the driven body. In addition, by the above switching, the implementation time of full-closed-loop control using the position detection value of the driven body that is an abnormal value can be minimized, thereby enabling a rapid transition to the stopping process of the driven body. This allows the driven body to stop safely.
[0159] According to Appendix (2), when the position detection value of the driven body is determined to be an abnormal value, the calculation unit switches the value used for calculation from the position detection value of the driven body to the position detection value of the motor, or substitutes the position detection value of the motor into the position detection value of the driven body, thereby inputting zero from the calculation unit to the second addition unit. Since the motor position detection value is input to the first addition unit, the control unit can switch the motor control from full closed-loop control to semi-closed-loop control, thereby eliminating the influence of the position detection value of the driven body. Furthermore, through the above calculation, the control unit can transfer the processing load to the stop processing of the driven body with the same processing load as when the position detection value of the driven body is normal.
[0160] According to Appendix (3), when the position detection value of the driven body is determined to be an abnormal value, a predetermined identical value is input to the arithmetic unit to replace the position detection value of the driven body and the motor position detection value, thereby inputting zero from the arithmetic unit to the second addition unit. Since the motor position detection value is input to the first addition unit, the control unit can switch the motor control from full closed-loop control to semi-closed-loop control, thereby eliminating the influence of the position detection value of the driven body. Furthermore, through the above calculation, the control unit can transfer the processing load to the stop processing of the driven body with the same processing load as when the position detection value of the driven body is normal.
[0161] According to Appendix (4), when the position detection value of the driven body is determined to be an abnormal value, zero is input to the second adder to replace the second deviation. Since the motor position detection value is input to the first adder, the control unit can switch the motor control from full closed-loop control to semi-closed-loop control, thereby eliminating the influence of the position detection value of the driven body. Furthermore, through the above calculation, since zero is directly input to the second adder, the control unit can transfer the processing load to the stop processing of the driven body with a smaller processing load than when the position detection value of the driven body is normal.
[0162] According to Appendix (5), when the position detection value of the driven body is determined to be abnormal, zero is input to the first addition unit to replace the motor position detection value, and the motor position detection value is input to the second addition unit to replace the second deviation. Thus, the control unit can switch the motor control from full closed-loop control to semi-closed-loop control, thereby eliminating the influence of the driven body's position detection value. Furthermore, through the above calculations, the control unit can transfer the same processing load as when the driven body's position detection value is normal to the driven body's stop processing.
[0163] According to Appendix (6), the moving average of the second deviation is the moving average of a predetermined number of second deviations calculated by the moving average filter output calculation unit. The moving average of the second deviation is the average of a predetermined number of second deviations including zeros, and is a value greater than zero. Therefore, when the moving average of the second deviation is input into the second addition unit, compared with the case where zero is input to replace the second deviation, the calculated value of the third deviation will gradually approach 0. As a result, when the control unit switches the motor control from full closed-loop control to semi-closed-loop control, it can reduce the impact on the driven body and smoothly transition to the stopping process of the driven body.
[0164] According to Appendix (7), the first unit conversion unit performs unit conversion, and the calculation unit calculates the second deviation based on each detection value, which is unified into the unit of the position detection value of the driven body. Therefore, the calculation unit can smoothly perform the calculation of the second deviation. Furthermore, the calculation unit can display the second deviation as the calculation result in the unit of the position detection value of the driven body. Therefore, the user can easily grasp the movement of the driven body, which is the actual control object. Furthermore, the second unit conversion unit performs unit conversion, and the second addition unit can smoothly calculate the third deviation based on each detection value, which is unified into the unit of the motor position detection value.
[0165] According to Appendix (8), the position detection value of the driven body is determined to be abnormal if at least one of the following conditions is met: the external encoder is abnormal, the external encoder's connection cable is abnormal, the second deviation exceeds a predetermined deviation value, or the output pulse frequency of the external encoder exceeds a predetermined frequency. Therefore, even if the position detection value of the driven body is abnormal due to reasons other than an abnormal external encoder or connection cable, the control unit can switch the motor control from full closed-loop control to semi-closed-loop control. Thus, the control unit can reliably eliminate the influence of the driven body's position detection value.
[0166] According to note (9), the same function and effect as note (1) can be obtained.
[0167] The embodiments disclosed herein should be considered exemplary rather than restrictive in all respects. In fact, the above embodiments can be embodied in various forms, and various omissions, substitutions, and modifications can be made to the above embodiments without departing from the scope and spirit of the appended claims.
[0168] For example, the motor control of the present invention is not limited to this. For example, it can also be implemented by installing two or more external encoders or sensors on the driven body and performing this control when the position detection value of the driven body is determined to be an abnormal value.
[0169] Symbol Explanation
[0170] 10…Control system, 100…Motor control device, 111…First acquisition unit, 112…Second acquisition unit, 113…Abnormal judgment unit, 114…First addition unit, 115…Second addition unit, 116, 116A, 116B…Full closed-loop calculation unit, 117…Control unit, 118…First unit conversion unit, 119…Second unit conversion unit, 120…Moving average filter, 121…First selection unit, 122…Second selection unit, 123…Third selection unit, 150…Motor encoder, 151…External encoder, 200…Upper-level control device.
Claims
1. A motor control device, characterized in that, include: The acquisition unit acquires the motor position detection value detected by the motor encoder and the position detection value of the driven body detected by the external encoder of the driven body driven by the motor. An anomaly determination unit determines whether the obtained position detection value of the driven body is an anomaly value. The first addition unit calculates the deviation between the position command and the detected motor position, which is the first deviation. The calculation unit calculates the deviation between the motor position detection value and the driven body position detection value, i.e., the second deviation. The second addition unit calculates the deviation between the first deviation and the second deviation, i.e., the third deviation; and The control unit controls the motor based on the third deviation. The first adding unit, the second adding unit, and the control unit are connected in series in this order. When the anomaly determination unit determines that the position detection value of the driven body is an abnormal value, it inputs zero to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and inputs the motor position detection value to the other.
2. The motor control device as described in claim 1, characterized in that, When the position detection value of the driven body is determined to be an abnormal value, the arithmetic unit outputs zero by switching the value used in the calculation of the arithmetic unit from the position detection value of the driven body to the position detection value of the motor, or by substituting the position detection value of the motor into the position detection value of the driven body.
3. The motor control device as described in claim 1, characterized in that, When the position detection value of the driven body is determined to be an abnormal value, the arithmetic unit is used to replace the position detection value of the driven body and the position detection value of the motor by inputting a predetermined identical value into the arithmetic unit, thereby causing the arithmetic unit to output zero.
4. The motor control device as described in claim 1, characterized in that, It includes a first selection unit, which, when determining that the position detection value of the driven body is an abnormal value, inputs zero into the second addition unit to replace the second deviation calculated by the calculation unit.
5. The motor control device as described in claim 1, characterized in that, include: The second selection unit, when determining that the position detection value of the driven body is an abnormal value, inputs zero into the first addition unit to replace the motor position detection value; as well as The third selection unit, when determining that the position detection value of the driven body is an abnormal value, inputs the motor position detection value into the second addition unit to replace the second deviation calculated by the calculation unit.
6. The motor control device as described in claim 2 or 3, characterized in that, This includes a moving average filter that outputs the moving average of a predetermined number of the second deviations most recently calculated by the calculation unit. The second addition unit calculates the deviation between the moving average of the first deviation and the second deviation as the third deviation.
7. The motor control device as described in any one of claims 1 to 5, characterized in that, include: A first unit conversion unit converts the unit of the motor position detection value into the unit of the driven body position detection value. as well as A second unit conversion unit converts the unit of the second deviation into the unit of the motor position detection value. The first unit conversion unit, the arithmetic unit, and the second unit conversion unit are connected in series in this order.
8. The motor control device as described in any one of claims 1 to 5, characterized in that, The anomaly determination unit determines that the position detection value of the driven body is an abnormal value when it determines that the external encoder is abnormal, the external encoder's connection cable is abnormal, the second deviation exceeds a predetermined deviation value, or the external encoder's output pulse frequency exceeds a predetermined frequency.
9. A motor control method, wherein the motor control method is executed by a motor control device. The motor control device includes: The acquisition unit acquires the motor position detection value detected by the motor encoder and the position detection value of the driven body detected by the external encoder of the driven body driven by the motor. An anomaly determination unit determines whether the obtained position detection value of the driven body is an anomaly value. The first addition unit calculates the deviation between the position command and the detected motor position, which is the first deviation. The calculation unit calculates the deviation between the motor position detection value and the driven body position detection value, i.e., the second deviation. The second addition unit calculates the deviation between the first deviation and the second deviation, i.e., the third deviation; and The control unit controls the motor based on the third deviation. The first adding unit, the second adding unit, and the control unit are connected in series in this order. The motor control method is characterized by including: When the anomaly determination unit determines that the position detection value of the driven body is an abnormal value, it inputs zero to one of the first addition unit and the second addition unit to replace the motor position detection value or the second deviation, and inputs the motor position detection value to the other.
Citation Information
Patent Citations
Motor control device
WO2022172859A1