Gear tooth machine tool position error automatic detection and asynchronous compensation method, system and storage medium

By constructing a calibration matrix and displacement reference, the tool position error of the gear turning machine is separated. The asynchronous compensation method solves the shortcomings of tool position error detection and compensation in the existing technology, and improves the gear machining accuracy and consistency.

CN122425554APending Publication Date: 2026-07-21CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2026-05-27
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing gear turning machines have difficulty in achieving automatic detection and non-disruptive compensation of tool position errors during the machining process. In particular, they cannot effectively separate tool holder eccentricity errors, machine tool dynamic drift, and workpiece thermal expansion errors, resulting in unstable tooth thickness and tooth profile accuracy.

Method used

By constructing a calibration matrix and displacement reference, and combining displacement sensor detection, the errors of tool holder eccentricity, machine tool thermal deformation and workpiece thermal expansion are separated. An asynchronous compensation method is used to quickly detect these errors in the non-cutting stage and compensate for them before the next workpiece is processed, thus avoiding real-time rewriting of servo pulses.

Benefits of technology

It improves the tooth thickness accuracy and cross-bar spacing stability in gear machining, reduces the risk of tool marks and tool interference on the tooth surface, and enhances the consistency and automation of batch processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122425554A_ABST
    Figure CN122425554A_ABST
Patent Text Reader

Abstract

The present application relates to gear processing machine tool technical field, specifically tooth turning machine tool position error automatic detection and asynchronous compensation method, system and storage medium, its method includes obtaining the reading information of displacement sensor in tooth turning machine, the calibration matrix is constructed based on the reading information of displacement sensor;The initial displacement vector is obtained by detecting the position of the cutter through the displacement sensor, and the actual displacement vector of the cutter is obtained based on the initial displacement vector and the calibration matrix;The displacement reference of the cutter is calculated based on the actual displacement vector;In the non-cutting processing stage of the tooth turning machine, the current position of the cutter is detected, and the comprehensive compensation vector of the cutter is calculated based on the displacement reference and the current position of the cutter;The effective compensation vector is calculated according to the comprehensive compensation vector, and the compensation operation of the cutter position is executed asynchronously with the tooth turning machine processing based on the effective compensation vectorThe present application can realize the error automatic detection and undisturbed compensation of tooth turning machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gear processing machine tool technology, specifically to a method, system, and storage medium for automatic detection and asynchronous compensation of tool position error on gear turning machines. Background Technology

[0002] A gear turning machine (also known as a gear scraping machine) is a high-efficiency gear machining equipment that uses the generating motion between the cutting tool and the workpiece to achieve tooth profile cutting. During gear turning, the precise position of the cutting tool (cutting tool) relative to the workpiece directly affects the tooth thickness accuracy, which is usually indirectly controlled by the span-bar distance M value. However, during continuous operation of the machine tool, factors such as spindle heating, bed thermal deformation, changes in the center of gravity of moving parts, and guideway friction can cause micrometer-level offsets in the actual positions of the cutting tool along the X and Y axes. The Z-axis motion, primarily the axial feed of the gear, traverses the entire gear in every machining process. Therefore, Z-axis errors have little impact on the accuracy of gear grinding.

[0003] Existing CNC machine tool error compensation methods typically involve arranging temperature sensors, displacement sensors, and other detection devices on the machine tool body, spindle, feed axes, or tool positions to establish an error database or compensation command database. Based on real-time detection data, corresponding compensation commands are invoked to correct the machine tool's machining motion. While this method can achieve a certain degree of online error compensation, it relies heavily on a pre-established error database or operating condition matching relationship. It struggles to independently identify and separate errors caused by tool holder eccentricity, tool holder manufacturing errors, spindle runout, and thermal expansion due to workpiece temperature rise during gear turning. Especially in gear turning, the relative positional error between the tool and workpiece directly affects tooth thickness, span, and tooth profile accuracy. Mixing tool holder eccentricity errors, spindle runout errors, and machine tool thermal drift errors for compensation can easily lead to miscompensation or overcompensation.

[0004] Furthermore, some existing error detection methods detect rotation center errors using standard spheres, ball-head probes, or multi-sensor structures. These methods primarily target the detection and compensation of rotary tool center errors or rotation axis errors in five-axis machine tools. Their detection objects, error sources, and compensation targets differ from those of integrated tool-workpiece error compensation in gear turning machines, and they typically do not incorporate compensation for radial thermal expansion errors of the workpiece during gear turning. Therefore, there is an urgent need for an automatic detection and compensation method suitable for gear turning machining scenarios, capable of simultaneously achieving tool holder eccentricity error separation, machine tool dynamic drift detection, workpiece thermal expansion correction, and disturbance-free compensation. Summary of the Invention

[0005] The purpose of this invention is to provide a method, system, and storage medium for automatic detection and asynchronous compensation of tool position error in gear turning machines, so as to solve the technical problem that existing gear turning machines cannot simultaneously achieve automatic error detection and non-disruptive compensation.

[0006] In a first aspect, the present invention provides a method for automatic detection and asynchronous compensation of tool position error in a gear turning machine, comprising the following steps: Obtain the readings of the displacement sensors in the gear turning machine, and construct a calibration matrix based on the readings of the displacement sensors; The initial displacement vector is obtained by detecting the position of the tool using a displacement sensor, and the actual displacement vector of the tool is obtained based on the initial displacement vector and the calibration matrix. The displacement reference of the tool is calculated based on the actual displacement vector; During the non-cutting machining phase of the gear turning machine, the current position of the tool is detected, and the comprehensive compensation vector of the tool is calculated based on the displacement reference and the current position of the tool. The effective compensation vector is calculated based on the comprehensive compensation vector, and a compensation operation asynchronous with the gear turning machining is performed on the tool position based on the effective compensation vector.

