Abstract:Coordinate measuring machines (CMMs), as core equipment in precision measurement and advanced manufacturing, have their measurement accuracy constrained by both geometric and non-geometric errors. Traditional error compensation methods based on laser interferometry suffer from low efficiency and incomplete compensation models, failing to meet the increasingly stringent accuracy requirements. To address these challenges, this paper proposes a comprehensive error compensation approach that integrates geometric error modeling with neural network techniques to achieve efficient and precise correction of complex errors. For geometric errors, an error model is constructed based on rigid body kinematics, and an adaptive differential evolution algorithm is employed to realize high-precision parameter identification. For non-geometric errors, a novel neural network leveraging neighborhood error features is designed, which utilizes a multi-head self-attention mechanism to deeply capture the error distribution characteristics within the measurement space. Compared to traditional networks that rely solely on the target point position as input, the proposed network significantly improves prediction accuracy. Experimental results demonstrate that, after compensation using the proposed method, the maximum probing error of a CMM with a nominal accuracy of 2.8+L/400 μm is reduced to 0.35 μm, and the length measurement error is improved to 0.5+L/400 μm, showing clear enhancement over the factory-specified accuracy and fully validating the method′s applicability and practicality. Furthermore, compared with conventional compensation techniques, the proposed approach exhibits significant advantages in compensating both geometric and non-geometric errors, achieving robust, efficient, and accurate comprehensive error compensation. This method offers a feasible and effective solution for error control and performance optimization in CMMs and other precision measurement instruments, holding substantial engineering significance and broad application prospects.