Control device
The control device addresses speed control inefficiencies by using a moving average filter with dummy pulses to optimize time constants, reducing cycle time and improving surface quality in industrial machinery.
Patent Information
- Application Number
- PCT/JP2024/026020
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2026-01-22
AI Technical Summary
Current speed control methods for industrial machinery motors use a constant acceleration change time value regardless of movement direction, leading to increased cycle time and surface quality issues due to speed steps when switching time constants.
A control device that uses a moving average filter for acceleration/deceleration processing, inserting dummy pulses to smooth speed transitions during time constant switches, preventing speed steps and optimizing control based on movement direction.
This approach reduces cycle time and improves surface quality by eliminating unnecessary acceleration/deceleration, ensuring smooth speed transitions and optimal time constant usage.
Smart Images

Figure JP2024026020_22012026_PF_FP_ABST
Abstract
Description
Control device
[0001] The present disclosure relates to a control device.
[0002] When controlling multiple motors installed in industrial machinery such as machine tools, speed control is currently performed by setting the same acceleration change time (time constant) value regardless of the movement direction of the axis related to the motor (for example, Patent Document 1, etc.). In a drive system operated by multiple axes, the stiffness of each axis may differ, and the ratio of the allowable jerk to the allowable acceleration may differ. In such a case, if a constant time constant that is independent of the movement direction is used, control will be performed with a time constant that is greater than the minimum necessary time constant, leading to an increase in cycle time.
[0003] Japanese Patent Application Publication No. 8-076827
[0004] If there was a mechanism to switch the time constant while the axis was moving, it would lead to a reduction in cycle time. However, with the current control method, if the time constant is switched at a constant speed without decelerating and stopping, there is an issue that speed steps occur and the quality of the machined surface deteriorates. In production sites, a mechanism to switch the time constant while the axis is moving is desired, so that speed steps do not occur.
[0005] The control device according to the present disclosure solves the above problem by smoothing the speed using dummy data that is not output to the servo when switching the time constant, thereby preventing the occurrence of speed steps.
[0006] One aspect of the present disclosure is a control device that includes an acceleration / deceleration unit that performs acceleration / deceleration processing using a moving average filter to adjust the movement amount in each control cycle for interpolation data that commands the movement amount for each control cycle that controls a servo motor, and a servo control unit that controls the servo motor based on the interpolation data that has been accelerated / decelerated, wherein the acceleration / deceleration unit inserts a dummy pulse into the moving average filter when performing acceleration / deceleration processing on the interpolation data before and after switching of the time constant, and performs acceleration / deceleration processing that takes the dummy pulse into consideration.
[0007] 1 is a schematic hardware configuration diagram of a control device according to a first embodiment; FIG. 2 is a block diagram showing schematic functions of the control device according to the first embodiment; FIG. 3 is a schematic diagram showing an example of interpolated data; FIG. 4 is a schematic diagram showing an example of interpolated data subjected to acceleration / deceleration processing; FIG. 5 is a schematic diagram showing an example of interpolated data subjected to further acceleration / deceleration processing after acceleration / deceleration processing; FIG. 6 is a schematic diagram showing an example of interpolated data before and after time constant switching; FIG. 7 is a schematic diagram showing an example of a case where a speed step is generated; FIG. 8 is a schematic diagram showing an example of interpolated data subjected to acceleration / deceleration processing according to a conventional technique; FIG. 9 is a schematic diagram explaining calculation of a moving average filter in acceleration / deceleration processing; FIG. 10 is a schematic diagram explaining calculation of a moving average filter in acceleration / deceleration processing; FIG. 11 is a schematic diagram explaining calculation of a moving average filter in acceleration / deceleration processing; FIG. 12 is a schematic diagram explaining calculation of a moving average filter in acceleration / deceleration processing; FIG. 13 is a schematic diagram explaining calculation of a moving average filter in acceleration / deceleration processing;
[0008] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the following description, components having the same or similar functions will be denoted by the same reference numerals. Duplicate descriptions of those components may be omitted.
[0009] In this application, "based on XX" means "based on at least XX," and includes cases where it is based on other elements in addition to XX. Furthermore, "based on XX" is not limited to cases where XX is used directly, but also includes cases where it is based on XX that has been calculated or processed. "XX" is any element (for example, any information).
[0010] First Embodiment Fig. 1 is a schematic hardware configuration diagram showing the main parts of a control device according to an embodiment of the present disclosure. The control device 1 of the present disclosure can be implemented as a motor control device that controls a motor that drives industrial machinery such as a machine tool or a robot. The control device 1 of the present disclosure can also be implemented as a numerical control device that controls industrial machinery equipped with a moving object that moves when driven by a motor, based on a numerical control program or the like. An example of implementation as a numerical control device that controls based on a numerical control program or the like will be described below.
[0011] The CPU 11 included in the control device 1 of the present disclosure is a processor that performs overall control of the control device 1. The CPU 11 reads a system program stored in the ROM 12 via the bus 22 and controls the entire control device 1 in accordance with the system program. The RAM 13 temporarily stores temporary calculation data, display data, various data input from outside, and the like.
[0012] The nonvolatile memory 14 is configured, for example, by a memory backed up by a battery (not shown) or an SSD (Solid State Drive), and retains its stored state even when the power to the control device 1 is turned off. The nonvolatile memory 14 stores operation programs and data read from an external device 72 via the interface 15, data and operation programs input via the input device 71, and various data acquired from the industrial machine 3. The operation programs and data stored in the nonvolatile memory 14 may be expanded into the RAM 13 when executed / used. Furthermore, various system programs such as known analysis programs are written in the ROM 12 in advance.
[0013] The interface 15 is an interface for connecting the CPU 11 of the control device 1 to an external device 72 such as a USB memory, CompactFlash (registered trademark), or SD card. For example, operation programs and various data used to control the industrial machine 3 can be read from the external device 72. Furthermore, operation programs and various data edited within the control device 1 can be stored in the external device 72. A PLC (programmable logic controller) 16 outputs signals to the industrial machine 3 and its peripheral devices (e.g., tool changers, actuators such as robots, sensors attached to the industrial machine 3, etc.) via an I / O unit 17 to control the industrial machine 3 using a sequence program built into the control device 1. The PLC 16 also receives signals from various switches on an operation panel installed on the main body of the industrial machine 3 and from peripheral devices, performs the necessary signal processing, and then passes the signals to the CPU 11.
[0014] The display device 70 displays various data loaded into the memory, data obtained as a result of executing operation programs, system programs, etc., output via the interface 18. In addition, the input device 71, which is composed of a keyboard, pointing device, etc., passes instructions, data, etc. based on operations by an operator to the CPU 11 via the interface 19.
[0015] The interface 20 is an interface for connecting the CPU 11 of the control device 1 to a wired or wireless network 5. The network 5 may communicate using technologies such as serial communication such as RS-485, Ethernet (registered trademark), optical communication, wireless LAN, Wi-Fi (registered trademark), Bluetooth (registered trademark), etc. Other control devices 4, fog computers 6, cloud servers 7, etc. are connected to the network 5, and data is exchanged between the network 5 and the control device 1.
[0016] The axis control circuit 30 for controlling the drive axes of the industrial machine 3 receives position commands for the drive axes from the CPU 11 and outputs commands for the drive axes to the servo amplifier 40. The servo amplifier 40 receives these commands and drives the servo motors 50 associated with the drive axes, moving each component of the industrial machine 3 along the respective axes. Each servo motor 50 has a built-in position detector, and feeds back a position feedback signal from the position detector to the axis control circuit 30. The axis control circuit 30 performs feedback control of the servo motor 50 based on the position feedback signal. Note that while only one axis control circuit 30, servo amplifier 40, and servo motor 50 are shown in the hardware configuration diagram of FIG. 1 , in reality, there are as many axis control circuits 30, servo amplifiers 40, and servo motors 50 as there are drive axes of the industrial machine 3 to be controlled. For example, to control a typical machine tool with three linear axes and two rotational axes, five sets of axis control circuits 30, servo amplifiers 40, and servo motors 50 are provided to move a spindle to which a tool is attached and a workpiece relatively in the three linear axes and two rotational axes (X-axis, Y-axis, Z-axis, A-axis, and C-axis directions).
[0017] The spindle control circuit 60 receives a spindle rotation command and outputs a spindle speed signal to a spindle amplifier 61. The spindle amplifier 61 receives this spindle speed signal and rotates a spindle motor 62 of the industrial machine 3 at the commanded rotation speed to drive the spindle. A position coder 63 is connected to the spindle motor 62. The position coder 63 outputs a feedback pulse in synchronization with the rotation of the spindle, and the feedback pulse is read by the CPU 11.
[0018] The control device 1 may be configured as a separate entity from the industrial machine 3. In this case, the control device 1 and the industrial machine 3 may be connected by a signal line or the like, or may be connected via a network. Furthermore, the control device 1 may be connected to the industrial machine 3 by being incorporated in the industrial machine 3.
[0019] 2 is a schematic block diagram illustrating functions of the control device 1 according to the first embodiment of the present disclosure. Each function of the control device 1 according to this embodiment is realized by the CPU 11 of the control device 1 shown in FIG. 1 executing a system program and controlling the operation of each part of the control device 1.
[0020] The control device 1 of this embodiment includes a program analysis unit 100, an interpolation unit 120, an acceleration / deceleration unit 130, and a servo control unit 150. The RAM 13 to the nonvolatile memory 14 of the control device 1 store in advance a control program 200 such as a numerical control program including commands for controlling the industrial machine 3.
[0021] The program analysis unit 100 sequentially reads blocks included in the control program 200 and analyzes the commands generated by those blocks for the operation of the industrial machine 3. Then, based on the analysis results, the program analysis unit 100 creates command data for instructing the operation of the industrial machine 3. The analysis by the program analysis unit 100 is based on parameters set in the control device 1 and the settings of the industrial machine 3. For example, if a block read from the control program 200 is a command for moving a moving object of the industrial machine 3, the command data created by the program analysis unit 100 is the amount of movement or rotation of at least one axis related to the movement, or the combined amount of movement or rotation of multiple drive axes, and outputs this data to the interpolation unit 120. Furthermore, for example, if a block read from the control program 200 is a command for the operation of the spindle motor 62, the program analysis unit 100 creates data for instructing the rotation amount of the spindle motor 62 and outputs this data to the control unit 140. The program analysis unit 100 outputs data for instructing the rotation operation of the servo motor 50 to the interpolation unit 120. The program analysis unit 100 also outputs other command data for controlling the operation of the industrial machine 3 to the control unit 140.
[0022] The interpolation unit 120 generates interpolation data that indicates the amount of movement or rotation for at least one axis or the combined amount of movement or rotation for multiple drive axes per predetermined interpolation period (control period) based on the command data output by the program analysis unit 100. In the interpolation data generated by the interpolation unit 120, the amount of movement per interpolation period is indicated by the number of pulses, for example. The interpolation unit 120 outputs the generated interpolation data to the acceleration / deceleration unit 130.
[0023] The acceleration / deceleration unit 130 performs acceleration / deceleration processing on the interpolated data created by the interpolation unit 120, adjusting the amount of movement in each interpolation period to prevent sudden acceleration or deceleration. The acceleration / deceleration unit 130 performs acceleration / deceleration processing using, for example, a moving average filter. The acceleration / deceleration unit 130 may perform acceleration / deceleration processing by applying a double filter, for example. The acceleration / deceleration unit 130 then outputs the interpolated data that has undergone acceleration / deceleration processing to the servo control unit 150.
[0024] The control unit 140 controls each part of the industrial machine 3 based on the command data created by the program analysis unit 100. For example, based on the command data created by the program analysis unit 100, the control unit 140 creates control commands for the spindle motor 62 provided in the industrial machine 3, signals for controlling peripheral devices, and the like, and outputs them to the industrial machine 3. The control unit 140 also acquires the state of each part of the industrial machine 3 as feedback values and uses them in each control process. The control unit 140 includes a servo control unit 150 that controls the servo motor 50 provided in the industrial machine 3. The servo control unit 150 controls the movement amount of the servo motor 50 for each interpolation period based on the interpolation data that has been subjected to acceleration / deceleration processing by the acceleration / deceleration unit 130.
[0025] When acceleration / deceleration processing is performed using a moving average filter, the output movement amount in a predetermined interpolation period is set to a value obtained by averaging the input movement amounts in interpolation periods of a predetermined width in the vicinity of the interpolation period. This predetermined width is the size of the moving average filter. The size of the moving average filter is defined by a time constant. In other words, the size of the moving average filter is the same value as the time constant. A predetermined interpolation period P t The output movement amount y(t) is calculated based on the predetermined interpolation period P tWhen the input movement amount in is x(t) and the size of the moving average filter is k, it can be calculated using the following formula 1.
[0026]
[0027] The acceleration / deceleration processing of the acceleration / deceleration unit 130 according to the prior art will be described below with reference to FIGS. 3 to 8. FIG. 3 is a schematic diagram illustrating an example of interpolation data created by the interpolation unit 120. In FIG. 3, the movement amount per interpolation period in the interpolation data is represented by the pulse amount. The interpolation data illustrated in FIG. 3 commands the servo motor 50 to move 10 pulses (10 unit movement amounts) per interpolation period P from time t1 onward. Since these 10 unit movement amounts are the movement amount per interpolation period, they represent a command speed F. If the servo motor 50 were controlled based on such interpolation data, the servo motor 50 would suddenly accelerate at time t1, causing a shock to the industrial machine 3. This shock would cause vibrations in the industrial machine, adversely affecting its operation and the controlled object. Therefore, the acceleration / deceleration unit 130 performs acceleration / deceleration processing on such interpolation data to prevent sudden acceleration and deceleration.
[0028] Fig. 4 is a schematic diagram showing an example in which the acceleration / deceleration unit 130 performs acceleration / deceleration processing on the interpolated data shown in Fig. 3. The example in Fig. 4 shows a case in which the size of the moving average filter is set to 5 and acceleration / deceleration processing is performed on the interpolated data shown in Fig. 3. By performing acceleration / deceleration processing on the interpolated data in this way, the movement amount per interpolation cycle is adjusted so that sudden acceleration does not occur when the servo motor 50 accelerates.
[0029] Fig. 5 is a schematic diagram showing an example in which further acceleration / deceleration processing is performed on the interpolated data after the acceleration / deceleration processing exemplified in Fig. 4. In the example of Fig. 5, the acceleration / deceleration processing is performed with a moving average filter size of 5, as in the example of Fig. 4. In this way, by performing acceleration / deceleration processing multiple times on the interpolated data, the movement amount for each interpolation period is adjusted so that the speed and acceleration changes are also smooth.
[0030] When the acceleration / deceleration unit 130 performs acceleration / deceleration processing, a delay occurs in the time it takes to reach the commanded speed. For example, if acceleration / deceleration processing is not performed as shown in FIG. 3, and the servo motor 50 is controlled based on the interpolated data, the speed of the servo motor 50 reaches the commanded speed F at time t1. However, if acceleration / deceleration processing is performed once using a moving average filter of size 5 as shown in FIG. 4, the commanded speed F is reached at time t5, and if acceleration / deceleration processing is performed twice as shown in FIG. 5, the commanded speed F is reached at time t9. At this stage, there are still pulses remaining to be processed in the moving average filter.
[0031] As described above, the time constant may be switched during acceleration / deceleration processing by the moving average filter. For example, suppose the moving average filter size is set to 5 for the cutting feed command and 3 for the fast-forward command. The time constant may be switched not only when switching between cutting feed and fast-forward as in the example, but also during the cutting feed command or the fast-forward command. As shown in FIG. 6 , consider a case in which interpolated data is generated based on the cutting feed command up to time t5, and interpolated data is generated based on the fast-forward command from time t6 onward. In this case, when acceleration / deceleration processing is performed by the acceleration / deceleration unit 130, the interpolated data generated based on the cutting feed command has not yet been output at time t5; specifically, approximately 20 pulses remain unoutput. Subsequently, the remaining pulses before the time constant was switched and the pulses based on the command after the time constant was switched are integrated and output as the movement amount. This results in a speed step, as shown in FIG. 7 . In the conventional acceleration / deceleration unit 130, in order to prevent such a speed step from occurring, the time constant is switched after the output of the pulse in response to the previous command is completed, and then the pulse in response to the next command is output, as illustrated in FIG.
[0032] In the acceleration / deceleration unit 130 according to this embodiment, in the acceleration / deceleration process by the moving average filter before the time constant is switched, a dummy pulse is inserted after the moving average filter to compensate for the remaining pulses that were not output before the time constant was switched. Also, in the acceleration / deceleration process by the moving average filter after the time constant is switched, the acceleration / deceleration unit 130 inserts a dummy pulse before the moving average filter to continue the movement from before the time constant was switched. This dummy pulse is a pulse that is used in calculations by the moving average filter but is not output as the amount of movement.
[0033] The acceleration / deceleration processing by the acceleration / deceleration unit 130 according to this embodiment will be described below with reference to FIGS. 9 to 11 . FIG. 9 is a schematic diagram illustrating calculations of a moving average filter in the acceleration / deceleration processing by the acceleration / deceleration unit 130 according to this embodiment. FIG. 9 shows an example of acceleration / deceleration processing performed by the acceleration / deceleration unit 130 according to this embodiment on interpolated data based on the cutting command illustrated in FIG. 6 . In FIG. 9 , the moving average filter is represented by multiple connected rectangular frames. Note that the time constant of the cutting feed command is set to five interpolation periods. Each frame of the moving average filter numerically indicates the number of pulses used to calculate the output movement amount at each time. The right side of the frame of the moving average filter numerically indicates the number of pulses in the interpolation period at a newer time, and the left side indicates the number of pulses in the interpolation period at an older time. Furthermore, the circled numbers within the frames indicate the number of dummy pulses. In the example of FIG. 9 , when 10 pulses are input as interpolated data at time t1, the output movement amount is calculated based on the number of pulses at time t1 and the number of pulses up to four interpolation periods prior to that, as illustrated in FIG. 9 . In the example of FIG. 6 , 10 pulses are input at time t1, and no pulses were input as interpolation data before time t1. Therefore, the rightmost box of the moving average filter is 10, and the remaining boxes are 0. Therefore, the output movement amount at time t1 is (0 + 0 + 0 + 0 + 10) / 5 = 2 (remainder 0). Furthermore, if 10 more pulses are input as interpolation data at time t2, the rightmost box is filled with the number of pulses input at time t2 (10), the second-to-the-right box is filled with the number of pulses input at time t1 (10), and the remaining boxes are filled with 0. Therefore, the output movement amount at time t2 is (0 + 0 + 0 + 10 + 10) / 5 = 4 (remainder 0). In this manner, the output movement amount is calculated by the moving average filter as time progresses. At time t6, the interpolation data based on the cutting feed command decreases to 0. However, even in such a case, the acceleration / deceleration unit 130 according to this embodiment performs acceleration / deceleration processing as if a dummy pulse had been input. 9, it is assumed that 10 dummy pulses have been input. The number of dummy pulses to be input may be the number of pulses required to maintain the commanded speed.In this way, the calculation of the output movement amount using the moving average filter continues, and when the integrated value of the output movement amount becomes the same as the number of input interpolated data, the acceleration / deceleration process for the interpolated data based on that command is terminated. If the finally calculated output movement amount has a remainder that is less than the commanded speed, an adjustment is made with the output movement amount in other interpolation periods as appropriate so that the commanded speed can be maintained until the end. In the example of Figure 9, at time t7, the integrated value of the output movement amount becomes 50, which matches the number of input pulses of the interpolated data based on the cutting command. Therefore, at this stage, the acceleration / deceleration process for the interpolated data based on the cutting command is terminated, and the acceleration / deceleration process for the interpolated data based on the subsequent fast-forward command is started.
[0034] FIG. 10 is a schematic diagram illustrating calculations of a moving average filter in acceleration / deceleration processing by the acceleration / deceleration unit 130 according to this embodiment. Following FIG. 9 , FIG. 10 illustrates an example of acceleration / deceleration processing performed by the acceleration / deceleration unit 130 according to this embodiment on interpolated data based on the fast-forward command illustrated in FIG. 6 . The time constant for the fast-forward command is set to three interpolation periods. The acceleration / deceleration processing for the interpolated data of the command after the time constant is switched begins in the interpolation period following the interpolation period in which calculation of the output movement amount based on the acceleration / deceleration processing for the interpolated data of the command before the time constant is switched is completed. In the example of FIG. 10 , calculation of the output movement amount based on the interpolated data based on the fast-forward command begins at time t8, which is the interpolation period following time t7, in which calculation of the output movement amount based on the acceleration / deceleration processing of the previous command is completed. The acceleration / deceleration unit 130 sequentially inserts interpolated data in chronological order so that the first interpolated data is placed in the center frame of the moving average filter (or the frame immediately to the left of the center if the size is even), and then adds dummy pulses necessary to maintain the specified speed to achieve the command speed. Then, processing begins. In the example of Figure 10, the moving average filter is filled with 10 dummy pulses corresponding to the command speed. The center of the moving average filter contains 10 pulses input as interpolated data based on the fast-forward command at time t6 and 10 pulses input as interpolated data based on the fast-forward command at time t7. The output movement amount is then calculated based on these pulse counts. In this manner, the calculation of the output movement amount by the moving average filter continues.
[0035] 11 is a schematic diagram showing the transition of the output movement amount when acceleration / deceleration processing is performed by the acceleration / deceleration unit 130 according to this embodiment. When acceleration / deceleration processing is performed by the acceleration / deceleration unit 130 according to this embodiment, almost no speed step occurs before and after switching the time constant. Also, since the movement according to the command before switching the time constant can be naturally connected to the movement according to the command after switching the time constant, unnecessary acceleration / deceleration is eliminated, and the cycle time can be shortened. In the prior art, as shown in FIG. 8, the movement according to the fast-forward command is performed at time t 10 The speed command is reached at time t 12 However, by performing acceleration / deceleration processing by the acceleration / deceleration unit 130 according to this embodiment, movement in response to the fast-forward command is started at time t8, and movement is performed at the commanded speed at the time the movement is started.
[0036] Next, an example of acceleration / deceleration processing in which a moving average filter is applied twice will be described with reference to Figures 12 to 16. In the case of acceleration / deceleration processing in which a filter is applied twice, the processing using the above-mentioned dummy pulse is performed when the filter is applied the first time, and further, processing using a dummy pulse is performed when the filter is applied the second time. Here, an example is shown in which a moving average filter is applied twice when the interpolated data shown in Figure 6 is input. When the filter is applied the first time, the output movement amount is as shown in Figure 11. On the other hand, a dummy pulse is also used when the moving average filter is applied the second time.
[0037] FIG. 12 is a schematic diagram illustrating the calculation of the moving average filter for the second time in the acceleration / deceleration process by the acceleration / deceleration unit 130 according to this embodiment. FIG. 12 shows an example in which the time constant of the moving average filter for the second time in the cutting feed command is set to three interpolation periods for the cutting feed interpolation data subjected to acceleration / deceleration process using a dummy pulse, and the acceleration / deceleration unit 130 according to this embodiment further performs acceleration / deceleration process. The cutting feed interpolation data subjected to the first acceleration / deceleration process using a dummy pulse is as shown in FIG. 11 . As illustrated in FIG. 11 , the output movement amount calculated at time t1 in the first acceleration / deceleration process is two pulses, and the output movement amount before time t1 is zero. Therefore, in FIG. 12 , the rightmost frame of the moving average filter at time t1 is 2, and the other frames are 0. Therefore, the output movement amount is (0 + 0 + 2) / 3 = 0 (remainder 2). Furthermore, the output movement amount calculated at time t2 in the first acceleration / deceleration process is four pulses, so at time t2, the rightmost frame of the moving average filter is 4, the one to the left of it is 2, and the other frames are 0. Therefore, the output movement amount at time t2 is (0 + 2 + 4) / 3 = 2 (remainder 0). In this manner, the calculation of the output movement amount by the moving average filter is performed as time progresses. Although the interpolation data based on the cutting feed command becomes 0 at time t8, the acceleration / deceleration unit 130 of this embodiment performs acceleration / deceleration processing as if dummy pulses had been input. In the example of FIG. 12, this is treated as if 10 dummy pulses had been input. The number of dummy pulses input may be the number of pulses required to maintain the commanded speed. In this manner, the calculation of the output movement amount by the moving average filter continues, and when the integrated value of the output movement amount becomes the same as the number of interpolated data input, the acceleration / deceleration processing for the interpolated data based on that command is terminated.
[0038] As shown in FIG. 13 , if the final calculated output movement amount falls short of the commanded speed, it is adjusted appropriately with the output movement amount in other interpolation periods to maintain the commanded speed until the end. In the example of FIG. 12 , at time t8, the integrated value of the output movement amount reaches 50, which matches the number of input pulses of the interpolated data based on the cutting command. Therefore, at this stage, the acceleration / deceleration process for the interpolated data based on the cutting command is terminated, and the acceleration / deceleration process for the interpolated data based on the subsequent fast-forward command is initiated. In contrast, in FIG. 13 , if 10 pulses equivalent to the commanded speed are output at the time following time t8, the number of pulses exceeds the input interpolated data. Therefore, the five pulses missing from the input interpolated data are compensated for in another interpolation period, thereby terminating the acceleration / deceleration process for the interpolated data based on the cutting command. When compensating for the missing pulses in another interpolation period, the pulses should be distributed so as not to create a large speed difference between the pulses output in the next interpolation period.
[0039] FIG. 14 is a schematic diagram illustrating the second calculation of the moving average filter in the acceleration / deceleration process by the acceleration / deceleration unit 130 according to this embodiment. FIG. 14 shows an example in which the time constant of the second moving average filter in the fast-forward command is set to three interpolation periods for the fast-forward interpolation data subjected to acceleration / deceleration processing using a dummy pulse following FIG. 12 , and the acceleration / deceleration unit 130 according to this embodiment further performs acceleration / deceleration processing. The fast-forward interpolation data subjected to the first acceleration / deceleration processing using a dummy pulse is as shown in FIG. 11 . The acceleration / deceleration process for the interpolation data of the command after the time constant is switched begins in the interpolation period following the interpolation period in which calculation of the output movement amount by the acceleration / deceleration process for the interpolation data of the command before the time constant is switched is completed. In the example of FIG. 14 , calculation of the output movement amount based on the interpolation data based on the fast-forward command begins at time t9, which is the interpolation period following time t8, in which calculation of the output movement amount based on the acceleration / deceleration process of the previous command is completed. The acceleration / deceleration unit 130 sequentially inserts interpolated data in chronological order so that the first interpolated data is placed in the center of the moving average filter, and then adds dummy pulses necessary to maintain the commanded speed to achieve the commanded speed before starting processing. The center of the moving average filter receives 10 pulses input as interpolated data based on the fast-forward command at time t8, and the right end of the filter receives 10 pulses input as interpolated data based on the fast-forward command at time t9. The output movement amount is then calculated based on the number of these pulses. The calculation of the output movement amount by the moving average filter continues in this manner.
[0040] 15 is a schematic diagram showing an example of the second calculation of the moving average filter in response to a fast-forward command in the acceleration / deceleration unit 130, similar to FIG. 14, in which the filter time constant is set to four interpolation periods. When the size is even, the acceleration / deceleration unit 130 inserts interpolation data sequentially in time order so that the first interpolation data is placed in the frame one frame to the left of the center, and then adds dummy pulses necessary to maintain the commanded speed to start processing in such a state that the commanded speed is reached. In addition, the frames one frame to the left of the center of the moving average filter are inserted from time t8 to time t 10In this case, 10 pulses are input as interpolation data based on the fast-forward command in step 1. Thereafter, the output movement amount is calculated based on these pulse numbers, but if left as is, there will be a shortage of 5 output pulses for the interpolation data of the input pulses, so adjustments are made so that all the commanded input pulses are output by adding an appropriate amount to the output movement amount in the subsequent interpolation cycles.
[0041] 16 is a schematic diagram showing the transition of the output movement amount when double acceleration / deceleration processing is performed by the acceleration / deceleration unit 130 according to this embodiment. When acceleration / deceleration processing is performed by the acceleration / deceleration unit 130 according to this embodiment, almost no speed step occurs before and after switching the time constant. Furthermore, since the movement commanded before switching the time constant can be naturally connected to the movement commanded after switching the time constant, unnecessary acceleration / deceleration is eliminated, and the cycle time can be shortened.
[0042] It is common to set the time constant T1 used for the first acceleration / deceleration to a time constant greater than the time constant T2 used for the second acceleration / deceleration. If T2 is set to a value greater than T1, the acceleration / deceleration calculation for T1 is performed first, and then the acceleration / deceleration calculation for T2 is performed, thereby realizing switching of the time constants at a constant speed without changing the results of the double acceleration / deceleration.
[0043] The control device 1 according to this embodiment, which has the above configuration, always uses an optimal time constant (a time constant that satisfies the allowable jerk) and can change the time constant depending on the direction of travel of the controlled object and the control method. Furthermore, it becomes clear how many pulses are output at what time in a certain interpolation period.
[0044] Second Embodiment A control device according to a second embodiment of the present disclosure will be described below. The control device 1 according to this embodiment has the same hardware configuration as the control device 1 according to the first embodiment.
[0045] Like the control device 1 according to the first embodiment, the control device 1 according to this embodiment includes a program analysis unit 100, an interpolation unit 120, an acceleration / deceleration unit 130, and a servo control unit 150. In addition, the RAM 13 to the nonvolatile memory 14 included in the control device 1 store in advance a control program 200 such as a numerical control program including commands for controlling the industrial machine 3.
[0046] The program analysis unit 100, the interpolation unit 120, and the servo control unit 150 according to this embodiment have the same functions as those according to the first embodiment.
[0047] The acceleration / deceleration unit 130 performs acceleration / deceleration processing to adjust the amount of movement in each interpolation period so that sudden acceleration or deceleration does not occur with respect to the interpolation data created by the interpolation unit 120. When performing acceleration / deceleration processing before and after switching of the time constant, the acceleration / deceleration unit 130 according to this embodiment needs the distance d1 before the time constant switching and the distance d2 after the time constant switching required for switching the time constant to satisfy the following equation 3. To satisfy equation 3, the command speed v shown in equation 2 must be k Therefore, the command speed is v k In equation 2, T1 is the time constant of the second acceleration / deceleration process before switching, T2 is the time constant of the second acceleration / deceleration process after switching, a1 is the acceleration before switching, a2 is the acceleration after switching, and v is the command speed before and after switching, and the following equation 2 can be obtained. Note that the time constant T'1 of the first acceleration / deceleration process before switching can also be expressed as v / a1, and the time constant T'2 of the first acceleration / deceleration process after switching can also be expressed as v / a2.
[0048]
[0049]
[0050] The control device 1 according to this embodiment, which has the above configuration, always uses the optimal time constant (a time constant that satisfies the allowable jerk) even when the speed changes before and after switching the time constant, and can change the time constant depending on the direction of travel of the controlled object. In addition, it becomes clear how many pulses are output at what time in a certain interpolation period.
[0051] Although the embodiments of the present disclosure have been described in detail above, the present disclosure is not limited to the individual embodiments described above. Various additions, substitutions, modifications, partial deletions, etc. are possible in these embodiments without departing from the gist of the invention or the idea and intent of the present disclosure derived from the content described in the claims and their equivalents. For example, in the above-described embodiments, the order of each operation and the order of each process are shown as examples and are not limited to these. The same applies when numerical values or mathematical expressions are used in the description of the above-described embodiments.
[0052] The following are supplementary notes related to embodiments of the present disclosure. (Supplementary Note 1) A control device (1) according to one aspect of the present disclosure includes an acceleration / deceleration unit (130) that performs acceleration / deceleration processing on interpolated data that commands a movement amount for each control cycle that controls a servo motor (50) using a moving average filter to adjust the movement amount in each control cycle, and a servo control unit (150) that controls the servo motor based on the interpolated data that has been accelerated / decelerated, and when performing acceleration / deceleration processing on the interpolated data before and after switching of the time constant, the acceleration / deceleration unit (130) inserts a dummy pulse into the moving average filter and performs acceleration / deceleration processing that takes the dummy pulse into consideration.
[0053] (Supplementary Note 2) The acceleration / deceleration unit (130) included in the control device (1) according to another aspect of the present disclosure inserts the dummy pulse into the moving average filter as if the movement amount per interpolation period before and after the time constant is switched is the command speed according to the command before the time constant is switched. (Supplementary Note 3) The acceleration / deceleration unit (130) of the control device (1) according to another aspect of the present disclosure inserts the dummy pulse into the moving average filter as if the movement amount per interpolation period before and after the time constant is switched is the command speed according to the command before the time constant is switched. kThe dummy pulse is inserted into the moving average filter as if the following equation were true: where, in equation 2, d is the distance before the time constant is switched that is required for switching the time constant, d is the distance after the time constant is switched that is required for switching the time constant, T is the time constant for the second acceleration / deceleration process before the switching, T is the time constant for the second acceleration / deceleration process after the switching, a is the acceleration before the switching, and a is the acceleration after the switching; d and d are calculated as values that satisfy equation 3; and in equation 3, v is the command speed before and after the time constant is switched.
[0054] REFERENCE SIGNS LIST 1 Control device 3 Industrial machine 4 Control device 5 Network 6 Fog computer 7 Cloud server 11 CPU 12 ROM 13 RAM 14 Non-volatile memory 15, 18, 19, 20 Interface 16 PLC 17 I / O unit 22 Bus 30 Axis control circuit 40 Servo amplifier 50 Servo motor 60 Spindle control circuit 61 Spindle amplifier 62 Spindle motor 63 Position coder 70 Display device 71 Input device 72 External device 100 Program analysis unit 120 Interpolation unit 130 Acceleration / deceleration unit 140 Control unit 150 Servo control unit 200 Control program
Claims
1. A control device comprising: an acceleration / deceleration unit that performs acceleration / deceleration processing using a moving average filter to adjust the amount of movement in each control period for interpolation data that commands the amount of movement for each control period that controls a servo motor; and a servo control unit that controls the servo motor based on the interpolation data that has been accelerated / decelerated, wherein the acceleration / deceleration unit inserts a dummy pulse into the moving average filter when performing acceleration / deceleration processing on the interpolation data before and after switching of the time constant, and performs acceleration / deceleration processing taking the dummy pulse into consideration.
2. The control device according to claim 1, wherein the acceleration / deceleration unit inserts the dummy pulses into the moving average filter so that the amount of movement per interpolation cycle before and after the time constant is switched is the command speed according to the command before the time constant is switched.
3. The acceleration / deceleration unit changes the movement amount per interpolation period before and after the time constant is switched at a speed v calculated by the following formula 2. k 2. The control device according to claim 1, wherein the dummy pulse is inserted into the moving average filter as if: where, in equation (2), d1 is a distance before the time constant is switched that is required for switching the time constant, d2 is a distance after the time constant is switched that is required for switching the time constant, T1 is a time constant for a second acceleration / deceleration process before the switching, T2 is a time constant for a second acceleration / deceleration process after the switching, a1 is the acceleration before the switching, and a2 is the acceleration after the switching, and d1 and d2 are calculated as values that satisfy equation (3) below, where v is a command speed before and after the time constant is switched.
Citation Information
Patent Citations
Digital position servo device
JP1989292405A
Asymmetrical acceleration and deceleration filter
JP1995121227A
Numerically controlled device
JP1997305211A
Moving average time change method
JP2000163113A
Positioning control apparatus
JP2009226520A