[0007] The significant advantages of this invention are as follows: By constructing a calibration matrix displacement sensor to calculate the displacement reference, this invention can correct the deviations in the detection values ​​of the displacement sensor, such as the installation angle error, sensitivity error, and cross-coupling error, when calculating the comprehensive compensation amount. This enables the displacement sensor readings to be accurately converted into the actual displacement in the machine tool coordinate system, thereby improving the long-term stability and resistance to installation errors of the detection system.

[0008] Furthermore, this invention employs rapid detection during the non-cutting gaps in loading and unloading after each workpiece is processed, and asynchronously compensates the tool position based on the effective compensation vector before starting the next workpiece processing program. It does not rewrite the servo pulse or motion trajectory in real time during the current tooth surface cutting interpolation process, thus avoiding the risk of tooth surface tool marks, tooth thickness abrupt changes, or tool interference caused by compensation abrupt changes.

[0009] Furthermore, the step of constructing the calibration matrix based on the reading information of the displacement sensor includes: The change in displacement sensor reading at the calibration measurement point is calculated based on the reading information of the displacement sensor. The actual displacement of the computer tool coordinate system is calculated based on the change in displacement sensor readings at the calibrated measurement points. A coefficient matrix is ​​constructed based on the change in displacement sensor readings at the calibration measurement points, an observation vector is constructed based on the actual displacement of the machine tool coordinate system, and a system of linear equations is constructed based on the coefficient matrix and the observation vector. The calibration matrix is ​​obtained by solving the system of linear equations.

[0010] Furthermore, the step of calculating the tool displacement reference based on the actual displacement vector includes: Obtain coordinate data of one or more points based on the actual displacement vector, and construct a circle equation based on the coordinate data of one or more points; Construct an error function based on the circle equation; The displacement datum is obtained by calculating the optimal center coordinates of the circle based on the circle equation and error function.

[0011] By sampling multiple angular positions of the outer circle of the tool holder and fitting the center, periodic errors such as tool holder manufacturing eccentricity, tool holder installation eccentricity, and spindle rotation runout can be separated from the detection results. This ensures that the final offset mainly reflects the real positional changes caused by machine tool thermal deformation, mechanical wear, and drift of moving parts, thus avoiding the miscompensation of tool holder shape errors as machine tool errors.

[0012] Furthermore, the step of calculating the comprehensive compensation vector of the tool based on the displacement reference and the current position of the tool includes: Calculate the current optimal center coordinates based on the current position of the tool, and calculate the center coordinate offset of the tool based on the current optimal center coordinates and the displacement reference. The workpiece temperature is obtained at one or more locations. The workpiece thermal expansion is calculated based on the workpiece temperature, and the workpiece thermal expansion is decomposed into a first workpiece thermal expansion component and a second workpiece thermal expansion component. The comprehensive compensation vector is calculated based on the center coordinate offset, the thermal expansion components of the first and second workpieces.

[0013] This solution not only detects the positional drift of the tool side, but also incorporates the dimensional changes caused by the temperature rise during workpiece processing into the compensation system by acquiring more temperature information and calculating the thermal expansion of the workpiece. This achieves comprehensive compensation for tool position error and workpiece thermal deformation error, thereby improving the tooth thickness accuracy, cross-pitch stability and batch processing consistency of gears after machining.

[0014] Furthermore, the step of calculating the effective compensation vector based on the comprehensive compensation vector includes: Calculate the compensation increment vector based on the comprehensive compensation vector; The first and second thresholds are constructed based on the comprehensive compensation vector; The effective compensation vector is determined based on the compensation increment vector, the first threshold, and the second threshold: When the magnitude of the compensation increment vector is less than or equal to the first threshold, the current comprehensive compensation vector is taken as the effective compensation vector. When the magnitude of the compensation increment vector is greater than the first threshold and the magnitude of the compensation increment vector is less than or equal to the second threshold, the compensation increment vector is weighted and smoothed to obtain the effective compensation vector. When the magnitude of the compensation increment vector exceeds the second threshold, the compensation vector that was effective in the previous processing cycle remains effective and an alarm is triggered.

[0015] Furthermore, when constructing the first threshold and the second threshold based on the comprehensive compensation vector, the same detection position of the tool is repeatedly detected a preset number of times, and the standard deviation of the comprehensive compensation vector magnitude is calculated. The first threshold is calculated based on the standard deviation of the comprehensive vector magnitude, and the second threshold is obtained based on the first threshold.

[0016] Secondly, the present invention provides an automatic detection and asynchronous compensation system for the position error of a gear turning machine tool, applicable to the aforementioned automatic detection and asynchronous compensation method for the position error of a gear turning machine tool. The system includes a gear turning machine body, a displacement detection unit, a temperature detection unit, a CNC unit, and a host computer. The gear turning machine body includes a cutting tool used to process a workpiece. The displacement detection unit detects the displacement of the cutting tool, and the temperature detection unit detects the temperature of the workpiece. The host computer obtains an effective compensation vector based on the detection results of the displacement and temperature detection units. The CNC unit performs compensation control on the position of the cutting tool in the gear turning machine body based on the effective compensation vector.

