2.3.2. Local Smooth Strategy
Based on the proposed basic interpolation unit, the following local instability may arise: (1) The short length of a certain line segment precludes it from attaining full acceleration or deceleration. To address this issue, the maximum feed rate allowed in this short segment will be reduced, and the feed rate will remain at a consistent low speed for an extended duration. (2) Endpoint singularity may occur during the interpolation between segments. A common approach to address this issue is to reduce the interpolation density of unstable segments. However, this approach may not fully meet the requirement of C
3 continuity, potentially leading to increased contour errors and decreased machining accuracy. Moreover, introducing boundary conditions between segments can facilitate local smoothness, yet finding a solution to this multi-factor optimization problem may not always be feasible. Hence, a local smooth strategy that considers both machining efficiency and interpolation accuracy is proposed in this section. Note that the local smooth strategy discussed in this section is mainly to address segments smoothing on the basic interpolation unit: local smoothing on a single segment or between multi-segments. More complex situations, such as a smooth strategy in multiple basic units, will be discussed in
Section 3.
(1) Linear segment cannot realize feed-rate profile
The condition of realizing the complete feed-rate profile is that:
where
ls is the approximate length of the linear segment. Generally, the length of the parametric curve cannot be obtained by analytical methods. Hence, the approximate segment length is solved using the method shown in
Figure 5. Note that this approximate method is suitable for both the linear segment and curve segment.
Insert
n equidistant points into a curve and the length of the polyline can be expressed as:
According to the definition of a NURBS curve, the approximate length of
ls is
Since the approximate length is always shorter than the actual length of the curve, Equation (22) always remains valid.
When ls < Sacc + Sdec in the linear segment, it indicates that the linear segment cannot achieve the complete feed-rate profile and requires local smoothing. Generally, when it comes to ls-Sav ≥ Sacc, an adaptive vmax = max{vs, ve} is used to ensure that the interpolation proceeds through the endpoint at a predefined feed rate of ve. However, for a long duration, the interpolation will process at a low-feed rate, which reduces machining efficiency. Thus, a joint method to smooth the local segment is proposed to regard the linear segment 2 and the curve segment 3 as one segment to realize the complete S-type feed-rate profile.
As mentioned before, spline fitting based on C
3 continuity is constrained by the step size
l, but the total length of the joint segment remains constant. If Equation (25) is satisfied, it is feasible to ensure that all joint segments adhere to the complete feed-rate profile requirements.
where
Sacc3 and
Sacc2 are represented as the acceleration length of Segment 2 and Segment 3, respectively.
Sdec3 and
Sdec2 are represented as the deceleration length of Segment 2 and Segment 3.
For the joint segment, the step size of Segment 3 should be modified as:
If Equation (25) is not satisfied and the approximate length ls is more than the length of the linear segment S2 and less than Sacc2, Sacc2 ≥ ls ≥ S2, the interpolation can only accelerate or decelerate to a constant value until reaching vmax= max{vs, ve}. Unfortunately, it will inevitably reduce the machining efficiency. To solve this problem, a multi-segment local smooth strategy will be introduced in the next section.
(2) Curve segment cannot realize the feed-rate profile.
In the basic unit, there are two curve segments, namely Segment 1 and Segment 3. As the feed-rate profile of Segment 1 and Segment 3 is similar, take Segment 3 as an example to make a detailed description. When the feed rate reaches the predefined vmax in Segment 3, the interpolation may not reach the endpoint at the predefined feed-rate value ve due to a shorter remaining length of Segment 3. In addition, to ensure the C3 continuity, the curve length can be modified by adjusting the step length instead of merging with a new segment. Note that a shorter curve length will result in a lower feed rate ve at the endpoint, which will further worsen the acceleration and deceleration conditions within the curve segment. Although modifying the maximum velocity as vmax = max{vs, ve} is a common method to solve this problem, machining efficiency will inevitably decrease.
Hence, a feed-rate correction method based on the golden section is introduced. Segment 3 is divided into acceleration areas and deceleration areas, where
Sacc = 0.618 · 2.5
l with respect to
vs >
ve, or
Sacc = 0.382 · 2.5
l with respect to
vs ≤
ve. As the length of Segment 3 is fixed, the maximum velocity
vmax can be modified as:
If vmax can be solved with respect to a ≤ amax, the vmax of Segment 3 can be modified. Otherwise, modified vmax = max{vs,ve}.
(1) Feed-rate mutation occurs at the interaction point between two segments
As mentioned before, when the step size of Segment 3 cannot be adjusted to ensure the complete feed-rate profile of Segment 2, feed-rate mutation will occur at the intersection between Segment 2 and Segment 3.
As shown in
Figure 6, when it comes to
vs >
ve, the joint strategy is used to take Segment 2 and Segment 3 as one segment to modify the feed-rate profile. In
Figure 6a, where
ve <
vs <
vmax, set
vs as
ve and then modify the maximum feed rate of Segment 3 with the help of the S-type interpolation strategy to smooth local segments. If
vmin <
ve <
vs, shown in
Figure 6b, Point A in the interval [
us2,
ue2] in Segment 2 of the fitting curve and Point B in the interval [
us3,
ue3] in Segment 3 of the fitting curve are selected. The segment from Point A to Point B is the joint segment that smooths Segment 2 and Segment 3. Note that the distance
d from interaction point C to the joint segment should be within the maximum chord error ε
max to avoid overcutting and undercutting, which means
d ≤ ε
max, as shown in Equation (28).
where
ya,
yb,
xa,
xb are the Cartesian coordinate values of Point A and Point B, corresponding to the parameter
u of the NURBS curve.
yc, and
xc are the Cartesian coordinate values of the interaction point C (i.e.,
u =
ue).
An iterative approach is used to yield a set of valid solutions (
x,
y) = {
xi,
yi}, and the parameters
u corresponding to the solution can also be determined, as well as the feed rate at determined points. Furthermore, the feed-rate profile of the joint segment should respect:
The solution of Equation (29) can determine Points A and B, but it may not be unique. Hence, to ensure the machining efficiency, the solution should guarantee the maximum vmax of the feed-rate profile.
When it comes to
ve <
vmin <
vs, as shown in
Figure 6c, the interpolation cannot accelerate to a corresponding feed rate in the interval [
us,
u2]. Even if the interpolation can reach the corresponding feed rate, there will be a mutation in the direction of acceleration. Hence, parameter values and the corresponding feed rate in Segment 2 are extracted along the counter-clockwise direction [
ue,
u1], and then saved in two-tuple
Di = (
ui,
vi) as Point A. Then, the two-tuple is iterated to the parameter point
u2 (i.e., Point C) in Segment 3 until Equation (30) is satisfied. Note that, compared with
Figure 6b, the point B in Segment 3 is fixed because the point B in the interval [
u2,
ue3] may cause the feed rate to exceed the limitation.
where
lm is the distance between the varied-point A and the fixed-point B. Although the iteration is a time-consumed method, the computation time in the proposed method will not be affected due to the short length of Segment 2. When Equation (30) is satisfied, the current point is regarded as the unique point B, and the S-type feed-rate strategy is used to generate a smooth feed-rate profile. It can be found that there will be more points afterward that satisfy Equation (30), but the machining efficiency in these points is lower than the previous point in turn. If there is no suitable point B, the current joint segment is marked as an undetermined segment, and the global smoothing strategy is introduced in
Section 3.
(2) Feed-rate direction mutation occurs at the interaction point between two segments
During the interpolation process, when there is an instantaneous change in the direction of acceleration at the interaction point between two segments, shown in
Figure 7, vibration will occur. Although the vibration has little impact on the interpolation of a single basic unit, it will affect the machining quality if continuous and intensive vibration occurs within multiple basic units. Generally, if this instantaneous change can be reduced in a single basic unit, the contour error caused by machining vibration will be effectively alleviated. However, continuous changes in acceleration direction are sometimes unavoidable, and solutions will be discussed in
Section 3.
When the angle
θp generated by the acceleration direction of the interval
ti and
ti+1 meets Equation (31), the feed-rate direction mutation occurs.
As
θp affects the machining efficiency,
θp is determined as 135°. When v
1min > v
2min, shown in
Figure 7a, Point A (
u =
u1) and Point B (
u =
u2) can be taken as the starting point and endpoint of the joint segment to conduct the S-type feed-rate strategy. If the approximate length
ls(ab) meets the condition,
ls(ab) ≥
Sacc(ab) +
Sdec(ab), the joint segment AB can realize the S-type feed-rate profile as a new segment. If
Sacc ≤
ls(ab) ≤
Sacc(ab) +
Sdec(ab), shown in
Figure 7b, only the deceleration phase in the S-type feed-rate profile is conducted. When it comes to (
v12max −
v22max)/2
amax ≤
ls(ab) ≤
Sacc(ab), shown in
Figure 7c, the feed rate first slows down to v
2max and then moves at this constant feed rate to Point B. Otherwise, the current basic unit is marked as an undetermined basic unit. Similarly, when v
1min < v
2min, converting the deceleration phase into the acceleration phase can solve the problem. When it comes to v
1max < v
2max, shown in
Figure 7d, the interpolation cannot directly accelerate to v
2max due to the feed-rate limitation. Hence, the interpolation in the interval [
u1,
ue] will process at the constant feed-rate v
1max and then accelerate to v
2max. It should be guaranteed that the chord error
εe at
u =
ue and
v1e =
v1max is less than the maximum chord error
εmax, which means 4
εmax·(2
ρe −
εmax)/(
Ts·
v1max)
2 ≥ 1. Otherwise, the current basic unit is marked as an undetermined basic unit. Similarly, when v
1max > v
2max, converting the acceleration phase into the deceleration phase can solve the problem.
For smoothed basic interpolation units, the feed rate profile data is stored in a data chain. In the real-time interpolation, the data in the data chain will be used as real-time interpolation prediction data to further smooth the feed-rate profile. Especially for undetermined basic units, when the symbol of an undetermined basic unit is identified, a global online smoothing method will be applied, which is discussed in the following section.