Share this

Fast circular interpolation algorithm with positive deviation characteristics

2026-04-06 06:00:57 · · #1
Abstract: Based on the basic idea of ​​the minimum deviation interpolation algorithm, a new circular arc interpolation recursive algorithm is proposed. This method is simple, fast, and has positive deviation characteristics. Keywords: Circular arc interpolation; Deviation; Minimum deviation method 1 Introduction In CNC systems, interpolation is a basic subroutine for generating machining trajectories, and its execution speed limits the maximum feed speed of the machine tool. References [1, 2] proposed the minimum deviation method based on the direct function method and the improved point-by-point comparison method, respectively. The basic idea is to use the deviation comparison function to determine the feed direction of the minimum deviation. Its final execution effect is that the machining trajectory fluctuates on both sides of the ideal curve. When using the minimum deviation method to interpolate circular arcs, the selection of the interpolation direction at each step requires first calculating the deviations in three interpolation directions and then comparing their absolute values. In addition, the deviations have positive and negative properties, which makes the interpolation program complex, reduces the execution speed, and limits its practical application, especially for some positive deviation requirements. This paper proposes an improved minimum deviation method. The feed direction still uses the coordinate axis direction and the diagonal direction (x and Y feed simultaneously in one step). This method does not require comparing the absolute value of the deviation, simplifying the algorithm, greatly improving the interpolation speed, and possessing positive deviation characteristics to meet practical needs. The error of the improved minimum deviation method is less than or equal to one pulse equivalent, which can be overcome by reducing the step size. 2. Deviation Calculation and Feed Direction Consider a typical inverse circular arc in the first quadrant, as shown in Figure 1. The center is at the origin, the radius is x, the starting point is (Xo, Yo), and the ending point is (Xe, Ye). Let the interpolation point in the i+1 step be P(Xi, Yi). The machining deviation formula is: Then the possible interpolation points in the i+1 step are: Their deviation functions from the ideal circular arc are: To select the point with the smallest deviation from the ideal circular arc and positive deviation characteristics among the three points as the next interpolation point, the discriminant function is taken as: When ≥ 0, point A is on or outside the circle, and the next interpolation point should be chosen from A and B. Therefore, we further use a quadratic discriminant function: If ≥ 0, it means point Bi is on or outside the circle, so we select Bi as the interpolation point for the (i+1)th step, i.e., feed one. The new deviation and coordinates are: If 3. Interpolation Calculation Procedure To implement the above-mentioned inverse circular interpolation in the first quadrant, at least 6 registers are required for the operation. The contents of these 6 registers are as follows: JF: Registered offset value F1; JF1: Registered J2: Registered Jx: Registered arc start-point coordinate value x0; during interpolation, it registers the moving point coordinate xi; Jy: Registered arc start-point coordinate value y0; during interpolation, it registers the moving point coordinate yi; Je : Registered the total step size of the arc endpoint in the Y-axis direction, i.e., the endpoint discrimination value. The starting coordinates of the circular arc in the first quadrant are x<sub>0</sub> and y<sub>0</sub>, and the ending coordinates are x<sub>e</sub> and y<sub>e</sub>. Therefore, E = |x<sub>0</sub> - x<sub>e</sub>, y<sub>0</sub> - y<sub>e</sub>|. The flowchart for the reverse circular arc interpolation operation in the first quadrant is shown in Figure 2. 4. Circular Arc Interpolation in Different Quadrants The same method can be used to deduce the operation for interpolation in other quadrants and for circular arcs. Let SR[sub]1[/sub], SR[sub]2[/sub], SR[sub]3[/sub], SR[sub]3[/sub], and SR[sub]4[/sub] represent the clockwise circular arcs in the first, second, third, and fourth quadrants, respectively; and NR[sub]1[/sub], NR[sub]2[/sub], NR[sub]3[/sub], and NR[sub]4[/sub] represent the counterclockwise circular arcs in the first, second, third, and fourth quadrants, respectively. The interpolation feed direction and deviation calculation for the eight line types can be unified through coordinate transformation, as shown in Table 1. The coordinate transformation table for circular arc interpolation is shown in Table 2. 5 Conclusion The improved minimum deviation interpolation algorithm has the following characteristics. (1) Each interpolation step only requires two deviation recursive calculations, without the need to compare the absolute value of the deviation, which simplifies the algorithm and greatly improves the interpolation speed. (2) It has positive deviation characteristics, with the error being less than or equal to 1 pulse equivalent. (3) For circular interpolation in different quadrants, the feed direction and deviation calculation can be uniformly expressed by coordinate transformation.
Read next

CATDOLL Mimi Soft Silicone Head

You can choose the skin tone, eye color, and wig, or upgrade to implanted hair. Soft silicone heads come with a functio...

Articles 2026-02-22