1 Introduction

Feedrate scheduling, which aims to generate smooth feedrate profile of tool motion under geometric and kinematic limitations, is one of the most important process in the parametric interpolation, and has important impact on machining process especially in terms of machining efficiency and quality. It is obvious that higher feedrate value leads to shorter machining time. However, on the other hand, the feedrate, which exceeds the limitation, will cause significant geometric deviation [1, 2]. Specifically, excessive feedrate value can cause larger contour error [1] and chord error [2]. Therefore, feedrate scheduling method needs to determine whether the speed should be increased to improve efficiency or decreased to satisfy kinematic constraints [3]. Meanwhile, feedrate scheduling method also should be succinct and convenient to implement.

Nowadays, a significant number of feedrate scheduling methods have been proposed, and the existing feedrate scheduling method can be roughly classified as two approaches: time-optimal approach and ACC/DEC approach.

For time-optimal approach, a minimal-time control problem, which is confined with given error, is present and the shape of feedrate profile can be determined by solving differential equations. There are two approaches to deal with differential equations: analytic approach and numeric approach. Timar and Farouki [4] obtained time-optimal feedrate functions under constant or speed-dependent acceleration limits by solving two differential equations, which have closed-form solutions. In the research of Zhang et al. [5], they reduced the chord error bound to a centripetal acceleration bound which leads to a velocity limit curve, called the chord error velocity limit curve. According to “bang-bang” control principle [6], the velocity limit curve was the time-optimal curve. Although analytic approach can achieve time-optimal feedrate profile, it is difficult to be applied in multiple constraints and high-order constraint time-optimal problems. At this time, numerical approach is used. Dong and Stori [7] proposed an optimal formulate with two types of constraints which were the equations explicitly including parametric acceleration and functions only of the path geometry and parametric velocity. Many researchers have proposed various numerical time-optimal method with kinds of constraints. In the article of Sun et al. [8], chord error and kinematic constraints including feedrate, acceleration, and jerk constraints were involved, and the feedrate value at every point was adjusted iteratively by multiplying constant coefficient. Bharathi and Dong [9] proposed heuristic smooth feedrate optimization algorithm with high-order constraints. Lu et al. [10] used an efficient numerical method based on Pontryagin maximum principle to solve time-optimal problems with tool-tip kinematic constraints. Ye et al. [11] re-parameterized tool path as the function of displacement to analyze feedrate, acceleration, jerk, and contour error. Chen et al. [12] introduced contour error to feedrate scheduling and schedule feedrate in the contour error violate zone of tool path. A challenge for time-optimal approach is that it is difficult to solve optimal problems with many constrains effectively and accurately since constraints are usually non-linear representation. To reduce the computational difficulty, linearization method was used in time-optimal method [13, 14]. In other articles [5, 15, 16], linear programming was applied to discretize the whole movement process. Though these methods can improve computational efficiency, the computational burden is still large. After solving time-optimal problem, the feedrate profile is a set of scatters which cannot be applied to interpolation conveniently. Therefore, fitting feedrate with spline is necessary to obtain continue and smooth feedrate profile [8, 13, 14].

It is obvious that time-optimal approach can generate minimum time or near minimum time feedrate profile. However, some shortcomings still exist. One is computational complexity when solving the optimal problems and fitting feedrate profile. The other is that some problems about machining quality are difficult to be solved, i.e., round-off error [17]. Therefore, a number of feedrate scheduling methods have been developed using a variety of acceleration/deceleration (ACC/DEC) approach.

In this approach, the acceleration and deceleration process are designed in advance with the limitation of geometric and dynamic error. Usually, tool motion is a complex motion which contains multiple acceleration and deceleration processes. Thus, the first step is splitting integral machining process into several phases. Feedrate value will change drastically at the interval where curvature is large. These intervals can be defined as sharp corners [18] or critical zones [19]. Also, high-curvature points and C0 continue points can be determined as break points which are used to split curve [20]. Other way is determining feedrate-sensitive regions according to the shape of feedrate profile [21, 22]. Then, acceleration and deceleration process can be designed using ACC/DEC model. The most widely used profiles in ACC/DEC approach are polynomial and trigonometric profiles. Cao and Chang [23] used trapezoidal-velocity profile to design the acceleration and deceleration motion in their look-ahead smoothly controlling algorithm. Smoothness of feedrate profile leads to better performance in machining quality. Erkorkmaz and Altintas [24] applied trapezoidal-acceleration profile to generate smooth trajectory. In trapezoidal-acceleration profile, the whole process is divided into 7 phases. Generally, jerk-continuous polynomial feed profile include 15 phases [25]. Furthermore, Wei et al. proposed a jerk-smooth feedrate profile in which whole process is divided into 31 phases [26]. For polynomial feedrate method, it can obtain near time-optimal feedrate profile since there are several adjustable parameters.

However, polynomial method is relatively difficult to implement because of more unknown parameters. For trapezoidal-acceleration profile, it contains 3 independent parameters which should be determined under symmetrical conditions. Since the actual situation is usually asymmetrical, there are 5 independent parameters that needed to be determined, as demonstrated in Fig. 1. Therefore, trigonometric profile was also used in feedrate scheduling [20]. Lee et al. [20] proposed a novel feedrate scheduling method containing two steps: splitting curve by break points and designing ACC/DEC phase by sine curve. Nevertheless, machining efficiency was relatively low. In other articles [18, 26, 27], some feedrate scheduling method have been proposed based on initial sine-curve method. Wang et al. [26] added linear term after trigonometric term so that feedrate profile was jerk-continuous. Liu et al. [18] designed jerk-continuous feedrate profile similar to jerk-continuous polynomial profile, and just replaced linear function with cosine function and abandoned constant non-zero phase in jerk profile. Huang and Zhu [27] interpolated parametric tool path using the sine series representation of jerk profile. It can be proved that its machining efficiency is higher than trigonometric profile. In fact, the low efficiency of trigonometric profile is derived from the representation of trigonometric function. Because of the lack of adjustable parameters, the shape of trigonometric profile is fixed and better efficiency cannot be achieved.

Fig. 1
figure 1

a Trapezoidal-acceleration profile with symmetrical conditions, b trapezoidal-acceleration profile with asymmetrical conditions