[0017] Furthermore, the displacement detection unit includes a first displacement sensor and a second displacement sensor. The first displacement sensor is used to detect the position of the tool in the X-axis direction, and the second displacement sensor is used to detect the position of the tool in the Y-axis direction.

[0018] Furthermore, the temperature detection unit includes a first temperature sensor, a second temperature sensor, and a third temperature sensor. The first temperature sensor is used to detect the temperature at the tip circle position in the middle of the tooth width of the workpiece to be processed. The second temperature sensor detects the temperature at the root circle in the middle of the tooth width of the workpiece to be processed. The third temperature sensor is used to detect the temperature of the upper surface of the workpiece to be processed.

[0019] Thirdly, the present invention provides a computer-readable storage medium containing a computer program, wherein the computer program is stored thereon, characterized in that, when the computer program is executed by one or more processors, it implements the steps of the above-described method for automatic detection and asynchronous compensation of tool position error of a gear turning machine. Attached Figure Description

[0020] Figure 1 This is a flowchart of the automatic detection and asynchronous compensation method for the position error of a gear turning machine tool in an embodiment of the present invention; Figure 2 This is a schematic diagram of the automatic detection and asynchronous compensation system for the tool position error of a gear turning machine in an embodiment of the present invention; Figure 3 for Figure 2 AA section view in the middle; Figure 4 This is a schematic diagram of the displacement sensor mounting protective housing in an embodiment of the present invention; Figure 5 This is a schematic diagram of the internal structure of the gear turning machine body in an embodiment of the present invention; In the figure: gear turning machine body 1, machine tool 101, machine tool housing 102, machining table 103, first slide plate 104, second slide plate 105, tool holder 106, tool spindle 107, tool holder 108; Displacement detection unit 2, first displacement sensor 201, second displacement sensor 202, protective housing 203; Temperature detection unit 3, first temperature sensor 301, bracket 302. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0022] See appendix Figure 1 The automatic detection and asynchronous compensation method for tool position error of a gear turning machine shown includes the following steps: S1. Obtain the readings of the displacement sensor in the gear turning machine and construct a calibration matrix based on the readings. The displacement sensor is a high-precision contact type. When obtaining the readings, the gear turning machine is preheated for 30 minutes. After the spindle and feed axis of the gear turning machine have stabilized due to thermal deformation, the machine tool is controlled to move within the range of the displacement sensor along the positive X, negative X, positive Y, and negative Y directions, respectively. The X, Y, and Z directions are determined relative to the plane of the machine tool during gear turning, representing the direction of tool movement. The specific direction indicators for the X, Y, and Z directions are shown in the appendix. Figure 2 As shown, the machine tool's movement step distance is 0.1 mm, and the error range during the machine tool's movement is ±0.3 mm.

[0023] The steps for constructing the sensor calibration matrix based on the readings from the displacement sensor include: A1. Calculate the change in displacement sensor reading at the calibration measurement point based on the displacement sensor readings. Specifically, calculate the change in sensor reading at the calibration measurement point based on the initial readings of the X-axis and Y-axis contact displacement sensors when the tool holder is in the initial calibration position, and the current readings of the X-axis and Y-axis contact displacement sensors when the tool holder moves to the calibration measurement point. The expression for the change in sensor reading at the calibration measurement point is: In the formula, For the first Changes in sensor readings at each calibrated measurement point For the first The change in displacement of the sensor in the X direction at each calibrated measurement point relative to the initial reading. For the first The change in the Y-axis displacement sensor at each calibrated measurement point relative to the initial reading. To determine the total number of calibration measurement points, For the first The current reading of the displacement sensor in the X direction at each calibrated measurement point. This is the initial reading of the displacement sensor in the X direction. For the first The current reading of the displacement sensor in the Y direction at each calibrated measurement point. This is the initial reading of the sensor in the Y direction.

[0024] A2. Calculate the actual displacement of the machine tool coordinate system based on the change in displacement sensor readings at the calibrated measurement points; the expression for the actual displacement of the machine tool coordinate system is: In the formula, For the first The actual displacement of the machine tool coordinate system at each calibration measurement point For the first The actual given displacement of each calibration measurement point relative to its initial calibration position in the X-axis of the machine tool coordinate system. For the first The actual given displacement of each calibration measurement point relative to its initial calibration position in the Y direction of the machine tool coordinate system is obtained from the machine tool coordinate readings of the CNC unit; The calibration residual in the X direction, The calibration residual in the Y direction, The main sensitivity coefficient of the sensor in the X direction is used to represent the proportion of the contribution of the sensor reading change in the X direction to the actual displacement in the X direction, and its ideal value is 1. The cross-sensitivity coefficient of the sensor in the X direction is used to represent the degree of influence of the sensor reading change in the Y direction on the actual displacement in the X direction, and its ideal value is 0. The main sensitivity coefficient of the sensor in the Y direction is used to represent the proportion of the contribution of the sensor reading change in the Y direction to the actual displacement in the Y direction. Its ideal value is 1. The cross-sensitivity coefficient of the sensor in the Y direction is used to represent the degree of influence of changes in sensor readings in the X direction on the actual displacement in the Y direction, and its ideal value is 0.

[0025] A3. Construct a coefficient matrix based on the displacement sensor readings at the calibration measurement points, construct an observation vector based on the actual displacement of the machine tool coordinate system, and build a system of linear equations based on the coefficient matrix and the observation vector; the expression for the coefficient matrix is: In the formula, The coefficient matrix, For the first The change in sensor reading in the X direction at each calibrated measurement point relative to the initial reading. For the first The change in the sensor reading in the Y direction at each calibrated measurement point relative to the initial reading.

