Method for optimizing cutting precision of numerical control lathe for machining pentahedron machining center
By generating a simulation model of integrated machining features and coupling it with the kinematic model of the CNC lathe axis system, the problem of cutting accuracy optimization of the five-sided machining center was solved, and the precise matching and smoothing of tool path and servo axis motion were achieved, improving the stability and accuracy of the cutting process.
Patent Information
- Application Number
- CN202610410372.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-03
AI Technical Summary
In the existing technology, the cutting accuracy optimization of CNC lathes for five-sided machining centers fails to effectively integrate the timing constraints of machining features with the theoretical spatial path of the tool, resulting in a disconnect between the simulation model and the actual clamping conditions. The tool path planning fails to accurately match the motion of the servo axis, resulting in sudden motion changes and axis motion adaptation deviations.
A simulation model of the integrated machining feature geometric boundary and temporal constraint relationship is generated, and the tool tip pose sequence is coupled with the CNC lathe axis kinematic model. Look-ahead preprocessing with speed smoothing and jerk constraints is performed to optimize tool path planning.
It achieves a precise correspondence between the simulation model and the actual machining conditions, and a coordinated matching between tool path planning and servo axis motion, thereby improving the smoothness of the cutting process and the accuracy of posture adaptation.
Smart Images

Figure CN122331392A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of CNC machining accuracy control technology, specifically a method for optimizing the cutting accuracy of CNC lathes for machining five-sided machining centers. Background Technology
[0002] Current methods for optimizing the cutting accuracy of CNC lathes used in five-sided machining centers often employ a method of independently retrieving the workpiece's 3D design model and configuring clamping parameters separately for machining simulation. The simulation model only contains the geometric shape data of the machining features; toolpath planning relies on calculations based on a single geometric boundary; servo axis command generation is achieved solely through coordinate transformation; and look-ahead processing uses only a single speed correction method. The machining simulation model constructed using conventional techniques does not integrate the temporal constraints of machining features with the theoretical spatial path of the tool; toolpath planning does not correlate the clamping posture with the working coordinate system; tool tip pose data is not directly coupled with the kinematic model of the CNC lathe's axis system; and look-ahead preprocessing does not simultaneously perform speed smoothing and jerk limiting operations.
[0003] Conventional simulation models are often disconnected from actual clamping conditions and machining timing logic, easily leading to timing conflicts in machining features, toolpath deviations from actual machining conditions, inaccurate matching between tool tip pose changes and physical servo axis motion, abrupt changes in servo axis commands, and deviations in the adaptation between axis motion and tool pose. This invention aims to fuse the original 3D design model with clamping posture information to generate a simulation model integrating machining feature geometric boundaries, timing constraints, and the theoretical spatial path of the tool. It also requires coupling the tool tip pose sequence with the axis kinematic model for calculation and performing look-ahead preprocessing for smoothing axis command execution speed and limiting jerk. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a method for optimizing the cutting accuracy of CNC lathes for machining five-sided machining centers, including: Obtain the original 3D design model of the workpiece to be processed and the preset workpiece clamping posture information; The original three-dimensional design model is combined with the preset workpiece clamping posture information to generate a workpiece machining simulation model in the CNC lathe working coordinate system. The workpiece machining simulation model includes the geometric boundaries of machining features, the constraint relationship of each machining feature in the machining time sequence, and the theoretical spatial path of the tool approaching each machining surface. Based on the constraints of each machining feature in the machining time sequence in the workpiece machining simulation model, the generation sequence of the tool path is planned, and the centerline trajectory of the tool path is calculated according to the geometric boundary of the machining feature. The centerline trajectory of the tool path includes the position sequence and attitude change sequence of the tool tip relative to the workpiece. The position sequence and attitude change sequence of the tool tip relative to the workpiece are coupled with the axis kinematic model of the CNC lathe to calculate the theoretical position command sequence and theoretical speed command sequence of each physical servo axis. The theoretical position command sequence and theoretical speed command sequence of each physical servo axis are subjected to look-ahead preprocessing, which includes speed smoothing and jerk limiting, to generate a smoothed and optimized axis control command sequence.
[0005] Furthermore, the acquisition of the original three-dimensional design model of the workpiece to be processed and the preset workpiece clamping posture information includes: Read the structural contour information and topological relationship of the workpiece to be processed, which are stored in a common CAD format; The reference planes, reference axes and key geometric tolerances in the original 3D design model are analyzed and converted into an internal precision constraint list. The workpiece clamping posture information corresponding to the current process is retrieved from the process planning library of the CNC lathe. The workpiece clamping posture information includes the positioning coordinates of the workpiece on the lathe worktable, the spatial transformation matrix of the workpiece coordinate system relative to the machine tool coordinate system, and the clamping force distribution parameters of the selected fixture. The internal precision constraint list is logically associated with the workpiece clamping posture information to ensure that the geometric tolerances defined in the original three-dimensional design model have a clear detection benchmark under the set clamping posture.
[0006] Furthermore, the original 3D design model is combined with the preset workpiece clamping posture information to generate a workpiece machining simulation model in the CNC lathe working coordinate system, including: Based on the spatial transformation matrix in the preset workpiece clamping posture information, coordinate transformation is performed on all vertex coordinates of the original three-dimensional design model to obtain model geometric data relative to the CNC lathe working coordinate system. Identify the material portion that needs to be removed from the model geometry data after coordinate transformation, and simulate the material removal process using Boolean operations by combining the selected tool geometry parameters from the tool library. During the Boolean operation simulation, the machined surface formed by each tool movement is recorded, and the boundary of the machined surface is extracted as the geometric boundary of the machining feature. The sequence of the cutting tool's access to different areas of the workpiece during the simulated machining process is analyzed to identify the machining sequence that must be followed due to geometric interference or clamping limitations, and to generate the constraint relationship between the machining features in the machining time sequence. Record all the movement trajectories taken by the tool tip and tool axis in order to avoid the fixture and workpiece body during the entire material removal simulation process, forming the theoretical spatial path of the tool approaching each machining surface.
[0007] Furthermore, based on the constraints of each machining feature in the machining timing within the workpiece machining simulation model, the generation sequence of the toolpath is planned, and the centerline trajectory of the toolpath is calculated according to the geometric boundaries of the machining features, including: Traverse the constraints of each machining feature in the machining time sequence in the workpiece machining simulation model, construct a directed acyclic graph with machining features as nodes and time sequence dependencies as edges, and perform topological sorting on the directed acyclic graph to obtain the tool path generation order that satisfies all time sequence constraints. For each machining feature in the toolpath generation sequence, its corresponding geometric boundary is extracted, and the machining method is identified based on the type of the geometric boundary. The machining method includes one of face turning, external turning, internal boring, or grooving. Based on the identified machining method, a target tool compatible with the geometric boundary of the machining feature is matched from a preset tool library, and the geometric parameters of the target tool are obtained. The geometric parameters include at least the tool tip radius, the tool rake angle, and the tool clearance angle. Driven by the geometric boundary of the machining feature, and combined with the geometric parameters of the target tool, an equidistant offset algorithm is used to generate the tool envelope. The tool envelope is then sampled discretely at a preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at each sampling point are calculated to form the centerline trajectory of the tool path. During the calculation of the centerline trajectory, for the transition area between adjacent machining features, a circular arc transition or straight line transition strategy is introduced to eliminate abrupt changes at the trajectory inflection point. The position sequence and attitude change sequence of the tool tip relative to the workpiece after the transition processing are integrated according to the tool path generation order to output a complete tool path centerline trajectory.
[0008] Furthermore, the position sequence and attitude change sequence of the tool tip relative to the workpiece are coupled with the axis kinematic model of the CNC lathe to calculate the theoretical position command sequence and theoretical speed command sequence of each physical servo axis, including: Obtain the shaft system structure parameters of the CNC lathe, which include the lead screw of the translational shaft, the reduction ratio of the rotary shaft, and the spatial configuration relationship between the shafts; Establish the forward and inverse kinematic equations based on the aforementioned shaft system structural parameters; The sequence of the tool tip's position relative to the workpiece and the sequence of its attitude changes are used as inputs to the inverse kinematic equations. Using the inverse kinematics equations, the position settings of each physical servo axis required to achieve the target position and attitude of the tool are calculated point by point, forming the theoretical position command sequence of each axis; The theoretical position command sequence is differentially calculated to obtain the theoretical displacement difference between adjacent command points for each physical servo axis. Combined with the interpolation cycle of the CNC system, the theoretical speed command sequence is calculated.
[0009] Furthermore, the theoretical position command sequence and theoretical velocity command sequence of each physical servo axis are subjected to look-ahead preprocessing, which includes velocity smoothing and jerk limiting processing, including: In the theoretical position command sequence, the step points of theoretical speed commands caused by sudden changes in tool path direction or program segment connections are identified; Using the step point as the analysis center, a preset number of program segments are extracted forward and backward to form a speed smoothing processing window; Within the speed smoothing processing window, polynomial curve fitting technology is used to reconstruct the trajectory of the theoretical position command sequence, and the speed curve of the reconstructed trajectory is planned to make the speed change before and after the step point continuous and smooth. The second derivative of the velocity curve with respect to time is calculated after the velocity is smoothed to obtain the acceleration rate curve. The acceleration change rate curve is compared with the maximum allowable jerk threshold of each servo axis of the CNC lathe. For curve segments that exceed the maximum jerk threshold, the shape of the speed curve is iteratively adjusted to suppress them, ensuring that the acceleration change rate of the entire processed speed curve is always within the range of the maximum jerk threshold.
[0010] Furthermore, during the calculation of the centerline trajectory, for the transition region between adjacent processing features, an arc transition or straight line transition strategy is introduced to eliminate abrupt changes at the trajectory inflection point, including: Traverse the adjacent machining features in the tool path generation sequence, extract the endpoint pose of the tool path centerline trajectory corresponding to the previous machining feature and the starting pose of the tool path centerline trajectory corresponding to the next machining feature, wherein the pose includes the three-dimensional coordinates of the tool tip and the tool axis vector. Calculate the spatial positional relationship between the endpoint pose and the starting pose, and determine whether there is a trajectory inflection point between the endpoint pose and the starting pose due to the discontinuity of the geometric boundary of the processing feature. The inflection point is determined when the angle between the tangent directions of adjacent trajectory segments is greater than a preset angle threshold. If a trajectory inflection point is determined, an arc transition strategy or a straight transition strategy is selected based on the geometric type and machining method of the adjacent machining features: when the adjacent machining features are all rotationally symmetric features and the machining method is external turning or internal boring, an arc transition strategy is selected, using the endpoint pose and the starting pose as endpoints and a preset transition arc radius as the radius of curvature to generate a spatial arc trajectory connecting the endpoint pose and the starting pose; when there are grooving features or end face turning features among the adjacent machining features, a straight transition strategy is selected to generate a straight trajectory connecting the endpoint pose and the starting pose. The circular or straight trajectory is discretely sampled according to the preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at the sampling point are calculated and inserted into the complete tool path centerline trajectory, replacing the original abrupt trajectory segment at the inflection point, so that the tool path centerline trajectory in the transition area is continuous and smooth.
[0011] Furthermore, the acceleration rate of change curve is compared with the maximum allowable jerk threshold for each servo axis of the CNC lathe. For curve segments exceeding the maximum jerk threshold, the shape of the velocity curve is iteratively adjusted to suppress the acceleration, including: The acceleration rate of change curves of each physical servo axis are sampled in segments, the acceleration rate of change value of each sampling point is extracted, and the acceleration rate of change value is compared with the maximum allowable jerk threshold of the corresponding servo axis point by point, and the over-limit curve segments whose acceleration rate of change value exceeds the maximum jerk threshold are marked. For each out-of-limit curve segment, the positions of its starting and ending sampling points in the velocity curve are determined. Taking the starting sampling point as the adjustment starting point, an iterative adjustment method based on velocity curve slope correction is adopted: First, the acceleration change rate exceeding the limit of the out-of-limit curve segment is calculated, where the exceeding limit is the difference between the acceleration change rate value and the maximum acceleration threshold; Second, based on the exceeding limit and a preset adjustment coefficient, the slope of the velocity curve segment corresponding to the out-of-limit curve segment is reduced. Specifically, the order of the polynomial fitting of the velocity curve within the out-of-limit curve segment interval is reduced by one, and the fitting coefficient is recalculated to achieve slope correction. The acceleration rate of change curve is recalculated for the adjusted velocity curve. The newly generated acceleration rate of change curve is compared with the maximum acceleration threshold again. If there are still curve segments that exceed the limit, the slope correction step is repeated until the acceleration rate of change values of all sampling points are less than or equal to the maximum acceleration threshold. After completing the iterative adjustment of all out-of-limit curve segments, the position command sequence corresponding to the final velocity curve is used as part of the axis control command sequence after acceleration limitation processing.
[0012] Furthermore, it also includes an adaptive feed rate adjustment step based on real-time cutting load: When the CNC lathe executes the smoothed and optimized axis control command sequence for machining, the spindle load current signal and the feed axis load torque signal are collected in real time by the spindle current sensor and the feed axis torque sensor. The real-time acquired spindle load current signal and feed axis load torque signal are filtered and feature extracted to calculate the real-time load rate of the current cutting process. The real-time load rate is compared with the recommended load rate range for the corresponding tool material preset in the process database; When the real-time load rate is continuously higher than the upper limit of the recommended load rate range, a feed rate reduction instruction is generated. The feed rate reduction instruction is used to reduce the speed instruction value in the currently executed axis control instruction sequence by a preset ratio. When the real-time load rate is continuously lower than the lower limit of the recommended load rate range, a feed rate increase instruction is generated. The feed rate increase instruction is used to increase the speed instruction value in the currently executed axis control instruction sequence by a preset ratio. The generated feed rate reduction or feed rate increase command is applied in real time to the smoothed and optimized sequence of axis control commands to be executed subsequently.
[0013] Further, the step of filtering and feature extraction of the real-time acquired spindle load current signal and feed axis load torque signal to calculate the real-time load rate of the current cutting process includes: A moving average filter is applied to the spindle load current signal to eliminate high-frequency electrical noise and obtain a smoothed spindle current value. A low-pass filter is applied to the feed axis load torque signal to isolate the low-frequency torque component related to cutting resistance, thereby obtaining a smoothed feed axis torque value. Read the reference values of the spindle no-load current and feed axis no-load torque under the current tool no-load condition from the process database; The difference between the smoothed spindle current value and the spindle no-load current reference value is calculated to obtain the net cutting current, and the difference between the smoothed feed axis torque value and the feed axis no-load torque reference value is calculated to obtain the net cutting torque; Divide the net cutting current and the net cutting torque by their respective rated maximum allowable values to obtain the spindle current load rate and the feed axis torque load rate. The larger value between the spindle current load rate and the feed axis torque load rate is taken as the real-time load rate characterizing the current cutting intensity.
[0014] Compared with the prior art, the beneficial effects of the present invention are: By combining the original 3D design model with the preset workpiece clamping posture information, a workpiece machining simulation model is generated in the CNC lathe working coordinate system. This simulation model synchronously integrates the geometric boundaries of machining features, the constraints of each machining feature in the machining sequence, and the theoretical spatial path of the tool approaching each machining surface. The geometric parameters and timing logic of the machining features are directly related to the tool spatial path. The simulation model achieves precise correspondence with the actual workpiece clamping state and the CNC lathe working coordinate system. The timing constraints of the machining features directly affect the simulation model construction stage. The theoretical spatial path of the tool strictly conforms to the constraints of the geometric boundaries of the machining features. The fusion of clamping posture information and 3D model eliminates the disconnect between the simulation model and the actual machining conditions. The timing logic and geometric boundaries of the machining features are synchronously incorporated into the simulation benchmark. The basic parameters of tool path planning are highly consistent with the actual machining scenario.
[0015] The tool tip position sequence and attitude change sequence relative to the workpiece are coupled with the CNC lathe axis kinematic model for calculation, directly outputting the theoretical position command sequence and theoretical speed command sequence of each physical servo axis. The above two types of command sequences are simultaneously subjected to look-ahead preprocessing for speed smoothing and jerk limiting. The position and attitude changes of the tool tip are accurately mapped to the motion parameters of the physical servo axis. The coupling of the axis kinematic model realizes the direct conversion from pose change to axis motion parameters. Speed smoothing optimizes the speed continuity of axis commands, and jerk limiting constrains the impact characteristics of axis motion. The motion curve of servo axis commands tends to be smoother, and the abrupt changes of axis motion are effectively suppressed. The coordination and matching degree between tool tip pose change and servo axis motion is improved, and the output accuracy of axis control commands is consistent with the actual motion requirements of the tool. The stability of axis motion and pose matching accuracy during cutting are enhanced. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of the CNC lathe cutting accuracy optimization method for five-sided machining centers as described in this invention. Figure 2 A flowchart generated for a workpiece machining simulation model; Figure 3 This is a diagram showing the theoretical position command sequence for the servo axes of a five-axis CNC lathe. Figure 4 This is a graph showing the change in position of the three-axis motion over time. Figure 5 This is a real-time cutting load rate monitoring curve for CNC machining. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 This invention provides a method for optimizing the cutting accuracy of CNC lathes for machining five-sided machining centers. The specific method includes: The process begins by acquiring the original 3D design model of the workpiece and the preset workpiece clamping posture information. The original 3D design model contains the geometric definition of the workpiece, while the workpiece clamping posture information clarifies the workpiece's position and clamping state on the machine tool. Next, the original 3D design model and the preset workpiece clamping posture information are combined. Through coordinate transformation and machining process simulation, a workpiece machining simulation model in the CNC lathe's working coordinate system is generated. This model not only includes the geometric boundaries of the machining features but also defines the sequential constraints of each machining feature during machining, as well as the theoretical spatial movement path required for the tool to approach the machining surface. Based on the machining sequence constraints of each machining feature in the simulation model, the toolpath generation sequence is planned, and the centerline trajectory of the toolpath is calculated according to the geometric boundaries of each machining feature. This trajectory records in detail a series of position coordinates of the tool tip relative to the workpiece and changes in tool posture during machining. The calculated tool tip position and attitude sequence is then coupled with the specific axis kinematic model of the CNC lathe. This kinematic model describes the geometric relationships between the machine tool's axes. Through inverse kinematics calculation, the tool's motion commands are converted into theoretical position and velocity command sequences for each physical servo axis. Finally, the generated theoretical position and velocity command sequences undergo look-ahead preprocessing, which includes velocity smoothing and jerk limiting. Velocity smoothing aims to eliminate abrupt velocity changes in the command sequence, while jerk limiting ensures that the rate of change of axis acceleration remains within acceptable limits. After preprocessing, a smoothed and optimized axis control command sequence is generated to drive the machine tool servo axes to complete high-precision machining.
[0019] In one embodiment of the present invention, the process of acquiring the original three-dimensional design model of the workpiece to be processed and the preset workpiece clamping posture information involves reading the structural contour information and topological relationships of the workpiece stored in a general CAD format, parsing the datum planes, datum axes, and key geometric tolerance annotations in the original three-dimensional design model, and converting them into an internal precision constraint list. The workpiece clamping posture information corresponding to the current process is retrieved from the CNC lathe's process planning library. This information includes the workpiece's positioning coordinates on the lathe worktable, the spatial transformation matrix of the workpiece coordinate system relative to the machine tool coordinate system, and the clamping force distribution parameters of the selected fixture. The internal precision constraint list is logically associated with the workpiece clamping posture information to ensure that the geometric tolerances defined in the original three-dimensional design model have a clear detection benchmark under the set clamping posture.
[0020] By combining the original 3D design model with the preset workpiece clamping posture information, a workpiece machining simulation model in the CNC lathe working coordinate system is generated. (See reference...) Figure 2 Based on the spatial transformation matrix in the preset workpiece clamping posture information, coordinate transformation is performed on the coordinates of all vertices of the original 3D design model to obtain the model's geometric data relative to the CNC lathe's working coordinate system. The material to be removed from the model's geometric data after coordinate transformation is identified, and Boolean operations are performed to simulate the material removal process using the selected tool geometry parameters from the tool library. During the Boolean operation simulation, the machined surfaces formed by each tool movement are recorded, and the boundaries of these machined surfaces are extracted as the geometric boundaries of the machining features. The order in which the tool accesses different areas of the workpiece during the simulation is analyzed, identifying the machining sequence that must be followed due to geometric interference or clamping limitations, and generating the constraints of each machining feature in the machining sequence. All movement trajectories taken by the tool tip and tool axis in the entire material removal simulation process to avoid the fixture and workpiece body are recorded, forming the theoretical spatial path of the tool approaching each machining surface.
[0021] In practice, the structural contour information and topological relationships of the workpiece to be processed, stored in a common CAD format, are read. This process is achieved by calling the kernel interface of commercial CAD software, which can read STEP or IGES format files and extract the boundary representation data structure, including vertex coordinates, edges, surfaces, and topological connections. The datum planes, datum axes, and key geometric tolerance annotations in the original 3D design model are parsed and converted into an internal precision constraint list. This internal precision constraint list is stored in a structured data table, with each row recording a geometric tolerance item, including the tolerance type, datum feature identifier, tolerance zone definition, and allowable deviation value. The workpiece clamping posture information corresponding to the current process is retrieved from the CNC lathe's process planning library. This information includes the workpiece's positioning coordinates on the lathe table, the spatial transformation matrix of the workpiece coordinate system relative to the machine tool coordinate system, and the clamping force distribution parameters of the selected fixture. The process planning library is a database stored in the CNC system or host computer, which predefines various clamping schemes and their parameters based on the workpiece type and process number. The internal precision constraint list is logically associated with the workpiece clamping posture information to ensure that the geometric tolerances defined in the original 3D design model have a clear inspection benchmark under the set clamping posture. The association process is completed by aligning and mapping the benchmark feature identifier of each tolerance in the internal precision constraint list with the origin and coordinate axis direction of the workpiece coordinate system defined by the workpiece clamping posture information.
[0022] In practice, the original 3D design model is combined with the preset workpiece clamping posture information to generate a workpiece machining simulation model in the CNC lathe working coordinate system. This is achieved by transforming the coordinates of all vertices of the original 3D design model according to the spatial transformation matrix in the preset workpiece clamping posture information. The transformation formula is:
[0023] in: In the original 3D design model, the first... Homogeneous coordinate vectors of vertices, It is the initial transformation matrix determined based on the modeling coordinate system of the original 3D design model. It is the spatial transformation matrix of the working coordinate system relative to the machine tool coordinate system contained in the workpiece clamping posture information. These are the vertex coordinates in the model geometry data obtained after transformation, relative to the CNC lathe's working coordinate system. The material to be removed from the transformed model geometry data is identified. Combined with the selected tool geometry parameters from the tool library, a Boolean operation simulation of the material removal process is performed. The Boolean operation is implemented through Boolean subtraction using voxelization or boundary representation. Each movement of the tool in the simulation is treated as a moving sweep body, and a real-time Boolean difference operation is performed with the workpiece model. During the Boolean operation simulation, the machined surfaces formed by each tool movement are recorded, and the boundaries of these machined surfaces are extracted as the geometric boundaries of the machining features. These geometric boundaries are stored as an ordered sequence of spatial points or parametric curve equations. The order of the tool's access to different areas of the workpiece during the simulated machining process is analyzed to identify the machining sequence that must be followed due to geometric interference or clamping limitations. Constraints on the machining sequence of each machining feature are generated. Specifically, these constraints are determined by checking for collision risks between the tool and the machined parts of the workpiece or the fixture when simulating the toolpath in unmachined areas. Record all the movement trajectories taken by the tool tip and tool axis in order to avoid the fixture and workpiece body during the entire material removal simulation process, forming the theoretical spatial path of the tool approaching each machining surface. The theoretical spatial path includes the trajectory from the safety plane to the cutting start point, the trajectory from the cutting end point back to the safety plane, and the connection trajectory between different machining features.
[0024] In one embodiment of the present invention, based on the constraints of machining features in the workpiece machining simulation model in terms of machining timing, the toolpath generation sequence is planned, and the centerline trajectory of the toolpath is calculated according to the geometric boundaries of the machining features. This involves traversing the constraints of machining features in the workpiece machining simulation model in terms of machining timing, constructing a directed acyclic graph with machining features as nodes and timing dependencies as edges, and performing topological sorting on the directed acyclic graph to obtain a toolpath generation sequence that satisfies all timing constraints. For each machining feature in the toolpath generation sequence, its corresponding geometric boundary is extracted, and the machining method is identified based on the type of geometric boundary. The machining method includes one of face turning, external turning, internal boring, or grooving. According to the identified machining method, a target tool compatible with the geometric boundary of the machining feature is matched from a preset tool library, and the geometric parameters of the target tool are obtained. The geometric parameters include at least the tool tip radius, the tool rake angle, and the tool clearance angle. Driven by the geometric boundaries of the machining features and combined with the geometric parameters of the target tool, an equidistant offset algorithm is used to generate the tool envelope. Discrete sampling is performed on the tool envelope according to a preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at each sampling point are calculated to form the centerline trajectory of the tool path.
[0025] During the calculation of the centerline trajectory, for the transition region between adjacent machining features, a circular arc transition or straight line transition strategy is introduced to eliminate abrupt changes at trajectory inflection points. This involves traversing each pair of adjacent machining features in the toolpath generation sequence, extracting the endpoint pose of the toolpath centerline trajectory corresponding to the previous machining feature and the starting pose of the toolpath centerline trajectory corresponding to the next machining feature. The pose includes the three-dimensional coordinates of the tool tip and the tool axis vector. The spatial relationship between the endpoint pose and the starting pose is calculated, and it is determined whether there is a trajectory inflection point between the endpoint pose and the starting pose due to discontinuity in the geometric boundaries of the machining features. The inflection point is determined when the angle between the tangent directions of adjacent trajectory segments is greater than a preset angle threshold. If a trajectory inflection point is determined, an arc transition strategy or a straight transition strategy is selected based on the geometric type and machining method of adjacent machining features: When adjacent machining features are all rotationally symmetric features and the machining method is external turning or internal boring, an arc transition strategy is selected, using the endpoint pose and the starting pose as endpoints and a preset transition arc radius as the radius of curvature to generate a spatial arc trajectory connecting the endpoint pose and the starting pose; when there are grooving features or end-face turning features among adjacent machining features, a straight transition strategy is selected to generate a straight trajectory connecting the endpoint pose and the starting pose. The arc trajectory or straight trajectory is discretely sampled according to a preset interpolation step size, the three-dimensional coordinates of the tool tip and the tool axis vector at the sampling point are calculated, and these are inserted into the complete tool path centerline trajectory, replacing the original abrupt trajectory segment at the inflection point, so that the tool path centerline trajectory in the transition area is continuous and smooth.
[0026] In practical implementation, the constraints of each machining feature in the workpiece machining simulation model on the machining time sequence are traversed. A directed acyclic graph (DAG) is constructed with machining features as nodes and time dependencies as edges. The DAG is then topologically sorted to obtain the toolpath generation sequence that satisfies all time constraints. For example, for a complex workpiece containing drilling, milling planes, and turning outer diameters, the drilling feature must be completed before the milling plane feature to prevent drill bit deflection, and the milling plane feature must be completed before the turning outer diameter feature to ensure the turning datum. These constraints constitute the edges of the DAG. For each machining feature in the toolpath generation sequence, its corresponding geometric boundary is extracted, and the machining method is identified based on the type of geometric boundary. The machining method includes one of the following: end face turning, external turning, internal boring, or grooving. For example, a cylindrical geometric boundary is identified as external turning, and a planar boundary perpendicular to the axis is identified as end face turning. Based on the identified machining method, a target tool compatible with the geometric boundary of the machining feature is matched from the preset tool library, and the geometric parameters of the target tool are obtained. The geometric parameters include at least the tool tip radius, the tool rake angle, and the tool clearance angle. The tool library is a database containing tool models, sizes, materials, and applicable machining types. The matching rules are based on the geometric dimensions and material properties of the machining feature.
[0027] In practical implementation, driven by the geometric boundary of the machining feature and combined with the geometric parameters of the target tool, an equidistant offset algorithm is used to generate the tool envelope. This algorithm offsets the geometric boundary of the machining feature along its normal or tangential direction by a distance determined by the tool tip radius and machining allowance. Discrete sampling is performed on the tool envelope at a preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at each sampling point are calculated to form the centerline trajectory of the tool path. The preset interpolation step size is a user-defined parameter, typically related to the minimum resolution or machining accuracy requirements of the CNC system. During the calculation of the centerline trajectory, for the transition region between adjacent machining features, a circular arc transition or straight line transition strategy is introduced to eliminate abrupt changes at trajectory inflection points. This involves traversing each pair of adjacent machining features in the tool path generation sequence, extracting the endpoint pose of the tool path centerline trajectory corresponding to the previous machining feature and the starting pose of the tool path centerline trajectory corresponding to the next machining feature. The pose includes the three-dimensional coordinates of the tool tip and the tool axis vector. Calculate the spatial relationship between the endpoint pose and the starting pose, and determine whether there is a trajectory inflection point between the endpoint pose and the starting pose due to the discontinuity of the geometric boundary of the processing feature. The inflection point is determined when the angle between the tangent directions of adjacent trajectory segments is greater than a preset angle threshold. For example, if the angle threshold is set to 5 degrees, an inflection point that needs to be processed is determined when the angle between the tangent directions of adjacent trajectory segments exceeds 5 degrees.
[0028] In practical implementation, if a trajectory inflection point is determined, an arc transition strategy or a straight transition strategy is selected based on the geometric type and machining method of adjacent machining features. When both adjacent machining features are rotationally symmetric features and the machining method is external turning or internal boring, an arc transition strategy is selected. Using the endpoint pose and the starting pose as endpoints and a preset transition arc radius as the radius of curvature, a spatial arc trajectory connecting the endpoint pose and the starting pose is generated. The preset transition arc radius is usually set based on the workpiece structural strength and machining process requirements. When there are grooving features or end-face turning features among the adjacent machining features, a straight transition strategy is selected to generate a straight trajectory connecting the endpoint pose and the starting pose. The arc trajectory or straight trajectory is discretized and sampled according to a preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at the sampling point are calculated and inserted into the complete tool path centerline trajectory, replacing the original abrupt trajectory segment at the inflection point, making the tool path centerline trajectory in the transition region continuous and smooth. The calculation of the equidistant offset of the tool envelope involves tool geometric compensation, and its relationship can be expressed as:
[0029] in: The parameters on the geometric boundary of the processing feature are point, It is the unit normal vector at that point. It is the radius of the tip arc of the target tool. It is an additional offset vector determined according to the machining method (such as radial for external turning, axial for face turning), used to compensate for machining allowance. These are the coordinates of the corresponding points on the tool envelope obtained through calculation.
[0030] In one embodiment of the present invention, the position sequence and attitude change sequence of the tool tip relative to the workpiece are coupled with the kinematic model of the CNC lathe's axis system to calculate the theoretical position command sequence and theoretical speed command sequence of each physical servo axis. This obtains the axis system structural parameters of the CNC lathe, which include the lead screw lead of the translational axis, the reduction ratio of the rotary axis, and the spatial configuration relationship between the axes. Forward and inverse kinematic equations based on the axis system structural parameters are established. The position sequence and attitude change sequence of the tool tip relative to the workpiece are used as inputs to the inverse kinematic equations. Using the inverse kinematic equations, the position setpoints of each physical servo axis required to achieve the target position and attitude of the tool are calculated point by point, forming the theoretical position command sequence for each axis. Differential calculations are performed on the theoretical position command sequences to obtain the theoretical displacement difference between adjacent command points for each physical servo axis. Combined with the interpolation cycle of the CNC system, the theoretical speed command sequence is calculated.
[0031] In practical implementation, the shaft system structural parameters of the CNC lathe are obtained. These parameters include the lead screw lead of the translational shaft, the reduction ratio of the rotary shaft, and the spatial configuration relationship between each shaft. The lead screw lead refers to the linear distance the machine tool slide moves when the servo motor rotates one revolution. The reduction ratio refers to the transmission ratio between the servo motor and the rotary table or milling spindle. The spatial configuration relationship describes the perpendicular, parallel, or series relationship between each motion axis. Refer to Table 1 for the specific values of the shaft system structural parameters.
[0032] Table 1: Shaft system structure parameters of a five-axis linkage CNC lathe
[0033] In practical implementation, forward and inverse kinematic equations based on axis structure parameters are established. The forward kinematic equations describe the process of calculating the position and orientation of the tool tip in the workpiece coordinate system when the positions of each physical servo axis are known. The inverse kinematic equations describe the process of solving for the required positions of each physical servo axis when the desired tool tip position and orientation are known. The position sequence and orientation change sequence of the tool tip relative to the workpiece are used as inputs to the inverse kinematic equations. The tool tip position sequence is an array containing a series of three-dimensional coordinate points, and the orientation change sequence is an array containing a series of vectors representing the tool axis directions. Using the inverse kinematic equations, the position setpoints of each physical servo axis required to achieve the target tool position and orientation are calculated point by point, forming the theoretical position command sequence for each axis. The theoretical position command sequence is an array of the same length as the input tool position sequence, with each row corresponding to the theoretical target position of each servo axis (X, Z, C, Y, B, etc.) under one CNC interpolation cycle.
[0034] In practical implementation, the inverse kinematics process involves a mapping from tool space to joint space. For the example five-axis milling and turning machine, its inverse kinematics formula is:
[0035] in: Denotes the inverse kinematics function. It is the first The three coordinate components of the tool tip relative to the workpiece coordinate system. It is the first Unit vector components in the tool axis direction, and They are the first The theoretical rotation angle commands for the C-axis and B-axis corresponding to each interpolation point. They are the first The theoretical linear position commands for the X, Z, and Y axes corresponding to each interpolation point are calculated. The theoretical position command sequence is then differentially calculated to obtain the theoretical displacement difference between adjacent command points for each physical servo axis. Combined with the interpolation cycle of the CNC system, the theoretical speed command sequence is calculated. The interpolation cycle is the basic time unit for the position loop control of the CNC system. The formula for calculating the theoretical speed command sequence is the theoretical displacement difference of the axis divided by the interpolation cycle.
[0036] See Figure 3This is a theoretical position command sequence diagram of a five-axis CNC lathe servo axes, visually demonstrating the position change trends of the four physical axes (X, Z, C, and B) over 50 interpolation cycles. It represents a typical output of inverse kinematics calculation. All axis position curves show a smooth upward trend without abrupt changes, meeting the requirements for smooth speed after look-ahead preprocessing in CNC machining. The C-axis (rotary axis) exhibits the largest displacement, indicating that the current process is dominated by rotational motion. The X / Z / B axes coordinate to complete spatial attitude adjustments, reflecting the collaborative control logic of five-axis linkage. The curves show no severe jitter, indicating that the inverse kinematics calculation and trajectory smoothing are effective, providing a foundation for subsequent cutting accuracy optimization. It can quickly verify the matching between the toolpath and servo axis motion, and detect inter-axis interference or overtravel risks in advance. Combined with the machining sequence, it can locate the motion load of each axis at different process stages, assisting in optimizing cutting parameters and tool life management.
[0037] In one embodiment of the present invention, the theoretical position command sequence and theoretical speed command sequence of each physical servo axis are subjected to look-ahead preprocessing. Look-ahead preprocessing includes speed smoothing and acceleration limiting. In the theoretical position command sequence, step points in the theoretical speed command caused by abrupt changes in toolpath direction or program segment connections are identified. Using the step point as the analysis center, a preset number of program segments are extracted forward and backward to form a speed smoothing window. Within the speed smoothing window, polynomial curve fitting technology is used to reconstruct the trajectory of the theoretical position command sequence, and the speed curve of the reconstructed trajectory is planned to ensure that the speed change before and after the step point is continuous and smooth. The second derivative of the speed curve with respect to time is calculated to obtain the acceleration rate of change curve. The acceleration rate of change curve is compared with the maximum allowable jerk threshold for each servo axis of the CNC lathe. For curve segments exceeding the maximum jerk threshold, the shape of the speed curve is iteratively adjusted to suppress the jerk, ensuring that the acceleration rate of change of the entire processed speed curve remains within the maximum jerk threshold range.
[0038] The acceleration rate of change curve is compared with the maximum allowable jerk threshold for each servo axis of the CNC lathe. For curve segments exceeding the maximum jerk threshold, the shape of the speed curve is iteratively adjusted to suppress the jerk. This involves segmenting the acceleration rate of change curve of each physical servo axis, extracting the acceleration rate of change value at each sampling point, and comparing the acceleration rate of change value with the corresponding maximum allowable jerk threshold point by point to mark the curve segments where the acceleration rate of change value exceeds the maximum jerk threshold. For each curve segment exceeding the limit, the positions of its starting and ending sampling points in the speed curve are determined. Using the starting sampling point as the adjustment starting point, an iterative adjustment method based on speed curve slope correction is adopted: First, the excess amount of the acceleration rate of change of the curve segment is calculated, which is the difference between the acceleration rate of change value and the maximum jerk threshold. Second, based on the excess amount and a preset adjustment coefficient, the slope of the speed curve segment corresponding to the curve segment exceeding the limit is reduced. Specifically, the order of the polynomial fitting of the speed curve within the interval of the curve segment exceeding the limit is reduced by one, and the fitting coefficient is recalculated to achieve slope correction. The acceleration rate of change curve is recalculated based on the adjusted velocity curve. The newly generated acceleration rate of change curve is then compared with the maximum jerk threshold. If any out-of-limit curve segments still exist, the slope correction step is repeated until the acceleration rate of change values at all sampling points are less than or equal to the maximum jerk threshold. After iterative adjustment of all out-of-limit curve segments, the position command sequence corresponding to the final velocity curve is used as part of the axis control command sequence after acceleration limiting processing.
[0039] In practical implementation, the theoretical position command sequence and theoretical speed command sequence of each physical servo axis undergo look-ahead preprocessing. Look-ahead preprocessing includes speed smoothing and acceleration limiting. It identifies step points in the theoretical speed command sequence caused by sudden changes in toolpath direction or program segment connections. A step point is a point where the change in theoretical speed command exceeds a preset threshold within adjacent interpolation cycles, such as the X-axis speed command suddenly changing from 100 mm / s to 10 mm / s. Using the step point as the analysis center, a preset number of program segments are extracted forward and backward to form a speed smoothing window. For example, 50 interpolation points forward and backward form a processing window containing 101 points. Within the speed smoothing window, polynomial curve fitting technology is used to reconstruct the trajectory of the theoretical position command sequence, and the speed curve of the reconstructed trajectory is planned to ensure continuous and smooth speed changes before and after the step point. Polynomial curve fitting typically uses fifth or seventh-order spline curves to ensure the continuity of position, speed, and acceleration.
[0040] In practical implementation, the second derivative of the smoothed velocity curve with respect to time is calculated to obtain the acceleration rate of change curve. The acceleration rate of change is the derivative of acceleration with respect to time, reflecting the degree of change in the servo axis driving force. The acceleration rate of change curve is compared with the maximum allowable jerk threshold for each servo axis of the CNC lathe. For curve segments exceeding the maximum jerk threshold, the shape of the velocity curve is iteratively adjusted to suppress it, ensuring that the acceleration rate of change of the entire processed velocity curve remains within the maximum jerk threshold range. The maximum allowable acceleration threshold for each servo axis of the CNC lathe is determined by the servo drive and mechanical structure characteristics; see Table 2 for typical value examples.
[0041] Table 2: Example Table of Maximum Acceleration Thresholds for Each Servo Axis Servo axis Maximum acceleration threshold (m / s³) X-axis 150 Z-axis 150 Y-axis 120 C-axis 2500 B-axis 2000 In practical implementation, the acceleration rate of change curve is compared with the maximum allowable jerk threshold of each servo axis of the CNC lathe. For curve segments exceeding the maximum jerk threshold, the shape of the speed curve is iteratively adjusted to suppress the jerk. This involves segmenting the acceleration rate of change curve of each physical servo axis, extracting the acceleration rate of change value at each sampling point, and comparing the acceleration rate of change value with the corresponding maximum allowable jerk threshold point by point to mark the curve segments exceeding the maximum jerk threshold. For each curve segment exceeding the limit, the positions of its starting and ending sampling points in the speed curve are determined. Using the starting sampling point as the adjustment starting point, an iterative adjustment method based on speed curve slope correction is adopted. The excess acceleration rate of change of the curve segment is calculated, which is the difference between the acceleration rate of change value and the maximum acceleration threshold. Based on the excess and a preset adjustment coefficient, the slope of the speed curve segment corresponding to the curve segment exceeding the limit is reduced. Specifically, the order of the polynomial fitting of the speed curve within the curve segment interval is reduced by one, and the fitting coefficient is recalculated to achieve slope correction. The acceleration rate of change curve is recalculated based on the adjusted velocity curve. The newly generated acceleration rate of change curve is then compared with the maximum jerk threshold. If any out-of-limit curve segments still exist, the slope correction step is repeated until the acceleration rate of change values at all sampling points are less than or equal to the maximum jerk threshold. After iterative adjustment of all out-of-limit curve segments, the position command sequence corresponding to the final velocity curve is used as part of the axis control command sequence after acceleration limiting. The mathematical expression of velocity curve slope correction involves the velocity function... One way to handle this adjustment is to construct a correction function:
[0042] in: It is the velocity curve function before adjustment. It is a function of the rate of change of acceleration curve. It is the start time of the out-of-limit curve segment. It is an adjustment coefficient between 0 and 1, used to control the magnitude of the correction. It is the new velocity curve function obtained after one iteration. The integral operation is performed within the time interval of the out-of-limit curve segment, aiming to attenuate and correct the original velocity curve according to the out-of-limit situation of the rate of change of acceleration.
[0043] See Figure 4 This is a graph showing the position variation of three axes over time, displaying the position fluctuations of the X, Y, and Z axes within 0-100 seconds. It is commonly used in CNC machining, robot motion control, or vibration monitoring. The X-axis exhibits periodic sinusoidal fluctuations with the largest amplitude, making it the dominant motion axis. The Y-axis fluctuates periodically, with a phase approximately opposite to the X-axis. The Z-axis has the smallest amplitude, changes smoothly, and fluctuates slowly at a low frequency. The X and Y axes show a clear anti-phase periodic motion, presumably a decomposition of in-plane reciprocating or circular motion. The Z-axis exhibits low-frequency, small-amplitude motion, possibly used for height compensation or slow feed. The curves contain slight high-frequency noise, consistent with the actual characteristics of sensor data acquisition or servo control. The absence of sharp abrupt changes indicates that look-ahead smoothing has been implemented in the motion control to ensure motion continuity. Combined with the machining sequence, the motion load on different axes can be analyzed, allowing for optimization of feed rate and acceleration limiting strategies.
[0044] In one embodiment of the present invention, when a CNC lathe executes a smoothed and optimized sequence of axis control commands for machining, the spindle load current signal and feed axis load torque signal are acquired in real time using a spindle current sensor and a feed axis torque sensor. The acquired spindle load current signal and feed axis load torque signal are filtered and feature extracted to calculate the real-time load rate of the current cutting process. The real-time load rate is compared with the recommended load rate range for the corresponding tool material preset in the process database. When the real-time load rate is consistently higher than the upper limit of the recommended load rate range, a feed rate reduction command is generated, which reduces the speed command value in the currently executed axis control command sequence by a preset ratio. When the real-time load rate is consistently lower than the lower limit of the recommended load rate range, a feed rate increase command is generated, which increases the speed command value in the currently executed axis control command sequence by a preset ratio. The generated feed rate reduction or increase command is applied in real time to the subsequent smoothed and optimized sequence of axis control commands to be executed.
[0045] The real-time acquired spindle load current and feed axis load torque signals are filtered and feature extracted to calculate the real-time load rate of the current cutting process. A moving average filter is applied to the spindle load current signal to eliminate high-frequency electrical noise, resulting in a smoothed spindle current value. A low-pass filter is applied to the feed axis load torque signal to isolate low-frequency torque components related to cutting resistance, resulting in a smoothed feed axis torque value. The reference values for the spindle no-load current and feed axis no-load torque under no-load conditions are read from the process database. The difference between the smoothed spindle current value and the reference value is calculated to obtain the net cutting current, and the difference between the smoothed feed axis torque value and the reference value is calculated to obtain the net cutting torque. Both the net cutting current and net cutting torque are divided by their corresponding rated maximum allowable values to obtain the spindle current load rate and feed axis torque load rate. The larger of the spindle current load rate and feed axis torque load rate is taken as the real-time load rate characterizing the current cutting intensity.
[0046] In practice, the adaptive feed rate adjustment step based on real-time cutting load is implemented when the CNC lathe executes a smoothed and optimized sequence of axis control commands. Spindle load current and feed axis load torque signals are acquired in real time using a spindle current sensor and a feed axis torque sensor. The spindle current sensor is typically connected in series in the current feedback loop of the spindle servo drive, while the feed axis torque sensor is usually mounted on the ball screw or servo motor. The acquired spindle load current and feed axis load torque signals are filtered and feature-extracted to calculate the real-time load rate of the current cutting process. The real-time load rate is a percentage value between 0% and 100%, used to quantify the ratio of the current cutting intensity to the tool's rated capacity. The real-time load rate is compared with the recommended load rate range for the corresponding tool material preset in the process database. The process database stores recommended load rate ranges for different combinations of tool materials, workpiece materials, and cutting parameters; for example, the recommended load rate range for turning 45 steel with a carbide tool is 60% to 85%. When the real-time load rate consistently exceeds the upper limit of the recommended load rate range, a feed rate reduction command is generated. This command decreases the speed command value in the currently executing axis control command sequence by a preset percentage, such as 5% each time. When the real-time load rate consistently falls below the lower limit of the recommended load rate range, a feed rate increase command is generated. This command increases the speed command value in the currently executing axis control command sequence by a preset percentage, such as 3% each time. The generated feed rate reduction or increase commands are applied in real-time to the subsequent smoothed and optimized axis control command sequences to be executed. The adjustment process is performed in the command buffer at the front end of the CNC system's interpolator, without affecting the already issued motion commands.
[0047] In practical implementation, the real-time acquired spindle load current signal and feed axis load torque signal are filtered and feature extracted to calculate the real-time load rate of the current cutting process. A moving average filter is applied to the spindle load current signal to eliminate high-frequency electrical noise, resulting in a smoothed spindle current value. The window length of the moving average filter can be set to 10 sampling periods. A low-pass filter is applied to the feed axis load torque signal to isolate low-frequency torque components related to cutting resistance, resulting in a smoothed feed axis torque value. The cutoff frequency of the low-pass filter is typically set to a value much lower than the servo driver switching frequency, such as 100Hz. The spindle no-load current reference value and feed axis no-load torque reference value are read from the process database under no-load conditions. The spindle no-load current reference value is the average current value of the spindle when running without load at a set speed, and the feed axis no-load torque reference value is the average torque value of the feed axis when idling without cutting load at a set speed. The difference between the smoothed spindle current value and the baseline spindle no-load current value is calculated to obtain the net cutting current, which reflects the current component purely used to overcome material shear deformation. The difference between the smoothed feed axis torque value and the baseline feed axis no-load torque value is calculated to obtain the net cutting torque, which reflects the feed direction resistance purely used to overcome material deformation. The net cutting current and net cutting torque are divided by their corresponding rated maximum allowable values to obtain the spindle current load rate and feed axis torque load rate, respectively. The rated maximum allowable value is the safe upper limit for continuous operation of the tool or machine tool components. The larger value between the spindle current load rate and the feed axis torque load rate is taken as the real-time load rate characterizing the current cutting intensity. The formula for calculating the real-time load rate is:
[0048] in: It is the real-time load rate. This is the spindle current value after moving average filtering. This is the reference value for the spindle no-load current. This is the rated maximum continuous operating current of the spindle drive system. This is the feed axis torque value after low-pass filtering. This is the reference value for the feed axis no-load torque. This is the rated maximum continuous output torque of the feed axis drive system. The calculated real-time load rate is updated multiple times per second and compared with the recommended load rate range.
[0049] See Figure 5This is a real-time cutting load rate monitoring curve for CNC machining, visually displaying the fluctuations in spindle current load rate and feed axis torque load rate within 0-100 seconds. It also marks the upper and lower limits of the recommended load rate, serving as the core data basis for adaptive feed rate adjustment. The high synchronization between the spindle and feed axis load rate trends indicates that changes in cutting load are mainly determined by process parameters such as depth of cut and feed rate. For most of the time, the load rate remains within the recommended range of 60%-85%, indicating stable process conditions. Several brief periods below 60% occur, meeting the trigger conditions for adaptive feed rate adjustment. Several brief periods approaching or exceeding 85% peak values also occur, meeting the trigger conditions for adaptive feed rate adjustment. The curve exhibits high-frequency jitter, a typical characteristic of actual sensor data acquisition and filtering, providing a real-time feedback basis for adaptive control.
[0050] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for optimizing the cutting accuracy of a CNC lathe oriented to machining in a pentahedral machining center, characterized by, The method includes: Obtain the original 3D design model of the workpiece to be processed and the preset workpiece clamping posture information; The original three-dimensional design model is combined with the preset workpiece clamping posture information to generate a workpiece machining simulation model in the CNC lathe working coordinate system. The workpiece machining simulation model includes the geometric boundaries of machining features, the constraint relationship of each machining feature in the machining time sequence, and the theoretical spatial path of the tool approaching each machining surface. Based on the constraints of each machining feature in the machining time sequence in the workpiece machining simulation model, the generation sequence of the tool path is planned, and the centerline trajectory of the tool path is calculated according to the geometric boundary of the machining feature. The centerline trajectory of the tool path includes the position sequence and attitude change sequence of the tool tip relative to the workpiece. The position sequence and attitude change sequence of the tool tip relative to the workpiece are coupled with the axis kinematic model of the CNC lathe to calculate the theoretical position command sequence and theoretical speed command sequence of each physical servo axis. The theoretical position command sequence and theoretical speed command sequence of each physical servo axis are subjected to look-ahead preprocessing, which includes speed smoothing and jerk limiting, to generate a smoothed and optimized axis control command sequence.
2. The method for optimizing the cutting accuracy of a CNC lathe oriented to the machining of a pentahedron machining center according to claim 1, characterized in that, The process of obtaining the original three-dimensional design model of the workpiece to be processed and the preset workpiece clamping posture information includes: Read the structural contour information and topological relationship of the workpiece to be processed, which are stored in a common CAD format; The reference planes, reference axes and key geometric tolerances in the original 3D design model are analyzed and converted into an internal precision constraint list. The workpiece clamping posture information corresponding to the current process is retrieved from the process planning library of the CNC lathe. The workpiece clamping posture information includes the positioning coordinates of the workpiece on the lathe worktable, the spatial transformation matrix of the workpiece coordinate system relative to the machine tool coordinate system, and the clamping force distribution parameters of the selected fixture. The internal precision constraint list is logically associated with the workpiece clamping posture information to ensure that the geometric tolerances defined in the original three-dimensional design model have a clear detection benchmark under the set clamping posture.
3. The method for optimizing the cutting accuracy of a CNC lathe oriented to the machining center of a pentahedron according to claim 2, characterized in that, The original 3D design model is combined with the preset workpiece clamping posture information to generate a workpiece machining simulation model in the CNC lathe working coordinate system, including: Based on the spatial transformation matrix in the preset workpiece clamping posture information, coordinate transformation is performed on all vertex coordinates of the original three-dimensional design model to obtain model geometric data relative to the CNC lathe working coordinate system. Identify the material portion that needs to be removed from the model geometry data after coordinate transformation, and simulate the material removal process using Boolean operations by combining the selected tool geometry parameters from the tool library. During the Boolean operation simulation, the machined surface formed by each tool movement is recorded, and the boundary of the machined surface is extracted as the geometric boundary of the machining feature. The sequence of the cutting tool's access to different areas of the workpiece during the simulated machining process is analyzed to identify the machining sequence that must be followed due to geometric interference or clamping limitations, and to generate the constraint relationship between the machining features in the machining time sequence. Record all the movement trajectories taken by the tool tip and tool axis in order to avoid the fixture and workpiece body during the entire material removal simulation process, forming the theoretical spatial path of the tool approaching each machining surface.
4. The method for optimizing the cutting accuracy of a CNC lathe oriented to the machining center of a pentahedron according to claim 3, characterized in that, Based on the constraints of each machining feature in the machining timing in the workpiece machining simulation model, the toolpath generation sequence is planned, and the centerline trajectory of the toolpath is calculated according to the geometric boundaries of the machining features, including: Traverse the constraints of each machining feature in the machining time sequence in the workpiece machining simulation model, construct a directed acyclic graph with machining features as nodes and time sequence dependencies as edges, and perform topological sorting on the directed acyclic graph to obtain the tool path generation order that satisfies all time sequence constraints. For each machining feature in the toolpath generation sequence, its corresponding geometric boundary is extracted, and the machining method is identified based on the type of the geometric boundary. The machining method includes one of face turning, external turning, internal boring, or grooving. Based on the identified machining method, a target tool compatible with the geometric boundary of the machining feature is matched from a preset tool library, and the geometric parameters of the target tool are obtained. The geometric parameters include at least the tool tip radius, the tool rake angle, and the tool clearance angle. Driven by the geometric boundary of the machining feature, and combined with the geometric parameters of the target tool, an equidistant offset algorithm is used to generate the tool envelope. The tool envelope is then sampled discretely at a preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at each sampling point are calculated to form the centerline trajectory of the tool path. During the calculation of the centerline trajectory, for the transition area between adjacent machining features, a circular arc transition or straight line transition strategy is introduced to eliminate abrupt changes at the trajectory inflection point. The position sequence and attitude change sequence of the tool tip relative to the workpiece after the transition processing are integrated according to the tool path generation order to output a complete tool path centerline trajectory.
5. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 4, characterized in that, The position sequence and attitude change sequence of the tool tip relative to the workpiece are coupled with the axis kinematic model of the CNC lathe to calculate the theoretical position command sequence and theoretical speed command sequence of each physical servo axis, including: Obtain the shaft system structure parameters of the CNC lathe, which include the lead screw of the translational shaft, the reduction ratio of the rotary shaft, and the spatial configuration relationship between the shafts; Establish the forward and inverse kinematic equations based on the aforementioned shaft system structural parameters; The sequence of the tool tip's position relative to the workpiece and the sequence of its attitude changes are used as inputs to the inverse kinematic equations. Using the inverse kinematics equations, the position settings of each physical servo axis required to achieve the target position and attitude of the tool are calculated point by point, forming the theoretical position command sequence of each axis; The theoretical position command sequence is differentially calculated to obtain the theoretical displacement difference between adjacent command points for each physical servo axis. Combined with the interpolation cycle of the CNC system, the theoretical speed command sequence is calculated.
6. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 5, characterized in that, The theoretical position command sequence and theoretical velocity command sequence of each physical servo axis are subjected to look-ahead preprocessing, which includes velocity smoothing and jerk limiting processing, including: In the theoretical position command sequence, the step points of theoretical speed commands caused by sudden changes in tool path direction or program segment connections are identified; Using the step point as the analysis center, a preset number of program segments are extracted forward and backward to form a speed smoothing processing window; Within the speed smoothing processing window, polynomial curve fitting technology is used to reconstruct the trajectory of the theoretical position command sequence, and the speed curve of the reconstructed trajectory is planned to make the speed change before and after the step point continuous and smooth. The second derivative of the velocity curve with respect to time is calculated after the velocity is smoothed to obtain the acceleration rate curve. The acceleration change rate curve is compared with the maximum allowable jerk threshold of each servo axis of the CNC lathe. For curve segments that exceed the maximum jerk threshold, the shape of the speed curve is iteratively adjusted to suppress them, ensuring that the acceleration change rate of the entire processed speed curve is always within the range of the maximum jerk threshold.
7. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 6, characterized in that, During the calculation of the centerline trajectory, for the transition region between adjacent processing features, an arc transition or straight line transition strategy is introduced to eliminate abrupt changes at trajectory inflection points, including: Traverse the adjacent machining features in the tool path generation sequence, extract the endpoint pose of the tool path centerline trajectory corresponding to the previous machining feature and the starting pose of the tool path centerline trajectory corresponding to the next machining feature, wherein the pose includes the three-dimensional coordinates of the tool tip and the tool axis vector. Calculate the spatial positional relationship between the endpoint pose and the starting pose, and determine whether there is a trajectory inflection point between the endpoint pose and the starting pose due to the discontinuity of the geometric boundary of the processing feature. The inflection point is determined when the angle between the tangent directions of adjacent trajectory segments is greater than a preset angle threshold. If a trajectory inflection point is determined, an arc transition strategy or a straight transition strategy is selected based on the geometric type and machining method of the adjacent machining features: when the adjacent machining features are all rotationally symmetric features and the machining method is external turning or internal boring, an arc transition strategy is selected, using the endpoint pose and the starting pose as endpoints and a preset transition arc radius as the radius of curvature to generate a spatial arc trajectory connecting the endpoint pose and the starting pose; when there are grooving features or end face turning features among the adjacent machining features, a straight transition strategy is selected to generate a straight trajectory connecting the endpoint pose and the starting pose. The circular or straight trajectory is discretely sampled according to the preset interpolation step size. The three-dimensional coordinates of the tool tip and the tool axis vector at the sampling point are calculated and inserted into the complete tool path centerline trajectory, replacing the original abrupt trajectory segment at the inflection point, so that the tool path centerline trajectory in the transition area is continuous and smooth.
8. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 7, characterized in that, The acceleration rate of change curve is compared with the maximum allowable acceleration threshold for each servo axis of the CNC lathe. For curve segments exceeding the maximum acceleration threshold, the shape of the velocity curve is iteratively adjusted to suppress the acceleration, including: The acceleration rate of change curves of each physical servo axis are sampled in segments, the acceleration rate of change value of each sampling point is extracted, and the acceleration rate of change value is compared with the maximum allowable jerk threshold of the corresponding servo axis point by point, and the over-limit curve segments whose acceleration rate of change value exceeds the maximum jerk threshold are marked. For each out-of-limit curve segment, the positions of its starting and ending sampling points in the velocity curve are determined. Taking the starting sampling point as the adjustment starting point, an iterative adjustment method based on velocity curve slope correction is adopted: First, the acceleration change rate exceeding the limit of the out-of-limit curve segment is calculated, where the exceeding limit is the difference between the acceleration change rate value and the maximum acceleration threshold; Second, based on the exceeding limit and a preset adjustment coefficient, the slope of the velocity curve segment corresponding to the out-of-limit curve segment is reduced. Specifically, the order of the polynomial fitting of the velocity curve within the out-of-limit curve segment interval is reduced by one, and the fitting coefficient is recalculated to achieve slope correction. The acceleration rate of change curve is recalculated for the adjusted velocity curve. The newly generated acceleration rate of change curve is compared with the maximum acceleration threshold again. If there are still curve segments that exceed the limit, the slope correction step is repeated until the acceleration rate of change values of all sampling points are less than or equal to the maximum acceleration threshold. After completing the iterative adjustment of all out-of-limit curve segments, the position command sequence corresponding to the final velocity curve is used as part of the axis control command sequence after acceleration limitation processing.
9. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 8, characterized in that, It also includes an adaptive feed rate adjustment step based on real-time cutting load: When the CNC lathe executes the smoothed and optimized axis control command sequence for machining, the spindle load current signal and the feed axis load torque signal are collected in real time by the spindle current sensor and the feed axis torque sensor. The real-time acquired spindle load current signal and feed axis load torque signal are filtered and feature extracted to calculate the real-time load rate of the current cutting process. The real-time load rate is compared with the recommended load rate range for the corresponding tool material preset in the process database; When the real-time load rate is continuously higher than the upper limit of the recommended load rate range, a feed rate reduction instruction is generated. The feed rate reduction instruction is used to reduce the speed instruction value in the currently executed axis control instruction sequence by a preset ratio. When the real-time load rate is continuously lower than the lower limit of the recommended load rate range, a feed rate increase instruction is generated. The feed rate increase instruction is used to increase the speed instruction value in the currently executed axis control instruction sequence by a preset ratio. The generated feed rate reduction or feed rate increase command is applied in real time to the smoothed and optimized sequence of axis control commands to be executed subsequently.
10. The method for optimizing the cutting accuracy of a CNC lathe for machining five-sided machining centers according to claim 9, characterized in that, The process of filtering and feature extraction of the real-time acquired spindle load current signal and feed axis load torque signal to calculate the real-time load rate of the current cutting process includes: A moving average filter is applied to the spindle load current signal to eliminate high-frequency electrical noise and obtain a smoothed spindle current value. A low-pass filter is applied to the feed axis load torque signal to isolate the low-frequency torque component related to cutting resistance, thereby obtaining a smoothed feed axis torque value. Read the reference values of the spindle no-load current and feed axis no-load torque under the current tool no-load condition from the process database; The difference between the smoothed spindle current value and the spindle no-load current reference value is calculated to obtain the net cutting current, and the difference between the smoothed feed axis torque value and the feed axis no-load torque reference value is calculated to obtain the net cutting torque; Divide the net cutting current and the net cutting torque by their respective rated maximum allowable values to obtain the spindle current load rate and the feed axis torque load rate. The larger value between the spindle current load rate and the feed axis torque load rate is taken as the real-time load rate characterizing the current cutting intensity.