Method for centering control of deep hole drilling and milling tooth processing
Patent Information
- Application Number
- CN202610825717.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-09
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]为此,本发明的目的在于:解决钻削深孔因孔轴线发生非线性偏移,造成后续螺纹铣牙时螺纹偏心的问题,从而提供一种深孔钻削后铣牙加工的对中控制方法,通过实测孔心坐标构建连续曲线模型,并逐点独立补偿铣牙主轴的回转中心,使螺纹轴线与实际孔轴线在全深度范围内保持一致
首先,突破孔轴线为理想直线的固有假设,通过实测多个深度位置的实际孔心坐标构建连续曲线模型,将深孔钻削过程中因钻头偏斜产生的非线性孔轴偏移轨迹进行量化描述和数学建模,使得原本不可控的加工误差转变为可计算、可跟随的目标轨迹。
Smart Images

Figure CN122883737A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of thread processing technology, and in particular to a method for centering control in milling after deep hole drilling. Background Technology
[0002] In current industry practice, after drilling deep holes (depth-to-diameter ratio greater than or equal to 5 or even greater than or equal to 10), thread milling is performed on a CNC machine tool using helical interpolation. However, during deep hole drilling, due to factors such as the large length-to-diameter ratio of the drill bit, insufficient rigidity, and uneven cutting forces, the drill bit is prone to deflection. The actual axis of the drilled hole will undergo unpredictable nonlinear displacement with increasing depth, forming a spatial curve deviating from the ideal straight line. Existing machining methods are based on the assumption that the hole axis is an ideal straight line, and all helical interpolation paths are generated around the initial rotation center. The milling spindle cannot sense the actual direction of the hole axis during machining and can only move according to the preset straight trajectory. This spatial deviation between the initial trajectory and the actual hole axis causes the milling cutter to make eccentric contact with the hole wall during thread milling. The machined thread profile is too deep on one side and too shallow on the other, with serious coaxiality deviations, directly affecting the connection strength and sealing performance of the thread. Summary of the Invention
[0003] Therefore, the purpose of this invention is to solve the problem of thread eccentricity during subsequent thread milling caused by nonlinear offset of the hole axis during deep hole drilling, and to provide a centering control method for thread milling after deep hole drilling. This method constructs a continuous curve model by measuring the hole center coordinates and independently compensates the rotation center of the milling spindle point by point, so that the thread axis and the actual hole axis remain consistent throughout the entire depth range.
[0004] To solve the above-mentioned technical problems, the present invention provides a centering control method for milling after deep hole drilling, comprising: S1. Determine the coordinates of the hole center at multiple depth positions along the depth direction of the drilled hole; S2. Based on the hole depth at each depth position and the hole center coordinates, construct a continuous curve model of the hole center trajectory; S3. Based on the helical interpolation path of the thread to be processed, determine the initial hole depth and initial hole center coordinates of the first interpolation point; based on the continuous curve model, determine the actual hole center coordinates at the initial hole depth; based on the actual hole center coordinates and the initial hole center coordinates, determine the offset compensation vector of the first interpolation point. S4. Adjust the initial rotation center of the milling spindle according to the offset compensation vector to obtain the actual rotation center; execute the helical feed of the first interpolation point according to the actual rotation center and the actual hole center coordinates; S5. Repeat steps S3 and S4 for each interpolation point of the spiral interpolation path in ascending order of depth, so that the rotation center of the milling spindle follows the hole center trajectory described by the continuous curve model point by point.
[0005] Preferably, the continuous curve model is constructed based on a cubic spline interpolation algorithm, including a first function f(z) and a second function g(z); the independent variable of both functions is the hole depth of the drilled hole, and the first function and the second function respectively represent the functional relationship between the coordinates of the center of the drilled hole on the X-axis and Y-axis and the hole depth.
[0006] Preferably, the offset compensation vector is uniquely determined based on the continuous curve model; for each interpolation point of the helical interpolation path, let its initial hole depth be z. i Then the offset compensation vector Δ(z) of the interpolation point i Determined in the following manner: Δ(z i )=(f(z i )-x(z i ),g(z i )-y(z i )); x(z) i ) and y(z i ) represent the hole depth as z i The initial X-axis and Y-axis coordinates of the hole center at the location; f(z i ) and g(z i The numbers z and z represent the hole depths determined based on the continuous curve model. i The actual X-axis and Y-axis coordinates of the hole center at the location.
[0007] Preferably, the helical feed of the first interpolation point is performed based on the actual rotation center and the actual hole center coordinates, including: determining the X-axis component and Y-axis component of the actual rotation center of the milling spindle for the first interpolation point; replacing the initial hole center coordinates of the first interpolation point with the actual hole center coordinates determined by the continuous curve model as the compensated position coordinates; generating a compensated interpolation command, which includes the following parameters: the X-axis endpoint coordinate is the X-axis component of the compensated position coordinates; the Y-axis endpoint coordinate is the Y-axis component of the compensated position coordinates; the arc center X-axis offset is the X-axis component of the actual rotation center, and the arc center Y-axis offset is the Y-axis component of the actual rotation center.
[0008] Preferably, the helical trajectory described by the compensated interpolation command satisfies the following geometric constraints: the cross-section of the helical trajectory at any depth position is an arc, and the center of the arc is located at the projection point of the actual rotation center at that depth position; the radius of the arc of the cross-section of the helical trajectory at any depth position is equal to the nominal radius of the thread to be processed; the feed rate of the helical trajectory in the depth direction corresponds to the pitch of the thread to be processed; and the centerline of the helical trajectory is the actual hole center trajectory described by the continuous curve model.
[0009] Preferably, for the first interpolation point, determining the X-axis and Y-axis components of the actual rotation center of the milling spindle includes: superimposing the offset compensation vector onto the initial rotation center of the milling spindle to obtain the coordinates of the actual rotation center.
[0010] Preferably, the interpolation point density of the spiral interpolation path is adjusted according to the rate of curvature change of the continuous curve model.
[0011] Preferably, determining the center coordinates of the hole at multiple depth locations along the depth direction of the drilled hole includes: for each depth location, performing the following operations in sequence: positioning the probe at the depth location, acquiring the radial coordinates of the hole wall in at least three different angular directions in the circumferential direction of the hole wall at the depth location; and calculating the center coordinates of the hole at the depth location based on the radial coordinates of the hole wall using the three-point circle method.
[0012] Preferably, the determination of the hole center coordinates at each depth position and the execution of the helical interpolation path are both based on the same workpiece coordinate system of the same CNC machine tool.
[0013] Preferably, the probe used to determine the center coordinates of the hole and the milling spindle used for milling are installed in the same spindle unit, and the two are switched by a tool changer; wherein, after the probe has completed the determination of the center coordinates of the hole at all depth positions, the probe is switched to a milling cutter by the tool changer, and then the helical interpolation path is executed.
[0014] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: First, by breaking through the inherent assumption that the hole axis is an ideal straight line, a continuous curve model is constructed by measuring the actual hole center coordinates at multiple depth positions. This allows for the quantitative description and mathematical modeling of the nonlinear hole axis offset trajectory caused by drill bit skew during deep hole drilling, transforming the originally uncontrollable machining error into a calculable and followable target trajectory.
[0015] Secondly, a point-by-point independent compensation mechanism is adopted. For each interpolation point on the spiral interpolation path, the actual hole center coordinates corresponding to the current depth are obtained from the continuous curve model, and the offset compensation vector is calculated. Since the compensation calculation of each interpolation point is independent of each other and does not depend on the result of the previous point, the accumulation of errors is fundamentally avoided. Even if the hole axis offset changes direction or fluctuates in amplitude with depth, it can be accurately adapted.
[0016] Furthermore, the actual rotation center after compensation is directly embedded into the helical interpolation command, so that the adjustment of the rotation center and the helical feed motion are completed synchronously within the same command cycle, without the need for additional adjustment time, thus ensuring the continuity and efficiency of the machining process.
[0017] The alignment control method for deep hole drilling followed by milling, as described in this invention, ensures that the rotation center of the milling spindle coincides with the actual hole center coordinates at every depth position, and that the thread axis remains consistent with the actual hole axis throughout the entire depth range. This solves the thread eccentricity problem caused by hole axis misalignment, fundamentally improving coaxiality. Furthermore, by employing a single clamping, online measurement, and in-situ machining method, it avoids secondary positioning errors caused by workpiece transfer between different devices. This method is particularly suitable for deep hole thread machining scenarios with a depth-to-diameter ratio greater than or equal to 5, or even greater than or equal to 10, and can effectively improve the thread connection quality and reliability of key components such as hydraulic cylinder blocks and engine cylinder blocks. Attached Figure Description
[0018] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0019] Figure 1 This is a flowchart of the milling machining centering control method in a preferred embodiment of the present invention; Figure 2 This is a flowchart of the helical feed at the first interpolation point in a preferred embodiment of the present invention. Detailed Implementation
[0020] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0021] When performing deep hole drilling and milling on a large hydraulic cylinder using the method of this invention, the first challenge is the nonlinear displacement of the hole axis that occurs during deep hole drilling. The diameter of the hole to be machined in this hydraulic cylinder is 40 mm, the depth is 240 mm, and the depth-to-diameter ratio is 6, which falls within the typical range of deep hole machining.
[0022] Due to factors such as the drill bit's large length-to-diameter ratio, insufficient rigidity, and uneven cutting forces, the hole axis is not an ideal straight line after drilling, but rather exhibits unpredictable offsets at different depths. For example, at a depth of 120mm from the hole opening, the hole center offsets 0.03mm in the X-axis direction and 0.02mm in the Y-axis direction relative to the ideal axis; at a depth of 200mm, the offsets increase to 0.05mm and -0.01mm, respectively. If this non-linear offset varying with depth is not identified and compensated for, subsequent thread milling along an ideal straight trajectory will result in eccentric contact between the milling cutter and the hole wall, causing one side of the thread profile to be too deep and the other too shallow, failing to meet the coaxiality requirements.
[0023] Based on this, the objective of this invention is to solve the problem of thread eccentricity during subsequent thread milling caused by nonlinear displacement of the hole axis during deep hole drilling. A centering control method for thread milling after deep hole drilling is provided, comprising: S1. Determine the coordinates of the hole center at multiple depth positions along the depth direction of the drilled hole; S2. Based on the hole depth and hole center coordinates at each depth location, construct a continuous curve model of the hole center trajectory; S3. Based on the helical interpolation path of the thread to be processed, determine the initial hole depth and initial hole center coordinates of the first interpolation point; determine the actual hole center coordinates under the initial hole depth based on the continuous curve model; and determine the offset compensation vector of the first interpolation point based on the actual hole center coordinates and the initial hole center coordinates. S4. Adjust the initial rotation center of the milling spindle according to the offset compensation vector to obtain the actual rotation center; execute the helical feed of the first interpolation point according to the actual rotation center and the actual hole center coordinates. S5. Repeat steps S3 and S4 for each interpolation point of the spiral interpolation path in ascending order of depth, so that the rotation center of the milling spindle follows the hole center trajectory described by the continuous curve model point by point.
[0024] It should be noted that the drilled hole is a straight hole; the hole center trajectory refers to the trajectory formed by the slight offset of the actual hole center relative to the ideal axis caused by factors such as drill bit skew and uneven cutting force, which varies with depth. This offset is typically on the order of 0.001mm to 0.1mm. The technical solution of this invention is to compensate for the rotation center of the milling spindle in a straight hole with a slight offset, so that the axis of the machined thread coincides with the actual hole center trajectory, thereby ensuring the coaxiality of the thread and the hole wall.
[0025] Before implementing this method, the hydraulic cylinder workpiece to be machined is clamped on a five-axis CNC machine tool. This machine tool is equipped with a contact-type trigger probe and a tool magazine. The probe and milling cutter are both mounted on the same spindle unit and switched via a tool changer to ensure that measurement and machining are completed in the same workpiece coordinate system. The following section combines... Figure 1The specific implementation steps will be explained in detail.
[0026] Step S1: Determine the center coordinates of the hole at multiple depth positions along the depth direction of the drilled hole. Specifically, the operator first sets the sequence of depth positions to be measured through the CNC system. For example, starting from the hole opening, a measurement section is set every 40mm, for a total of seven measurement sections, with depths of 40mm, 80mm, 120mm, 160mm, 200mm, and 240mm. The CNC system controls the spindle to move the probe to the first depth position (40mm). After reaching the predetermined depth, the system locks the Z-axis enable to ensure that the Z-axis coordinate does not drift when the probe moves within the depth plane.
[0027] Subsequently, the probe sequentially contacts three points on the hole wall at different angles along its circumference, with these three angles spaced 120 degrees apart. Each time the probe contacts the hole wall, the CNC system records the coordinates of the probe center and, combined with probe radius compensation, calculates the actual coordinates of that contact point in the workpiece coordinate system.
[0028] After acquiring data at three points, the coordinates of the circle center within the depth plane are calculated using a three-point circle determination algorithm; these are the actual hole center coordinates at that depth. To improve measurement reliability, the system repeats the measurement twice at that depth, taking the arithmetic mean of the two calculations as the final actual hole center coordinates. Subsequently, the system unlocks the Z-axis and moves to the next depth position (80mm), repeating the above operation until the actual hole center coordinates at all depth positions are determined. The depth positions and their corresponding actual hole center coordinates are then compiled into a depth-hole center coordinate sequence.
[0029] Step S2: Based on the borehole depth and the measured borehole center coordinates at each depth location, a continuous curve model of the borehole center trajectory is constructed. Specifically, the borehole depth is used as the independent variable, and the X-axis and Y-axis coordinates of the actual borehole center are used as dependent variables. Two functions, denoted as the first function f(z) and the second function g(z), are constructed using a cubic spline interpolation algorithm. The core of the cubic spline interpolation algorithm is that: in the interval between each adjacent depth location, both the first and second functions are cubic polynomials; the first and second derivatives of both functions are continuous over the entire depth domain; at each depth location, the function value of the first function is equal to the measured X-axis coordinate of the borehole center at that depth location, and the function value of the second function is equal to the measured Y-axis coordinate of the borehole center at that depth location. By solving the tridiagonal linear equation system formed by the above conditions, the coefficients of the cubic polynomials in each interval can be uniquely determined.
[0030] The completed continuous curve model can output the actual center coordinates of the hole at any depth. For example, substituting a depth of 100mm into the continuous curve model will yield the actual center coordinates of the hole at that depth without the need for actual measurement at that depth. The continuous curve model fully describes the nonlinear characteristics of the hole axis offset as a function of depth, including the increase or decrease in offset amount and the change in offset direction.
[0031] Step S3: Based on the helical interpolation path of the thread to be processed, determine the initial hole depth and initial hole center coordinates of the first interpolation point. Then, determine the actual hole center coordinates at the initial hole depth based on the continuous curve model. Finally, calculate the offset compensation vector. Specifically, the parameters of the thread to be processed include nominal diameter, pitch, and thread length. The CNC system generates a standard helical interpolation path based on these parameters. This helical interpolation path consists of a series of interpolation points arranged in ascending order of depth. Taking the first interpolation point as an example, its initial hole depth is 80mm, and the initial hole center coordinates are the position of the ideal axis at this depth. Substituting the initial hole depth of 80mm into the continuous curve model constructed in step S2, the first function f(80) returns the actual hole center X-axis coordinates, and the second function g(80) returns the actual hole center Y-axis coordinates. Thus, the offset compensation vector of this interpolation point is the positional deviation of the actual hole center relative to the initial hole center.
[0032] Step S4: Adjust the initial rotation center of the milling spindle according to the offset compensation vector to obtain the actual rotation center, and execute the helical feed at the interpolation point based on the actual rotation center and the actual hole center coordinates. Specifically, the offset compensation vector is superimposed on the initial rotation center coordinates of the milling spindle to obtain the actual rotation center coordinates. Simultaneously, the initial hole center coordinates of the interpolation point are replaced with the actual hole center coordinates determined by the continuous curve model, serving as the compensated position coordinates. Subsequently, the CNC system generates a compensated helical interpolation command. In this command, the X-axis endpoint coordinate is set to the X-axis component of the compensated position coordinates, the Y-axis endpoint coordinate is set to the Y-axis component of the compensated position coordinates, the Z-axis endpoint coordinate is set to the initial hole depth at the interpolation point, the X-axis offset of the arc center is set to the X-axis component of the actual rotation center, and the Y-axis offset of the arc center is set to the Y-axis component of the actual rotation center. When the CNC system executes this command, the rotation center of the milling spindle is automatically adjusted to the actual hole center position. The milling cutter always uses the actual hole center as its center when moving along the helical trajectory, thus ensuring that the thread is concentric with the hole wall.
[0033] Step S5: Repeat steps S3 and S4 for each interpolation point of the helical interpolation path in ascending order of depth. Specifically, after the CNC system completes the machining of the first interpolation point, it automatically selects the next interpolation point as the new current interpolation point and repeats the steps of offset compensation vector calculation, actual rotation center adjustment, and post-compensation instruction generation. Since the compensation calculation for each interpolation point is performed independently, the compensation result of the previous point does not participate in the calculation of the next point. Therefore, even if the hole axis offset changes abruptly or its direction changes, the system can accurately adapt. As the machining depth gradually increases from 40mm to 240mm, the rotation center of the milling spindle is adjusted to the actual hole center coordinates corresponding to that depth at each depth position. That is, the rotation center follows the hole center trajectory described by the continuous curve model point by point. After machining, the thread axis and the actual hole axis remain consistent throughout the entire depth range, and the thread profile is uniform and the coaxiality meets the design requirements.
[0034] The implementation details of the key technical features in the above embodiments are as follows. Regarding the construction of the continuous curve model, the cubic spline interpolation algorithm ensures the continuity of the second derivative of the hole center trajectory. This means that the rotation center of the milling spindle has continuous acceleration during the movement, avoiding tool vibration and surface quality degradation caused by sudden acceleration changes.
[0035] Regarding point-by-point independent compensation, since the offset compensation vector of each interpolation point depends only on the initial hole depth and continuous curve model of that point and is independent of the compensation results of adjacent interpolation points, even if the measurement data at a certain depth position is abnormal, it will not affect the compensation accuracy at other depth positions. This characteristic is particularly important when the hole axis offset changes irregularly with depth.
[0036] Regarding the generation of the compensation interpolation command, the actual rotation center coordinates are directly written into the arc center parameters, so that the rotation center adjustment and the helical feed motion are completed synchronously within the same command cycle, without the need for additional adjustment actions or waiting time, ensuring the continuity and high efficiency of the machining process.
[0037] In addition, the depth locking and multi-point averaging methods used in determining the center coordinates of the borehole effectively eliminate the influence of probe Z-axis drift and random errors in single-point measurement on the model accuracy, providing a reliable data basis for subsequent compensation.
[0038] In the above embodiments, the coordinates of the hole center at multiple depth positions are measured. However, directly using these discrete measurement points for machining compensation presents two fundamental problems: first, the number of measurement points is limited, failing to provide complete offset information across continuous depths; second, the hole axis trajectory between measurement points is unknown, and using simple linear interpolation will produce discontinuous broken line trajectories, leading to unstable milling spindle movement and consequently affecting thread machining quality. The embodiments of this invention construct a continuous curve model using cubic spline interpolation, and calculate the offset compensation vector point-by-point based on this model, fundamentally solving the above problems. The following detailed description, in conjunction with specific implementation methods, provides further details.
[0039] Before implementing this solution, the workpiece to be processed needs to be clamped on a CNC machine tool. The machine tool is equipped with a contact-type trigger probe. The probe and the milling cutter are both installed on the same spindle unit and switched by an automatic tool changer to ensure that measurement and processing are completed in the same workpiece coordinate system.
[0040] The first step involves setting multiple measurement sections along the depth direction of the drilled hole. At each depth, the probe is positioned to that depth, and at least three radial coordinate points at different angles are collected along the circumference of the hole wall. The actual hole center coordinates at that depth are calculated using the three-point circle method, resulting in a depth-hole center coordinate sequence composed of each depth position and its corresponding actual hole center coordinates. In this sequence, each depth position corresponds to a two-dimensional hole center coordinate, completely recording the actual spatial position of the hole shaft at different depths.
[0041] The second step involves constructing two functions, denoted as the first function f(z) and the second function g(z), with the hole depth z as the independent variable and the X-axis and Y-axis coordinates of the actual hole center as the dependent variables. The first function f(z) represents the functional relationship between the hole center's X-axis coordinate and the hole depth, while the second function g(z) represents the functional relationship between the hole center's Y-axis coordinate and the hole depth.
[0042] The construction process of the cubic spline interpolation algorithm is as follows: Let the measured depth position sequence be... The corresponding measured X-axis coordinate is The measured Y-axis coordinate is n represents the total number of depth locations measured; i = 1, 2, ..., n; In each sub-interval [z i , z i+1 On the above, the first function f(z) is constructed as a cubic polynomial: (1); The polynomial satisfies the following conditions: (2); That is: the function value is equal to the measured value at the endpoints of the interval; the first derivative is continuous at the endpoints of the interval; the second derivative is continuous at the endpoints of the interval.
[0043] Among them, z i Let z be the hole depth at the left endpoint of the i-th sub-interval. i+1 Let be the hole depth at the right endpoint of the i-th sub-interval. These are the coefficients of the higher-order terms, the quadratic terms, the linear terms, and the constant term of a cubic polynomial.
[0044] By solving the tridiagonal linear equations formed by these conditions, the four coefficients in each interval can be uniquely determined. The second function g(z) is constructed in the same way, except that the measured X-axis coordinates are replaced with the measured Y-axis coordinates.
[0045] Regarding the handling of boundary conditions, this embodiment adopts natural boundary conditions, that is, the second derivative at the endpoints is set to zero. This is because the offset trend of the borehole center at the orifice and the bottom cannot be known in advance. Natural boundary conditions introduce minimal subjective assumptions, allowing the model to maintain a smooth transition at the endpoints.
[0046] The completed continuous curve model possesses the following important characteristics: Over the entire depth domain, both f(z) and g(z) are continuously differentiable functions. The continuity of their first derivative ensures the continuity of the velocity of the milling spindle's rotation center, while the continuity of their second derivative ensures the continuity of the acceleration, avoiding tool vibration caused by abrupt changes in motion. Furthermore, the model can output the actual hole center coordinates corresponding to any depth value without requiring additional sampling points in actual measurements. Thus, discrete measurement points are transformed into a continuous, analytically computable hole center trajectory function.
[0047] The third step involves the CNC system generating a standard helical interpolation path based on the parameters of the thread to be machined. This path consists of a series of interpolation points arranged in ascending order of depth. For any given interpolation point, let its initial hole depth be z. i The initial hole center coordinates (x(z) of the interpolation point) i ), y(z i The ideal axis is located at this depth. The initial hole depth z of this interpolation point is... i Substituting into the continuous curve model, through the first function f(z) i ) Calculate the actual X-axis coordinates of the hole center at this depth using the second function g(z) i Calculate the actual Y-axis coordinate of the hole center at this depth. Then, the offset compensation vector Δ(z_i) of this interpolation point is determined by the following formula: Δ(z i )=(f(z i )-x(z i ),g(z i )-y(z i )); For an interpolation point whose depth is exactly equal to the depth of the measurement point, f(z)i ) and g(z i The value of g(z) is directly equal to the measured borehole center coordinates at that depth, i.e., g(z) i )=x i , g(z i )=y i For interpolation points with depths between the measurement points, f(z) i ) and g(z i The value of ) is calculated using the cubic spline interpolation formula described above.
[0048] It should be noted that the initial hole center coordinates refer to the theoretical hole center position corresponding to a certain interpolation point on the helical interpolation path under the assumption of an ideal straight hole axis. When the CNC system generates the helical interpolation path, it defaults to assuming that the hole axis is an ideal straight line perpendicular to the XY plane. Based on this assumption, the theoretical coordinates of the hole center (i.e., the initial hole center coordinates) are fixed at any depth, usually at the origin (0, 0) of the workpiece coordinate system. In contrast, the actual hole center coordinates are affected by factors such as drill bit skew and uneven cutting force, which cause the actual hole axis to deviate from the ideal straight line, resulting in a deviation between the actual hole center coordinates and the initial hole center coordinates.
[0049] Since the offset compensation vector of each interpolation point is calculated independently directly from the continuous curve model, the compensation result of the previous interpolation point does not participate in the calculation of the next interpolation point. Therefore, even if the measurement data at a certain depth position is abnormal, it will not affect the compensation accuracy at other depth positions, and there is no problem of error accumulation.
[0050] After obtaining the offset compensation vector, the offset compensation vector is superimposed on the initial rotation center of the milling spindle to obtain the actual rotation center. The initial hole center coordinates are replaced with the actual hole center coordinates, and the compensation interpolation command is generated. The command is then executed point by point in ascending order of depth until all thread machining is completed.
[0051] In the above embodiment, the calculated offset compensation vector is applied to the milling spindle, ensuring precise synchronization between the rotation center adjustment and the helical feed motion in time and space. In traditional CNC systems, the arc center parameters (I, J) in helical interpolation commands (such as G02 or G03) are preset fixed values before interpolation begins and cannot be dynamically changed during the interpolation process. This means that even if the offset compensation vector for each interpolation point is calculated in step S3, if the machining command is generated in the conventional way, the rotation center can only remain unchanged throughout the entire thread machining process, making point-to-point following impossible.
[0052] To address this problem, embodiments of the present invention further provide a centering control method for deep hole drilling followed by milling by directly embedding the offset compensation vector into the helical interpolation command parameters, enabling the rotation center adjustment and helical feed to be completed synchronously within the same command cycle. The following is a combination of... Figure 2 The specific implementation process will be explained.
[0053] Specifically, steps S1 and S2 have been completed before implementing this scheme, and the offset compensation vector for each interpolation point has been determined. The following detailed implementation method is based on the completed continuous curve model and the calculated offset compensation amount.
[0054] The first step, when performing the helical feed at the first interpolation point, is to first determine the X-axis and Y-axis components of the actual rotation center of the milling spindle. The actual rotation center is determined by superimposing the offset compensation vector onto the initial rotation center of the milling spindle. Let the initial rotation center of the milling spindle be (I0, J0). This initial rotation center is the theoretical center coordinate determined based on the assumption of an ideal straight hole axis. When the ideal hole axis is set as the Z-axis in the workpiece coordinate system, the initial rotation center is the origin of the workpiece coordinate system (0.00mm, 0.00mm). Let the offset compensation vector of the first interpolation point calculated in step S3 be (Δx, Δy). Then, the X-axis component Ia of the actual rotation center is: Ia = I0 + Δx, and the Y-axis component Ja of the actual rotation center is: Ja = J0 + Δy. Taking the interpolation point at a depth of 80mm as an example, assuming the offset compensation vector of this point is (0.0120mm, 0.003mm) and the initial rotation center is (0.00mm, 0.00mm), then the actual rotation center (Ia, Ja) is (0.0120mm, 0.003mm).
[0055] The second step is to replace the initial hole center coordinates of the interpolation point with the actual hole center coordinates determined by the continuous curve model, as the compensated position coordinates. Let the initial hole center coordinates of the interpolation point be (x0, y0). These coordinates represent the theoretical hole center position determined based on the assumption of an ideal straight hole axis. Under typical settings (ideal hole axis as the Z-axis, hole center as the origin), for any depth, (x0, y0) = (0.00mm, 0.00mm). Let the actual hole center coordinates at this depth, determined by the continuous curve model, be (x... a , y a This refers to the function values of the first function f(z) and the second function g(z) at that depth. Therefore, the X-axis component of the compensated position coordinates is x. a The Y-axis component is y a Taking the interpolation point at a depth of 80mm as an example, assuming the actual hole center coordinates output by the continuous curve model are (0.0120mm, 0.003mm), then the compensated position coordinates are (0.0120mm, 0.003mm).
[0056] The third step is to generate the post-compensation interpolation command, which includes the following parameters: the X-axis endpoint coordinate is set to the X-axis component of the compensated position coordinate; the Y-axis endpoint coordinate is set to the Y-axis component of the compensated position coordinate; the X-axis offset of the arc center is set to the X-axis component of the actual rotation center; and the Y-axis offset of the arc center is set to the Y-axis component of the actual rotation center. In standard CNC systems, the format of the helical interpolation command is: for counterclockwise helical interpolation, the G03 command is used, whose parameters include the endpoint coordinates (X, Y, Z) and the center offset (I, J). The post-compensation interpolation command generated by this scheme is specifically: G03 X(x a ) Y(y a Z(z) i )I(Ia) J(Ja). Where, z i This represents the initial hole depth at the interpolation point. Taking an interpolation point at a depth of 80mm as an example, the generated command is: G03 X0.012 Y0.003 Z80.000 I0.012 J0.003 F100.0. When the CNC system executes this command, the milling spindle starts from its current position and moves along an arc trajectory to the endpoint (0.0120mm, 0.003mm). Simultaneously, the Z-axis moves from the previous depth to 80.000mm, and the center of the arc is located at an offset position relative to the starting point (0.0120mm, 0.003mm). Since both the endpoint coordinates and the center coordinates include offset compensation, the milling cutter always uses the actual hole center as the center during its movement, ensuring the concentricity of the thread and the hole wall.
[0057] It should be noted that in the above embodiments, the initial rotation center and initial hole center coordinates are typically set to (0.00mm, 0.00mm), which makes the actual rotation center and the compensated position coordinates numerically equal to the offset compensation vector. However, in more general cases, such as when the workpiece coordinate system is set differently, or when the workpiece is misaligned causing the ideal hole axis to be non-perpendicular to the XY plane, the initial rotation center and initial hole center coordinates may be non-zero values. In this case, the above superposition and replacement operations still apply, and the formula form remains unchanged.
[0058] The helical trajectory described by the compensated interpolation command satisfies the following geometric constraints: First, the cross-section of the helical trajectory at any depth position is an arc, and the center of this arc is located at the projection point of the actual rotation center at that depth position. Since the actual rotation center is a quantity that varies with depth (determined independently for each interpolation point), the position of the arc center is different at different depth positions, which is a fundamental difference from the fixed center in traditional helical interpolation. Second, the radius of the arc cross-section of the helical trajectory at any depth position is equal to the nominal radius of the thread to be machined. Regardless of how the center changes, the radius of the arc always remains the nominal radius of the thread, which is a prerequisite for ensuring the correct thread profile. Third, the feed rate of the helical trajectory in the depth direction corresponds to the pitch of the thread to be machined, that is, for every revolution of the Z-axis, the depth increases (or decreases) by one pitch. Fourth, the centerline of the helical trajectory is the actual hole center trajectory described by the continuous curve model. The so-called centerline refers to the spatial curve formed by connecting the centers of the arc cross-sections at all depth positions. Since the center of the circle at each depth position is the actual center of rotation, and the actual center of rotation is set to be equal to the actual hole center coordinates at that depth, the curve formed by connecting all the circle centers is exactly equal to the actual hole center trajectory described by the continuous curve model.
[0059] The present invention provides a solution that obtains the actual rotation center by superimposing the offset compensation vector onto the initial rotation center, and replaces the initial hole center coordinates with the actual hole center coordinates as the compensated position coordinates. This solution merges the two actions of adjusting the rotation center and executing the helical feed, which originally required separate execution, into a single compensated interpolation command. In traditional methods, if the rotation center is adjusted first and then the feed is executed, additional adjustment time and dedicated adjustment commands are needed, increasing the machining cycle. If online real-time adjustment is used, extremely high demands are placed on the response speed of the CNC system. This solution, through command fusion, enables the rotation center adjustment and helical feed to be completed synchronously within the same command cycle, eliminating the need for additional adjustment actions or waiting time, thus ensuring the continuity and high efficiency of the machining process.
[0060] Furthermore, the interpolation point density of the spiral interpolation path is adjusted according to the rate of curvature change of the continuous curve model; in particular, a higher interpolation point density is used in depth intervals with a large rate of curvature change.
[0061] Specifically, the curvature and its rate of change are calculated based on the continuous curve model. Curvature represents the degree of bending of the hole center trajectory at the corresponding hole depth. The greater the curvature, the more severe the bending of the hole shaft. The rate of change of curvature is the first derivative of curvature with respect to hole depth, which represents how fast the curvature changes with depth. The greater the rate of change of curvature, the more severe the bending of the hole shaft with depth, and the more dense the interpolation points are needed to capture this change.
[0062] A threshold for the rate of curvature change is set to determine which depth ranges belong to areas with a large rate of curvature change. This threshold can be determined comprehensively based on the machining accuracy requirements and the computing power of the CNC system; for example, it can be set to an empirical value of 0.001mm. -2 The depth domain is divided into several continuous depth intervals. The length of each interval can be selected according to actual needs, for example, every 20mm. For each depth interval, the average rate of change of curvature is calculated. The average rate of change of curvature is equal to the absolute value of the difference between the curvature at the end depth of the interval and the curvature at the beginning depth of the interval, divided by the interval length. The average rate of change of curvature is compared with a preset threshold. If the average rate of change of curvature is greater than the threshold, the interval is marked as a high curvature change interval.
[0063] The interpolation point density is adjusted based on the marking results. A baseline interpolation point density is set, for example, ten interpolation points per mm. For depth ranges marked as high curvature variation areas, the interpolation point density within these ranges is adjusted to a multiple of the baseline interpolation point density. This multiple can be determined based on the actual value of the curvature change rate; for example, a multiple of two for ranges with a curvature change rate less than one time the threshold, and a multiple of three or four for ranges exceeding one time the threshold. For unmarked depth ranges, the baseline interpolation point density remains unchanged. After the above adjustments, in areas where the hole shaft curvature changes drastically with depth, the interpolation point density is significantly increased, ensuring that rapid changes in the hole center trajectory can be captured. In areas where the hole shaft curvature is gentle or changes little, the interpolation point density is kept at a lower level to avoid unnecessary computational overhead. This achieves adaptive matching between the interpolation point density and the curvature of the hole center trajectory, ensuring compensation accuracy in high-curvature areas while reducing computational load in flat areas, effectively balancing machining accuracy and machining efficiency.
[0064] In the above embodiment, the coordinates of the circle center are calculated based on the three-point circle determination algorithm. The principle of the three-point circle determination algorithm is as follows: given the coordinates of three points on the circle, the coordinates of the circle center are obtained by solving the intersection of the perpendicular bisectors, and then the radius is obtained by calculating the distance from the circle center to any point.
[0065] The determination of hole center coordinates at various depths and the execution of helical interpolation paths are both based on the same workpiece coordinate system of the same CNC machine tool. This means that all hole center coordinate data measured in step S1 directly correspond to the workpiece coordinate system used during machining, without any coordinate system transformation. Specifically, after the workpiece is clamped, the operator first establishes the workpiece coordinate system, typically setting the center of the drilled hole opening as the origin and the ideal hole axis as the Z-axis. Under this coordinate system, the measured hole center coordinates directly reflect the actual offset of the hole axis relative to the ideal axis. When subsequent milling is performed, the CNC system executes under the same workpiece coordinate system, and the measurement data and machining instructions use the exact same coordinate reference. This method eliminates the coordinate transformation required due to inconsistencies between the measurement coordinate system and the machining coordinate system, avoiding calculation errors and operational mistakes that may be introduced during the transformation process.
[0066] The probe used to determine the hole center coordinates and the milling spindle used for milling are installed in the same spindle unit, and the two are switched via a tool changer. The specific operation process is as follows: Before step S1 begins, the CNC system removes the probe from the tool magazine and installs it into the spindle unit via the tool changer. Then, the measurement operation is performed, and the probe is sequentially positioned to each preset depth position to collect the radial coordinates of the hole wall and calculate the actual hole center coordinates at each depth position. After the hole center coordinates at all depth positions are measured, the CNC system removes the probe from the spindle unit, puts it back into the tool magazine, and then uses the automatic tool changer to remove the milling cutter from the tool magazine and install it into the same spindle unit.
[0067] Then, steps S2 to S5 are executed, namely, constructing a continuous curve model, calculating the offset compensation vector, generating the post-compensation interpolation command, and executing the helical feed. The key here is that after the probe completes the measurement of the hole center coordinates at all depth positions, it switches to the milling cutter to perform machining. That is, measurement and machining are executed sequentially, rather than alternately. This sequential execution method has the following advantages: First, the influence of cutting vibration and cutting fluid on measurement accuracy does not need to be considered during measurement, and more accurate hole center coordinate data can be obtained; second, the measurement process and the machining process do not interfere with each other, simplifying the control logic; third, the continuous curve model is fully constructed before machining begins, avoiding the problem of incomplete model that may be caused by measuring and machining simultaneously. The advantage of the probe and milling cutter sharing the same spindle unit instead of being installed on different spindles is that their positional relationship in the machine tool coordinate system is determined (because they are installed on the same spindle unit, their central axes coincide), and the measurement reference and machining reference are naturally consistent, without the need for additional calibration and compensation.
[0068] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for centering control during milling after deep hole drilling, characterized in that, include: S1. Determine the coordinates of the hole center at multiple depth positions along the depth direction of the drilled hole; S2. Based on the hole depth at each depth position and the hole center coordinates, construct a continuous curve model of the hole center trajectory; S3. Based on the helical interpolation path of the thread to be processed, determine the initial hole depth and initial hole center coordinates of the first interpolation point; based on the continuous curve model, determine the actual hole center coordinates at the initial hole depth; based on the actual hole center coordinates and the initial hole center coordinates, determine the offset compensation vector of the first interpolation point. S4. Adjust the initial rotation center of the milling spindle according to the offset compensation vector to obtain the actual rotation center; execute the helical feed of the first interpolation point according to the actual rotation center and the actual hole center coordinates; S5. Repeat steps S3 and S4 for each interpolation point of the spiral interpolation path in ascending order of depth, so that the rotation center of the milling spindle follows the hole center trajectory described by the continuous curve model point by point.
2. The centering control method for milling after deep hole drilling according to claim 1, characterized in that... The continuous curve model is constructed based on the cubic spline interpolation algorithm, including a first function f(z) and a second function g(z); the independent variable of both functions is the hole depth of the drilled hole, and the first function and the second function respectively represent the functional relationship between the coordinates of the hole center on the X-axis and Y-axis and the hole depth.
3. The centering control method for milling after deep hole drilling according to claim 2, characterized in that... The offset compensation vector is uniquely determined based on the continuous curve model; for each interpolation point of the spiral interpolation path, let its initial hole depth be z. i Then the offset compensation vector Δ(z) of the interpolation point i Determined in the following manner: Δ(z i )=(f(z i )-x(z i ),g(z i )-y(z i )); x(z i ) and y(z i ) represent the hole depth as z i The initial X-axis and Y-axis coordinates of the hole center at the location; f(z i ) and g(z i The numbers z and z represent the hole depths determined based on the continuous curve model. i The actual X-axis and Y-axis coordinates of the hole center at the location.
4. The centering control method for milling after deep hole drilling according to claim 2, characterized in that... The helical feed of the first interpolation point is performed based on the actual rotation center and the actual hole center coordinates, including: For the first interpolation point, determine the X-axis and Y-axis components of the actual rotation center of the milling spindle; The initial hole center coordinates of the first interpolation point are replaced with the actual hole center coordinates determined by the continuous curve model, which are used as the compensated position coordinates. Generate a post-compensation interpolation instruction, which includes the following parameters: The X-axis endpoint coordinate is the X-axis component of the compensated position coordinate; The Y-axis endpoint coordinate is the Y-axis component of the compensated position coordinate; The X-axis offset of the arc center is the X-axis component of the actual rotation center. The Y-axis offset of the arc center is the Y-axis component of the actual rotation center.
5. The centering control method for milling after deep hole drilling according to claim 4, characterized in that... The spiral trajectory described by the post-compensation interpolation command satisfies the following geometric constraints: The cross-section of the spiral trajectory at any depth is an arc, and the center of the arc is located at the projection point of the actual rotation center at that depth. The radius of the cross-sectional arc of the helical trajectory at any depth position is equal to the nominal radius of the thread to be processed; The feed rate of the helical trajectory in the depth direction corresponds to the pitch of the thread to be processed; The centerline of the spiral trajectory is the actual centerline trajectory described by the continuous curve model.
6. The centering control method for milling after deep hole drilling according to claim 4, characterized in that... For the first interpolation point, determining the X-axis and Y-axis components of the actual rotation center of the milling spindle includes: superimposing the offset compensation vector onto the initial rotation center of the milling spindle to obtain the coordinates of the actual rotation center.
7. The centering control method for milling after deep hole drilling according to claim 1, characterized in that... The density of interpolation points in the spiral interpolation path is adjusted according to the rate of curvature change of the continuous curve model.
8. The centering control method for milling after deep hole drilling according to claim 1, characterized in that... Determine the center coordinates of the hole at multiple depth locations along the depth direction of the drilled hole, including performing the following operations sequentially for each depth location: Position the probe at the depth location and collect the radial coordinates of the hole wall in at least three different angular directions around the hole wall at the depth location; Based on the radial coordinates of the hole wall, the coordinates of the hole center at the depth position are calculated using the three-point circle method.
9. The centering control method for milling after deep hole drilling according to claim 8, characterized in that... The determination of the hole center coordinates at each depth position and the execution of the helical interpolation path are both based on the same workpiece coordinate system of the same CNC machine tool.
10. The centering control method for milling after deep hole drilling according to claim 9, characterized in that... The probe used to determine the center coordinates of the hole and the milling spindle used for milling are installed in the same spindle unit, and the two are switched by a tool changer. After the probe has completed the determination of the center coordinates of the hole at all depth positions, the probe is switched to a milling cutter by the tool changer and then the helical interpolation path is executed.