Controller and its command value extrapolation method
The controller addresses unnatural movements and computational overload by using extrapolation formulas to handle communication errors, ensuring smooth and stable motor operation with reduced computational load.
Patent Information
- Application Number
- JP2021119735
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-07-20
- Publication Date
- 2025-09-04
- Estimated Expiration
- 2041-07-20
AI Technical Summary
Existing methods for extrapolating command values in robot controllers can cause unnatural robot movements and computational overload, and fail to handle communication errors effectively, leading to abnormal noise and vibrations.
A controller with an extrapolation calculation unit that calculates command values using formulas such as y(k)=y(k-2)+{y(k-1)-y(k-3)} or y(k)=y(km)+{y(k-1)-y(km-1)} to handle missing command values due to communication abnormalities, reducing computational load and preventing noise and vibrations.
The controller smoothly operates motors even with missing command values, suppressing noise and vibrations, and maintaining stable motor control with minimal computational effort.
Smart Images

Figure 0007734012000001 
Figure 0007734012000002 
Figure 0007734012000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a controller for controlling a device having a motor for driving each axis, and particularly to extrapolation of a command value in a controller. [Background technology]
[0002] Examples of devices that have a motor for driving each axis include robots and various types of conveying equipment. Controllers for these devices, called robot controllers or motion controllers, include a position control unit provided for each motor and controlling the motor based on a position command value for that motor. Below, we will explain a robot controller as an example of such a controller. Since multiple axes of the robot must be moved simultaneously to operate the robot along a specified trajectory, the robot controller also includes a multi-axis position command generator that collectively calculates and outputs position command values for multiple axes of the robot (e.g., all axes of the robot). The multi-axis position command generator functions as a higher-level device for the position control unit and may be provided separately from the robot controller that has a position control unit for each axis. The multi-axis position command generator and the position control unit are connected via a signal line or a communication network.
[0003] The position control unit receives position command values for the corresponding axes from the multi-axis position command generator at regular intervals, for example, every 100 to several hundred microseconds, and performs servo control of the motors of those axes based on the received position command values. Depending on the processing load of the multi-axis position command generator and limitations of the communication network bandwidth, the transmission interval of the position command values from the multi-axis position command generator to the position command unit may be longer than the update interval (also called the sampling interval) of the position command values on the position control unit side. In such cases, the position control unit must perform interpolation (also called internal interpolation) based on the received position command values to generate position commands for servo control. Furthermore, the position control unit may not receive position command values due to communication errors. In such cases, it must perform extrapolation (also called internal interpolation) of the position command values based on previously received position command values. If the position command values obtained by interpolation or extrapolation are inappropriate, the robot's movements will become unstable and abnormal noise and vibrations will occur. Even when servo control of the motors is performed based on velocity command values rather than position command values, interpolation or extrapolation of the velocity command values is still required.
[0004] As an example of extrapolation of a position command value in a robot controller, Patent Document 1 discloses delaying the extrapolated position command value by a predetermined update period, and further correcting the extrapolated position command value when the difference between the extrapolated position command values in the previous update period and the current update period is greater than the difference in the position command value received from a higher-level device. Patent Document 2 also discloses writing the position command value received from a higher-level device and the time of reception thereof to a ring buffer, and calculating the position command value for the current time by extrapolation based on the position command value and the time of reception written in the ring buffer. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2009-134380 [Patent Document 2] Japanese Patent Publication No. 63-280307 Summary of the Invention [Problem to be solved by the invention]
[0006] The method described in Patent Document 1 may cause unnatural robot movements when position command units with different update periods for position command values are mixed. Furthermore, since the position command value is further corrected by extrapolation, there is also the problem of a large computational load. The method described in Patent Document 2 assumes that position command values can be received at all times, so it cannot be applied in cases where one or more position command values are missed due to a communication error or the like. Similar problems also occur in devices other than robots that have a motor for each axis.
[0007] An object of the present invention is to provide a controller that does not generate abnormal noise or vibration even when a command value sent from a higher-level device is not received due to a communication abnormality, and that has a small computational load for extrapolation, and a method for extrapolating a command value in such a controller. [Means for solving the problem]
[0008] The controller of the present invention is a controller for controlling equipment having a motor for driving each axis, and includes a control unit provided corresponding to the motor for each axis, which servo-controls the motor based on a command value for that motor, and the control unit receives command values from a host device via communication and updates the command values to be used at a predetermined update period, and the command value used by the control unit in the t-th update period is set to y(t), and when the control unit does not receive a command value from the host device in the k-th update period or when an abnormality occurs in communication, the control unit: y(k)=y(k-2)+{y(k-1)-y(k-3) } to Therefore, an extrapolation calculation unit is provided to calculate the command value y(k) to be used in the kth update period.
[0009] Another controller of the present invention is a controller for controlling equipment having a motor for driving each axis, and includes a control unit provided corresponding to the motor for each axis, which servo-controls the motor based on a command value for that motor, and the control unit receives command values from a host device via communication and updates the command values to be used at a predetermined update period, where m is an integer of 2 or greater, and the transmission period in which the host device transmits command values is m times the period in which the control unit updates the command values, and the command value used by the control unit in the t-th update period is y(t), and when the control unit does not receive a command value from the host device in the k-th update period or when an abnormality occurs in communication, y(k)=y(km)+{y(k-1)-y(km-1)} The apparatus is provided with an extrapolation calculation unit that calculates the command value y(k) to be used in the kth update period according to the above.
[0010] According to the above-described controllers of the present invention, y(k)=y(k-2)+{y(k-1)-y(k-3)} ,Ma or y(k)=y(km)+{y(k-1)-y(km-1)} By performing the extrapolation represented by the formula (1), it becomes possible to suppress the generation of abnormal noise and vibration and to smoothly operate a device equipped with a motor even when a command value cannot be received from a higher-level device due to a communication error or the like. The controller based on the present invention is, for example, a robot controller or a motion controller.
[0011] The controller of the present invention may include a control unit that includes a servo calculation unit that receives feedback of information about the motor's position from an encoder connected to the motor and performs calculations necessary for servo control, and an abnormality detection unit that determines whether a command value has been validly received from a host device at each update cycle. In this case, the extrapolation calculation unit passes the command value received from the host device to the servo calculation unit when the abnormality detection unit determines that the command value has been validly received, and passes the command value calculated by the extrapolation calculation unit to the servo calculation unit when the abnormality detection unit does not determine that the command value has been validly received. By configuring the robot controller in this way, servo control is performed using the received command value during update cycles when a command value has been received from the host device, making it possible to perform control that is more faithful to the command value generated by the host device.
[0012] In the controller of the present invention, the command value is, for example, a position command value for a motor. By subjecting the position command value to extrapolation, smoother movement can be achieved in equipment equipped with a motor.
[0013] In the controller of the present invention, the host device includes, for example, a multi-axis command generation unit that collectively calculates and outputs command values for the motors of multiple axes in a device equipped with motors. Even if a communication error occurs when the host device cannot send command values in accordance with the update cycle of the command values in the control unit due to the processing capacity of the multi-axis command generation unit, the present invention makes it possible to smoothly operate the device equipped with motors.
[0014] The extrapolation method of the present invention calculates the command value for the motor for each axis. By communication An extrapolation method in a controller that receives and uses command values from a host device and updates them at a predetermined update period, and servo-controls a motor based on the command values, the method comprising: assuming that the command value used for servo control in the t-th update period is y(t), when a command value is not received from the host device in the k-th update period or when an abnormality occurs in communication, y(k)=y(k-2)+{y(k-1)-y(k-3) } to Therefore, the command value y(k) to be used in the kth update period is calculated.
[0015] Another extrapolation method of the present invention is to calculate the command values for the motors for each axis. By communication An extrapolation method for a controller that receives and uses command values from a host device and updates them at a predetermined update period, and servo-controls a motor based on the command values, wherein m is an integer equal to or greater than 2, and the transmission period in which the host device transmits command values is m times the update period, and the command value used for servo control in the t-th update period is y(t), and when a command value is not received from the host device in the k-th update period or an abnormality occurs in communication, y(k)=y(km)+{y(k-1)-y(km-1)} The command value y(k) to be used in the kth update period is calculated according to the above.
[0016] According to each of the above-described extrapolation methods of the present invention, y(k)=y(k-2)+{y(k-1)-y(k-3)} ,Ma or y(k)=y(km)+{y(k-1)-y(km-1)} By performing the extrapolation calculation expressed by the formula (1), it becomes possible to suppress the generation of abnormal noise and vibration and to operate a motor-equipped device smoothly even when a command value cannot be received from a higher-level device due to a communication error, etc. The controller to which the extrapolation method of the present invention is applied is, for example, a robot controller or a motion controller.
[0017] In the extrapolation method of the present invention, the command value is, for example, a position command value for a motor. By subjecting the position command value to the extrapolation calculation, smoother movement can be achieved in equipment equipped with a motor. [Effects of the Invention]
[0018] According to the present invention, even when a command value sent from a higher-level device is not received due to a communication abnormality, extrapolation can be performed with a small calculation load without generating abnormal noise or vibration. [Brief explanation of the drawings]
[0019] [Figure 1] FIG. 2 is a diagram illustrating an example of a configuration of a robot controller. [Figure 2] FIG. 2 is a block diagram showing an example of the configuration of a position control unit. [Figure 3] FIG. 10 is a diagram illustrating another example of the configuration of a robot controller. [Figure 4] FIG. 10 is a diagram illustrating another example of the configuration of a robot controller. [Figure 5] FIG. 10 is a diagram illustrating another example of the configuration of a robot controller. [Figure 6] FIG. 10 is a diagram showing the relationship between a position command value and a two-cycle backward difference value thereof. [Figure 7] FIG. 10 is a diagram illustrating an example of an extrapolation method. [Figure 8] FIG. 10 is a diagram illustrating an example of an extrapolation method. [Figure 9] FIG. 1 illustrates an extrapolation method according to the present invention. [Figure 10] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 11] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 12] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 13] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 14] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 15] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 16] FIG. 10 illustrates another example of an extrapolation method according to the present invention. [Figure 17] FIG. 2 is a block diagram showing an example of the configuration of an extrapolation calculation unit. DETAILED DESCRIPTION OF THE INVENTION
[0020] Next, an embodiment of the present invention will be described with reference to the drawings. Hereinafter, the controller to which the present invention is applied will be assumed to be a robot controller used to control a robot. However, the present invention can be broadly applied to controllers that control devices equipped with motors for driving each axis. Examples of such controllers include motion controllers as well as robot controllers. FIG. 1 shows an example of the configuration of a robot controller to which the present invention can be applied. The robot controller 10 shown in FIG. 1 controls a robot 50 equipped with multiple axes. The robot 50 is provided with a motor (M) 51 and an encoder (E) 52 connected to the motor 51 and detecting the rotational position of the motor 51 for each axis. In the illustrated example, the robot 50 is an eight-axis robot.
[0021] The robot controller 10 includes a position control unit 30 provided for each motor 51 in the robot 50, controlling the motor 51 based on a position command value for that motor 51. Since the robot 50 has eight axes, eight position control units 30 are provided, as indicated by C-1 to C-8 in the figure. The robot controller 10 also includes a multi-axis position command generation unit 20 that collectively calculates and outputs position command values for the multiple axes of the robot 50 to move the robot 30 along a specified trajectory. The multi-axis position command generation unit 20 is configured, for example, by a microprocessor. The robot controller 10 is typically provided close to the robot 50; however, the multi-axis position command generation unit 20 may be provided as a host device that controls multiple robots 50, away from the main body of the robot controller 10 that includes at least the position control unit 30. A large-scale multi-axis position command generation unit 20 that controls multiple robots 50 may also be configured, for example, by a server computer. The multi-axis position command generator 20 corresponds to the multi-axis command generator, and the position controller 30 corresponds to the controller.
[0022] The multi-axis position command generator 20 and the multiple position control units 30 are connected via a signal line or a communication network, and a position command value is transmitted from the multi-axis position command generator 20 to each position control unit 30. In the example shown in FIG. 1, a communication relay MCU (microcontroller unit) 25 is provided to relay the transmission of the position command value from the multi-axis position command generator 20 to the position control unit 30. One communication relay MCU 25 can communicate with up to two position control units 30. In the example shown here, eight position control units 30 are provided, so four communication relay MCUs 25, designated B-1 to B-4 in the figure, are provided. The multi-axis position command generator 20 and the four communication relay MCUs 25, designated A in the figure, are connected via a network 22 capable of high-speed communication. Communication over the network 22 is performed using an open industrial communication network protocol. Examples of protocols used over such a network 22 include EtherCAT (registered trademark) and CC-Link (registered trademark).
[0023] The communication relay MCU 25 and the position control unit 30 are connected via a network 27 provided for each communication relay MCU 25. Up to two position control units 30 are connected to each network 27. Communication over this network 27 is performed using a protocol specific to the position control unit 30. In the robot controller 10 shown in FIG. 1 , communication between the multi-axis position command generator 20 and each position control unit 30 is performed via the communication relay MCU 25 equipped with a microprocessor or the like. Therefore, by providing the communication relay MCU 25 with a protocol conversion function, it becomes possible to support various communication protocols on the multi-axis position command generator 20 side, regardless of the communication protocol on the position control unit 30 side. In other words, when a multi-axis position command generator 20 is provided as a host device that controls multiple robots 50, various robot controllers 10 can be connected by replacing the communication relay MCU 25 or selecting a protocol using software executed by the communication relay MCU 25. In addition, the communication relay MCU 25 determines whether there is an abnormality in the communication between the multi-axis position command generation unit 20 and the communication relay MCU 25, and based on the determination result, transmits a signal indicating that communication is active to each position control unit 30.
[0024] FIG. 2 shows the configuration of the position control unit 30. The position control unit 30 controls the motor 51 of the corresponding axis based on the position command sent from the multi-axis position command generator 20. It includes a position control MCU (microcontroller unit) 31, which is implemented by, for example, a microprocessor, and a drive circuit 36 that drives the three-phase motor 51. The drive circuit 36 includes an inverter circuit. The logical configuration of the position control MCU 31 includes an abnormality detection unit 32 that applies techniques such as an error detection code to the received position command value to detect the occurrence of communication errors, an extrapolation calculation unit 33 that receives the position command value and performs extrapolation processing, if necessary, to generate an internal position command value, and a servo calculation unit 34 that receives feedback of the rotational position of the motor 51 from an encoder 52 connected to the motor 51, performs calculations for servo control based on the internal position command value and the fed-back rotational position, and controls the drive circuit 36 based on the calculation results. The abnormality detection unit 32 also receives a signal indicating a communication enabled state from the communication relay MCU 25. The abnormality detection unit 32 determines whether the data received as the position command value is valid at each update period (described later) and transmits a signal indicating the valid received value to the extrapolation calculation unit 33. The valid received value signal indicates "normal" when the position command value is received correctly, and indicates "abnormal" when the position command value is not received or a communication abnormality is detected. When the valid communication signal received from the communication relay MCU 25 indicates that communication between the multi-axis position command generation unit 20 and the communication relay MCU 25 is "invalid," the abnormality detection unit 32 also outputs a valid received value signal indicating "invalid." When the valid received value status is "normal," the extrapolation calculation unit 33 passes the input position command value to the servo calculation unit 34 as an internal position command value. When the valid received value status is "abnormal," the extrapolation calculation unit 33 passes the result of the extrapolation calculation to the servo calculation unit 34 as an internal position command value.
[0025] In the robot controller 10 shown in FIG. 1, the processing load on the multi-axis position command generator 20 and communication relay MCU 25 varies depending on the number of axes of the robot 50, i.e., the number of position control units 30. The processing load becomes heavier when the number of axes is large. Each position control unit 30 attempts to acquire a position command value with an update period (sampling period) of, for example, 250 μs. Ideally, it is desirable to transmit a position command value to each position control unit 30 at the update period of the position command value of that position control unit 30. However, when the processing load on the multi-axis position command generator 20 and communication relay MCU 25 is heavy, it becomes impossible to generate and transmit a position command value to the position control unit 30 at the update period of the position control unit 30, and the transmission period of the position command value must be lengthened. For example, when one position control unit 30 is connected to one communication relay MCU 25 as shown in Figure 3, the communication relay MCU 25 can send position command values to the position control unit 30 at a cycle of 250 μs, but when two position control units 30 are connected to one communication relay MCU 25 as shown in Figure 1, the communication relay MCU 25 sends position command values to each position control unit 30 at a cycle of 500 μs.
[0026] Similarly, in the multi-axis position command generator 20, the transmission period of the position command value changes depending on the number of position control units 30 connected thereto directly or via the communication relay MCU 25. FIG. 4 shows a robot controller 10 in which eight position control units 30 are connected to the multi-axis position command generator 20 via the network 22 without via the communication relay MCU 25. FIG. 5 shows a robot controller 10 similar to that shown in FIG. 4, but in which the number of position control units 30 connected to the multi-axis position command generator 20 is four. In the case shown in FIG. 5, the multi-axis position command generator 20 can send position command values to each position control unit 30 at the update period of the position control unit 30 (e.g., 250 μs). In contrast, in the case shown in FIG. 4, the number of position control units 30 is large, which increases the calculation load of the multi-axis position command generator 20. Therefore, the multi-axis position command generator 20 can only transmit position command values to each position control unit 30 at a period (e.g., 500 μs) longer than the update period of the position control unit 30.
[0027] In terms of position control unit 30, if a position command value does not exist for each update period in position control unit 30, servo control of the corresponding motor 51 cannot be performed. Therefore, when position command values can only be received at periods longer than the update period in position control unit 30, the position command value to be used for the update period in which no position command value was received is calculated based on the position command values received up to that point. This is the extrapolation calculation performed by extrapolation calculation unit 33. In practice, the period in which position command values are transmitted to position control unit 30 is generally set to an integer multiple of the update period of the position command in the position control unit, and the previously received position command value is used as is for update periods in which no position command value was received.
[0028] The extrapolation calculation unit 33 also performs extrapolation calculations when a position command value is missing due to a communication error or the like even though it is the timing to receive it. However, if the previously received position command value is used as is when a position command value that should be received is missing due to a communication error or the like, the motor 51 may be servo-controlled by a position command value that is far different from the position command value that should have been received, which may cause abnormal noise or vibration in the robot 50. Therefore, an object of the present invention is to provide an extrapolation method that does not cause such abnormal noise or vibration.
[0029] FIG. 6 shows the position command value that the communication relay MCU 25 should send to the position control unit 30 and the two-cycle backward differential value of that position command value, assuming that the update period of the position control unit 30 in the robot controller 10 described with reference to FIG. 1 is, for example, 250 μs. In FIG. 6, the horizontal axis represents time, the vertical axis represents the position command value or its two-cycle backward differential value, and the dashed vertical lines indicate the timing at which the position control unit 30 should acquire, i.e., sample, the position command value for each update period. In this example, the multi-axis position command generator 20 of the robot controller 10 shown in FIG. 1 generates position command values for all axes of the robot 50, i.e., eight axes. Therefore, the position command value for the position control unit 30 of interest is generated every two update periods (e.g., 500 μs) by the position control unit 30. In the example shown in FIG. 6, the motor 51 is assumed to rotate at a constant speed, and the position command value increases by a constant amount every two update periods. At this time, the two-cycle backward differential value does not change. When there is a sudden change in the two-cycle backward difference value, the robot 50 is not moving smoothly, and abnormal noise or vibration may occur in the robot 50.
[0030] Let y(t) denote the position command value in a given update period t, i.e., the t-th update period counted from a reference time. Figure 7 shows the behavior of the position command value and its two-period backward difference value when the position command value is not received correctly, assuming that the position command value y(k) in update period k is extrapolated using the position command value y(k-1) in the previous update period k-1 when the change in the original position command value is as shown in Figure 6. That is, the extrapolation calculation in this case is expressed by equation (1). y(k)=y(k-1) (1)
[0031] In the figure, solid white circles indicate position command values that were received correctly, while dashed white circles indicate position command values that could not be received due to an abnormality. The presence or absence of an abnormality can be detected, for example, by performing error detection on communication data. The hatched circles indicate the extrapolated position command value and the two-cycle backward differential value resulting from the extrapolation when a position command value that was not received due to an abnormality is calculated by extrapolation. As shown in FIG. 7(a), when an abnormality occurs during an update cycle in which the position command value should be increased from the previous update cycle and an extrapolation is performed, the position control unit 30 does not change the position command value, resulting in a sudden change in the two-cycle backward differential value. Because of the sudden change in the two-cycle backward differential value, the case shown in FIG. 7(a) may induce abnormal noise or vibration in the robot 50.
[0032] Figure 7(b) shows the extrapolated position command value and its two-cycle backward differential value when an abnormality occurs at the timing when the same position command value as the position command value in the previous update cycle should be transmitted, assuming that the position command value changes as shown in Figure 6. Because the timing when the abnormality occurred is a timing when there is no change from the position command value in the previous update cycle, extrapolation using equation (1) obtains the same value as the original position command value. As a result, there is no sudden change in the two-cycle backward differential value, and no abnormal noise or vibration is induced in the robot 50. In the case shown in Figure 7(a), there is a sudden change in the two-cycle backward differential value, so extrapolation using equation (1) cannot appropriately deal with the missing position command value due to a communication abnormality.
[0033] FIG. 8 shows the position command value and its two-cycle backward difference value when an extrapolation calculation is performed based on the following equation (2), assuming that the position command value changes as shown in FIG. y(k)=y(k-1)+{y(k-1)-y(k-2)} (2)
[0034] Figure 8(a) shows a case where an abnormality occurs during an update cycle when the position command value should be increased from the previous update cycle. In this case, the position command value calculated by extrapolation is the same as in Figure 7(a), and a sudden change occurs in the two-cycle backward differential value. Figure 8(b) shows a case where an abnormality occurs during a timing when the same position command value as the position command value in the previous update cycle should be transmitted. In this case, the term {y(k-1)-y(k-2)} in equation (2) affects the position command value calculated by extrapolation, and it becomes larger than the actual position command value. As a result, a sudden change also occurs in the two-cycle backward differential value. Even with the extrapolation using equation (2), it is not possible to appropriately deal with missing position command values due to communication abnormalities.
[0035] Fig. 9 is a diagram for explaining the extrapolation method according to the present invention, showing the position command value and its two-cycle backward difference value when extrapolation is performed based on the following equation (3) assuming that the position command value changes as shown in Fig. 6. Equation (3) shows an example of a calculation algorithm for the extrapolation method of the present invention. Here, it is assumed that the transmission period of the position command value to position control unit 30 is twice the update period of the position command value in position control unit 30. y(k)=y(k-2)+{y(k-2)-y(k-4)} (3)
[0036] Figure 9(a) shows the case where an abnormality occurs during an update cycle when the position command value should be increased from the previous update cycle. Figure 9(b) shows the case where an abnormality occurs at the timing when the same position command value as the position command value during the previous update cycle should be transmitted. In either case, the position command value calculated by the extrapolation calculation is the original position command value, and the backward difference value between two cycles is constant. As shown in Figure 6, it can be seen that the extrapolation calculation using equation (3) can appropriately deal with missing position command values due to communication abnormalities when the position command value changes.
[0037] The extrapolation calculation according to the present invention is not limited to that shown in equation (3). Figure 10 is a diagram for explaining another example of the extrapolation method according to the present invention, and shows the position command value and its two-cycle backward difference value when extrapolation calculation is performed based on equation (4) below, assuming that the position command value changes as shown in Figure 6. Equation (4) shows another example of the calculation algorithm in the extrapolation method of the present invention. y(k)=y(k-2)+{y(k-1)-y(k-3)} (4)
[0038] Figure 10(a) shows the case where an abnormality occurs during an update cycle when the position command value should be increased from the previous update cycle. Figure 10(b) shows the case where an abnormality occurs at the timing when the same position command value as the position command value during the previous update cycle should be transmitted. In either case, the position command value calculated by the extrapolation calculation is the original position command value, and the backward difference value between two cycles is constant. As shown in Figure 6, it can be seen that the extrapolation calculation using equation (4) can appropriately deal with missing position command values due to communication abnormalities when the position command value changes.
[0039] 9 and 10 show a case where the transmission period of the position command value to position control unit 30 is twice the update period of the position command value in position control unit 30, and where extrapolation is required during the update period when no position command value is transmitted. On the other hand, if the transmission period of the position command value to position control unit 30 matches the update period of the position command value in position control unit 30, then in principle there is no need to perform extrapolation, but if the position command value cannot be received due to a communication failure or the like, extrapolation must be performed. Here, the extrapolation will be described for the case where the transmission period of the position command value to position control unit 30 matches the update period of the position command value in position control unit 30.
[0040] Figure 11 shows the position command value and its two-cycle backward differential value when extrapolated using Equation (3) assuming a communication error occurs when the position command value increases by a constant increment each update cycle. The extrapolated position command value is calculated to match the original position command value, and the two-cycle backward differential value is also constant. Figure 12 shows the position command value and its one-cycle backward differential value when extrapolated using Equation (4) assuming a communication error occurs, as in the case shown in Figure 11. Even when using Equation (4), the extrapolated position command value is calculated to match the original position command value, and the one-cycle backward differential value is also constant. From the above, it can be seen that when attempting to rotate the motor 51 at a constant speed, smooth extrapolation can be performed when the position command value is missing due to a communication error, regardless of whether the transmission cycle of the position control value is 1 or 2 times the update cycle of the position command value in the position control unit 30, and whether extrapolation using Equation (3) or Equation (4) is used. There is no difference in performance between Equation (3) and Equation (4).
[0041] 11 and 12 show the case where a position command value for rotating the motor 51 at a constant speed is transmitted to the position control unit 30. However, a communication error may occur when a position command value for accelerating or decelerating the motor 51 is transmitted to the position control unit 30. Whether the motor 51 is being accelerated or decelerated has no essential effect on the extrapolation calculation. Therefore, we consider the case where a position command value for accelerating the motor 51 is transmitted to the position control unit 30 when the transmission period of the position command value to the position control unit 30 matches the update period of the position command value in the position control unit 30. FIG. 13 shows the position command value and its one-cycle backward differential value when extrapolated using equation (3). Similarly, FIG. 14 shows the position command value and its one-cycle backward differential value when extrapolated using equation (4). Since this is during acceleration, if there is no communication error, the position command value increases along a parabola, and the one-cycle backward differential value increases along a straight line sloping upward to the right. When equation (3) is used, in the update cycle in which the abnormality occurred, the position command value after the extrapolation is slightly smaller than the position command value in the immediately preceding update cycle, and the backward differential value during one cycle is also slightly smaller. In contrast, when equation (4) is used, in the update cycle in which the abnormality occurred, the position command value after the extrapolation is smaller than the original value but larger than the value in the immediately preceding update cycle, and accordingly, the difference between the backward differential value during one cycle and the original value is also small. Both the extrapolation calculation using equation (3) and the extrapolation calculation using equation (4) can deal with missing position command values due to communication abnormalities when accelerating or decelerating the motor 51, but the extrapolation calculation using equation (4) is superior in terms of performance.
[0042] The above example illustrates a case where a communication error or other problem occurs during only one of the update periods of the position control unit 30, resulting in a missing position command value. The extrapolation method according to the present invention is also effective when a communication error or other problem occurs during consecutive update periods when the motor 51 is driven at a constant speed. Figure 15 illustrates a case where a communication error or other problem occurs during four consecutive update periods in the position control unit 30, assuming that the position command value varies as shown in Figure 6. The position command value obtained by the extrapolation calculation shown in Equation (4) and its two-period backward difference value are shown. The position command value used in the extrapolation calculation includes the position command value obtained by the previous extrapolation calculation. As shown in Figure 15, the extrapolation method according to the present invention can extrapolate position command values for two or more consecutive update periods.
[0043] The extrapolation method of the present invention is also effective when the transmission period of the position command value to position control unit 30 is three or more times the update period of the position command value in position control unit 30. Therefore, the extrapolation method according to the present invention will be generalized to a case where the transmission period of the position command value to position control unit 30 is m times the update period of the position command value in position control unit 30, where m is an integer greater than or equal to 2. FIG. 16 is a diagram illustrating this generalized extrapolation method, showing the position command value and its m-period backward difference value when this generalized extrapolation method is applied to drive motor 51 at a constant speed. In the example shown in FIG. 16, equation (5) is used as the generalized extrapolation calculation formula. y(k)=y(km)+{y(k-1)-y(km-1)} (5)
[0044] If m = 2, then equation (5) coincides with equation (4). Since the transmission period of the position command value to the position control unit 30 is too long compared to the update period of the position control unit 30, proper control of the robot 50 becomes impossible. Therefore, practically, m should be 4 or less. Because the transmission period of the position command value to the position control unit 30 is m times longer than the update period of the position control unit 30, the position control unit 30 receives a position command value every m update periods. During the update period from when a position command value is received until the next position command value is received, the most recently received position command value is used as the position command value for that update period. Figure 15(a) shows a case where a communication error occurs during an update period in which a position command value should be received, while Figure 15(b) shows a case where a communication error occurs during an update period following the update period in which a position command value should be received. In both cases, the original position command value is calculated by extrapolation, and the m-period backward differential value remains constant. In other words, the extrapolation calculation using equation (5) allows for proper calculation of the position command value even when a position command value is missing due to a communication error or the like. The extrapolation using equation (5) can also be used for extrapolation calculations when the timing is not the timing of the transmission of the position command value from the higher-level device but the timing is the timing of sampling the position command value according to the update period of the position control unit 30.
[0045] 17 is a diagram showing the logical configuration of the extrapolation calculation unit 33 that performs the extrapolation calculation shown in Equation (5) within the position control MCU 31 of the position control unit 30. The extrapolation calculation unit 33 includes a selector 41 that performs a selection operation based on the received value validity signal received from the abnormality detection unit 32, a delay element 42 that delays the received position command value by m update periods, a subtraction element 43 that subtracts the output of the selector 41 from the output of the delay element 42, a delay element 44 that delays the output of the subtraction element 43 by one update period, and an addition element 45 that adds the outputs of the delay element 42 and the delay element 44. The received position command value and the output of the addition element 45 are input to the selector 41, and the output of the selector 41 is output to the servo calculation unit 34 as an internal position command value. The selector 41 selects the received position command value when the received value validity state is "valid," and selects the output of the addition element 45 when the received value validity state is "invalid." The output of the addition element 45 is clearly the value shown in equation (5). As a result, when the received value validity state is “valid”, the received position command value is sent as is to the servo calculation unit 34 as the internal position command value, and when it is “invalid”, the result of the extrapolation calculation according to equation (5) is sent to the servo calculation unit 34 as the internal position command value.
[0046] In the robot controller described above, by using the extrapolation method shown in equation (3), equation (4), or equation (5), when a position command value cannot be received from a higher-level device due to a communication error or the like, it is possible to perform an appropriate extrapolation calculation of the position command value, thereby preventing the occurrence of abnormal noise and vibration in the robot 50. Although the extrapolation of the position command value has been described here, the extrapolation based on the present invention can also be applied to the extrapolation of the velocity command value. [Explanation of symbols]
[0047] 10...Robot controller; 20...Multi-axis position command generation unit; 22, 27...Network; 25...Communication relay MCU; 30...Position control unit; 31...Position control MCU; 32...Abnormality detection unit; 33...Extrapolation calculation unit; 34...Servo calculation unit; 36...Drive circuit; 41...Selector; 42, 44...Delay elements; 43...Subtraction element: 44...Addition element; 50...Robot; 51...Motor; 52...Encoder.
Claims
1. A controller for controlling a device having a motor for driving each axis, a control unit provided corresponding to the motor for each axis, the control unit servo-controlling the motor based on a command value for the motor; the control unit receives the command value from a higher-level device through communication and updates the command value to be used at a predetermined update period; When the command value used by the control unit in the t-th update period is y(t), and the control unit does not receive the command value from the host device in the k-th update period or when an abnormality occurs in the communication, y(k)=y(k-2)+{y(k-1)-y(k-3)} an extrapolation calculation unit that calculates a command value y(k) to be used in the k-th update period according to the above formula.
2. A controller for controlling a device having a motor for driving each axis, a control unit provided corresponding to the motor for each axis, the control unit servo-controlling the motor based on a command value for the motor; the control unit receives the command value from a higher-level device through communication and updates the command value to be used at a predetermined update period, wherein a transmission period in which the higher-level device transmits the command value is m times the period in which the control unit updates the command value, where m is an integer of 2 or more; When the command value used by the control unit in the t-th update period is y(t), and the control unit does not receive the command value from the host device in the k-th update period or when an abnormality occurs in the communication, y(k)=y(km-m)+{y(k-1)-y(km-1)} an extrapolation calculation unit that calculates a command value y(k) to be used in the k-th update period according to the above formula.
3. The control unit a servo calculation unit that receives feedback of information about the position of the motor from an encoder connected to the motor and performs calculations necessary for servo control; an abnormality detection unit that determines whether the command value is validly received from the host device for each update period; Equipped with 3. The controller according to claim 1, wherein the extrapolation calculation unit passes the command value received from the higher-level device to the servo calculation unit when the abnormality detection unit determines that the command value has been received effectively, and passes the command value calculated by the extrapolation calculation unit to the servo calculation unit when the abnormality detection unit does not determine that the command value has been received effectively.
4. The controller according to claim 1 , wherein the command value is a position command value.
5. The controller according to claim 1 , wherein the host device includes a multi-axis command generating unit that collectively calculates and outputs the command values for the motors of the multiple axes in the device.
6. An extrapolation method for a controller that receives a command value for a motor for each axis from a host device via communication, updates the command value to be used at a predetermined update period, and servo-controls the motor based on the command value, comprising: When the command value used for servo control in the t-th update period is y(t), and when the command value is not received from the host device in the k-th update period or an abnormality occurs in the communication, y(k)=y(k-2)+{y(k-1)-y(k-3)} An extrapolation method for calculating a command value y(k) to be used in the k-th update period according to the following.
7. An extrapolation method for a controller that receives a command value for a motor for each axis from a host device via communication, updates the command value to be used at a predetermined update period, and servo-controls the motor based on the command value, comprising: a transmission period in which the higher-level device transmits the command value is m times the update period, where m is an integer equal to or greater than 2; When the command value used for servo control in the t-th update period is y(t), and when the command value is not received from the host device in the k-th update period or an abnormality occurs in the communication, y(k)=y(km-m)+{y(k-1)-y(km-1)} An extrapolation method for calculating a command value y(k) to be used in the k-th update period according to the following.
8. 8. The extrapolation method according to claim 6 or 7, wherein the command value is a position command value.
Citation Information
Patent Citations
controller
JP1988280307A
Optical information recording and reproducing device
JP1991130936A
Motor controller for automatic machine
JP1999149308A
Servo controller
JP2006048203A
Position control device
JP2009134380A