The evolution of manufacturing demands greener and faster production methods. In the realm of foundry, digital patternless casting technology has emerged as a significant trend, offering substantial advantages over traditional casting methods. This approach involves machining the sand molds or cores directly from a CAD model, eliminating the need for physical wood or metal patterns. The benefits are profound: significantly reduced pollution, shorter lead times from design to casting, and lower overall production costs. As this technology advances, the complexity of cast components it can produce has grown. We now see an increasing demand for manufacturing sand molds for intricate and thin-walled castings, such as impellers, complex housings, and aerodynamic bodies. These complex geometries necessitate the use of five-axis linkage machining to achieve the required undercuts, deep cavities, and sculpted surfaces that are impossible with three-axis systems.

The transition from three-axis to five-axis machining for sand castings introduces a fundamental control challenge. In five-axis machines, two rotational axes (typically combining tilting and rotary motions) are added to the three linear axes (X, Y, Z). When the tool orientation changes by rotating these axes, the physical position of the tool tip relative to the workpiece would deviate from the programmed path if no compensation were applied. To maintain the tool tip precisely on its intended trajectory, the control system must perform real-time compensation. This core function is known as Rotation Tool Center Point (RTCP) control or “tool tip programming.” Essentially, the programmer specifies the path of the tool tip in the workpiece coordinate system, and the RTCP function automatically calculates the necessary coordinated movements of all five axes to keep the tool tip on that path while the tool orientation changes. This capability is a hallmark of advanced five-axis CNC systems and is crucial for the accurate machining of complex sand castings.
Furthermore, the desire to shorten production cycles for large, intricate sand castings pushes for higher machining efficiency. Fortunately, the machining forces involved in cutting bonded sand are considerably lower than those in metal cutting, making high-speed machining a viable and attractive option for sand castings. However, high-speed five-axis machining introduces another layer of complexity: speed fluctuation and overdrive. The coordinated motion required for RTCP can cause the actual feed rates of the linear axes to exceed the programmed feed rate, sometimes surpassing the physical limits of the machine. This can lead to vibration, servo alarms, and defects in the fragile sand material. To enable smooth and efficient high-speed machining of sand castings, advanced look-ahead control strategies are essential to pre-plan the motion, ensuring all axis velocities and accelerations remain within safe limits.
This article delves into the key control technologies enabling the high-speed, five-axis machining of digital sand castings. We will derive the kinematic model for RTCP, analyze the root cause of speed fluctuations, and propose a novel single-axis look-ahead control strategy to ensure stable and efficient machining. Experimental validation on a representative sand mold geometry will be presented and discussed.
Kinematic Modeling for RTCP in Sand Mold Machining
Five-axis machine tools come in various configurations, such as table-table, head-table, and head-head. For machining large sand castings, where the workpiece (the sand block) is sizable, a head-head configuration with a tilting-rotary (B-C) spindle is often preferred. This structure provides a large work envelope unencumbered by a rotary table. Our study focuses on this B-C dual swing head configuration.
The core principle of RTCP for this structure is illustrated conceptually. When programming a linear tool tip movement, if the B or C axis rotates, the linear axes (X, Y, Z) must be simultaneously adjusted to compensate for the resulting displacement of the tool tip, ensuring it stays on the straight line. To mathematically describe this, we establish the relevant coordinate systems, summarized in the table below:
| Coordinate System | Symbol | Description |
|---|---|---|
| Workpiece Coordinate System | $$O_MX_MY_MZ_M$$ | Origin $$O_M$$ is a feature point on the workpiece, aligned with the CAM software origin. |
| Tool Coordinate System | $$O_TX_TY_TZ_T$$ | Origin $$O_T$$ is at the tool tip when the tool axis is parallel to the Z-axis. |
| Rotation Center System | $$O_RX_RY_RZ_R$$ | Origin $$O_R$$ is the intersection point of the B and C axis rotation centerlines. |
We define the tool length, or swing length, as $$L$$, which is the distance from the rotation center $$O_R$$ to the tool tip $$O_T$$ when the tool is in its initial orientation (B=0, C=0). In the tool coordinate system, the vector from $$O_T$$ to $$O_R$$ is $$M_T = [0, 0, L]^T$$. Conversely, in the rotation system, the vector from $$O_R$$ to the tool tip is $$T_L = [0, 0, -L]^T$$.
The rotations about the B-axis (tilting) and C-axis (rotation) are described by the following rotation matrices:
$$R_B = \begin{bmatrix} \cos B & 0 & \sin B \\ 0 & 1 & 0 \\ -\sin B & 0 & \cos B \end{bmatrix}, \quad R_C = \begin{bmatrix} \cos C & -\sin C & 0 \\ \sin C & \cos C & 0 \\ 0 & 0 & 1 \end{bmatrix}$$
The fundamental RTCP problem is: given a commanded tool tip position $$P_M = [P_{MX}, P_{MY}, P_{MZ}]^T$$ in the workpiece system and orientation angles (B, C), calculate the required machine linear axis coordinates $$P = [P_X, P_Y, P_Z]^T$$. When the tool rotates, the tool tip position in the workpiece system changes by an amount equal to the rotated $$T_L$$ vector plus the fixed offset $$M_T$$. To cancel this change and keep the tool tip at $$P_M$$, the machine linear axes must move to the position given by the inverse kinematics solution:
$$P = P_M – (R_B \cdot R_C \cdot T_L + M_T)$$
Substituting the vectors and matrices, we obtain the practical inverse kinematics equations for the B-C head structure:
$$ \begin{aligned} P_X &= P_{MX} + L \sin B \cos C \\ P_Y &= P_{MY} + L \sin B \sin C \\ P_Z &= P_{MZ} + L \cos B – L \end{aligned} $$
Similarly, the forward kinematics solution, which calculates the actual tool tip position from the machine coordinates and rotation angles, is derived by rearranging the above equations:
$$ \begin{aligned} P_{MX} &= P_X – L \sin B \cos C \\ P_{MY} &= P_Y – L \sin B \sin C \\ P_{MZ} &= P_Z – L \cos B + L \end{aligned} $$
In an open-architecture CNC system (e.g., based on a PMAC controller), these forward and inverse kinematic algorithms are implemented as real-time software routines. The control cycle (typically 1-10 ms) continuously reads the programmed tool tip path, executes the inverse kinematics to compute the setpoints for all five servo axes (X, Y, Z, B, C), and uses the forward kinematics for monitoring and feedback. This seamless, cyclic calculation is what enables precise five-axis contouring for complex sand castings.
Analysis of Speed Fluctuation and Single-Axis Look-Ahead Control
Mechanism of Speed Overdrive
In five-axis machining with RTCP, a critical issue arises during high-speed motion: the actual axis velocities can dramatically exceed the programmed feed rate. This occurs because the control system’s interpolation time is based on the programmed tool tip displacement, but the actual distances the machine axes must travel are governed by the RTCP-compensated inverse kinematics path, which can be much longer.
The time interval $$t$$ to move between two programmed points is calculated from the programmed feed rate $$F$$ and the Euclidean distance in the programmed coordinate space (including linear and rotary axes, converted to a common unit, e.g., mm):
$$t = \frac{\sqrt{\mu_X^2 \Delta P_{MX}^2 + \mu_Y^2 \Delta P_{MY}^2 + \mu_Z^2 \Delta P_{MZ}^2 + \mu_B^2 \Delta B^2 + \mu_C^2 \Delta C^2}}{F}$$
where $$\mu_X, \mu_Y, \mu_Z, \mu_B, \mu_C$$ are scaling factors converting user units (mm, deg) to controller internal units (counts).
The actual velocity for each axis, if unconstrained, is then calculated as its RTCP-based displacement divided by this time interval:
$$V_X = \frac{\mu_X \Delta P_X}{t}, \quad V_Y = \frac{\mu_Y \Delta P_Y}{t}, \quad V_Z = \frac{\mu_Z \Delta P_Z}{t}, \quad V_B = \frac{\mu_B \Delta B}{t}, \quad V_C = \frac{\mu_C \Delta C}{t}$$
Substituting $$t$$ into these equations reveals the relationship between the actual axis velocities and the programmed feed rate $$F$$. The magnitude of the actual tool tip velocity (which can differ from F) and the individual axis velocities can be expressed as:
$$F_{act} = F \times \frac{\sqrt{\mu_X^2 \Delta P_X^2 + \mu_Y^2 \Delta P_Y^2 + \mu_Z^2 \Delta P_Z^2 + \mu_B^2 \Delta B^2 + \mu_C^2 \Delta C^2}}{\sqrt{\mu_X^2 \Delta P_{MX}^2 + \mu_Y^2 \Delta P_{MY}^2 + \mu_Z^2 \Delta P_{MZ}^2 + \mu_B^2 \Delta B^2 + \mu_C^2 \Delta C^2}}$$
From the inverse kinematics equations, we know that $$\Delta P_X, \Delta P_Y, \Delta P_Z$$ include terms proportional to the tool length $$L$$ and the changes in $$\sin B \cos C$$, etc. For long tools and significant orientation changes, the numerator can be vastly larger than the denominator. Consequently, $$V_X, V_Y, V_Z$$ and $$F_{act}$$ can exceed $$F$$ by a large margin, potentially violating the machine’s maximum velocity and acceleration limits. This overdrive causes severe vibration and is particularly detrimental when machining fragile sand castings, leading to surface defects and even mold breakage.
Proposed Single-Axis Look-Ahead Control Strategy
Look-ahead control is a standard technique to manage acceleration and velocity by previewing the upcoming path. For five-axis machining, a full five-dimensional look-ahead is computationally intensive. However, a key observation allows for a significant simplification: the ratios of the axis velocities are strictly constrained by the ratios of their RTCP displacements.
From the velocity equations, the ratio between any two axis velocities is fixed by their displacement ratios, for example:
$$\frac{V_X}{V_Y} = \frac{\mu_X \Delta P_X}{\mu_Y \Delta P_Y}, \quad \frac{V_X}{V_Z} = \frac{\mu_X \Delta P_X}{\mu_Z \Delta P_Z}, \quad \text{etc.}$$
This constraint implies that if we effectively limit the velocity of one axis, the velocities of the other four will be proportionally constrained. Therefore, we can achieve overall five-axis speed control by applying a look-ahead algorithm to only one selected axis. This dramatically reduces the computational burden compared to a full five-axis look-ahead.
The strategy is as follows:
- Select one axis (e.g., the Z-axis) as the master control axis.
- For this axis, calculate a look-ahead threshold velocity $$V_{threshold}$$ that guarantees none of the five axes will exceed its individual limit.
- Configure the CNC’s look-ahead module to use this $$V_{threshold}$$ as the maximum velocity for the selected master axis. The velocity limits for the other four axes can be set to their maximum possible values or disabled.
- The look-ahead algorithm will preview the path, and whenever the projected velocity for the master axis would exceed $$V_{threshold}$$, it will insert a speed override or adjust the trajectory’s time base, automatically slowing down all axes in a coordinated manner.
Calculation of the Look-Ahead Threshold
The look-ahead threshold for the master axis is the maximum velocity it can attain without causing any axis to violate its limit. Considering all constraints, for a chosen master axis (e.g., the Z-axis), its permissible velocity range is the intersection of the limits imposed by all five axes. The threshold is the minimum of the upper bounds of this range.
Let $$V_{X_{limit}}^{+}$$ and $$V_{X_{limit}}^{-}$$ be the positive and negative velocity limits for the X-axis, and similarly for other axes. Assuming symmetrical limits ($$V_{limit}^{+} = |V_{limit}^{-}|$$), the constraint on the Z-axis velocity $$V_Z$$ derived from the X-axis limit is:
$$V_Z \leq \frac{\Delta P_Z}{\Delta P_X} V_{X_{limit}} \quad \text{(considering direction)}$$
Applying this logic to all axes, the look-ahead threshold for the Z-axis is calculated as:
$$V_{Z_{threshold}} = \min\left\{ \left| \frac{\Delta P_Z}{\Delta P_X} \right| V_{X_{limit}}, \left| \frac{\Delta P_Z}{\Delta P_Y} \right| V_{Y_{limit}}, |V_{Z_{limit}}|, \left| \frac{\Delta P_Z}{\Delta B} \right| V_{B_{limit}}, \left| \frac{\Delta P_Z}{\Delta C} \right| V_{C_{limit}} \right\}$$
Similar formulas can be derived for selecting X, Y, B, or C as the master axis. The look-ahead buffer length (number of segments to preview) can be estimated based on this threshold velocity $$V_{threshold}$$, the master axis’s maximum acceleration $$A_{max}$$, and the servo update period $$t_s$$:
$$N = \frac{V_{threshold}}{2 A_{max} t_s}$$
This single-axis look-ahead strategy provides a practical and efficient method for enforcing velocity limits in high-speed five-axis machining of sand castings, ensuring process stability and protecting both the machine and the fragile sand mold.
Experimental Validation and Discussion
Experimental Setup and Machining Procedure
To validate the derived RTCP model and the proposed control strategy, experiments were conducted on a digital five-axis patternless casting machine. The machine features a B-C dual swing head, driven by servo motors and ballscrews, and is controlled by an open-architecture PMAC system. A representative complex geometry—an impeller sand mold—was chosen for the tests. The impeller blade passages involve complex, doubly-curved surfaces that require continuous five-axis motion to machine. The sand block was prepared with dimensions 337 mm x 337 mm x 166 mm.
The machining parameters and machine axis limits are summarized below:
| Axis | Travel | Max Velocity | Max Accel. | Pulse Equivalent |
|---|---|---|---|---|
| X, Y, Z | 1500, 2000, 700 mm | 12000 mm/min | 1500 mm/s² | 1 μm/count |
| C, B | ±360°, ±90° | 60, 30 rpm | – | 0.001°/count |
The tool was a 10 mm diameter specialized hollow mill for sand machining, with a measured swing length $$L = 403.70$$ mm. The spindle speed was set to 6000 rpm. The RTCP forward and inverse kinematics algorithms were programmed into the PMAC and executed with a 5 ms cycle time.
Results of RTCP Machining Without Speed Control
First, the impeller sand mold was machined using the RTCP function at a programmed feed rate of F500 (500 mm/min). The machining process was stable, and the surface quality of the sand mold was good. Data logging confirmed that the actual axis trajectories followed the inverse kinematics calculations closely. The maximum contouring error between the actual path and the ideal RTCP-calculated path was approximately 0.036 mm in Y and 0.034 mm in Z, which is within acceptable tolerances for sand castings. This error correlates with periods of high axis acceleration, as shown by the relationship:
$$a_X = \frac{dV_X}{dt}, \quad \text{Error} \propto f(a_{max}, T_{cycle}, PID)$$
where $$T_{cycle}$$ is the RTCP calculation cycle time.
When the programmed feed rate was increased to F2500 to test high-speed performance, severe speed overdrive was observed without look-ahead control. The linear axis velocities spiked well beyond F2500, with X-axis peaks near -6440 mm/min and Y-axis peaks near -7528 mm/min. This caused noticeable machine vibration. The contouring error also increased proportionally, to about 0.077 mm, demonstrating the detrimental effects of uncontrolled high-speed RTCP motion on precision for sand castings.
Results with Single-Axis Look-Ahead Control
The single-axis look-ahead control strategy was then implemented. The Z-axis was selected as the master control axis. Based on the axis limits and the tool path geometry, the look-ahead threshold velocity for the Z-axis was calculated using the formula in Section 2.3, resulting in $$V_{Z_{threshold}} = 1234.1$$ mm/min. This value was set as the maximum velocity for the Z-axis look-ahead module, with other axis limits set to their maximum machine values.
Re-running the F2500 program with Z-axis look-ahead enabled yielded dramatically different results. The look-ahead algorithm successfully anticipated speed violations and planned a smooth velocity profile. As a result, all axis velocities were constrained within their limits. The maximum X-axis velocity was now clamped near its limit, and all other axes followed proportionally. The violent speed fluctuations and machine vibration were eliminated, resulting in a smooth, stable machining process for the sand castings. The trade-off was an increase in total machining time from 3.31s to 11.4s, as the look-ahead proactively reduced feed rates at critical points to stay within limits.
The look-ahead process introduces a minor trajectory fitting error when adjusting the path. This error can be estimated for spline-based look-ahead as:
$$E = \frac{V^2 T^2}{6R}$$
where $$V$$ is the feed rate, $$T$$ is the RTCP/servo cycle time, and $$R$$ is the local radius of curvature of the tool path. For our parameters ($$V \approx 1200$$ mm/min, $$T=0.005$$ s, minimum $$R \approx 10.23$$ mm), the maximum estimated error is about 0.0005 mm, which is negligible for sand casting applications.
Conclusion
This work has presented and validated essential control technologies for enabling efficient and precise five-axis high-speed machining of digital sand castings. The kinematic model for RTCP in a B-C dual swing head machine was derived, and its implementation in an open-architecture CNC system proved effective for accurately machining complex geometries like impeller sand molds.
The analysis of speed fluctuation elucidated the root cause of linear axis overdrive during high-speed RTCP motion, a critical issue when machining fragile sand castings. To address this, a novel and computationally efficient single-axis look-ahead control strategy was proposed. By leveraging the constrained ratios between axis velocities and their RTCP displacements, this method allows for global five-axis speed limitation by applying look-ahead to only one master axis. The strategy and the formula for calculating the look-ahead threshold velocity were provided.
Experimental results on an impeller sand mold confirmed that the RTCP implementation provides sufficient accuracy for sand casting. More importantly, they demonstrated that without speed control, high programmed feed rates lead to severe axis overdrive and vibration. Activating the proposed single-axis (Z-axis) look-ahead control successfully eliminated these issues, constraining all axis velocities, ensuring process stability, and protecting the integrity of the sand mold. While this study focused on a B-C head machine for sand castings, the principles of the single-axis look-ahead strategy are broadly applicable to other five-axis configurations and high-speed machining domains.
Future work will focus on further improving the efficiency of machining sand castings by integrating trajectory smoothing algorithms at the CNC level to optimize the motion of the numerous small linear segments typically generated by CAM software for five-axis toolpaths, thereby maximizing the usable feed rate within the machine’s dynamic constraints.