[0026] The expression for the observation vector is: In the formula, For the observation vector, For the first The actual given displacement of each calibration measurement point relative to its initial calibration position in the X-axis of the machine tool coordinate system. For the first The actual given displacement of each calibration measurement point relative to its initial calibration position in the Y-axis of the machine tool coordinate system.

[0027] The expression for the system of linear equations is: In the formula, Let be the calibration parameter vector to be determined.

[0028] A4. The calibration matrix is ​​obtained by solving the linear equation system using the least squares method. Due to the large number of calibration measurement points... The value is usually greater than 2, therefore the linear equation system is an overdetermined system. The least squares method is used to solve it, minimizing the sum of squared residuals at all calibrated measurement points. The solution formula is: In the formula, For calibration parameter vector Find the vector The minimum value of the L2 norm square is obtained, that is, the minimum of the sum of squared residuals of all calibrated measurement points.

[0029] When performing the solution, when When invertible, the least squares solution of the calibration parameter vector is: In the formula, It is the transpose of the coefficient matrix.

[0030] The obtained calibration parameter vector is restored element-wise to obtain the calibration matrix, which is expressed as follows: In the formula, This is the calibration matrix.

[0031] S2. The initial displacement vector is obtained by detecting the tool position using a displacement sensor. The actual displacement vector of the tool is then obtained based on the initial displacement vector and the calibration matrix. A displacement reference is calculated based on the initial and actual displacement vectors. When constructing the initial displacement vector, the CNC unit on the gear turning machine calls a preset measurement program to control the X and Y feed axes, causing the tool holder with the tool mounted on it to move precisely to the detection positions of the X and Y displacement sensors. Once the tool holder reaches the preset reference position in the CNC program, the CNC unit triggers a spindle indexing rotation command, controlling the spindle to rotate at set angular intervals (e.g., every 120°), for a total of N rotations, where N≥3. At each angular position, the output reading of the displacement sensor is collected and recorded, and the initial displacement vector is constructed based on the displacement sensor reading. The expression for the initial displacement vector is: In the formula, Let this be the initial displacement vector. This represents the current reading of the X-axis displacement sensor when the tool holder reaches the detection position. This is the current reading of the Y-axis displacement sensor when the tool holder reaches the detection position.

[0032] The expression for the actual displacement vector is: In the formula, This is the actual displacement vector. This represents the actual displacement of the tool in the X-axis of the machine tool coordinate system. This represents the actual displacement of the tool in the Y-axis of the machine tool coordinate system.

[0033] The steps for calculating the displacement datum based on the actual displacement vector include: B1. Obtain coordinate data for one or more points based on the actual displacement vector. The coordinate data of each angle position in the actual displacement vector are the coordinate data for circle fitting. Process the coordinate data of one or more points using the least squares circle fitting algorithm, and construct a circle equation using the coordinate data of one or more points: In the formula, This represents the X-axis component of the actual displacement vector in the point coordinate data. This represents the Y-axis component of the actual displacement vector in the point coordinate data. Let X be the coordinate of the center of the circle to be determined. Let Y be the Y-axis coordinate of the center of the circle to be determined. To fit the radius of the circle B2. Constructing an error function based on the circle equation: In the formula, Let be the circle fitting error function, representing the sum of squares of the algebraic distance deviations from all measurement points to the fitted circle. It is used to measure the overall fit between the fitted circle and the coordinate data of each point. Minimize the solvable optimal circle center coordinates And the optimal circle radius.

[0034] B3. The displacement datum is obtained by calculating the optimal center coordinates based on the error function. Specifically, the error function is analyzed separately. Parameters in Find the partial derivatives, set all partial derivatives to zero, and establish a system of partial derivatives. Solve the system of equations to obtain the optimal coordinates of the circle center. The coordinate system of the center point eliminates the influence of tool holder manufacturing eccentricity and spindle runout errors, serving as the displacement reference for subsequent calculations. ,Right now .

[0035] S3. After each machining operation of a workpiece by the gear turning machine, the current position of the cutting tool is detected during the non-cutting machining phase of the gear turning machine, and the comprehensive compensation vector of the cutting tool is calculated based on the displacement reference and the current position of the cutting tool. Specifically, during the trial machining phase of the gear turning machine, after each workpiece is machined, the position of the cutting tool is quickly detected during the gap in the non-cutting machining phase before and after the workpiece is machined. When detecting the position of the cutting tool, the CNC unit of the gear turning machine controls the tool holder to move to the displacement sensor detection position along the same path and speed as in step S2. The spindle indexing rotation and least squares circle fitting are performed again to obtain the center coordinates of the outer circle of the cutting tool holder. The step of calculating the comprehensive compensation vector of the cutting tool based on the displacement reference and the current position of the cutting tool includes: C1. Calculate the current optimal center coordinates based on the current position of the tool. Then, calculate the tool's center coordinate offset based on the current optimal center coordinates and the displacement reference. This means calculating the offset of the center coordinates of the tool holder's outer circle relative to the center coordinates of the displacement reference. The center coordinate offset primarily reflects the tool holder position drift caused by thermal deformation and mechanical wear. The formula for calculating the center coordinate offset is: In the formula, This represents the coordinate offset of the outer circle center of the tool holder in the X-axis of the machine tool coordinate system. The X-coordinate of the center of the outer circle of the tool holder, obtained through least-squares circle fitting during the current machining cycle detection phase. The X-axis coordinate of the center of the outer circle of the tool holder, obtained through least-squares circle fitting during the initial calibration stage (displacement reference). This represents the coordinate offset of the outer circle center of the tool holder in the Y-axis of the machine tool coordinate system. The Y-coordinate of the center of the outer circle of the tool holder, obtained through least-squares circle fitting during the current machining cycle detection phase. The Y-coordinate of the center of the outer circle of the tool holder, obtained through least-squares circle fitting during the initial calibration stage (displacement reference).

