A machine motion trajectory measuring device for measuring a motion trajectory of a machine position, wherein the machine position is a relative position of a tool of a machine with respect to a work table controlled by a motor, a motor position of the motor being detected by a detector, and the motor is driven such that the detected motor position follows a commanded position, the machine motion trajectory measuring device comprising:
- an accelerometer for measuring acceleration of the tool of the machine or the work table;
- and
- a motion trajectory measuring unit which measures the motion trajectory of the machine position by
- obtaining the measured acceleration measured by the accelerometer,
- determining motion trajectory error occurring regions, in which a trajectory error is expected to occur, based on a rate of change of the acceleration obtained by differentiating the commanded position three times and exceeding a preset threshold value, and a reversal of a sign of a commanded velocity obtained by differentiating the commanded position,
- extracting the measured acceleration at the motion trajectory error occurring regions,
- integrating the measured acceleration at the motion trajectory error occurring regions twice to compute the machine position,
- correcting errors for the computed machine position such that a profile of the corrected machine position coincides with a profile of the detected motor position or with a profile of an estimated position estimated using a model for simulating a response of the machine position to the commanded position, and
- obtaining a trajectory of the corrected machine position as the motion trajectory of the machine position.