Abstract
Large gantry-machine positioning errors vary with position and operating history, while sensors differ in spatial and temporal coverage. This study proposes an interferometer-derived spatial-prior framework for Y-axis positioning-error prediction. Direction-specific profiles are formed by centering and averaging ten interferometer sweeps per direction, then scaled using tracker training data. A long short-term memory (LSTM) network models residual dynamics from temperature, feed-rate, and travel-direction sequences; Gaussian process regression (GPR) further corrects the residuals. Tested on an FV-4224E gantry milling machine, the method predicts total signed positioning error without a matched cold reference to isolate thermal effects. Across eight feed-direction groups, centered Pearson correlation coefficients ranged from 0.9411 to 0.9818, and the transfer coefficient was 1.1557. On 156 held-out targets, Path B achieved a root mean square error (RMSE) of 7.849 , a coefficient of determination () of 0.9645, and a maximum absolute error of 21.752 , compared with 8.738 for Direct LSTM and 8.504 for Structural LSTM. GPR improved the paired Structural LSTM in all 20 repeated fits. In reciprocal retrospective date holdouts with disjoint feed ranges, Structural LSTM reduced mean RMSE by 67.0% and 57.2% relative to Direct LSTM. These reductions compare models with different prediction-time information and cannot be attributed exclusively to the spatial prior. Path B’s nominal 95% intervals covered 82.69% of held-out observations; independent calibration is needed before using them as operational error bounds.
1. Introduction
The positioning error of a long-travel machine axis can vary along the stroke and change as the drive warms. On a lathe feed axis, Shi et al. distinguished drift of the axis origin from the part of the thermal error that varied with position [1]. Cao et al. modeled heat generation and loss along a ball screw to predict its expansion [2]. Measurements on a dual-drive feed system also showed how thermal drift and hysteresis depend on operating history [3]. For a gantry mill running at different feeds on different days, this raises a practical question. How much of the error pattern along the axis persists across runs, and can a separate measurement of that pattern improve prediction?
An error profile depends on the measurement geometry. Interferometric tests on a gantry milling machine assessed positioning accuracy at different spatial locations when validating volumetric error compensation [4]. On a gantry machine, Hou et al. used multilateration to map geometric errors while accounting for deformation induced by motion of another axis [5]. Independent instruments can also be used to check the shape of a profile. Li et al. compared multistation measurements of two milling-machine axes with interferometer readings at the same positions [6]. For thermal prediction, contact temperatures and thermal images have been combined as inputs to a convolutional neural network for spindle-error prediction [7]. In our experiment, the two instruments observed the gantry Y axis on different dates. The interferometer sampled closely spaced positions in repeated sweeps, while the laser tracker recorded successive visits to five positions during operation. We can therefore compare the spatial shapes at corresponding coordinates and travel directions, even though the two instruments did not record the same thermal history.
Previous models suggest ways to use a repeatable component. Wang et al. separated a linear feed-axis error trend from deviations about it under different cooling conditions [8]. For a spindle, Chen et al. used a recurrent network to predict the deformation left over after a thermal-expansion calculation [9]. A central difficulty is deciding what can be carried over when operating conditions change [10]. Liu et al. transferred a spindle thermal-error prediction model between machine tools [11], and Chuang et al. used new measurements to adapt a compensation model several years after its initial calibration [12]. Here the candidate for transfer is the spatial shape measured by interferometry. We test its value for prediction on a held-out date without fitting to tracker errors from that date.
Our target variable is the signed Y-axis positioning error, defined as the difference between the measured and commanded positions. This error comprises contributions from geometric effects, thermal deformation, and the measurement system. However, no matched cold-reference measurements are available for the gantry experiments, precluding the isolation of the thermal component. To establish the spatial prior, each interferometer sweep is first centered, and the ten centered sweeps for each travel direction are then averaged at 24 measurement coordinates. Across the eight feed-rate-by-direction groups, the correlation coefficients between the centered tracker errors and the interpolated interferometer profiles range from 0.941 to 0.982, based on all available tracker measurements. A common scaling factor is subsequently estimated for both direction-specific profiles using only the tracker training data. After subtracting the scaled spatial profile from the measured positioning error, a long short-term memory (LSTM) network is trained to predict the residual using the four temperature measurements, feed rate, and travel direction from the preceding ten records. The structural LSTM prediction is obtained by adding the scaled spatial profile, evaluated at the current commanded position and travel direction, to the predicted residual. In contrast, the Direct LSTM predicts total positioning error from historical features that explicitly include past positions, but it does not receive the current commanded position or direction as separate inputs. Thus, the Structural-versus-Direct LSTM comparison changes both the prediction target and the information supplied at prediction time; it does not isolate the contribution of the spatial-prior strategy.
We further investigate whether residual correction can improve the predictive performance of either LSTM-based model. Gaussian process regression (GPR) has previously been employed to quantify uncertainty in thermal-error compensation [13]. In this study, a separate GPR model is fitted to the prediction residuals of each LSTM-based predictor using an independent tracker calibration segment. This procedure yields two correction schemes: a tracker-only approach (Path A) and an approach incorporating the interferometer-derived spatial prior (Path B). Each corrected model is evaluated against its corresponding uncorrected LSTM baseline, while the coverage of the resulting prediction intervals is assessed using held-out observations.
We first reserve the final 20% of prediction targets within each of the four date-and-feed-rate blocks for testing. On the resulting 156 held-out targets, the final model fits achieve root mean square errors (RMSEs) of 8.738 m for the direct LSTM, 8.504 m for the structural LSTM, and 7.849 m for Path B. We subsequently conduct a leave-one-date-out evaluation by holding out all tracker measurements from each measurement date in turn. The two dates involve non-overlapping feed-rate combinations, while the interferometer survey was conducted after both dates. Accordingly, these experiments assess retrospective transfer under simultaneous changes in measurement date and feed-rate range. Averaged over ten independent initializations for each training–testing date pairing, the structural LSTM reduces RMSE relative to the direct LSTM by 67.0% when transferring to higher feed rates and by 57.2% when transferring to lower feed rates. Incorporating GPR further improves performance in the higher-feed-rate transfer scenario, but increases RMSE in the reverse transfer direction. Finally, the Appendix A presents an additional experiment using publicly available three-axis interferometer measurements from a separate machine [14], investigating static prediction performance under conditions where a measured cold-reference profile is available.
2. Methods
2.1. Definition of Positioning Error
Thermal error occurs when using a gantry machine tool because of the irregular arrangement of heat sources and the heat transfer behavior of the structure. Taking the Y direction as an example, the signed positioning error measured by either instrument is given by
where is the commanded position along the Y-axis and is the position read using an external sensor. The positive sign implies that the actual position is greater than the commanded position. This deviation includes geometric, thermal, and measurement-system effects. The gantry measurements contain no matched cold reference that would identify the thermal contribution separately.
2.2. Interferometer Spatial Prior and Transfer to the Tracker
In this study, measurements from the laser tracker and interferometer are assigned to distinct modeling tasks according to their inherent characteristics. The interferometer supplies a direction-specific spatial profile, and the tracker supplies the ordered operating histories and measured positioning errors. Based on these characteristics, a dual-path modeling framework is constructed. Figure 1 shows the proposed spatial-prior branch (Path B).
Figure 1.
The proposed spatiotemporal decoupling framework. The interferometer supplies a direction-specific spatial profile. Tracker training data set its scale and train the dynamic long short-term memory (LSTM) network. A separate tracker calibration segment supplies the residuals for Gaussian process regression (GPR).
At each commanded machine coordinate y, let denote the interferometer deviation in sweep k with direction . The mean is calculated over the positions in that sweep. The spatial prior is the direction-specific mean of the centered sweeps,
where for each direction. Centering removes each sweep’s offset while preserving its spatial variation. The profile is evaluated at tracker positions by shape-preserving piecewise cubic Hermite interpolation. The across-sweep sample standard deviation is interpolated linearly. To assess agreement between instruments, the interpolated prior and the tracker deviations are centered within each date, feed, and direction group, and their Pearson correlation is calculated. This descriptive check uses all observations in each group.
Let be the prior at tracker observation i, and let identify its date, feed, and direction. Within the base training set , let and , where the means are computed within each training group. The common least-squares transfer coefficient is
This dimensionless slope transfers the amplitude of the spatial profile. The group means enter only the slope calculation. For the final within-block fit, each bootstrap replicate samples eight complete training groups with replacement, retains their centered observations, and refits the slope. The 2.5th and 97.5th percentiles of 1500 replicates give a 95% interval conditional on the measured interferometer profile.
2.3. LSTM: The Method for Temporal Dynamic Modeling
Based on the temporal evolution characteristics of the laser tracker data, an LSTM network is adopted for temporal dynamic modeling. The training target for the dynamic LSTM is . Each tracker record supplies six dynamic inputs , where is feed rate and is travel direction. The four components of denote the temperatures at the ball-screw nut, servo motor housing, pulse encoder, and ambient air, respectively. The sliding window length is set to , and the network input is defined as the feature sequence over the previous k time steps. Adding the transferred spatial profile back at the current commanded position gives the Structural LSTM prediction
Although the time variable t is not explicitly included in the input features, temporal information is implicitly encoded in the LSTM through the sequential structure [15,16]. The learned dynamic term can absorb operating offsets and other deviations left after subtracting the spatial profile. The Direct LSTM comparator uses , so its seven historical features explicitly include absolute position. Its prediction is
Equation (5) has no separate input for or , whereas Equation (4) uses both current command variables to evaluate . These variables are available from the commanded trajectory and are distinct from the measured current positioning error, which is the prediction target. Consequently, the reported difference between these LSTMs combines the use of current command information, the interferometer profile, and residual-target learning. A comparison that isolates the effect of the structural strategy would also supply the direct predictor with , for example by concatenating these variables with its final recurrent representation before the regression layers, while keeping the data partitions and training budget fixed. That additional LSTM comparison has not been performed here.
Both tracker networks use the architecture listed in Table 1. All inputs and outputs are processed using Z-score normalization. LSTM inputs and targets use base-training statistics. The input features are clipped at eight standard deviations. The training samples are shuffled between epochs during LSTM optimization. Observation order within each window is preserved.
Table 1.
Long short-term memory (LSTM) architecture and training hyperparameters.
2.4. GPR: The Method for Residual Correction
The GPR method is implemented through two paths. Path A uses only laser-tracker-derived residuals for single-source residual correction. In Path A, the Direct LSTM is fitted on the base training segment. On a subsequent tracker calibration segment, a GPR is fitted to the measured error minus the Direct LSTM prediction. The GPR takes all seven features at the current observation. Thus, although its base LSTM uses historical positions only, the complete Path A predictor does have access to current position and direction through its GPR. The selected Path B GPR also uses all seven current features (Section 3.3). Comparing Paths A and B therefore provides a comparison with current positional information available to both complete predictors, but it does not hold their base networks, training targets, or residual kernels fixed.
In Path B, the corresponding calibration residual is . Its GPR inputs comprise the six current dynamic features or all seven current features , as selected on validation data. Based on these features, GPR is used for probabilistic modeling of the residuals [17]. The posterior predictive mean supplies the final correction,
The spatial-prior-only comparator returns . Adding the dynamic LSTM gives Equation (4). Comparing Equations (4) and (6) tests the residual correction. For each GPR we standardize the inputs using the calibration segment and clip the standardized features at . We use a constant mean and exact inference. Candidate kernels are squared exponential, Matérn , Matérn , and rational quadratic. The first three use a separate length scale for each feature (automatic relevance determination, ARD).
3. Experimental Setup
3.1. Machine Tool and Measurement System
The experiments were carried out on a moving-table gantry machine tool, specifically an FV-4224E Gantry Milling Machine (Fair Friend Enterprise Co., Ltd., Taichung, Taiwan), as shown in Figure 2a,b. Its main structural parameters are listed in Table 2. The tests were performed in an open workshop under natural convection conditions. In this study, the Y-axis was selected as the research object because its thermal error is influenced by both the thermal elongation of the ball-screw drive chain and the thermally induced bending deformation of the crossbeam under the combined influence of ambient temperature differences, solar radiation, and guideway frictional heat. Owing to the thermomechanical coupling, the dynamics of the Y-axis error become complicated and, hence, merit attention [18,19,20].
Figure 2.
Gantry machine and measurement configurations. (a) The gantry machine tool for the experiment. (b) The 3D model of the machine tool. (c) The laser interferometer measurement setup. (d) The laser tracker measurement setup.
Table 2.
Technical specifications of the gantry machine tool.
To obtain representative positioning error data, a dual-source measurement system integrating a laser tracker and a laser interferometer was implemented. For the precise measurement of errors, the Renishaw XL-80 laser interferometer (Renishaw plc, Wotton-under-Edge, UK) was used, with a stated linear accuracy of ppm, a resolution of 1 nm, and a sampling frequency of up to 50 kHz, as illustrated in Figure 2c. The Leica Absolute AT960-MR laser tracker (Leica Geosystems AG, Heerbrugg, Switzerland) was used for rapid multi-position measurements and quasi-temporal data acquisition, with a stated maximum permissible error of , where L is the measurement distance, and a sampling frequency of about 10–20 Hz, as shown in Figure 2d. The model uses records from designated stops. The 10–20 Hz rate refers to tracker acquisition in this setup. Environmental conditions can also affect the measured deviations [21,22].
Additionally, two Class A PT100 temperature sensors (WIKA Alexander Wiegand SE & Co. KG, Klingenberg, Germany) were arranged at the Y-axis ball-screw nut and in the ambient air, as shown in Figure 3a, with installation methods illustrated in Figure 3b. The signals were recorded using a JK3000 multi-channel data logger (Changzhou Jinko Electronic Technology Co., Ltd., Changzhou, China) through a conversion module at a 1 Hz sampling frequency, while the numerical control system also recorded the commanded position, feed speed, and temperature signals. The tracker records used for modeling contain four temperature channels. Figure 3a also identifies two built-in sensing locations. The acquisition system directly generated records pairing the temperature channels with the positioning measurement at each designated stop. The modeling stage used these paired records, as detailed in Section 3.3. Channel-specific calibration and the residual timing offset between acquisition subsystems were not quantified.
Figure 3.
Temperature sensing on the gantry machine. (a) The locations of the temperature sensors. (b) The installation method of temperature sensors. Red outlines and arrows identify the sensor locations and the mounting detail.
3.2. Data Acquisition Strategy
Considering that thermal error is a low-frequency and slowly varying process with a time constant much greater than the sampling interval [23], a “move-dwell-measure” approach was adopted for data acquisition [24]. Measurements carried out after dwelling at designated positions help reduce dynamic disturbances in quasi-static conditions. For the laser tracker, measurement positions along the Y-axis ranging from to 1000 mm at 500 mm intervals were selected for reciprocating measurements. Several reciprocating cycles were performed to obtain quasi-temporal measurements over the entire sampled Y-axis range. The laser tracker measurements were conducted over two experimental runs. Run 1 included feed rates of 4000 and 3000 mm/min, whereas Run 2 included feed rates of 5000 and 6000 mm/min.
The tracker runs took place on 10 and 11 November 2025. Their five nominal positions are G54 commands. The transformation mm places them in the machine-coordinate range mm. Scan direction is reconstructed within each block from the sign of the local 500 mm command increments, preferentially the outgoing increment. At reset jumps or repeated endpoints, the nearest admissible increment supplies the direction. This procedure assumes the commanded trajectory is available at prediction time.
The independent interferometer acquisition on 9 July 2026 comprised 20 unidirectional sweeps, ten per direction. Each sweep covered 24 machine coordinates from to 0 mm at 100 mm spacing. The reported deviations in micrometers agreed with measured minus commanded displacement after unit conversion. All five tracker positions lie within the measured interferometer range. Feed rate does not enter the calculation of the spatial prior. Both retrospective transfer tests use this later-acquired interferometer profile.
3.3. Data Preprocessing and Partitioning
Modeling and data analysis were performed using MATLAB R2024a (The MathWorks, Inc., Natick, MA, USA).
Temporal alignment was established by the acquisition system when it generated the paired records, rather than by matching two independent raw time series during model preprocessing. Each tracker record contains a Date/Time entry, the four temperature values, feed rate, and commanded and measured Y positions. Preprocessing retained this same-record association: the temperature vector and the positioning error were taken from the same record. No additional offline temperature interpolation, upsampling to the tracker acquisition rate, or nearest-timestamp join was applied. The 1 Hz rate describes the external temperature logger, and the approximately 10–20 Hz rate describes tracker acquisition; neither is the sampling rate of the sequence of retained stop records. After rejecting records with invalid required values or Date/Time entries, records were used in acquisition order within each date/feed block. The ten-step LSTM history therefore comprises ten preceding paired stop records, rather than ten seconds or ten raw tracker samples.
The acquisition system’s internal pairing latency, clock offset between subsystems, and the age of a temperature value at the corresponding positioning measurement were not independently quantified. Accordingly, record-level pairing should not be interpreted as verified simultaneous sampling. The move–dwell–measure procedure and slow thermal variation motivate this treatment, but do not establish that timing mismatch is negligible. Its effect on prediction error and interval coverage remains an experimental limitation; a common-clock acquisition audit would be needed to quantify it.
At the stage of preprocessing, not-a-number (NaN) entries from each dataset were removed. The measured positioning errors were retained without filtering. After data cleaning, 480 valid samples from the laser interferometer and 820 from the laser tracker were retained. The tracker records comprise four contiguous blocks, each defined by date and feed rate (Table 3). For a block of n records, the ten-record lookback produces prediction targets. Windows never cross a change in date or feed. Targets are partitioned chronologically within each block. Adjacent windows can share past operating inputs across a split boundary. The within-block test therefore evaluates continuation of an existing run. Ten observations need not span the same elapsed time in every window.
Table 3.
Tracker records and chronological partitions of the supervised windows. Base, calibration (Cal.), and validation (Val.) refer to model selection. Final fitting combines the first two columns of selection windows for the base fit and uses the validation segment for GPR calibration.
During model selection, the first 60% of targets in each block fit and the LSTMs, the next 10% fit each candidate GPR, and the following 10% select the residual model by validation root mean square error (RMSE). Path A selected the rational quadratic kernel. Path B selected the ARD Matérn kernel with all seven current features. With these choices fixed, the base models were refitted on the first 70% of each block (546 targets), and the residual GPRs were refitted on the next 10% (78 targets). Only the last 20% (156 targets) supplied the within-block test scores. The selection seed was 20,261,115 and the reported single-fit test seed was 20,261,114. We also repeated fitting at 20 base seeds (71,001–71,020) with the same partitions and fixed model choices. For each base seed, the dynamic-network seed was offset by 100,000.
For cross-day transfer, we held out each complete tracker date in turn. On the training date, each block was split chronologically into 60%, 20%, and 20% for base fitting, residual calibration, and validation during model selection. After selection, the first 80% supplied the final base fit, and the last 20% supplied residual calibration. We re-estimated , standardization parameters, LSTMs, and GPRs using only that training date’s tracker data. All sequences on the other date were scored (400 or 380 targets, depending on direction). The two dates contain disjoint feed rates, so this design evaluates a joint change in date and operating condition. We report mean scores over ten training seeds per direction. A two-sided Student-t interval on mean RMSE summarizes seed-to-seed variability conditional on the measured dates.
The following metrics were used to evaluate model performance on held-out tracker observations. We report root mean square error (RMSE), coefficient of determination (), and maximum absolute error (MaxAE). The dimensional metrics are reported in micrometers. For Path A, the nominal 95% prediction interval is constructed as the final point prediction times the GPR predictive standard deviation [13]. For Path B, the conditional interval is , where is the residual GPR predictive standard deviation. This quadrature treats the two contributions as uncorrelated and holds the fitted slope and LSTM fixed. Empirical coverage and mean interval width are evaluated on the test targets. An additional interval calculation adds the variance of the point predictions across the 20 training seeds to the conditional variance. These are conditional, approximate intervals. They do not propagate uncertainty in the estimated transfer coefficient or fitted GPR hyperparameters, and the main calculation holds the LSTM fixed. The added seed variance describes sensitivity to initialization; it does not establish calibration under a change of date or feed. No separate allowance was estimated for timing mismatch or measurement-system bias.
4. Experimental Results and Discussion
4.1. Spatial Dependence Assessment and Transfer of the Interferometer Profile
Across the 24 interferometer positions, the centered mean profile spanned 111.1 m in each travel direction. At a fixed position and direction, the standard deviation across ten sweeps ranged from 0.48 to 4.56 m (Figure 4a). All five tracker positions fell inside the interferometer calibration range. For the eight combinations of tracker block and travel direction, the Pearson correlation between the centered tracker errors and the interpolated interferometer profile ranged from 0.9411 to 0.9818 (Figure 4b). These descriptive correlations use all 820 tracker readings. They quantify agreement in spatial shape across the observed operating conditions.
Figure 4.
Spatial transfer between instruments. (a) Direction-specific mean interferometer error after sweep centering, with bands of one across-sweep standard deviation. (b) Centered Pearson correlations for each tracker feed and travel direction. Squares indicate decreasing Y and triangles indicate increasing Y. (c) Bootstrap distribution of the transfer coefficient. The solid line gives the fitted coefficient and the dashed lines mark the 2.5th and 97.5th percentiles.
The common transfer coefficient fitted on the 546 base-training targets was , with a pooled centered correlation of 0.9717. The 95% percentile interval was over 1500 bootstrap resamples of the eight complete block-by-direction groups (Figure 4c). Separate diagnostic fits gave slopes of 1.1554 for negative travel and 1.1561 for positive travel. A common coefficient therefore captured a similar amplitude adjustment in both directions. The interval reflects variation among the eight sampled groups on this machine.
4.2. Overall Prediction Accuracy and Residual Characteristics
On the 78 validation targets, the lowest RMSE for Path A was 8.377 m with a rational quadratic kernel. Within Path B, a Matérn kernel with separate length scales and the full set of current predictors gave 9.291 m. The best candidate that excluded current position from the residual GPR gave 10.316 m. The dynamic LSTM in both Path B candidates omitted absolute position from its history. The selection therefore retained position for the final residual correction. Direct LSTM had a validation RMSE of 8.306 m.
All models were evaluated on the same laser-tracker test targets using identical metrics (RMSE, , MaxAE, and multi-threshold hit rates). These common scoring conditions do not make their prediction-time inputs identical; in particular, the two uncorrected LSTMs differ in access to current command information. Table 4 reports the final fit on 156 held-out targets. The scaled spatial profile alone had an RMSE of 42.793 m, consistent with the block offsets and time-varying deviations left after sweep centering. The Structural LSTM reduced RMSE to 8.504 m, which was 2.7% below the Direct LSTM value of 8.738 m. On the test set, Path A obtains an of 0.9626 and an RMSE of 8.052 m, while Path B reaches an of 0.9645 and an RMSE of 7.849 m. The residual GPR reduced the Structural LSTM’s RMSE by a further 7.7%. Path B had the lowest MaxAE (21.752 m) and the highest . The RMSE difference between the two GPR-corrected models was 0.203 m.
Table 4.
Performance on the pooled final 20% of the four date/feed blocks (). Hit rates are the percentages of absolute errors at or below each threshold. Boldface identifies the best value in each column. RMSE, root mean square error; , coefficient of determination; MaxAE, maximum absolute error.
The relationship between the predicted and measured values is presented in Figure 5a. The multi-threshold hit rates are summarized in Table 4, and the error distribution is plotted in Figure 5b. At 10 m, Structural LSTM had the largest hit rate (82.05%). At 20 m, Path A covered 154 of the 156 targets and Path B covered 153. The latter’s lower RMSE reflects the magnitudes of the residuals across the entire test set.
Figure 5.
Predictions on the 156 held-out tracker targets. (a) Path B predictions against measured positioning error, grouped by travel direction. The diagonal denotes equality. (b) Empirical cumulative distributions of absolute prediction error for the four learned models.
4.3. Sensitivity to Initialization and Feed Rate
Across 20 additional fits on the same split, the mean ± sample standard deviation of RMSE was m for Direct LSTM, m for Path A, m for Structural LSTM and m for Path B. Adding the residual GPR to the same fitted Structural LSTM reduced RMSE in all 20 pairs (Figure 6a). The reduction averaged 0.602 m and ranged from 0.065 to 0.889 m. In comparisons with different base learners, Path B had lower RMSE than Direct LSTM in 11 of 20 fits and lower RMSE than Path A in 15 of 20. All repetitions shared the same 156 targets, so the paired counts characterize sensitivity to training randomness on this split.
Figure 6.
Within-block RMSE by training seed and operating condition. (a) Each pair links Structural LSTM and Path B from the same fit on the same held-out targets. (b) RMSE by feed for the four learned models in the final single fit.
The adaptability of the proposed Path B model was evaluated at four feed rates in the final single fit (Figure 6b). Its RMSEs were 4.280, 4.169, 11.975 and 7.662 m at 3000, 4000, 5000 and 6000 mm/min, respectively. All four learned models had their largest block RMSE at 5000 mm/min. At 6000 mm/min, the residual correction increased the Structural LSTM error from 6.946 to 7.662 m.
4.4. Adaptability to Different Operating Conditions Across Tracker Dates
Training on 10 November 2025 (3000 and 4000 mm/min) and testing on 11 November (5000 and 6000 mm/min) gave mean RMSEs of 48.586 m for Direct LSTM and 16.029 m for Structural LSTM over ten seeds. The relative reduction was 67.0%. In the reverse transfer, the corresponding means were 50.056 and 21.430 m, a 57.2% reduction (Figure 7). The source-date transfer coefficients were 1.0734 and 1.2087, respectively. Mean rose from to 0.865 in the first direction and from to 0.717 in the reverse direction. A negative mean indicates that the average squared error across fits exceeded that of predicting the test-set mean.
Figure 7.
RMSE after transfer to all tracker windows on the other date. (a) Training on 10 November 2025 and testing on 11 November (380 source and 400 test windows). (b) Training on 11 November and testing on 10 November (400 source and 380 test windows). Points are means across ten training seeds. Bars are 95% Student t intervals for the mean across seeds with the test date fixed. The spatial-only predictor is deterministic for a fixed training split. Direct LSTM uses only historical position inputs; Structural LSTM additionally uses current command position and direction through the prior. The bars describe initialization variability, not uncertainty over new measurement dates.
Adding the residual GPR lowered the mean RMSE from 16.029 to 15.075 m when testing on 11 November. It increased the reverse-transfer RMSE from 21.430 to 22.869 m. The Structural LSTM had lower RMSE than the historical-input Direct LSTM in both transfers. However, the 67.0% and 57.2% reductions quantify the difference between these complete predictors, including their different learning targets and access to current commanded position and direction. They cannot be interpreted as the isolated gain from the interferometer-derived spatial prior. With one machine, two tracker dates and a distinct pair of feeds on each date, the experiment measures their combined shift. The common interferometer profile was acquired on 9 July 2026, so both tests assess retrospective transfer conditional on this calibration.
Table 5 additionally brings together the existing Path A and Path B results, for which both final predictors receive the same seven current features through their residual GPRs. Across the ten seeds, the mean cross-day RMSEs were 48.429 versus 15.075 m when testing on the higher feeds, and 49.104 versus 22.869 m in the reverse transfer. These results show that Path B also outperformed a predictor with access to current position. Nevertheless, the two paths use different base learners and selected residual kernels; this comparison cannot substitute for an additional Direct LSTM trained with current position and direction as explicit inputs, or establish how much of the gain comes from the spatial prior alone.
Table 5.
Existing results for the two complete predictors with current positional information. Both residual GPRs use the four current temperatures, feed, direction, and position. The within-block row is the final single fit; cross-day rows are mean ± sample standard deviation over ten seeds. Relative reductions are computed from the displayed models’ unrounded RMSEs. No additional LSTM training is represented by this table.
4.5. Uncertainty Quantification
On the within-block test set, the nominal 95% prediction intervals encompass 129 of 156 observations (82.69%) for Path B, with a mean width of 22.25 m. Coverage varied from 38/38 at 4000 mm/min to 23/42 at 5000 mm/min (Figure 8). The interval width varies across the test sequence, reflecting both the spatial-prior dispersion and the GPR predictive uncertainty. Path A achieved 85.26% coverage at a mean width of 22.15 m. Adding the between-seed prediction variance to the conditional variance, while retaining the final fit’s point prediction, raised Path B coverage to 84.62% at 23.80 m mean width. For Path B, 27 of 156 observations (17.31%) fell outside the nominal 95% intervals, and coverage in the 5000 mm/min block was only 54.76% (23/42). Thus, the intervals are empirically undercalibrated on this test set, including after the seed-variance addition, and should not be treated as validated 95% error bounds.
Figure 8.
Path B signed residuals (measured minus predicted) on the held-out portion of each operating block, in acquisition order within each block. Feeds in mm/min are (a) 4000, (b) 3000, (c) 5000, and (d) 6000. Shading shows the nominal conditional interval expressed about zero ( predictive standard deviations). Highlighted observations fall outside that interval.
The present uncertainty estimates are useful as descriptive measures of model dispersion, but the observed coverage does not justify a 95% reliability claim for compensation decisions. Possible contributors include unpropagated parameter uncertainty, model mismatch, and changes in operating conditions; their individual contributions have not been identified. In particular, the reported within-block coverage does not validate coverage on an unseen day. Practical deployment would require interval recalibration using development data independent of the final test set and subsequent validation on additional dates and feed conditions, together with a quantified acquisition-timing assessment. Until then, these intervals should not be used alone to certify positioning tolerances or set automatic compensation limits.
5. Conclusions
The laser tracker primarily supports temporal modeling of the positioning error remaining after removal of the spatial term, whereas the laser interferometer provides a direction-specific spatial prior. Across the eight feed and direction groups, centered correlations ranged from 0.941 to 0.982. The tracker training data scaled the profile by a factor of 1.1557, with a 95% group-bootstrap interval of [1.0774, 1.2338]. This agreement supports transferring the shape over the measured Y-axis range. The prior alone had an RMSE of 42.793 m on the within-run test, so predicting the total error also required an estimate of the level and its changes during operation.
On the held-out ends of the four tracker blocks, the historical-input Direct LSTM and the Structural LSTM achieved RMSEs of 8.738 and 8.504 m, respectively. This comparison includes the change in prediction-time positional information. GPR reduced the Structural LSTM RMSE further to 7.849 m, with and a maximum absolute error of 21.752 m. The GPR step improved on its paired structural LSTM in each of 20 initializations of this split.
The largest reduction came from the structural model when both the date and feed range changed. Relative to direct sequence learning, its mean RMSE fell from 48.586 to 16.029 m when testing on the higher feeds and from 50.056 to 21.430 m when testing on the lower feeds. GPR brought the first value down to 15.075 m and raised the second to 22.869 m. These reciprocal tests support the performance of the complete spatially informed predictor under the measured joint date/feed shifts. They do not attribute the 67.0% and 57.2% reductions exclusively to the spatial-prior strategy, because the original Direct LSTM does not receive current command position and direction. The Path A–Path B comparison gives both complete predictors access to current position, but an additional LSTM comparison with equivalent positional information remains necessary to separate the effects.
Point-prediction accuracy and uncertainty calibration must be assessed separately. Path B’s nominal 95% intervals achieved only 82.69% empirical coverage, or 84.62% after adding seed variance, and cannot currently support a validated 95% operational error guarantee. Moreover, acquisition-system pairing supplies record-level temperature/position association without a quantified cross-system timing error. Independent interval recalibration, timing verification, and testing on new runs are required before using the uncertainty estimates to set compensation limits.
The generalization capability of the proposed model across different axes, machine tools, and operating ranges requires further verification. Both date holdouts used a spatial profile acquired after the tracker experiments. A prospective experiment could acquire the interferometer reference first and repeat the same feeds in both directions over several days. That design would separate feed effects from day-to-day changes and allow interval coverage to be assessed on independent runs. Further validation will also consider more demanding operating conditions, including heavy cutting loads, complex speed profiles, and multi-axis interactions.
Author Contributions
Conceptualization, W.G. and C.C.; methodology, Z.Y.; formal analysis, Z.Y., J.G. and Z.L.; investigation, J.G., Z.L. and Y.G.; data curation, J.G.; writing—original draft preparation, W.G.; writing—review and editing, C.C.; supervision, C.C.; project administration, W.G.; validation, C.C. and Y.G. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The gantry-machine data presented in this study are available on request from the corresponding author. The data are not publicly available due to containing confidential performance information of industrial machine tools, which requires authorization from the corresponding author for distribution. The external cold-reference experiment uses the public three-axis positioning dataset of Farias and Bordinassi [25].
Conflicts of Interest
The authors declare no conflict of interest.
Appendix A. Cold-Reference Modeling on a Separate Three-Axis Machine
The gantry experiment uses a profile transferred between instruments. A separate benchmark examines the simpler case in which one instrument measures both a cold reference and subsequent positioning errors. The public dataset of Farias and Bordinassi contains Renishaw XL-80 measurements on a ROMI Discovery 560 machining center [14,25]. One cold acquisition and 7, 10, and 6 warmed acquisitions are available for the X, Y, and Z axes, respectively. Each acquisition contains five readings per position and travel direction at 23, 17, and 21 nominal positions on the three axes, with 25 mm spacing. There are 5180 readings, of which 610 are cold-state readings. Temperatures are recorded at the start and end of each acquisition, so this benchmark evaluates a static correction.
At position p and direction d, the mean of the five cold readings defines . We obtained the signed error e in micrometers by multiplying measured minus nominal position in millimeters by 1000. The resulting sign differs from the published error column for 90 warmed Z-axis readings at 25 or 50 mm. We used the position-derived error in the primary analysis and repeated the comparisons with the published error column. For models that use the cold reference, the regression target is the increment and the prediction adds back.
Table A1 gives the acquisition-level partition. The five readings at each position and direction were averaged for fitting. The two final warmed acquisitions of each axis were withheld, and all their individual readings were scored. The predictors were position, direction, and the ambient and two bearing temperatures at acquisition start. Models were selected on the validation acquisition and refitted on training and validation acquisitions, with development-only feature scaling. Table A2 reports the individual-reading results. Figure A1 shows the forward-travel profiles from the last held-out acquisition on each axis.
Table A1.
Allocation of warmed acquisitions on the external machine. Each fitting mean contains five readings.
We compared the fixed cold reference, interaction ridge regression of the increment, direct GPR on total error, and GPR on the increment. Ridge used the five predictors, squared position, and position multiplied by direction and each temperature. The ridge penalty was selected from . For both GPR variants, validation RMSE selected ARD Matérn on X and Y and the squared-exponential kernel on Z. Signal variance and length scales were fitted by marginal likelihood with fixed bounds. The noise variance for a fitting mean equaled the pooled within-position-and-direction repeat variance divided by five. The conditional intervals for individual predictions added the full repeat variance to the latent variance and used a multiplier of 1.96.
On X, cold-reference GPR reduced RMSE from 7.93 to 6.34 relative to ridge (Table A2). Each of the two held-out acquisitions favored cold-reference GPR in RMSE, although ridge had the lower pooled MaxAE. On Y, ridge gave the lowest RMSE in both acquisitions. On Z, the 0.32 advantage of cold-reference GPR over ridge depended on the target convention. Using the published error column gave RMSEs of 8.80, 8.01, and 9.07 for ridge, direct GPR, and cold-reference GPR, respectively. The X and Y results were unaffected by this change.
Figure A1.
Forward-travel profiles from the final held-out acquisition of each external-machine axis. (a) X, acquisition 7. (b) Y, acquisition 10. (c) Z, acquisition 6. Points and error bars show the mean and sample standard deviation (SD) of five readings. Curves show the predicted total positioning error.
Table A2.
Performance on individual readings from the two held-out acquisitions of each axis. Error metrics and mean prediction interval width are in . Coverage is for nominal 95% intervals. Bold entries identify the lowest RMSE on each axis. MAE denotes mean absolute error.
Cold-reference GPR covered at least 98.33% of the held-out readings on each axis, with mean interval widths of 43.44–55.24 . The intervals condition on the fitted kernels and the common cold reference. The axis dependence and the Z-axis sign discrepancy limit the conclusions that can be drawn about transferring a spatial reference to other machines.
References
- Shi, H.; Zhang, B.; Mei, X.; Wang, H.; Zhao, F.; Geng, T. Thermal error modelling and compensation of CNC lathe feed system based on positioning error measurement and decoupling. Measurement 2024, 231, 114633. [Google Scholar] [CrossRef] [Scilit]
- Cao, L.; Park, C.-H.; Chung, S.-C. Real-time thermal error prediction and compensation of ball screw feed systems via model order reduction and hybrid boundary condition update. Precis. Eng. 2022, 77, 227–240. [Google Scholar] [CrossRef] [Scilit]
- Han, J.; Wang, L.; Wang, D.; Li, X.; Kizaki, T.; Sugita, N. Understanding thermodynamic mechanisms of 6-DOF thermal errors in complex manufacturing feed systems via a novel interpretable network with learned activation functions. Int. J. Mach. Tools Manuf. 2026, 218, 104390. [Google Scholar] [CrossRef] [Scilit]
- Lei, L.; Sun, C.; Xie, Z.; Liang, L.; Fu, Y.; Zhang, B. Development of a spatial accuracy compensation method based on multi-beam laser interferometer. Sci. Rep. 2025, 15, 16756. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hou, L.; Zhang, Y.; Jing, L.; Du, Z.; Huang, N.; Zhu, L. A comprehensive error evaluation method for non-rigid body gantry machine tools considering quasi-static crosstalk based on optimized multilateration measurement. Measurement 2024, 230, 114476. [Google Scholar] [CrossRef] [Scilit]
- Li, H.; Wang, Y.; Wang, Y.; Yu, Y.; Wang, Z.; Su, W.; Zhu, Y.; Yang, L.; Ma, C.; Li, J.; et al. Principle and Method of Base Station Calibration Based on a Physical Standard for Multi-Station Laser Tracking Measurement. Machines 2026, 14, 614. [Google Scholar] [CrossRef] [Scilit]
- Wu, C.; Xiang, S.; Xiang, W. Spindle thermal error prediction approach based on thermal infrared images: A deep learning method. J. Manuf. Syst. 2021, 59, 67–80. [Google Scholar] [CrossRef] [Scilit]
- Wang, T.; Guo, P.; Wang, J.; Mustafa, G.; Meng, X.; Chen, X.; Zhang, S. A decoupling modeling method for thermal error prediction of machine tool linear feed axes applicable to cross-conditions. Appl. Therm. Eng. 2026, 283, 128940. [Google Scholar] [CrossRef] [Scilit]
- Chen, H.; Huang, Y.; Qiu, C.; Ning, X.; Wang, P.; Yang, K. Hybrid-Mechanism Deep Learning Modeling for Machine Tool Thermal Error: Robust Prediction via Few-Sample Learning. Machines 2026, 14, 399. [Google Scholar] [CrossRef] [Scilit]
- Weng, L.; Kizaki, T.; Ma, C.; Gao, W.; Kono, D. A review of robust thermal error reduction of machine tools. Int. J. Mach. Tools Manuf. 2025, 209, 104298. [Google Scholar] [CrossRef] [Scilit]
- Liu, J.; Ma, C.; Gui, H.; Wang, S. Transfer learning-based thermal error prediction and control with deep residual LSTM network. Knowl.-Based Syst. 2022, 237, 107704. [Google Scholar] [CrossRef] [Scilit]
- Chuang, C.-C.; Lin Chi, Z.-W.; Kuo, T.-C.; Chang, C.-J.; Hsieh, W.-H. Development of a Transfer Learning Technique for Rapid Adaptation of Thermal Compensation Models to Long-Term Machine Thermal Behavior Changes. Machines 2026, 14, 309. [Google Scholar] [CrossRef] [Scilit]
- Kaftan, P.; Mayr, J.; Porquez, F.; Pomodoro, K.; Trombert, D.; Wegener, K.; Bambach, M. Reducing thermal errors with confidence: Uncertainty-based compensation for precision machine tools. CIRP J. Manuf. Sci. Technol. 2025, 61, 400–409. [Google Scholar] [CrossRef] [Scilit]
- Farias, A.; Seriacopi, V.; dos Santos, M.O.; Bordinassi, E.C. 3-axis computer numerical control machine positioning error dataset for thermal error compensation. Data Brief 2024, 57, 110942. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, Y.-C.; Li, K.-Y.; Tsai, Y.-C. Spindle Thermal Error Prediction Based on LSTM Deep Learning for a CNC Machine Tool. Appl. Sci. 2021, 11, 5444. [Google Scholar] [CrossRef] [Scilit]
- Zeng, S.; Ma, C.; Liu, J.; Li, M.; Gui, H. Sequence-to-sequence based LSTM network modeling and its application in thermal error control framework. Appl. Soft Comput. 2023, 138, 110221. [Google Scholar] [CrossRef] [Scilit]
- Wei, X.; Ye, H.; Miao, E.; Pan, Q. Thermal error modeling and compensation based on Gaussian process regression for CNC machine tools. Precis. Eng. 2022, 77, 65–76. [Google Scholar] [CrossRef] [Scilit]
- Jin, C.; Wu, B.; Hu, Y.; Yi, P.; Cheng, Y. Thermal characteristics of a CNC feed system under varying operating conditions. Precis. Eng. 2015, 42, 151–164. [Google Scholar] [CrossRef] [Scilit]
- Wang, T.; Shi, J.; Sun, J.; Zhang, S. Position error decomposition and prediction of CNC machine tool under thermal–mechanical coupling loads. Int. J. Adv. Manuf. Technol. 2025, 137, 199–216. [Google Scholar] [CrossRef] [Scilit]
- Guo, Z.; Liu, S.; Wang, H. Dynamic modeling and experimental verification for the feeding system of a gantry machine tool based on thermal-mechanical coupling. Int. J. Adv. Manuf. Technol. 2016, 85, 227–236. [Google Scholar] [CrossRef] [Scilit]
- Pérez Muñoz, P.; Albajez García, J.A.; Santolaria Mazo, J. Analysis of the initial thermal stabilization and air turbulences effects on Laser Tracker measurements. J. Manuf. Syst. 2016, 41, 277–286. [Google Scholar] [CrossRef] [Scilit]
- Rerucha, S.; Hola, M.; Oulehla, J.; Lazar, J.; Mikel, B.; Cip, O. Thermally compensated common-path differential interferometer with reduced long-term zero-drifts. Meas. Sci. Technol. 2024, 35, 095021. [Google Scholar] [CrossRef] [Scilit]
- Zhang, C.; Gao, F.; Yan, L. Thermal error characteristic analysis and modeling for machine tools due to time-varying environmental temperature. Precis. Eng. 2017, 47, 231–238. [Google Scholar] [CrossRef] [Scilit]
- Straka, M.; Mareš, M.; Horejš, O.; Sulitka, M.; Je, S.; Kim, H.; Kim, C.-J. Study on applicability of touch trigger probes in issues of on-machine measurement of machine tool thermal errors. CIRP J. Manuf. Sci. Technol. 2025, 63, 522–532. [Google Scholar] [CrossRef] [Scilit]
- Farias, A.; Bordinassi, E. Dataset for Thermal Error Compensation in a 3-Axis CNC Machine, Version 1; Mendeley Data: Amsterdam, The Netherlands, 2024. [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








