Share this

Closed-loop control method based on interpolation buffer in economical CNC system

2026-04-06 08:50:19 · · #1
Abstract: Closed-loop control is an important method for improving the machining accuracy of CNC machine tools. Considering the characteristics of economical CNC systems, a closed-loop control method based on interpolation buffer is proposed. This method avoids complex and expensive dedicated hardware systems and has the advantages of simple control and fast response speed, making it highly practical for the development and design of CNC systems. Keywords: economical CNC system; closed-loop control; interpolation; buffer The level of control precision and response speed directly determine the machining accuracy and efficiency of the CNC system. Currently, achieving high-precision closed-loop control in economical CNC systems is a challenge faced by CNC manufacturers and CNC workers. Since economical CNC systems generally use a single CPU as the control core, most hardware functions are implemented through software simulation, resulting in low control efficiency and considerable difficulty in achieving high-precision closed-loop control. Therefore, studying the closed-loop control principle and exploring new closed-loop control implementation methods are of great significance for improving the machining performance of economical CNC systems. 1 Closed-loop Control Principle The basic closed-loop control principle of a CNC system is: the control core compares the theoretical position calculated by interpolation with the actual feedback position, and uses the difference to control the feed motor, so that the actual value and the theoretical value tend to coincide, thereby eliminating machining errors. In economical CNC systems, closed-loop control is mainly applied to the linear movement position control of the worktable, and its closed-loop control model is shown in Figure 1 [1, 2]. In CNC systems, closed-loop control and interpolation are closely related, and closed-loop control is based on interpolation data. In practical applications, commonly used closed-loop control methods include: 1) Indirect control method: The indirect control method incorporates the position detection error value into the interpolation process. By modifying the interpolation data, the machining error is corrected in the next interpolation output, achieving the purpose of closed-loop control. This is a software closed-loop control method, which is simple to control and easy to implement. Economical CNC systems often use this method due to their inherent limitations. It is easy to see that the indirect control method has the disadvantages of control lag and low response accuracy, making it difficult to improve the closed-loop control accuracy. 2) Direct control method: The direct control method feeds back the position detection error value to the drive system. Through dedicated hardware circuitry, it is integrated with the interpolation data to form secondary control of the servo motor, achieving the purpose of reducing error. This is a hardware control method, which has good real-time control and high response accuracy, but the hardware system is complex and costly, and it is often used in high-precision CNC systems. In economical CNC systems, an effective way to improve closed-loop accuracy is to use the direct control method. In practice, we propose a closed-loop control method based on the interpolation buffer. 2. Closed-Loop Control Method Based on Interpolation Buffer The machining process of a CNC system generally involves several steps, including interpolation, output pulses, and feedback. The traditional method involves issuing a pulse and detecting the error after each interpolation step. In this method, the control process is sequential, with each step mutually constraining the others, making rapid error response difficult. The closed-loop control method based on an interpolation buffer utilizes advanced multi-task parallel processing technology and employs a foreground/background control model to improve the closed-loop response speed. Its basic principle is: a high-speed interpolation buffer is established, where the control data interpolated during the interpolation process is stored. The position control system retrieves machining data from this buffer based on the machining speed and merges it with the error data detected by the feedback system. Then, it directly controls the servo motor. In this method, the position control process and the interpolation process are relatively independent; they only exchange data through the interpolation buffer. Interpolation data input is implemented in the foreground, while position control data extraction is implemented in the background. This foreground/background control model is a multi-task parallel processing process. It allows interpolation and position control to be implemented out of sequence, and the position control system can process multiple interpolation data simultaneously. Instead of waiting for the interpolation process to execute, it can merge error data with interpolation data at any time, tracking errors in real time and thus improving closed-loop control accuracy. The interpolation buffer is defined as a first-in, first-out (FIFO) data queue, the length of which can be determined according to the system processing speed. Taking a three-axis CNC system as an example, each data node is a 16-bit unsigned integer, as defined in Figure 2. The control data for each motor consists of 4 bits. The first and second bits determine the motor direction: 00 for stationary; 01 for forward rotation; and 10 for reverse rotation. The third bit specifies whether the feed is error compensation data or normal interpolation data. For example, if a data point in the buffer is 0xxxx010x001x000, it indicates that the X-axis is stationary, the Y-axis is fed forward, and the Z-axis is fed backward. The position control system sends out the correct motor control word based on this data. The closed-loop control method based on the interpolation buffer is implemented by the position control system automatically merging error compensation data with interpolation data. For example, with the same interpolation data, the position control task will reset it based on the error data before sending it to the servo motor. Assuming there is an error in the positive direction (insufficient movement), the position control system merges the control data for that direction. In this example, if the direction is stationary (x000), the merged result becomes xl01, meaning the motor rotates forward. If the direction itself is reversed (x010), the merged result becomes xl00, meaning the motor does not rotate. If the direction itself is positive (x001), the error is carried over to the next data for merging. After this processing, the position control system promptly compensates for the machining error, improving the response speed of the feedback compensation. Traditional indirect control methods, on the other hand, incorporate error compensation data into the interpolation algorithm, artificially delaying the compensation and naturally reducing its response speed. 3. Experiment The experiment was conducted on a XII-CXZ300 CNC multi-functional machine tool. The closed-loop detection element used in the experiment was a common metal grating ruler with a detection resolution of 0.001mm and a pulse equivalent of 0.01mm for the Z-axis motor. The grating ruler was mounted on the Z-axis, and the system read the data through a detection control card配套 with the grating ruler. The system software employs a foreground/background control method within multi-task parallel processing technology. The position control module runs via timer interrupts, the interpolation module uses a loop control method, and the error detection module is driven by hardware interrupts from the closed-loop control card. The CNC system uses a PID00 general-purpose microcomputer as its control core, with an interpolation buffer length of 200. The experiment tested the error compensation at high speed (1500mm/min, 2500mm/min), medium speed (300mm/min, 720mm/min), and low speed (18mm/min, 60mm/min). The experimental results are shown in Table 1. The data show that the error after compensation is between 0.01 and 0.03mm, which is 1 to 2 times smaller than the error of 0.02 to 0.05mm without feedback compensation (this data was measured when it passed the evaluation in August 1999). The effect is obvious at high speed and poor at low speed, which is mainly due to the low precision of the machine tool itself. 4 Conclusion The experimental results prove that, without using a special hardware system, the closed-loop control method proposed in this paper can effectively improve the machining accuracy of the CNC system. It is an effective method for realizing closed-loop control in economical CNC systems. References [1] Ren Yutian. Computer Numerical Control Technology for Machine Tools [M]. Beijing: Beijing Institute of Technology Press. 1996.4-6 [2] Zhuodis. Numerical Control Technology and Applications [M]. Beijing: National Defense Industry Press, 1997, pp. 283-305.
Read next

CATDOLL Laura Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22