1. Introduction
The contour error control performance for the high-speed and high-precision machining of complex free-form surface parts has a direct and significant impact. Therefore, many scholars have performed in-depth research on contour error control strategies. The control principle can be roughly divided into the following categories [
1]: offline methods, interpolator designs, single-axis tracking controllers, cross-coupled control (CCC) methods, coordinate system design, etc.
Offline control methods include offline feedrate planning methods and offline compensation methods. Liu [
2] proposed an improved feedrate planning algorithm based on contour error constraints, which can reduce the response error according to the servo response error model. Longkun [
3] proposed a new off-line feedrate interpolation method based on the constraint intersection principle that can satisfy the chord error, velocity, acceleration, and jerk limits of drive axes. In the offline feedrate planning method, the contour error tolerance is treated as planning constraints in the feedrate profile generation [
4]. Offline compensation methods are used to add pre-compensations to reduce the contour error and improve the contour error control performance. Yang [
5] developed a global toolpath modulation-based contour error pre-compensation method, which incorporates the error compensation issue into the stage of toolpath planning. Qun [
6] proposed an adaptive contour error pre-compensation method for five-axis machine tools by constructing a model reference adaptive control. However, the performance of these methods depends on the accuracy of the feed system model. In addition, offline methods cannot tackle the influence of time-varying servo parameters or external disturbances, such as the cutting force, on the contour error.
Compared with offline control methods, interpolator designs can adjust the feedrate online or compensate for control commands to reduce the contour error in real time. Lo and Hsiao designed a CNC machine tool interpolator with a path compensation method for a repeated contour machining process [
7]. In addition, some studies have applied the servo dynamic model and contour error constraints to the real-time feedrate planning of interpolators [
8,
9,
10]. However, interpolator designs also require an accurate feed system model and cannot effectively handle perturbations such as cutting forces or parameter drifts during the machining process.
Since the contour error is related to the single-axis tracking error in multi-axis contouring control, many scholars have carried out a lot of research work to improve the accuracy of single-axis servo controllers. Tomizuka [
11] proposed the Zero Phase Error-Tracking Controller (ZPETC) for digital control systems to eliminate the poles, zeros, and phase shifts to achieve wide bandwidth and small tracking errors. Many scholars have improved the ZPETC method based on Tomizuka’s work, such as introducing feedforward terms and optimization algorithms [
12,
13,
14]. However, improving single-axis tracking performance cannot guarantee an improvement in contouring accuracy because the mismatch of the dynamic characteristics between the servo drive modules of a multi-axis machine tool and the time lag effect of the control, among other things, can produce contour errors [
15].
In 1980, Koren [
16] proposed the concept of cross-coupled control (CCC) to solve the contouring control problem of a two-axis motion control system. Srinivasan and Kulkarni [
17] designed a proportional control law to achieve the approximate decoupling of contouring error and tracking error. Li et al. [
18] designed an intelligent adaptive cross-coupled control strategy based on feature modeling and used proportional feedback cross-coupling control to improve the tracking accuracy of two-dimensional profiles. Wei et al. [
19] proposed a Fuzzy PID cross-coupled controller based on an improved PSO algorithm by optimizing controller parameters. Regarding 3D contour error control, Zhang et al. [
20] designed and completed a two-layer CCC controller, where the
X-
Y-axis plane is controlled in the bottom layer and a compensator for the
Z-axis is designed in the top layer to reduce the contour error. Liu et al. [
21] designed an adaptive cross-coupled pre-compensated controller to compensate for the value of the contour error.
According to the characteristics of CNC machining, many different types of coordinate systems have been proposed to achieve the decoupling of system motion. For a two-axis servo feed system, Lo et al. [
22] investigated the Tangential-Contouring Controller (TCC) method, which establishes a tangential-contouring coordinate system, decouples the tracking error into the two coordinate system directions, decomposes the component to the normal direction as the approximate contouring error, and expresses the feed performance in terms of the tangential error. For the three-axis contouring control task, Chiu [
23] designed a new Task Coordinate Frame (TCF). Based on the TCF, Chen et al. [
24] investigated a free-form curve-oriented contour error estimation algorithm to achieve a first-order approximation of the contour error. Yao [
25] and Davis [
26] et al. proposed the Orthogonal Global Task Coordinate Frame (GTCF). Lou et al. [
27] proposed the Task Polar Coordinate Frame (TPCF) to transform the dynamics in the Cartesian coordinate system under the TPCF coordinate system, which is suitable for contour error control. Shi et al. [
28,
29] extended the TPCF method to 3D contouring applications. Ke et al. [
30] proposed a novel tangential velocity tracking (TVT)-based contouring control framework for biaxial motion systems, which can yield much better contouring performance than the traditional TCF method because of accurate contour error estimations. It is worth noting that this type of method is applicable to limited scenarios, such as straight line and circular arc trajectories, and cannot be generalized to free curves. When the tracking error is large, a lower contour error accuracy may exist.
Most of the commonly used contour error controllers are based on the position tracking control, which inevitably introduces the tracking error. CCC methods can significantly reduce the contour error, but the effect of reducing the tracking error is not obvious [
31]. A large tracking error may significantly reduce the contour error control accuracy, especially in complex free-form surface machining with high velocity and large curvature change. In order to solve this problem, many researchers have already proposed a series of methods combining the CCC method and the tracking error compensation strategy [
32]. However, the influence of the tracking error still exists in these contour control methods. To overcome this problem, this paper explores a new contour control method that is not based on position tracking but directly uses the contour error as the control objective.
The purpose of this paper is to present a novel direct contour control method based on coordinate transformation (CT-DCC). The remainder of this paper is organized as follows:
Section 2 describes the algorithm of direct contour control. Simulation results based on the comparison of the proposed method and contour error CE calculation methods are described in
Section 3. In
Section 4, the experimental results of real-time control on an X-Y-Z motion table are presented. Finally,
Section 5 concludes this paper.
2. Direct Contour Control Method Based on Coordinate Transformation
In this section, the principles and specific algorithms of the CT-DCC method are described.
2.1. Principles of the CT-DCC
The direct contour control (DCC) method proposed in this paper eliminates the position interpolation and the position tracking used in conventional motion control. Since DCC does not require tracking to the target position specified in the position interpolation, it relaxes the time constraints in the contouring and pays more attention to the current contour accuracy. DCC completely eliminates the adverse impact of the tracking error on the accuracy of contour control, as shown in
Figure 1.
The two-dimensional curve is given as an example in
Figure 2.
is the actual position point, and
and
are the actual velocities in the
X-axis and
Y-axis directions, respectively. Based on the algorithm proposed by Liu et al. [
33], the foot point parameter
, the foot point position
and the contour error
corresponding to point
can be calculated, as shown in
Figure 2a.
and
are the velocity vectors along the contour error direction and the tangential feed direction, which are calculated from
and
in the world coordinate system by coordinate transformation, as shown in
Figure 2b.
is the planning tangential feedrate corresponding to
, whose direction is orthogonal to the contour error direction, according to the feedrate planning algorithm in the parameter domain [
33].
The idea of CT-DCC is to make the actual machining trajectory as close as possible to the contour of the programmed curve, while also taking the feed direction velocity control into account, to achieve the goal of high-accuracy contour control. CT-DCC is composed of an upper controller and a lower controller. In one control period, the upper controller performs contour error control and feedrate control. In the contour error direction, the actual position point
is “pulled” towards the corresponding foot point on the programmed trajectory to complete contour error compensation based on position control, thus generating the compensation velocity in the contour error direction. Meanwhile, in the tangential feed direction, CT-DCC only realizes velocity control to ensure that the actual feed velocity can track the programmed feedrate profile, as shown in
Figure 2c.
The two control components in the contour error direction and the tangential feed direction are always orthogonal to each other so that independent decoupling control can be realized to achieve the purpose of accurate contour control.
The lower controller consists of several single-axis controllers, which realize the final motion control of each feed axis of machine tools according to the commands of the upper controller. The upper and lower controllers convert various control variables through coordinate transformation.
2.2. The CT-DCC Algorithm
This section focuses on two CT-DCC algorithms with different type of lower controllers. Both of the CT-DCC methods employ the contour error calculation algorithm described in [
33].
2.2.1. CT-DCC Based on Single-Axis Velocity Control
The principle of CT-DCC based on single-axis velocity control is illustrated in
Figure 3. Taking X-Y plane contouring control as an example, the lower controllers of the X and Y axes utilize PI-type velocity control. The upper controller includes the P-type contour error controller and the tangential velocity interpolation module to generate the tangential feed velocity command. The detailed algorithm is presented below.
According to the target programming curve, plan the velocity profile with respect to the curve parameter for DCC and construct the corresponding relationship between the curve parameter u and the tangential velocity v.
Based on the real-time contour error calculation algorithm [
33], calculate the contour error
, the foot point parameter
, the foot point position
corresponding to the actual point
of each axis in the world coordinate system, the feed direction unit vector
T, and the contour error direction unit vector
N corresponding to
. Construct the contour control coordinate system.
Calculate the interpolated velocity command in the tangential feed direction corresponding to the foot point parameter u and the planned velocity profile. is the tangential velocity command.
According to the contour error , calculate the velocity control command along the contour error direction. is the contour error compensation velocity command.
Transform the above velocity command vectors from the contour control coordinate system to the world coordinate system. The coordinate transformation is:
where:
where
is coordinate system rotation transformation matrix and
.
is the velocity command vector in the CT-DCC coordinate system. The velocity command
in the world coordinate system can be expressed as:
Remark: In this paper, the transformation from the CT-DCC coordinate system to the world coordinate system is defined as a forward transformation, while the transformation from the world coordinate system to the CT-DCC coordinate system is defined as an inverse transformation.
According to , and the actual velocity ,, the lower controllers of the X and Y axes complete velocity control by the PI controllers and generate the torque command, which is amplified to drive the feeding system on each axis.
At the end of the servo control period, if the contouring is complete, stop the motion control. Otherwise, return to step 2 and continue the next servo control period calculation.
The CT-DCC algorithm flow based on single-axis velocity control is shown in
Figure 4.
2.2.2. CT-DCC Based on Single-Axis Torque Control
The principle of CT-DCC based on single-axis torque control is illustrated in
Figure 5.
The CT-DCC algorithm flow based on single-axis torque control is shown in
Figure 6.
It can be seen that single-axis torque control-based CT-DCC accomplishes contour control and velocity control in the contour control coordinates, which is more “direct” than the single-axis velocity control-based CT-DCC in the contour control. However, in some servo drives, there is no torque control mode, in which case, only single-axis velocity control-based CT-DCC can be adopted.
The above algorithms are described with two-dimensional CT-DCC. For three-dimensional CT-DCC, the implementation steps are basically the same, except the 3D coordinate system transformation is employed. In addition, this paper adopts the P-PI-type controller, which is the most used method in servo controls, to realize closed-loop control in CT-DCC. Other advanced control methods can also be selected in the application.
2.3. Comparison with Other Contour Control Methods
The differences in various types of contour control methods are briefly mentioned in the Introduction. In this section, the commonly used contour controllers, such as the P-PI control system (
Figure 7), the cross-coupled control system (
Figure 8), the Fuzzy PID CCC control system (
Figure 9), the TCC control system (
Figure 10, which is similar to the decoupled control idea in this paper), and the CT-DCC control system (
Figure 5), are selected for comparison in the form of block diagrams and a table.
The P-PI control system is the basic form of the position-tracking type contour control system. The interpolated position commands are sent to the axial controllers. The axial controller incorporates a position loop, a speed loop, and a torque loop. Each axial controller realizes position tracking independently, and the actual contour is the result of the actual position in the tracking of each axis. because of the difference in the parameters, dynamic characteristics, and disturbances of each axis, as well as the actual position lag in the position tracking, the contour error is high in the high-speed and large curvature zones.
As a modification of the basic P-PI control system, the CCC control system employs the contour error calculation module, the axial control module, and the cross-coupled control module. The output of the cross-coupled control module is added to the velocity command input of each single-axis controller (some type of CCC module adds the output on the position command). The CCC control system can reduce the contour error compared with the P-PI-type control system. However, the direction of the contour control error is not orthogonal to the direction of the position tracking error; therefore, the contour control performance is affected by the position tracking in the CCC controller.
At present, a lot of contour error control methods are designed based on CCC, such as the sliding mode structure, Fuzzy PID control [
19], model reference adaptive control [
21], and so forth. The traditional CCC controller is adjusted by PID parameters, and parameter tuning is mainly performed through theoretical calculation and engineering optimization. In the Fuzzy PID CCC Control system, a Fuzzy controller is added to the PID adjustment, which can adaptively adjust the proportional, integral, and differential coefficients.
The TCC control system is another contour control scheme based on single-axis position tracking. Unlike CCC, the contour error is not calculated in the TCC. Instead, the tracking error is decomposed into the normal and tangential directions of the command position point, and then position compensation is performed in these two orthogonal directions. However, because of the existence of the tracking error, the actual contour error foot point position will lag behind the command position. Therefore, in the high-speed and large curvature zone, the direction of the normal compensation vector of the command position may significantly differ from the direction of the actual contour error vector, and the normal component of the tracking error also differs widely from the real contour error, which leads to the degeneration in contouring performance.
The CT-DCC control system is similar to the TCC control system in that both of the controllers utilize decoupled control in the feed and orthogonal directions. But in the CT-DCC control system, the single-axis position tracking is completely eliminated, which essentially avoids the influence of position tracking on contour control. The CT-DCC control system calculates control commands in the two orthogonal directions based on the contour state feedback at the current time, including the contour error and the feed direction of the foot point, and no longer requires information such as the command position, the tracking error, etc. In addition, the CT-DCC control system utilizes the real contour error value and the real curve parameter at the foot point rather than the estimated ones, which further improves contour control performance. A comparison of these contour controllers is shown in
Table 1 (N/A is short for Not applicable).