[0036] C2. Calculate the thermal expansion of the workpiece according to the preset workpiece thermal expansion model, wherein the formula for calculating the thermal expansion of the workpiece is: In the formula, This is the amount of thermal expansion of the workpiece. For the workpiece at the reference temperature The pitch circle radius is obtained from the workpiece machining drawing. The coefficient of linear expansion of the workpiece material. The temperature of the first workpiece. The temperature of the second workpiece. The temperature of the third workpiece. The reference temperature is usually the temperature of the workpiece under standard measurement conditions, typically 20℃. The first workpiece temperature, the second workpiece temperature, and the third workpiece temperature are obtained by measuring the workpiece temperature through three infrared temperature sensors on the gear turning machine. The first workpiece temperature is the temperature at the tooth tip circle in the middle of the workpiece tooth width, the second workpiece temperature is the temperature at the tooth root circle in the middle of the workpiece tooth width, and the third workpiece temperature is the temperature of the upper end face of the workpiece.

[0037] The thermal expansion of the workpiece is decomposed into a first workpiece thermal expansion component and a second workpiece thermal expansion component. Specifically, in this embodiment, it is decomposed into an X-axis component and a Y-axis component according to the feed direction: In the formula, This represents the X-axis component of the workpiece's thermal expansion. The radial feed angle of the tool relative to the workpiece center is the angle between the line connecting the tool cutting contact point and the workpiece center in the machine tool plane and the X-axis. This represents the Y-axis component of the workpiece's thermal expansion. Let be the direction cosine of the radial feed direction angle of the tool relative to the workpiece center in the Y-axis direction. It is the direction cosine of the radial feed direction angle of the tool relative to the center of the workpiece in the X-axis direction.

[0038] C3. The comprehensive compensation vector is calculated based on the center coordinate offset, the thermal expansion components of the first and second workpieces, where the formula for calculating the comprehensive compensation vector is: In the formula, To comprehensively compensate for the components of the vector in the X-axis of the machine tool coordinate system, This is to provide the component of the comprehensive compensation vector in the Y-axis of the machine tool coordinate system.

[0039] S4. Calculate the effective compensation vector based on the comprehensive compensation vector, and perform asynchronous compensation on the tool position based on the effective compensation vector. Specifically, when the gear turning machine enters the normal machining stage, after obtaining the comprehensive compensation vector for the current machining cycle, the comprehensive compensation vector is not immediately written into the CNC unit. Instead, the comprehensive compensation vector is first smoothed or limited to obtain the effective compensation vector. The calculation steps for the effective compensation vector include: D1. Calculate the compensation increment vector based on the comprehensive compensation vector. Specifically, in this embodiment, the compensation increment vector is calculated based on the effective compensation amount of the previous processing cycle and the comprehensive compensation vector. The calculation formula is as follows: In the formula, To compensate for the incremental vector, This is the comprehensive compensation vector for the current processing stage. This is the effective compensation amount from the previous processing cycle. For the first The component of the comprehensive compensation vector in the X direction of the secondary processing cycle. For the first The component of the comprehensive compensation vector in the Y direction of the secondary processing cycle. For the first The component of the compensation amount effective in the X direction for the next processing cycle. For the first The component of the compensation amount in the Y direction for the next processing cycle.

[0040] D2. Construct a first threshold and a second threshold based on the comprehensive compensation vector; specifically, during the trial machining stage of the gear turning machine, the same detection position is repeatedly detected a preset number of times, preferably 10 times in this embodiment; calculate the comprehensive compensation vector of the detection results for each preset number of times, and calculate the standard deviation of the comprehensive compensation vector magnitude. Calculate the first threshold based on the standard deviation of the comprehensive vector magnitude, and obtain the second threshold based on the first threshold, wherein the expression for the first threshold is: In the formula, The first threshold, To comprehensively compensate for the standard deviation of the vector magnitude.

[0041] The expression for the second threshold is: In the formula, This is the second threshold.

[0042] Based on the requirements for detection stability and processing accuracy, under general processing conditions, , Under high-precision and stable processing conditions, , When there is significant interference on site or the machine tool is in the pre-thermal stabilization stage, , .

[0043] D3. Compare the magnitude of the compensation increment vector with the first threshold and the second threshold: When the magnitude of the compensation increment vector is less than or equal to the first threshold, i.e. If the current comprehensive compensation vector changes smoothly, it is considered that the current comprehensive compensation vector changes smoothly, and the current comprehensive compensation vector is directly used as the final effective compensation vector for this time. When the magnitude of the compensation increment vector is greater than the first threshold, and the magnitude of the compensation increment vector is less than or equal to the second threshold, i.e. If the current comprehensive compensation vector is considered to have a large but acceptable change, then the compensation increment vector is weighted and smoothed to obtain the effective compensation vector, which is calculated as follows: In the formula, For effective compensation amount, To smoothly update the coefficients, To ensure the smoothing of the maximum value of the update coefficients, it is preferred in this embodiment. , To minimize the smooth update coefficient, the preferred approach in this embodiment is... .