In order to guarantee the simplicity of the method and improve efficiency, a novel feedrate planning method based on Sigmoid function is proposed in this article. The method firstly obtains feedrate data with chord error constraint in the form of scatters. A feedrate detection method with chord error limitation is proposed. In this method, feedrate will be adjusted step by step, and adjusting coefficient will be recomputed in each step to ensure the accuracy. By scanning these scatters with method of two-step screening, some special points are selected to split curve into some blocks. For each block, there is only one acceleration, deceleration, or constant feedrate process which is convenient to design feedrate profile. Then, a smooth feedrate profile is designed, and a time-optimal method is proposed to reach the minimum machining time. Compared with the polynomial method, the proposed method has less unknown parameters, and it has more excellent performance in terms of machining efficiency than trigonometric method.

The rest of this paper is organized as follows. In Section 2, properties about Sigmoid functions are explained. The feedrate determining method with the chord error constraint and implementation is present in Section 3. In Section 4, a feedrate scheduling method based on Sigmoid functions is proposed. In Section 5, simulations with two free-form NURBS curves are conducted to verify the feasibility and applicability of the proposed method, and the comparison with sine method is also presented in this section. Our conclusions and future work are summarized in Section 6.

2 Sigmoid function and sine feedrate profile

2.1 Properties of Sigmoid function

Sigmoid function is widely used to classify data because it is monotone differentiable, arbitrary order differentiable, and S-shape. The Sigmoid function is defined by Eq. (1):

$$f(x)=\frac{1}{1+{e}^{-x}}$$
(1)

Domain of the Sigmoid function is (−∞, +∞)

Then, the range of the function is (0, 1)

It is convenient to calculate first- and second-order derivatives, according to Eqs. (2) and (3):

$${f}^{\prime }(x)=f(x)\left(1-f(x)\right)$$
(2)
$${f}^{\prime \prime }(x)=f(x)\left(1-f(x)\right)-2{f}^2(x)\left(1-f(x)\right)$$
(3)

where f(x) can be calculated as Eq. (1). And Fig. 1a, b, and c show the graphs of f(x), first-order derivative of f(x), and two-order derivative of f(x), respectively.

A decreasing function p(x) is defined as reflection of f(x) about vertical axis.

$$p(x)=f\left(-x\right)=\frac{1}{1+{e}^x}$$
(4)

Similarly, the first- and second-order derivatives can be calculated in the same way.

$${p}^{\prime }(x)=p(x)\left(p(x)-1\right)$$
(5)
$${p}^{\prime \prime }(x)=p(x)\left(1-p(x)\right)-2{p}^2(x)\left(1-p(x)\right)$$
(6)

The graphs of p(x), p(x), and p′′(x) are shown in Fig. 2d, e, and f, respectively.

Fig. 2
figure 2

Graphs of increasing function f(x), decreasing function p(x), and their first- and two-order derivatives. a Graph of function f(x); b graph of first-order derivative function of f(x); c graph of two-order derivative function of f(x); d graph of function p(x); e graph of first-order derivative function of p(x); f graph of two-order derivative function of p(x)

In the next sections, f(x) and p(x) will be applied to design acceleration and declaration processes. Thus, their first-order derivatives will be used in acceleration profile. And jerk profile will be deduced based on the two-order derivatives. Naturally, it is necessary to determine the extremes of these functions and where the extremes can be reached. There are two properties of Sigmoid function which can be easily acquired from Fig. 2 and Eqs. (2), (3), (5), and (6).

  1. 1.

    f(x) and p(x) have maximum or minimum values when x = 0.5. The max value of f(x) is 0.25. And the minimum value of p(x) is −0.25.

  2. 2.

    f′′(x) and p′′(x) reach their extremes when f(x) or \(p(x)=0.5\pm \sqrt{3}/6\).

2.2 Sine feedrate profile

Since sine-curve velocity profile is a smooth curve and more concise than polynomial velocity profile, it can be used to generate the feedrate profile and its velocity equation is given as Eq. (7) in [20]:

$$v(t)=\frac{v_e-{v}_s}{2}\left[\sin \pi \left(\frac{t}{T}-\frac{1}{2}\right)+1\right]+{v}_s,\kern0.5em 0\le t\le T$$
(7)

where vs and ve denote the start and end feedrate. T denotes the time from start to end. Differentiating Eq. (7) yields thegeneration under the chord error constraint acceleration equation as (12),

$${\displaystyle \begin{array}{cc}A(t)=\frac{v_e-{v}_s}{2}\frac{\pi }{T}\cos \pi \left(\frac{t}{T}-\frac{1}{2}\right),& 0\le t\le T\end{array}}$$
(8)

Differentiating Eq. (8), we can obtain the jerk equation,

$$J(t)=-\frac{v_e-{v}_s}{2}{\left(\frac{\pi }{T}\right)}^2{\sin}\pi \left(\frac{t}{T}-\frac{1}{2}\right)$$
(9)

The limits of tangent acceleration and jerk can be determined as Eqs. (10) and (11):

$$\left|A(t)\right|=\left|\frac{v_e-{v}_s}{2}\frac{\pi }{T}\cos \pi \left(\frac{t}{T}-\frac{1}{2}\right)\right|\le \left|\frac{v_e-{v}_s}{2}\right|\frac{\pi }{T}\le {A}_m$$
(10)
$$\left|J(t)\right|=\left|\frac{v_e-{v}_s}{2}{\left(\frac{\pi }{T}\right)}^2\sin \pi \left(\frac{t}{T}-\frac{1}{2}\right)\right|\le \left|\frac{v_e-{v}_s}{2}\right|{\left(\frac{\pi }{T}\right)}^2\le {J}_m$$
(11)

The feedrate, acceleration, and jerk profile are shown in Fig. 3. According to Eqs. (7), (8), and (9), the feedrate curve and acceleration curve can be guaranteed to be continuous but jerk curve is discontinuous because the value of jerk is not zero at start and end point.

Fig. 3
figure 3

Sine feedrate profile

3 Feedrate generation under the chord error constraint