[0044] When the magnitude of the compensation increment vector is greater than the second threshold, i.e. If the current comprehensive compensation vector is deemed to have a risk of abnormal change, it will not be written to the CNC unit. Instead, the compensation vector that took effect in the previous machining cycle will remain valid, and an alarm will be triggered. During the next measurement, the multi-point detection of the tool holder's outer circle, center fitting, and workpiece temperature acquisition will be re-executed, and the comprehensive compensation vector will be recalculated. If the comprehensive compensation vector still exceeds the second threshold, an alarm message will be output, prompting the user to check the sensor contact status, the tool holder detection surface, the temperature probe, or the machine tool's thermal condition.

[0045] When asynchronously compensating for tool position based on the effective compensation vector, the host computer of the gear turning machine runs the OPC UA (Open Platform Communications United Architecture) client, and the CNC unit runs the OPC UA server. The host computer calls the OPC UA write service to write the compensation vector to the reserved R parameter address or coordinate system offset register of the CNC unit. The write operation is executed asynchronously with the current interpolation cycle of the CNC unit, without interrupting the currently executing machining program. After detecting the end signal of the current workpiece machining, the CNC unit automatically executes the coordinate system translation command before the first positioning command when the next workpiece machining program starts, translating the origin of the workpiece coordinate system by the corresponding compensation amount, thereby completing the compensation for tool position error.

[0046] After compensation is completed, S3 to S4 are repeated to achieve periodic detection and compensation of tool position error, forming a closed-loop control.

[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. This invention combines spindle indexing rotation and least-squares circle fitting to sample and fit the center of multiple angular positions of the outer circle of the tool holder. This allows the periodic errors such as tool holder manufacturing eccentricity, tool holder installation eccentricity, and spindle rotation runout to be separated from the detection results. The final offset mainly reflects the real positional changes caused by machine tool thermal deformation, mechanical wear, and drift of moving parts, avoiding the miscompensation of tool holder shape errors as machine tool errors.

[0048] 2. This invention not only detects the positional drift of the tool side, but also obtains the temperature information of the workpiece's tooth tip circle, tooth root circle and end face through multi-point infrared thermometry, and calculates the radial thermal deformation of the workpiece based on the workpiece's thermal expansion model. This incorporates the dimensional changes caused by the temperature rise during workpiece processing into the compensation system, realizing comprehensive compensation for tool position error and workpiece thermal deformation error, and improving the tooth thickness accuracy, span pitch stability and batch processing consistency of gears after processing.

[0049] 3. This invention corrects the installation angle error, sensitivity error, and cross-coupling error of X-axis and Y-axis contact displacement sensors by using a calibration matrix, so that the sensor readings can be accurately converted into actual displacements in the machine tool coordinate system, thereby improving the long-term stability and resistance to installation errors of the detection system.

[0050] 4. This invention uses the non-cutting gap during loading and unloading after each workpiece is processed to perform rapid detection, and performs coordinate system translation compensation before starting the next workpiece processing program. It does not rewrite the servo pulse or motion trajectory in real time during the current tooth surface cutting interpolation process, thus avoiding the risk of tooth surface tool marks, tooth thickness abrupt changes or tool interference caused by compensation abrupt changes.

[0051] 5. This invention asynchronously writes the compensation vector into the reserved register or zero offset table address of the CNC unit through the OPC UA protocol, thereby decoupling the detection and calculation of the host computer and the compensation execution of the CNC unit. It eliminates the need for machine downtime for manual measurement or manual modification of the machining program, making it suitable for continuous batch machining scenarios of gear turning machines and improving the degree of machining automation and production efficiency.

[0052] This invention also aims to provide an automatic detection and asynchronous compensation system for gear turning machine tool position errors, used to implement the aforementioned automatic detection and asynchronous compensation method for gear turning machine tool position errors, as shown in the appendix. Figure 2 and attached Figure 3 As shown, the machine includes a gear turning machine body 1, a displacement detection unit 2, a numerical control unit, and a host computer. The gear turning machine body 1 is used to perform tooth profile cutting on gears. The displacement detection unit 2 is used to detect the displacement of the cutting tool in the gear turning machine body 1. The host computer is used to obtain the effective compensation vector based on the detection result of the displacement detection unit 2. The numerical control unit is used to compensate and control the position of the cutting tool in the gear turning machine body 1 based on the effective compensation vector.

[0053] The gear turning machine body 1 includes a machine tool 101, on which a machine tool housing 102 is mounted. A machining cavity is provided between the machine tool housing 102 and the machine tool 101, and the machining cavity is used to accommodate cutting tools for machining gears. The specific structure and connection method of the machine tool 101 and the machine tool housing 102 are existing technologies and will not be described in detail here.

[0054] A machining table 103 is provided inside the machining cavity. One end of the machining table 103 is fixedly connected to the machine tool 101, and the other end extends upward along the plane perpendicular to the top of the machine tool 101. The machining table 103 is used to machine gears. A first slide plate 104 and a second slide plate 105 are provided on one side of the machining table 103. Both ends of the first slide plate 104 and the second slide plate 105 are fixedly connected to the machine tool 101 through connectors. The two ends of the first slide plate 104 extend to both sides of the machine tool 101 along the X-axis direction, and the two ends of the second slide plate extend to both sides of the machine tool 101 along the Y-axis direction.

[0055] A tool holder 106 is also provided in the machining cavity. The bottom of the tool holder 106 is connected to the first slide plate 104 and the second slide plate 105. The first slide plate 104 is used to drive the tool holder 106 to move along the X-axis on the machine tool 101, and the second slide plate 105 is used to drive the tool holder 106 to move along the Y-axis. In this embodiment, the tool holder 106 and the first slide plate 104, and the tool holder 106 and the second slide plate 105 can both be connected by a lead screw structure to drive the tool holder 106 to move. The specific connection structure between the tool holder 106 and the first slide plate 104 and the second slide plate 105 is prior art and will not be described in detail here. In other embodiments, other transmission structures can be selected between the tool holder 106, the first slide plate 104 and the second slide plate 105 to drive the tool holder 106 to move.

[0056] A tool spindle 107 is provided on the side of the tool holder 106 near the machining table 103, and the tool spindle 107 is located above the machining table 103. The tool spindle 107 is slidably connected to the tool holder 106. Specifically, the tool spindle 107 can move up and down along the Z-axis on the tool holder 106. The tool spindle 107 and the tool holder 106 can be connected by a lead screw structure. The specific connection structure between the tool spindle 107 and the tool holder 106 is existing technology and will not be described in detail here.

[0057] A tool holder 108 is installed at one end of the tool spindle 107 near the machining table 103. One end of the tool holder 108 is fixedly connected to the tool spindle 107 by bolts or clips. The other end of the tool holder 108 extends along the Z-axis towards the side near the machining table 103. A tool is detachably connected to the side of the tool spindle 107 near the machining table 103. The tool spindle 107 is used to drive the tool to move circumferentially along the machining table 103 via the tool holder 108.

[0058] The displacement detection unit 2 includes a first displacement sensor 201 and a second displacement sensor 202. Both the first displacement sensor 201 and the second displacement sensor 202 are fixedly connected to the machine tool housing 102 by bolts or clips. The axis of the detection end of the first displacement sensor 201 is parallel to the X-axis of the machine tool 101, and the axis of the detection end of the second displacement sensor 202 is parallel to the Y-axis of the machine tool 101. The detection ends of both the first displacement sensor 201 and the second displacement sensor 202 are precisely aligned with the standard outer circular surface of the tool holder 108 at the detection position. Both the first displacement sensor 201 and the second displacement sensor 202 are high-precision contact displacement sensors. Preferably, in this embodiment, both the first displacement sensor 201 and the second displacement sensor 202 are Keyence GT2-PA12 sensors (resolution...). Range High-precision contact displacement sensor.

[0059] As attached Figure 4 As shown, the outer surfaces of the first displacement sensor 201 and the second displacement sensor 202 are both covered with protective shells 203. The first displacement sensor 201 or the second displacement sensor 202 is fixed inside the protective shell 203 by bolts. The protective shell 203 is fixedly connected to the machine tool housing 102 by bolts.

[0060] It also includes a temperature detection unit 3, which comprises a first temperature sensor 301, a second temperature sensor, and a third temperature sensor. The first temperature sensor 301, the second temperature sensor, and the third temperature sensor are distributed along the circumference of the processing table 103 on one side of the processing table 103; as shown in the attached figure. Figure 5 As shown, the first temperature sensor 301 is fixedly mounted on the outer ring of the machining table 103 via a bracket 302, with the detection end of the first temperature sensor 301 aligned with the tooth tip circle at the middle of the workpiece tooth width. The second and third temperature sensors are evenly distributed on both sides of the worktable in this manner, with their detection ends aligned with the tooth root circle at the middle of the workpiece tooth width and the upper surface of the workpiece, respectively. Preferably, in this embodiment, the first, second, and third temperature sensors are all Keyence FT-H10 type (temperature measurement range...). Response time Measurement accuracy Infrared temperature sensor.

[0061] The host computer is electrically connected to displacement detection unit 2 and temperature detection unit 3. Displacement detection unit 2 is used to calculate the effective compensation vector for the tool position based on the detection results from displacement detection unit 2 and temperature detection unit 3, following the steps of the aforementioned automatic detection and asynchronous compensation method for tool position error in gear turning machines. The host computer uses an Advantech IPC-610-H industrial control computer (Intel Core i7-8700 processor, 8GB memory, Windows 10 IoT Enterprise operating system) running LabVIEW software for sensor data acquisition and deviation calculation.

[0062] The CNC unit is electrically connected to the host computer and the gear turning machine body 1. The CNC unit and the host computer transmit data through the OPCUA (Open Platform Communications United Architecture) architecture. The CNC unit is used to issue commands to control the tool holder 106 to compensate the position of the tool by coordinate system translation before the start of the next machining program, based on the effective compensation vector calculated by the host computer.

[0063] The present invention also aims to provide a computer-readable storage medium containing a computer program, wherein the computer program is stored thereon, characterized in that, when the computer program is executed by one or more processors, it implements the steps of the above-described method for automatic detection and asynchronous compensation of tool position error of a gear turning machine.

[0064] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the scope of the present invention should be included within the protection scope of the present invention.

Claims

1. An automatic detection and asynchronous compensation method for tool position error in gear turning machines, characterized in that, Includes the following steps: Obtain the readings of the displacement sensors in the gear turning machine, and construct a calibration matrix based on the readings of the displacement sensors; The initial displacement vector is obtained by detecting the position of the tool using a displacement sensor, and the actual displacement vector of the tool is obtained based on the initial displacement vector and the calibration matrix. The displacement reference of the tool is calculated based on the actual displacement vector; During the non-cutting machining phase of the gear turning machine, the current position of the tool is detected, and the comprehensive compensation vector of the tool is calculated based on the displacement reference and the current position of the tool. The effective compensation vector is calculated based on the comprehensive compensation vector, and a compensation operation asynchronous with the gear turning machining is performed on the tool position based on the effective compensation vector.

2. The automatic detection and asynchronous compensation method for tool position error of a gear turning machine according to claim 1, characterized in that, The steps for constructing the calibration matrix based on the readings from the displacement sensor include: The change in displacement sensor reading at the calibration measurement point is calculated based on the reading information of the displacement sensor. The actual displacement of the computer tool coordinate system is calculated based on the change in displacement sensor readings at the calibrated measurement points. A coefficient matrix is ​​constructed based on the change in displacement sensor readings at the calibration measurement points, an observation vector is constructed based on the actual displacement of the machine tool coordinate system, and a system of linear equations is constructed based on the coefficient matrix and the observation vector. The calibration matrix is ​​obtained by solving the system of linear equations.

3. The automatic detection and asynchronous compensation method for tool position error of a gear turning machine according to claim 1, characterized in that, The step of calculating the tool displacement reference based on the actual displacement vector includes: Obtain coordinate data of one or more points based on the actual displacement vector, and construct a circle equation based on the coordinate data of one or more points; Construct an error function based on the circle equation; The displacement datum is obtained by calculating the optimal center coordinates based on the error function.

4. The automatic detection and asynchronous compensation method for tool position error of a gear turning machine according to claim 3, characterized in that, The step of calculating the comprehensive compensation vector of the tool based on the displacement reference and the current position of the tool includes: Calculate the current optimal center coordinates based on the current position of the tool, and calculate the center coordinate offset of the tool based on the current optimal center coordinates and the displacement reference. The workpiece temperature is obtained at one or more locations. The workpiece thermal expansion is calculated based on the workpiece temperature, and the workpiece thermal expansion is decomposed into a first workpiece thermal expansion component and a second workpiece thermal expansion component. The comprehensive compensation vector is calculated based on the center coordinate offset, the thermal expansion components of the first and second workpieces.

5. The automatic detection and asynchronous compensation method for tool position error of a gear turning machine according to claim 1, characterized in that, The step of calculating the effective compensation vector based on the comprehensive compensation vector includes: Calculate the compensation increment vector based on the comprehensive compensation vector; The first and second thresholds are constructed based on the comprehensive compensation vector; The effective compensation vector is determined based on the compensation increment vector, the first threshold, and the second threshold: When the magnitude of the compensation increment vector is less than or equal to the first threshold, the current comprehensive compensation vector is taken as the effective compensation vector. When the magnitude of the compensation increment vector is greater than the first threshold and the magnitude of the compensation increment vector is less than or equal to the second threshold, the compensation increment vector is weighted and smoothed to obtain the effective compensation vector. When the magnitude of the compensation increment vector exceeds the second threshold, the compensation vector that was effective in the previous processing cycle remains effective and an alarm is triggered.

6. The automatic detection and asynchronous compensation method for tool position error of a gear turning machine according to claim 5, characterized in that, When constructing the first threshold and the second threshold based on the comprehensive compensation vector, the same detection position of the tool is repeatedly detected a preset number of times, and the standard deviation of the comprehensive compensation vector magnitude is calculated. The first threshold is calculated based on the standard deviation of the comprehensive vector magnitude, and the second threshold is obtained based on the first threshold.

7. An automatic detection and asynchronous compensation system for gear turning machine tool position error, used to implement the automatic detection and asynchronous compensation method for gear turning machine tool position error as described in any one of claims 1-6, characterized in that, The machine includes a gear turning machine body, a displacement detection unit, a temperature detection unit, a CNC unit, and a host computer. The gear turning machine body includes a cutting tool, which is used to process the workpiece. The displacement detection unit is used to detect the displacement of the cutting tool, and the temperature detection unit is used to detect the temperature of the workpiece. The host computer is used to obtain an effective compensation vector based on the detection results of the displacement detection unit and the temperature detection unit. The CNC unit is used to compensate and control the position of the cutting tool in the gear turning machine body based on the effective compensation vector.

8. The automatic detection and asynchronous compensation system for tool position error of a gear turning machine according to claim 7, characterized in that, The displacement detection unit includes a first displacement sensor and a second displacement sensor. The first displacement sensor is used to detect the position of the tool in the X-axis direction, and the second displacement sensor is used to detect the position of the tool in the Y-axis direction.

9. The automatic detection and asynchronous compensation system for tool position error of a gear turning machine according to claim 7, characterized in that, The temperature detection unit includes a first temperature sensor, a second temperature sensor, and a third temperature sensor. The first temperature sensor is used to detect the temperature at the tip circle position in the middle of the tooth width of the workpiece to be processed. The second temperature sensor detects the temperature at the root circle in the middle of the tooth width of the workpiece to be processed. The third temperature sensor is used to detect the temperature of the upper surface of the workpiece to be processed.

10. A computer-readable storage medium containing a computer program, wherein the computer program is stored thereon, characterized in that, When the computer program is executed by one or more processors, it implements the steps of the automatic detection and asynchronous compensation method for tool position error of a gear turning machine as described in any one of claims 1-6.