To generate feedrate profile of given parametric curve, an offline process for pre-interpolation and feedrate data scanning, which is aimed to determine the feedrate data of curve, is developed. In the stage of pre-interpolation, the feedrate data of the whole curve is determined in the form of scatters. By using an approximate ratio relationship, feedrate data which satisfies the chord error constraint is obtained to prepare for the following stage. In the next stage, the breaking points are determined by two steps. Above all, screening factor is computed at every feedrate point firstly. According to these screening factors and given standard value, the candidates of breaking points can be selected when the screening factors are greater than the standard value. In candidate points, there are some noise points which are not compatible with the definition of breaking point. Then, a symbolic function is defined to distinguish the noise points from the true breaking points. The feedrate curve can be split into some sub-curves via these points. In order to record these interval segments, a structure called block is defined containing the start position parameter us, end position parameter ue, start feedrate vs, end feedrate ve, time T, shape parameter s, and displacement L. The displacement is computed via numerical integration, and the shape parameter and time will be computed in Section 4.

3.1 Chord error constraint

In parametric interpolation, the desired trajectory is approximated by numerous interpolation points with a fixed time interval Ts. For establishing the relationship between curve parameter u and time t, two-order Taylor expansion is utilized in [28].

$${u}_{i+1}={u}_i+\frac{v_i{T}_s}{{\left\Vert \frac{dC(u)}{du}\right\Vert}_{u={u}_i}}-\frac{\left(\frac{dC(u)}{du}\frac{d^2C(u)}{d{u}^2}\right)}{2\bullet {\left\Vert \frac{dC(u)}{du}\right\Vert}_{u={u}_i}^4}{v_i}^2{T}_s^2$$
(12)

where Ts is the sampling time, C(u) is the parametric curve, and vi is the feedrate value within a sampling time.

The parametric curve’s approximation via small segments results in deviation between small segments and desired trajectory when the curvature is not zero, as shown in Fig. 4a.

Fig. 4
figure 4

a Parametric curve approximated by two short straight lines, b schematic diagram of chord error

The chord error is defined as the maximum distance between the parametric curve and actual tool path. Many researches [2, 20, 29] use an approximate model shown in Fig. 4b to construct the relationship between feedrate and curvature as Eq. (13):

$$v=\frac{2}{T_s}\sqrt{\delta \left(2\rho -\delta \right)}$$
(13)

However, Eq. (13) is deduced from an approximate model so that chord error cannot be absolutely limited as shown in Fig. 6c. Then, an iterative approach, which is aimed at determining credible feedrate, is adopted. Since chord error is very small, the quadratic term can be ignored. If chord error tolerance δm is given and smaller than current chord error δ, the feedrate is updated by Eq. (14) until the updated feedrate suffice chord error constraint.

$${v}_m=\sqrt{\delta_m/\delta }v$$
(14)

The iterative feedrate determining approach has the following steps:

  1. Step 1

    according to the given parameter of current point ui, computing the parameter of next sampling \({u}_{i+1}^{\prime }\);

  2. Step 2

    computing the chord error δ between the two points C(ui) and \(C\left({u}_{i+1}^{\prime}\right)\), and comparing with the chord error tolerance δm. If δ > δm, then go to step 3. Else δ ≤ δm, go to step 4;

  3. Step 3

    adjusting the feedrate just as Eq. (14). Then go to step 1;

  4. Step 4

    let \({u}_{i+1}={u}_{i+1}^{\prime }\).

To determine the feedrate profile about whole parametric curve, a pre-interpolation process is proposed. In this process, two-order Taylor expansion is used to compute the parameter u. Then the above strategy is applied to compute the feedrate at the current point. When the parameter is equal to 1, the process ends. The whole process is shown in the follow flow chart Fig. 5.

Fig. 5
figure 5

Flow chart of pre-interpolation process

A cubic parametric curve is used as an example to display the difference, which is shown in Fig. 6a, between our approach and common approach, Eq. (13). Figure 6b and c demonstrate that our approach can absolutely limit chord error; however, chord error in common approach still exceeds limitation.

Fig. 6
figure 6

a A cubic parametric curve, b comparison of feedrate profiles determined by proposed method and common method, c comparison of chord error profiles produced by proposed method and common method

3.2 Feedrate profile splitting

In order to simplify the process of feedrate scheduling, feedrate profile, which is determined by the pre-interpolation process mentioned above, should be split into several segments which consist of three types: acceleration, deceleration, and constant feedrate.

These segments are divided by breaking points that are extreme points on feedrate profile, as shown in Fig 7a. On the left of point A, it is acceleration segment. On the right of point A, it is deceleration segment. Therefore, point A is the breaking point.

Fig. 7
figure 7

a Breaking point in the curve; b noise point and breaking points in the curve

These points can be determined through two steps. The first step is computing the screening factor for each point. Assume that there are three points of feedrate profile, (ui − 1, vi − 1), (ui, vi), and (ui + 1, vi + 1).

Denoting screening factor at ui as μi, and it can be computed by the following equation (15):

$${\mu}_i=\left|\frac{v_{i+1}-{v}_i}{u_{i+1}-{u}_i}-\frac{v_i-{v}_{i-1}}{u_i-{u}_{i-1}}\right|$$
(15)

When the screening factor is greater than a given standard value μs, the point is a candidate of breaking points. However, there are some points which are not breaking points but their screening factors are also greater than μs, as shown in Fig. 7b. Points A and C are breaking points, but the screening factor at point B can also be greater than μs. Obviously, point B is not the breaking point. So, it is necessary to identify true breaking points. In the second step, the points, which constitute monotonous sequence of points with two neighbor points, are deleted. In order to separate the false inflection point from the true inflection point, a symbolic function can be calculated as the Eq. (16):

$$w(i)=\left\{\begin{array}{c}1,\left({v}_{i+1}-{v}_i\right)\left({v}_i-{v}_{i-1}\right)>0\\ {}-1,\left({v}_{i+1}-{v}_i\right)\left({v}_i-{v}_{i-1}\right)<0\end{array}\right.,0\le i\le n$$
(16)

where vi + 1, vi, and vi − 1 are the feedrate of points (ui + 1, vi + 1), (ui, vi), and (ui − 1, vi − 1) respectively. When w(i) is equal to −1, the point (ui, vi) is the breaking point which satisfy the requirements.

Through the two steps, the feedrate profile can be divided into several sub-curves. Feedrate between the two adjacent breaking points may be increased, decreased, or unchanged. Then, each sub-curve contains the process of feedrate change, and each sub-curve needs to be recorded. Hence, a structure named as block, which consists of start position parameter, end position parameter, start feedrate, end feedrate, time, displacement, and shape parameter, is defined.

An example of feedrate profile splitting is shown in Fig. 8. The feedrate profile is shown in Fig. 6b and obtained via proposed method. As shown in Fig. 8, point 2, point 3, and point 4 are breaking points. Point 1 is the start point in which the parameter is equal to 0. Similarly, point 5 is the end point in which the parameter is equal to 1. These points split the feedrate curve into 4 blocks. The displacement in the each block is acquired by computing integral.

$$L={\int}_{u_s}^{u_e} ds={\int}_{u_s}^{u_e}\sqrt{x^{\prime^2}(u)+{y}^{\prime^2}(u)+{z}^{\prime^2}(u)} du$$
(17)
Fig. 8
figure 8

Feedrate curve split into 4 blocks

where x(u), y(u), and z(u) are the first-order derivative of parameter curve coordinate components x(u), y(u), and z(u) respectively.

The other elements, namely shape parameter and time, will be computed in the next section.

4 Feedrate scheduling based on Sigmoid function

When the pre-interpolation process has finished, crucial information of each block for feedrate scheduling are obtained and stored. In this section, feedrate profile for each block will be constructed based on the Sigmoid function depending on the type of block. When start feedrate is smaller than end feedrate, the expression of feedrate can be deduced from f(x); otherwise, the feedrate is designed based on p(x). Furthermore, kinematic constraints should be considered; consequently, an optimal method is carried out to adjust parameters of blocks with purpose of balancing machining efficiency and kinematic characters.

4.1 Feedrate profile based on Sigmoid functions

When tool movement needs acceleration or deceleration, feedrate designing is necessary to smooth tool movement and constraint kinematic characters. Because the procedures for acceleration and deceleration are similar, acceleration process is involved as an instance in this section. For a block which represents accelerated process, the function (1) f(x) mentioned in the Section 2 can be used.

Suppose that a section symmetrical about the origin is intercepted from the real number axis by f(x), which is recorded as [−s, s]. Then, the function range is [f(−s), f(s)], where the parameter s is the shape parameter. There are two functions that have contributed to deduce feedrate profile, which are established as Eqs. (18) and (19).

$${\displaystyle \begin{array}{cc}{g}_1:\left[0,T\right]\mapsto \left[-s,s\right]& {g}_1=\frac{2s}{T}t-s\end{array}}$$
(18)
$${\displaystyle \begin{array}{cc}{g}_2:\left[f\left(-s\right),f(s)\right]\mapsto \left[{v}_s,{v}_e\right]& {g}_2=\frac{v_e-{v}_s}{f(s)-f\left(-s\right)}\left(f\left({g}_1\right)-f\left(-s\right)\right)+{v}_s\end{array}}$$
(19)

The feedrate equation is given as the following equation (20):

$$v(t)={g}_2\circ f\circ {g}_1=\frac{v_e-{v}_s}{f(s)-f\left(-s\right)}\left(f\left(\frac{2s}{T}t-s\right)-f\left(-s\right)\right)+{v}_s$$
(20)

where T is the time in block. Time T and displacement L satisfy the integral equation (21):

$$L={\int}_0^tv\left(\tau \right) d\tau$$
(21)

However, due to the symmetry of the velocity function, Eq. (21) can be simplified to Eq. (22):

$$L=\frac{\left({v}_s+{v}_e\right)}{2}T$$
(22)

Then, differentiating Eq. (20) yields the acceleration Eq. (23),

$$A(t)=\frac{2s}{T}\frac{v_e-{v}_s}{f(s)-f\left(-s\right)}f\left(\frac{2s}{T}t-s\right)\left(1-f\left(\frac{2s}{T}t-s\right)\right)$$
(23)

Differentiating Eq. (23), one obtains the jerk Eq. (24):

$$J(t)={\left(\frac{2s}{T}\right)}^2\frac{v_e-{v}_s}{f(s)-f\left(-s\right)}\left(f\left(\frac{2s}{T}t-s\right)\left(1-f\left(\frac{2s}{T}t-s\right)\right)-2{f}^2\left(\frac{2s}{T}t-s\right)\left(1-f\left(\frac{2s}{T}t-s\right)\right)\right)$$
(24)

Considering limits of acceleration and jerk, condition (25) can be obtained:

$$\left\{\begin{array}{c}\left|A(t)\right|\le {A}_m\\ {}\left|J(t)\right|\le {J}_m\end{array}\right.$$
(25)

Using the properties in Section 2, the inequality can be further reduced to the following inequality (26):

$$\left\{\begin{array}{c}\frac{s}{2f(s)-1}\frac{v_e-{v}_s}{T}\frac{1}{2}\le {A}_m\\ {}\frac{4{s}^2}{2f(s)-1}\frac{v_e-{v}_s}{T^2}\left|2{k}^3-3{k}^2+k\right|<{J}_m,k=0.5-\sqrt{3}/6\end{array}\right.$$
(26)

where the Am and Jm are the maximum acceleration and jerk which the machine tool can provide, respectively. What is mentioned above is under the premise that tool movement is acceleration process. Otherwise, if it is deceleration process, the feedrate profile can be obtained in similar way as long as f(x) is replaced by p(x).

4.2 Feedrate smoothing strategy

Although feedrate profile established in Section 2.2 is smooth and high-order differentiable, the derivative at 0 and t are not zero, which means discontinues at junctions of blocks. To obtain continuous acceleration profile, a feedrate smoothing strategy is applied.

For one block, whole movement is divided into 3 parts, [0, T/3], [T/3, 2T/3], and [2T/3, T]. In the parts [0, T/3] and [2T/3, T], original feedrate profiles are replaced by two cubic curves as Eq. (27):

$$\bar{v}(t)=\left\{\begin{array}{c}{a}_1{t}^3+{a}_2{t}^2+{a}_3t+{a}_4\kern11em t\in \left[0,T/3\right]\\ {}{b}_1{\left(T-t\right)}^3+{b}_2{\left(T-t\right)}^2+{b}_3\left(T-t\right)+{b}_4\kern0.5em t\in \left[2T/3,T\right]\end{array}\right.$$
(27)

Then, the acceleration and jerk profiles can be obtained as Eqs. (28) and (29):

$$\bar{A}(t)=\left\{\begin{array}{c}3{a}_1{t}^2+2{a}_2t+{a}_3\kern1em t\in \left[0,T/3\right]\\ {}-3{b}_1{\left(T-t\right)}^2-2{b}_2\left(T-t\right)-{b}_3t\in \left[2T/3,T\right]\end{array}\right.$$
(28)
$$\bar{J}(t)=\left\{\begin{array}{c}6{a}_1t+2{a}_2\ t\in \left[0,T/3\right]\\ {}6{b}_1\left(T-t\right)+2{b}_2t\in \left[2T/3,T\right]\end{array}\right.$$
(29)

In order to obtain the acceleration continues curve, Eqs. (27) and (28) should meet feedrate and acceleration constraints at 0, T/3, 2T/3, and T.

$${\displaystyle \begin{array}{cc}\bar{v}(0)={v}_s\ \bar{v}\left(T/3\right)=v\left(T/3\right)& \bar{v}\left(2T/3\right)=v\left(2T/3\right)\ \bar{v}(T)={v}_e\\ {}\bar{A}(0)=0\ \bar{A}\left(T/3\right)=A\left(T/3\right)& \bar{A}\left(2T/3\right)=A\left(2T/3\right)\ \bar{A}(T)=0\end{array}}$$
(30)

Because of the kinematic constraints, the inequalities (25) are necessary. Through the given conditions, the parameters in the cubic function can be solved as Eq. (31)

$${a}_4={v}_s$$
$${b}_4={v}_e$$
$${a}_2=-{b}_2=\frac{27\left(v\left(T/3\right)-{v}_s\right)}{T^2}-\frac{3A\left(T/3\right)}{T}$$
(31)
$${a}_1=-{b}_1=\frac{9A\left(T/3\right)}{T^2}-\frac{54\left(v\left(T/3\right)-{v}_s\right)}{T^3}$$

Combining Sections 2.2 and 2.2, an acceleration-continuous feedrate profile shown in Fig. 9 is constructed with three parts, and the first and third parts depend on the second part which is discussed in Section 2.2.

Fig. 9
figure 9

Feedrate profile consist of 3 sections

4.3 Time-optimal adjustment of feedrate

Although the feedrate blocks obtained via methods in Section 2.1 meet the chord error limitation, not all blocks can meet the kinematic constraint. For some blocks with short displacement and large difference between start and end feedrate, their maximum acceleration and jerk values may exceed the limits of acceleration Am and jerk Jm. Hence, a method to further adjust these blocks is vital to ensure that acceleration and jerk under the kinematic limits. There are six situations that will be encountered in adjusting these blocks, as shown in Fig. 10. The first is the process whose feedrate is increased firstly and then constant, in Fig. 10a. The second situation is just the opposite of first situation as shown in Fig. 10b. The next is the process whose feedrate is increased firstly and then decreased, in Fig. 10c. The fourth one is the process which contains the constant feedrate phase, in Fig. 10d. For the last two situations in Fig. 10e and f, two blocks in each situation have identical monotonicity, and these situations will happen because feedrate may be changed after adjusting.

Fig. 10
figure 10

a Feedrate adjusting for two blocks with acceleration and constant feedrate phase, b feedrate adjusting for two blocks with constant feedrate and deceleration phase, c feedrate adjusting for two blocks with no constant feedrate phase, d feedrate adjusting for three blocks, e feedrate adjusting for two acceleration blocks, f feedrate adjusting for two deceleration blocks

Machining efficiency is a significant factor that is necessary to be considered. Then, for two-block situations, expect for fifth and sixth situations; whole motion time can be expressed as Eq. (32)

$$T={T}_1+{T}_2=\frac{2{L}_1}{v_1+{v}_2}+\frac{2{L}_2}{v_2+{v}_3}$$
(32)

where L1 and L2 are the displacements of blocki − 1 and blocki respectively. Considering acceleration and jerk constraints, an optimal problem with the constraints is established in Eq. (33).

$${\displaystyle \begin{array}{cc}\operatorname{Min}& \frac{L_1}{v_1+{v}_2}+\frac{L_2}{v_2+{v}_3}\end{array}}$$
(33)
$$\left\{\begin{array}{l}\left|{A}_i(t)\right|\le {A}_m,i=1,2\\ {}\left|{J}_i(t)\right|\le {J}_m,i=1,2\\ {}\left|{\overline{A}}_i(t)\right|\le {A}_m,i=1,2\\ {}\left|{\overline{J}}_i(t)\right|\le {J}_m,i=1,2\end{array}\right.$$

Substituting Eqs. (26) and (31) into Eq. (33):

$$\frac{v_2-{v}_1}{f(s)-f\left(-s\right)}\frac{s\left({v}_2+{v}_1\right)}{L_1}\frac{1}{4}\le {A}_m$$
$$\frac{v_3-{v}_2}{p(s)-p\left(-s\right)}\frac{s\left({v}_3+{v}_2\right)}{L_2}\frac{1}{4}\le {A}_m$$
$$\frac{v_2-{v}_1}{f(s)-f\left(-s\right)}\frac{s^2{\left({v}_2+{v}_1\right)}^2}{L_1^2}{\lambda}_1\le {J}_m$$
(34)
$$\frac{v_3-{v}_2}{p(s)-p\left(-s\right)}\frac{s^2{\left({v}_2+{v}_3\right)}^2}{L_2^2}{\lambda}_2\le {J}_m$$

\(\max \left|\overline{A_i}\right|\le {A}_m\) i = 1, 2

max(|2ai, 2|, |6ai, 1 + 2ai, 2|) ≤ Jm i = 1, 2

where the parameter λ1 is the value of Eq. (3) in Section 2 when the k is \(0.5-\sqrt{3}/6\) in blocki − 1, and the parameters a1, 1 and a1, 2 are the coefficients of cubic term and quadratic term of first cubic function respectively in blocki − 1. Similarly, the parameter λ2 is the value of Eq. (6) in Section 2 when the k is \(0.5+\sqrt{3}/6\). The parameters a2, 1 and a2, 2 are the coefficients of cubic term and quadratic term of first cubic function respectively in blocki.

For this optimal problem, the constraints are polynomials about v2. It is obvious that the value of v2 should be as large as possible. Then, for each inequality, when the equal sign is established, the value of the v2 reaches the maximum value. The minimum value of these maximum values is the solution of the optimal problem.

Due to what is discussed above, for the first two situations, displacement of constant feedrate blocks can be decreased. When displacements of constant feedrate blocks become 0, feedrate in constant blocks need to be adjusted, just as shown in Fig. 10a and b.

For the third situation, feedrate at midpoint decreases firstly, and the maximum acceleration and jerk should be judged whether it exceeds limits. It should be noted that third situation possibly becomes first or second situation.

For the last situation, as shown in Fig. 10d, there are three processes. From ui − 1 to ui, blocki − 1 is accelerated and the displacement is L1. From ui to ui − 1, it is a constant feedrate phase and its displacement can be denoted as L2. Similarly, from ui + 1 to ui + 2, blocki + 2 is decelerating whose displacement is remarked as L3. To ensure the demand of chord error and reduce machining time as much as possible, L1, L3, and the feedrate value of constant feedrate phase need to be adjusted.

In the fourth situation, the machining time can be expressed as Eq. (35):

$$T={T}_1+{T}_2+{T}_3=\frac{2{L}_1}{v_1+{v}_2}+\frac{L_2}{v_2}+\frac{2{L}_3}{v_2+{v}_3}$$
(35)

where v1 and v3 are the feedrate at ui − 1 and ui + 2 respectively. Then, an optimal problem also can be obtained.

$${\displaystyle \begin{array}{cc}\operatorname{Min}& \frac{L_1}{v_1+{v}_2}+\frac{L_2}{v_2}+\frac{L_3}{v_2+{v}_3}\end{array}}$$
(36)
$$\left\{\begin{array}{l}\left|{A}_i(t)\right|\le {A}_m,i=1,3\\ {}\left|{J}_i(t)\right|\le {J}_m,i=1,3\\ {}\left|{\overline{A}}_i(t)\right|\le {A}_m,i=1,3\\ {}\left|{\overline{J}}_i(t)\right|\le {J}_m,i=1,3\\ {}{L}_1+{L}_2+{L}_3=L\left(\mathrm{constant}\right)\end{array}\right.$$

Substituting Eqs. (26) and (31) into (36):

$$\frac{v_2-{v}_1}{f(s)-f\left(-s\right)}\frac{s\left({v}_2+{v}_1\right)}{L_1}\frac{1}{4}\le {A}_m$$
$$\frac{v_3-{v}_2}{p(s)-p\left(-s\right)}\frac{s\left({v}_3+{v}_2\right)}{L_3}\frac{1}{4}\le {A}_m$$
$$\frac{v_2-{v}_1}{f(s)-f\left(-s\right)}\frac{s^2{\left({v}_2-{v}_1\right)}^2}{L_1^2}{\lambda}_1\le {J}_m$$
$$\frac{v_3-{v}_2}{p(s)-p\left(-s\right)}\frac{s^2{\left({v}_2+{v}_3\right)}^2}{L_3^2}{\lambda}_2\le {J}_m$$

\(\max \left(\overline{A{}_i}\right)\le {A}_m\) i = 1, 3

max(|2ai, 2|, |6ai, 1 + 2ai, 2|) ≤ Jm i = 1, 3

$${L}_1+{L}_2+{L}_3=L={\int}_{u_{i-1}}^{u_{i+2}}\sqrt{x^{\prime^2}+{y}^{\prime^2}+{z}^{\prime^2}} du$$
(37)

The solution of the above time-optimal problem is desired parameters reconciling kinematic limits and machining efficiency. The optimal problem mentioned above is very simple so that there are many methods to solve it such as penalty function–based method and GA (genetic algorithm) after determining the value of s. In the following section, how to ascertain shape parameter s is presented.

For the optimal problem, if the feedrate v2 is fixed, the longer the phase with constant feedrate, the shorter the time. Hence, it is noted that the optimal problem can also be solved in an analytical way.

At last, for the last and two situations, feedrate at breaking points is changed from one point to another as shown in Fig. 10e and f.

Discussing the Sigmoid function based feedrate profile

In our method, shape parameters have a significant effect on maximum value of acceleration and jerk. Given the limits of acceleration and jerk, feedrate profile constructed by the above method has different ability to speed up and slow down. For Sigmoid function–based feedrate profile, the expressions of acceleration and jerk can be represented as Eq. (38)

$$\left({v}_e-{v}_s\right){\mu}_1-T{A}_m\le 0$$
$$\left({v}_e-{v}_s\right){\mu}_2-T{A}_m\le 0$$
$$\left({v}_e-{v}_s\right){\mu}_3-{T}^2{J}_m\le 0$$
$$\left({v}_e-{v}_s\right){\mu}_4-{T}^2{J}_m\le 0$$
$$\left({v}_e-{v}_s\right){\mu}_5-{T}^2{J}_m\le 0$$
$${\mu}_1=\frac{1}{2}\frac{s}{f(s)-f\left(-s\right)}$$
(38)
$${\mu}_2=\frac{1}{\left(f(s)-f\left(-s\right)\right)}\left|\frac{81{q}^2+4{s}^2{p}^2-36 sp q}{6 sp-18q}\right|,\mathrm{if}-\frac{a_{i,2}}{3{a}_{i,1}}\in \left[0,T/3\right]\kern12.75em {\mu}_2=0\kern5em ,\kern0.5em \mathrm{else}\kern0.5em -\frac{a_{i,2}}{3{a}_{i,1}}\notin \left[0,T/3\right]$$
$${\mu}_3=\frac{s^2}{4\left(f(s)-f\left(-s\right)\right)}{\lambda}_1$$
$${\mu}_4=\frac{1}{\left(f(s)-f\left(-s\right)\right)}\left|54q-12 sp\right|$$
$${\mu}_5=\frac{1}{\left(f(s)-f\left(-s\right)\right)}\left|24 sp-54q\right|$$

\(q=f\left(-\frac{s}{3}\right)-f\left(-s\right)\) \(p=f\left(-\frac{s}{3}\right)\left(1-f\left(-\frac{s}{3}\right)\right)\)

where μ1, μ2, μ3, μ4, and μ5 reflect the strictness of constraints. When motion time and start feedrate are given, end feedrate only depends on these parameters. μ1 and μ2 are constraints for the second part and first part of acceleration profile. Meanwhile, μ3, μ4, and μ5 are constraints for the second part and first part of jerk profile. To satisfy acceleration and jerk constraints simultaneously, determining which constraint is more rigorous is important. Thus, there are three cases.

  1. Case 1:

    Acceleration constraint is more rigorous;

  2. Case 2:

    Jerk constraint is more rigorous;

  3. Case 3:

    Two constraints are similar.

In most actual circumstances, situations 1 and 2 are more common. In order to distinguish three situations, a displacement\(\bar{l}\)can be calculated with feasible acceleration Am and S which can take 3 using Eq. (26). Then, the maximum jerk \(\bar{J}\) is computed using the displacement \(\bar{l}\) and Eq. (26). Finally, if \(\bar{J}<{J}_m\), it is case 1. If \(\bar{J}>{J}_m\), it is case 2. Otherwise, it is case 3.

For case 1, acceleration constraints are only considered, and considering jerk constraints are enough in case 2. For case 3, all constraints need to be considered. In fact, μ1is increasing with s, and μ2 depend on the moving time. Analogously, μ3 is increasing with s, μ4 is decreasing with s, and μ5 is increasing so that max(μ3, μ4, μ5) have a minimum value as shown in Fig. 11.

Fig. 11
figure 11

The trends of μ3, μ4, and μ5 with the change of shape parameter

Similarly, sine-based feedrate profile can also be represented as the same formulation in Eq. (39).

$$\left({v}_e-{v}_s\right)\frac{\pi }{2}-T{A}_m\le 0$$
$$\left({v}_e-{v}_s\right)\frac{\pi^2}{2}-{T}^2{J}_m\le 0$$
(39)

In case 1, when s = 2.5 and moving time is rather small, \(\max \left({\mu}_1,{\mu}_2\right)<\frac{\pi }{2}\) which means Sigmoid function–based feedrate profile is more efficient. In case 2, when s = 3.3, \(\max \left({\mu}_3,{\mu}_4,{\mu}_5\right)<\frac{\pi^2}{2}\).

An example is presented in Fig. 11. Simply, start feedrate, moving time, maximum acceleration, and jerk are set as 10mm/s, 0.1s, 3000mm/s2, and 55000mm/s3, respectively. And the value of s is taken as 2.5, 2.9, 3.3, and 4.0, successively. In Fig. 12, when s has taken 3.3, end feedrate is maximal.

Fig. 12
figure 12

Sigmoid function–based feedrate profile with different shape parameters and sine-based feedrate profile

For avoiding the jumps and discontinuities at the junctions, repeated checking is necessary. If a discontinuity happens, the federate at the junction is need to be set as minimum value. Then, blocks which have been updated should be adjusted with updated federate. The process continues until there are no jumps.

5 Simulation and experimental verification

In this section, two typical NURBS curve with different degrees are used to validate the proposed feedrate scheduling method. The first one is an open WM-shaped second-degree NURBS curve with 8 control points. The other is a closed butterfly-shaped third-degree NURBS curve with 51 control points. Threshold of chord error and kinematic constraints which are maximum velocity, acceleration, and jerk are given in advance. Then, the proposed method is applied to generate feedrate profile. To compare the effectiveness between the proposed method and the sine-curve method, sine-based feedrate curve is used to design feedrate profile of each block via just replacing constraint conditions in Eqs. (34) and (37) with Eq. (39). In order to further verify the feasibility of the method, two machining simulation experiments about these NURBS curves are carried out using Unigraphics NX, and the results are shown in Figs. 18 and 24.

In the interpolation stage, two-order Taylor interpolation algorithms are also performed to verify the efficiency of the proposed method with the interpolation parameters illustrated in Tables 1 and 3. Since there is truncation error in initial two-order Taylor interpolation method, an iterative process based on dichotomy method is applied to calculate accuracy parameter u which corresponds to interpolation step length L. The theoretical machining time is calculated according to Eq. (85). Machining time is also used to compare machining efficiency.

$${T}_{\mathrm{total}}={\sum}_{i=1}^N{t}_i$$
(40)
Table 1 Parameters of kinematic constraints and feedrate scheduling method for WM curve

where N is the number of blocks, and ti is the element of blocki after feedrate adjusting.

The simulations are conducted on a personal computer with Intel(R) Core (TM) i7-6500U 2.59-GHz CPU, 8.00-GB SDRAM, and Windows 10 operating system. All the algorithms for the simulations are developed and implemented on Dev-C++ by C language.

5.1 Simulation results of WM-shaped curve

In the simulation of WM-shaped curve, the curve is shown in Fig. 13b, and the constraints and interpolation periods are listed in Table 1. The feedrate curve under the chord error is shown in Fig. 13a which illustrates the proposed algorithm on how to detect the breaking points. The red points are breaking points which also contain start and end points of NURBS curve. Totally, there are 20 breaking points and 19 blocks. Between two adjacent points, the process is one of three types, acceleration, deceleration, and constant feedrate. As the given parameters, it is classified as case 2 so that shaped parameter s is selected as 3.3. Then, the optimal problem Eqs. (33) or (36) for each block is solved depending on which situation does the current block belongs to. Finally, the feedrate profile generated by the proposed method is planned as shown in Fig. 14a. As shown in Fig. 14b–d, the profiles of acceleration, jerk, and chord error generated by the proposed method are almost constrained on the values of 2000mm/s2, 26000mm/s3, and 0.5 μm, respectively. Meanwhile, Fig. 15a, b, c and d show that the motion of each axis is smooth.

Fig. 13
figure 13

a Feedrate profile confined on chord error and breaking points, b WM-shaped curve

Fig. 14
figure 14

a Feedrate profile of proposed method, b acceleration profile of proposed method, c jerk profile of proposed method, d Chord error profile of proposed method

Fig. 15
figure 15

a X-axis feedrate profile of proposed method, b Y-axis federate profile of proposed method, c X-axis acceleration profile of proposed method, d Y-axis acceleration profile of proposed method

The results of the sine-curve method are demonstrated in Figs. 16 and 17. In Fig. 16, the profile of acceleration, jerk, and chord error is almost constrained by given limits. The feedrate and acceleration of X-axis and Y-axis are also shown in Fig. 17. Comparing the proposed method with the sine-curve method, the proposed method is rather efficient. In the feedrate profile of the proposed method, the value of point A is 100mm/s, while it is only 97mm/s in the sine-curve method. Also, the displacement of the first and end blocks in Fig. 14a is 7.38 and 9.96mm, respectively, but the displacement of the same blocks is 7.14 and 8.22mm, respectively, using the sine-curve method. For maximum acceleration, it can reach 928mm/s2 in the proposed method and is just 768mm/s2 in the sine-curve method. Finally, after interpolation calculation, there are 701 interpolation points in the results of the proposed method and 722 interpolation points in the results of the sine-curve method.

Fig. 16
figure 16

a Feedrate profile of sine-curve method, b acceleration profile of sine-curve method, c jerk profile of sine-curve method, d chord error profile of sine-curve method

Fig. 17
figure 17

a X-axis feedrate profile of sine-curve method, b Y-axis feedrate profile of sine-curve method, c X-axis acceleration profile of sine-curve method, d Y-axis acceleration profile of sine-curve method

The simulation results show that not only the proposed method can confine the chord error under the 0.5 μm but also the acceleration and jerk are bounded (Table 2). Besides, in high-speed machining, efficiency of the proposed method slightly improved compared to that of the sine-curve method. The machining simulation experiment is also conducted, and the result shows that our method can guarantee precision requirement in machining as shown in Fig. 18.

Table 2 Simulation results of WM-shape curve
Fig. 18
figure 18

Simulation result of WM-shaped curve

5.2 Simulation results of butterfly-shaped curve

For the simulation butterfly-shaped curve, the curve is shown in Fig. 19b and the parameters of simulations are listed in Table 3. Through the feedrate curve scanning, 37 breaking points are determined using the strategy in Section 2.1 as shown in Fig. 19a. Then, totally 36 blocks are divided via these breaking points. According to the given parameters, jerk constraint is stricter. Then, feedrate adjusting for each block is implemented. After feedrate adjusting, some blocks will degrade into points in which the start parameters are equal to the end parameters. For example, the points where the parameter u is 0.346605 and 0.653272 respectively are degenerated from the original blocks, in Fig. 20a.

Fig. 19
figure 19

a Feedrate profile confined on the chord error and breaking points, b butterfly-shaped curve

Table 3 Parameters of kinematic constraints and feedrate scheduling method for butterfly curve
Fig. 20
figure 20

a Feedrate profile of proposed method, b acceleration profile of proposed method, c jerk profile of proposed file, d chord error profile of proposed method

In Fig. 20a–d, profile of acceleration, jerk, and chord error generated by the proposed method is shown and almost constrained on the values of 3000mm/s2, 55000mm/s3, and 0.5 μm. The feedrate and acceleration profile of X-axis and Y-axis are shown in Fig. 21. Meanwhile, the feedrate profile generated by the proposed method is shown in Fig. 19b.

Fig. 21
figure 21

a X-axis feedrate profile of proposed method, b Y-axis feedrate profile of proposed method, c X-axis acceleration profile of proposed method, j Y-axis acceleration profile of proposed method

Then, Fig. 22a–d show the profile of feedrate, chord error, acceleration, and jerk generated by the sine-curve method. Besides, feedrate and acceleration profile for each axis are also shown in Fig 23. Comparing Figs. 19a and 22a, the total time of blocks is 4.360 and 4.417s, respectively. At the points where parameter u is 0.346605 and 0.653272, the feedrate at these points are 95.806648 and 96.284721 mm/s, respectively. The feedrate generated by the sine-curve method at these points is 93.044418 and 93.507507 mm/s. In Figs. 19c and 22c, maximum value of jerk in the sine-curve method is greater than jerk limitation, and the proposed method can strictly meet jerk constraint. After interpolation calculation, there are 4360 points using the proposed feedrate scheduling method and there are 4420 points using the sine-curve method. Then, the simulation results for butterfly curve are presented in Table 4. In Fig. 24, the machining simulation result of butterfly-shaped curve indicates that the motion of tool is smooth and that precision requirement can be satisfied.

Fig. 22
figure 22

g Feedrate profile of sine-curve method, h acceleration profile of sine-curve method, c jerk profile of sine-curve method, d chord error of sine-curve method

Fig. 23
figure 23

a X-axis feedrate profile of sine-curve method, b Y-axis feedrate profile of sine-curve method, c X-axis acceleration profile of sine-curve method, d Y-axis feedrate profile of sine-curve method

Table 4 Simulation results of sine-curve method
Fig. 24
figure 24

Simulation result of butterfly-shaped curve

5.3 Discussion

From the feedrate profiles demonstrated above, it can be observed that not only tangential feedrate ensure smoothness but also the motion for each axis is smoothness. For chord error constraint, two chord error profiles are constrained by given chord error threshold. So, the feedrate determining method in Section 2.1 can guarantee constraint of chord error. It is noted that the value of μs should be consistent with NURBS curve. From Tables 2 and 4, the kinematic characteristics containing acceleration and jerk are confined on the given value. Therefore, the proposed feedrate scheduling method based on Sigmoid function can guarantee that kinematic characteristics do not exceed the preset value. Comparing the two methods, the theoretical machining time of the proposed method is shorter than that of the sine-curve method for two NURBS curve. And the number of interpolation points for the proposed method is less than that of the sine-curve method. According to the data, proposed feedrate scheduling method has a certain extent of advantages in the term of machining efficiency compared with the sine-curve method. Besides, the proposed method can reach higher acceleration than the sine-curve method. It indicates that kinematic constraints can be more fully used in the proposed method than in the sine-curve method.

6 Conclusion

This paper proposes a Sigmoid function–based feedrate scheduling method with chord error constraints and kinematic constraints. An approximate relationship between feedrate and chord error is used to calculate accurate feedrate value in pre-interpolation process. Through the pre-interpolation process, the shape of feedrate curve with chord error constraint is determined. Then, a two-step scanning algorithm, which aims to find a breaking point, is carried out to scan the whole feedrate curve, and feedrate curve will be divided into three kinds of blocks: acceleration, deceleration, and constant feedrate block according the breaking point. In every block, the feedrate profile will be designed by Sigmoid function with compounding two linear functions and local polynomial fitting. The feedrate profile is “one master, two slaves” method of which the connection of three parts is closer than the polynomial method, and expression ability is better than the trigonometric method. Therefore, the proposed method is more convenient to be applied than the polynomial method and has the advantage in efficiency than the sine-curve method. Since kinematic constraints are also needed to be considered, a time-optimal formulate is established to adjust the feedrate value at breaking points. Although the proposed method is a jerk-limited method, it can become jerk-continuous by using high-order polynomial to fit. Meanwhile, contour error and kinematic characteristics of each axis need to be considered. Both two aspects will be introduced in future work.