A numerical control grinding machine machining precision control method, system, medium and product

By combining curvature gradient analysis and real-time feedback compensation of CNC grinding machines, local abrupt change zones are identified and predicted compensation values ​​and feedback correction amounts are generated. This solves the problem of insufficient precision caused by thermal drift and abrupt changes in grinding force in the processing of high-precision aspherical optical components by CNC grinding machines, and achieves high-precision and consistent processing results.

CN121733437BActive Publication Date: 2026-05-05BEIJING ROUNDANCE CNC MASCH TOOLS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ROUNDANCE CNC MASCH TOOLS CO LTD
Filing Date
2026-02-27
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

When machining high-precision aspherical optical components, existing CNC grinding machines struggle to cope with sudden changes in grinding force and machine tool thermal drift caused by large differences in the curvature of the workpiece surface, resulting in insufficient machining accuracy and poor consistency.

Method used

By acquiring the digital geometric model of the workpiece, a predetermined machining toolpath is generated and curvature gradient analysis is performed to identify local abrupt change zones. Combined with the operating status of the CNC grinding machine and the material properties of the workpiece, predicted compensation values ​​and real-time feedback correction amounts are generated, and the process parameters are dynamically adjusted using a weighted fusion method.

Benefits of technology

It significantly improves the machining accuracy and consistency of complex curved surface workpieces, enhances the machining capabilities of CNC grinding machines in dynamic environments and complex geometric features, and meets the needs of high-end manufacturing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121733437B_ABST
    Figure CN121733437B_ABST
Patent Text Reader

Abstract

A method, system, medium, and product for controlling the machining accuracy of a CNC grinding machine are disclosed, relating to the field of CNC machining. In this method, a digital geometric model of the workpiece to be machined is acquired, and a predetermined machining toolpath is generated. Along the predetermined toolpath, curvature gradient analysis is performed on the digital geometric model to obtain local abrupt change zones. Based on the curvature, rate of curvature change, and relative position of each machining point to the local abrupt change zones on the predetermined toolpath, a predicted compensation value is generated. During machining, the machining deviation between the actual machining contour of the current machining point and the digital geometric model is acquired, and a feedback correction amount is generated based on the machining deviation. The feedback correction amount and the predicted compensation value corresponding to the current machining point are weighted and fused to generate a composite correction instruction. Based on the composite correction instruction, final process parameters are generated, and the CNC grinding machine is controlled to execute the final process parameters. Implementing the technical solution provided in this application improves the machining accuracy of the workpiece.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of CNC machining, specifically to a method, system, medium, and product for controlling the machining accuracy of a CNC grinding machine. Background Technology

[0002] As a key piece of equipment for precision and ultra-precision machining, the machining accuracy of CNC grinding machines directly determines the performance and reliability of core components in high-end manufacturing. In traditional grinding processes, the setting of process parameters mainly relies on the operator's experience and offline process testing. This method is difficult to adapt to the dynamic changes in the machine tool's state during machining in real time. For example, as machining progresses, key components such as the machine tool spindle and guideways generate heat due to friction and motor operation, leading to thermal deformation of the machine tool structure, i.e., thermal drift. Simultaneously, the grinding force itself can also cause elastic deformation and vibration of the machine tool structure. These dynamic factors can cause the preset process parameters to deviate from their optimal state, ultimately resulting in decreased workpiece machining accuracy and poor consistency.

[0003] To address the shortcomings of static parameter settings in handling dynamic changes, a machining accuracy control method based on real-time feedback has been proposed in the prior art. This method first collects the grinding machine's operating status parameters before machining, and then, in conjunction with the material properties of the workpiece, uses a machine learning model to determine the target process parameters.

[0004] However, the aforementioned existing technologies still have limitations when applied to machining scenarios. For example, in grinding high-precision aspherical optical components, the curvature differences at different locations on the workpiece surface are significant. Current control methods struggle to precisely address the instantaneous abrupt changes in grinding force caused by rapid changes in the workpiece surface geometry. When the grinding wheel transitions from a gently curving surface to a steeply curving surface, the grinding contact area and normal force change drastically. This leads to a brief but intense local deformation and vibration in the machine tool, and existing methods cannot compensate for this local, transient error quickly enough, affecting the workpiece's contour machining accuracy. Summary of the Invention

[0005] This application provides a method, system, medium, and product for controlling the machining accuracy of CNC grinding machines, which improves the machining accuracy of workpieces.

[0006] A first aspect of this application provides a method for controlling the machining accuracy of a CNC grinding machine. The method includes: acquiring a digital geometric model of a workpiece to be machined, and generating a predetermined machining toolpath based on the digital geometric model; performing curvature gradient analysis on the digital geometric model along the predetermined machining toolpath to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold; generating a predicted compensation value based on the curvature, rate of curvature change, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region; before machining begins, acquiring the operating state parameters of the CNC grinding machine and determining initial global process parameters in conjunction with the material properties of the workpiece to be machined; controlling the CNC grinding machine to machine the workpiece according to the initial global process parameters and the predetermined machining toolpath; during machining, acquiring the machining deviation between the actual machining contour of the current machining point and the digital geometric model, and generating a feedback correction amount based on the machining deviation; weightedly fusing the feedback correction amount and the predicted compensation value corresponding to the current machining point to generate a composite correction instruction, generating final process parameters based on the composite correction instruction, and controlling the CNC grinding machine to execute the final process parameters.

[0007] By employing the above technical solutions, a digital geometric model of the workpiece to be processed is obtained, and a predetermined machining toolpath is generated. This allows for precise planning of the machining trajectory and improved machining efficiency. Curvature gradient analysis of the digital geometric model identifies local abrupt changes where the rate of curvature change exceeds a threshold, pre-identifying high-risk areas where accuracy issues may arise during machining. Based on the curvature, rate of curvature change, and relative position of the machining points to local abrupt changes, predictive compensation values ​​are generated. These values ​​allow for the estimation of required compensation amounts in advance, based on the geometric characteristics and positional relationships of the machining points, thereby reducing machining deviations. Before machining, acquiring the operating status parameters of the CNC grinding machine and the material properties of the workpiece allows for the determination of initial global process parameters. This comprehensive consideration of equipment status and workpiece characteristics enables the rational setting of machining parameters, improving machining quality. During machining, by acquiring the deviation between the actual machining contour and the digital model, feedback correction amounts are generated. This allows for timely detection of machining deviations and dynamic adjustment of machining parameters. Weighted fusion of the predictive compensation values ​​and feedback correction amounts yields a composite correction instruction, generating the final process parameters. This approach balances predictive compensation and real-time feedback, comprehensively optimizing and adjusting machining parameters to further improve machining accuracy and ensure machining quality. This technical solution combines curvature gradient analysis with real-time feedback compensation to solve the problem of insufficient machining accuracy caused by thermal drift, sudden changes in grinding force, and variations in the geometric features of complex curved surfaces in traditional CNC grinding. By identifying local abrupt change zones in advance and generating predicted compensation values, and by acquiring machining deviations in real time through structured light scanning during machining, a weighted fusion method is used to dynamically adjust process parameters. This improves the response speed of the machining process to transient errors and achieves synergistic compensation between global and local conditions. The technical effect is a significant improvement in the machining accuracy and consistency of complex curved surface workpieces, enhancing the ability of CNC grinding machines to cope with dynamic machining environments and complex geometric features, thereby meeting the precision machining needs of core components in high-end manufacturing.

[0008] Optionally, the step of performing curvature gradient analysis on the digital geometric model along the predetermined machining path to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold specifically includes: discretizing the predetermined machining path into multiple coordinate points and calculating the curvature value and rate of curvature change at each coordinate point; performing a difference operation on the rate of curvature change of adjacent machining points to obtain a second-order rate of curvature change, and marking machining points where the second-order rate of curvature change exceeds a preset threshold as local abrupt change points; using the local abrupt change points as the core, searching for multiple neighboring abrupt change points whose distance from the local abrupt change point is within a preset distance range and whose rate of curvature change is higher than a preset rate of curvature change; and using the region envelope formed by the local abrupt change point and the neighboring abrupt change points as the local abrupt change region.

[0009] By employing the above technical solution, the predetermined machining toolpath is discretized into multiple coordinate points. The curvature value and rate of change of curvature at each coordinate point are calculated, transforming the continuous toolpath into a discrete set of points, facilitating subsequent analysis and calculation. Differential operations are performed on the rate of change of curvature of adjacent machining points to obtain the second-order rate of change of curvature, which more sensitively reflects the degree of drastic curvature changes. Machining points with a second-order rate of change of curvature exceeding a preset threshold are marked as local abrupt change points, automatically identifying the key points with the most drastic curvature changes. Using the local abrupt change points as the core, neighboring abrupt change points with high rates of change of curvature within a certain distance are searched to find abrupt change regions associated with the local abrupt change points. The envelope of the region formed by the local abrupt change point and its neighboring abrupt change points is used as the local abrupt change region, which can completely characterize the range of regions with drastic curvature changes. Through these steps, local abrupt change regions on the machining toolpath can be accurately and comprehensively identified, providing important reference for subsequent prediction compensation and accuracy control, and helping to improve machining accuracy and surface quality.

[0010] Optionally, generating a predicted compensation value based on the curvature, rate of curvature change, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region specifically includes: for each machining point on the predetermined machining toolpath, calculating the curvature value and rate of curvature change at the location of the machining point, and inputting the curvature and rate of curvature change into a preset predicted compensation model to obtain an initial predicted compensation value for the machining point; determining whether the machining point is located within the local abrupt change region; if it is determined that the machining point is located within the local abrupt change region, then using mathematical morphology methods, calculating a first distance between the machining point and the center of the local abrupt change region and a second distance between the machining point and the boundary of the local abrupt change region; calculating the membership coefficient of the machining point relative to the local abrupt change region using a preset membership function based on the first distance and the second distance; using the membership coefficient as a distance influence factor, superimposing the distance influence factor on the initial predicted compensation value to obtain the predicted compensation value; if the machining point is not located within the local abrupt change region, then using the initial predicted compensation value as the predicted compensation value.

[0011] By employing the above technical solution, for each machining point on the predetermined machining toolpath, the curvature value and rate of change of curvature at that point are calculated and input into the predictive compensation model. This fully utilizes the geometric feature information of the machining points, combined with a machine learning model, to obtain initial predicted compensation values, providing a foundation for subsequent compensation. Determining whether a machining point is located within a local abrupt change region allows for differentiation between machining points inside and outside the region, enabling the adoption of different compensation strategies. For machining points located within a local abrupt change region, mathematical morphology methods are used to calculate the distance between the point and the center and boundary of the region, quantitatively describing the relative position of the machining point within the region. Based on the distances from the machining point to the center and boundary of the region, a membership coefficient is calculated using a preset membership function, reasonably quantifying the degree to which the machining point is affected by the region. Using the membership coefficient as a distance influence factor, and superimposing and correcting it on the initial predicted compensation value, yields more accurate and personalized predicted compensation values. For machining points not located within a region, the initial predicted compensation value is directly used, avoiding unnecessary corrections and improving computational efficiency.

[0012] Optionally, the step of using mathematical morphology methods to calculate the first distance between the processing point and the center of the local mutation region and the second distance between the processing point and the boundary of the local mutation region specifically includes: performing binarization processing on the local mutation region to obtain a binary image; performing morphological dilation operation on the binary image to obtain a dilated binary image; extracting the boundary contour of the local mutation region in the dilated binary image and calculating the geometric center coordinates of the boundary contour; calculating the Euclidean distance between the coordinates of the processing point and the geometric center coordinates as the first distance; and substituting the coordinates of the processing point into a preset boundary contour equation to calculate the normal distance from the processing point to the boundary contour as the second distance.

[0013] By employing the above technical solution, binarization of the local abrupt change region yields a binary image, which clearly distinguishes the abrupt change region from the non-abrupt region, facilitating subsequent morphological operations. Morphological dilation of the binary image expands the extent of the abrupt change region, ensuring its integrity and avoiding the omission of important boundary points. Extracting the boundary contour of the local abrupt change region from the dilated binary image provides the precise boundary shape. Calculating the geometric center coordinates of the boundary contour locates the center of the abrupt change region. Calculating the Euclidean distance between the coordinates of the processing point and the geometric center coordinates as the first distance determines the straight-line distance from the processing point to the center of the abrupt change region, reflecting the relative position of the processing point within the region. Substituting the coordinates of the processing point into the preset boundary contour equation and calculating the normal distance from the processing point to the boundary contour as the second distance accurately describes the vertical distance between the processing point and the boundary of the abrupt change region, reflecting the degree to which the processing point is affected by the edge effect of the abrupt change region. Using the methods described above, mathematical morphology and analytical geometry can be employed to quantitatively calculate the distance between the processing point and the critical location of the local abrupt change zone. This provides a reliable input for subsequent compensation coefficient calculations, improves the spatial adaptability and accuracy of predictive compensation, and helps to better control the processing quality near the abrupt change zone.

[0014] Optionally, the step of obtaining the operating status parameters of the CNC grinding machine and determining the initial global process parameters in combination with the material properties of the workpiece to be processed specifically includes: performing time-domain and frequency-domain analysis on the operating status parameters to extract time-domain and frequency-domain features; generating corresponding quantitative indicators based on the time-domain and frequency-domain features, and determining the initial process parameters in a preset historical process database based on the quantitative indicators; obtaining the material properties of the workpiece to be processed, and correcting the initial process parameters based on the material properties to generate the initial global process parameters.

[0015] By employing the above technical solutions, time-domain and frequency-domain analyses are performed on the operating status parameters of the CNC grinding machine to extract time-domain and frequency-domain features. This allows for the characterization of the equipment's operating status from different perspectives, yielding comprehensive feature information. Based on the extracted time-domain and frequency-domain features, corresponding quantitative indicators are generated, transforming complex equipment states into specific numerical indicators for easier subsequent analysis and judgment. Initial process parameters are determined using these quantitative indicators within a pre-set historical process database. This leverages historical processing experience to quickly find the optimal combination of process parameters similar to the current equipment state, serving as the foundation for processing. The material properties of the workpiece to be processed are obtained, and the initial process parameters are corrected based on these properties to generate initial global process parameters. These parameters can be optimized and adjusted to better suit the physical characteristics of different materials, resulting in processing parameters more suitable for the current workpiece. Through this process, considering both the equipment's operating status and the workpiece's material properties, and making personalized corrections based on historical experience, suitable initial processing parameters can be determined more intelligently and efficiently. This lays the foundation for high-precision machining, improving processing efficiency and quality.

[0016] Optionally, the step of obtaining the machining deviation between the actual machining contour of the current machining point and the digital geometric model, and generating a feedback correction amount based on the machining deviation, specifically includes: acquiring a set of scattered coordinates representing the actual machining contour using a structured light scanner installed on the grinding wheel spindle box of the CNC grinding machine; performing spatial coordinate transformation on the scattered coordinate set to convert the scattered coordinate set to the workpiece coordinate system of the digital geometric model to obtain the corresponding contour point cloud data; performing least-squares registration between the contour point cloud data and the digital geometric model, and calculating the normal deviation between each discrete point and the contour point cloud data using each discrete point on the digital geometric model as a reference to form a normal deviation sequence; performing filtering processing on the normal deviation sequence to generate a machining deviation sequence; determining the deviation areas and deviation values ​​in the actual machining contour that are overcut or undercut according to the machining deviation sequence; if the deviation value is determined to be greater than or equal to a preset tolerance threshold, then determining the feedback correction amount through interpolation based on the deviation value, wherein the feedback correction amount includes a grinding wheel linear speed correction value, a workpiece rotation speed correction value, and a grinding wheel feed amount.

[0017] By employing the above technical solution, a structured light scanner is installed on the grinding wheel spindle box of a CNC grinding machine to collect a set of scattered coordinates representing the actual machining contour. This allows for the rapid and accurate acquisition of the three-dimensional morphology information of the machined surface, providing raw data for subsequent deviation analysis. The collected scattered coordinates are transformed to the workpiece coordinate system of the digital geometric model, yielding corresponding contour point cloud data. This unifies different coordinate systems and facilitates comparison with the digital model. The contour point cloud data is then registered with the digital geometric model using least-squares, and the normal deviation between each discrete point and the contour point cloud data is calculated using each discrete point on the digital model as a reference. This forms a normal deviation sequence, which can accurately quantify the deviation between the actual machining contour and the ideal model, identifying the distribution pattern of machining errors. Filtering the normal deviation sequence generates a machining deviation sequence, removing noise interference and extracting effective deviation signals. Based on the machining deviation sequence, the regions with overcut or undercut deviations in the actual machining contour, along with their numerical values, are identified. This allows for pinpointing areas where machining accuracy is substandard and quantifying the severity of the deviations. If the deviation value is greater than or equal to the preset tolerance threshold, the feedback correction amount is determined through interpolation based on the deviation value. This allows for timely adjustment of process parameters, dynamic compensation for machining deviations, and ensures that machining accuracy meets requirements. Through these measures, machining deviation information can be accurately obtained, machining quality can be precisely assessed, and feedback correction amounts can be generated promptly based on the magnitude of the deviation, achieving closed-loop optimization control and effectively improving machining accuracy and efficiency.

[0018] Optionally, the step of weightedly fusing the feedback correction amount corresponding to the current processing point and the predicted compensation value to generate a composite correction instruction specifically includes: obtaining the geometric coordinates of the current processing point and calculating the shortest distance between the current processing point and the local abrupt change region; calculating a first weight coefficient corresponding to the predicted compensation value and a second weight coefficient corresponding to the feedback correction amount using a preset distance weight mapping function based on the shortest distance; multiplying the predicted compensation value by the first weight coefficient to obtain a weighted predicted compensation value; multiplying the feedback correction amount by the second weight coefficient to obtain a weighted feedback correction amount; and adding the weighted predicted compensation value and the weighted feedback correction amount to obtain the composite correction instruction.

[0019] By employing the above technical solution, the geometric coordinates of the current processing point are obtained, and the shortest distance between this point and the local abrupt change zone is calculated. This allows for the determination of the spatial relationship between the processing point and the abrupt change zone, and an assessment of the degree to which the processing point is affected by the abrupt change zone. Based on the shortest distance, a preset distance weighting mapping function is used to calculate the first weighting coefficient corresponding to the predicted compensation value and the second weighting coefficient corresponding to the feedback correction amount. This allows for a reasonable allocation of the contribution ratios of predicted compensation and feedback correction in the composite correction command, highlighting the predictive compensation role of processing points closer to the abrupt change zone while also considering the dynamic adjustment capability of real-time feedback. Multiplying the predicted compensation value by the first weighting coefficient yields the weighted predicted compensation value, and multiplying the feedback correction amount by the second weighting coefficient yields the weighted feedback correction amount. This allows for a weighted adjustment of predicted compensation and feedback correction, balancing the influence of the two correction methods. Adding the weighted predicted compensation value and the weighted feedback correction amount yields the composite correction command, which comprehensively considers the roles of predicted compensation and feedback correction, generating a more comprehensive and reliable correction command for optimizing and adjusting processing parameters. By combining the above methods with the predictive compensation based on local mutation zone analysis and the correction amount of real-time deviation feedback, we can respond more intelligently and flexibly to sudden situations and dynamic changes in the processing process, improve the processing accuracy and adaptability of CNC grinding machines, and ensure the processing quality of workpieces.

[0020] In a second aspect, embodiments of this application provide a CNC grinding machine machining accuracy control system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the CNC grinding machine machining accuracy control system to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a CNC grinding machine machining accuracy control system, cause the CNC grinding machine machining accuracy control system to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a CNC grinding machine machining accuracy control system, cause the CNC grinding machine machining accuracy control system to execute the method described in the first aspect and any possible implementation thereof.

[0023] In summary, one or more technical solutions provided in this application have at least the following technical effects or advantages:

[0024] 1. This technical solution combines curvature gradient analysis with real-time feedback compensation to solve the problem of insufficient machining accuracy caused by thermal drift, sudden changes in grinding force, and variations in the geometric features of complex curved surfaces in traditional CNC grinding. By identifying local abrupt change zones in advance and generating predicted compensation values, and by acquiring machining deviations in real time through structured light scanning during machining, a weighted fusion method is used to dynamically adjust process parameters. This improves the response speed of the machining process to transient errors and achieves synergistic compensation between global and local conditions. The technical effect is a significant improvement in the machining accuracy and consistency of complex curved surface workpieces, enhancing the ability of CNC grinding machines to cope with dynamic machining environments and complex geometric features, thereby meeting the precision machining needs of core components in high-end manufacturing. Attached Figure Description

[0025] Figure 1 This is a schematic flowchart of a CNC grinding machine machining accuracy control method disclosed in an embodiment of this application;

[0026] Figure 2 This is another schematic flowchart of a CNC grinding machine machining accuracy control method disclosed in the embodiments of this application;

[0027] Figure 3 This is a schematic diagram of the structure of a CNC grinding machine machining accuracy control system provided in an embodiment of this application.

[0028] Explanation of reference numerals in the attached drawings: 301, Central Processing Unit; 302, Read-Only Memory; 303, Random Access Memory; 304, Bus; 305, Input / Output Interface; 306, Input Section; 307, Output Section; 308, Storage Section; 309, Communication Section; 310, Driver; 311, Removable Media. Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0030] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0031] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0032] This application provides a method for controlling the machining accuracy of a CNC grinding machine, referring to... Figure 1 , Figure 1 This is a flowchart illustrating a CNC grinding machine machining accuracy control method provided in an embodiment of this application. The method is applied to a CNC grinding machine machining accuracy control system, which can execute the CNC grinding machine machining accuracy control method program. The method includes steps S101 to S107, as follows:

[0033] Step S101: Obtain the digital geometric model of the workpiece to be processed, and generate a predetermined machining toolpath based on the digital geometric model.

[0034] In step S101, the digital geometric model represents a three-dimensional morphological description of the workpiece stored in data form that can be recognized and processed by a computer, such as a three-dimensional solid model file created by computer-aided design software, like a STEP format file or an IGES format file. The predetermined machining toolpath refers to the ideal motion trajectory sequence that the grinding wheel grinding points should follow in the workpiece coordinate system to achieve the final shape of the workpiece. This trajectory sequence is usually compiled into instruction code executable by the CNC system, such as a G-code program.

[0035] Specifically, the system first loads a digital geometric model file, provided by the design engineer and containing complete geometric information of the workpiece to be processed, from an external storage device or network server. After loading, the system parses the model. Machining personnel then set grinding strategies through a human-machine interface, such as selecting whether the grinding type is external cylindrical grinding or non-circular grinding, setting the total grinding allowance, depth of cut per pass, and the wheel's entry and exit methods. Based on these settings, the system calculates a series of continuous coordinate points to guide the movement of the grinding wheel center or grinding edge, and converts this set of coordinate points into program code conforming to a specific CNC grinding machine syntax format, thereby generating a complete predetermined machining toolpath containing all motion instructions and auxiliary functions for subsequent machining.

[0036] Step S102: Perform curvature gradient analysis on the digital geometric model along the predetermined machining toolpath to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold.

[0037] In step S102, curvature gradient analysis refers to a mathematical calculation process used to quantify the rate of change of the curvature of a geometric shape at a certain point. A local abrupt change zone refers to a specific area on the workpiece surface where the geometry transitions from a gentle curve to a sharp curve, or rapidly changes from one curvature shape to another, such as the junction of a large arc and a small arc. The preset threshold is a value pre-set by engineers based on their machining experience and understanding of the machine tool's dynamic response characteristics, used to determine whether the drastic change in curvature is sufficient to cause significant machining errors.

[0038] Specifically, the system traverses the geometric path corresponding to the predetermined machining toolpath generated in step S101 with a very small discrete step length. At each discrete point, the system calls a geometric analysis algorithm to accurately calculate the surface curvature value of the digital geometric model at that point. After completing the curvature calculation for all points, the system differentiates the obtained curvature value sequence along the toolpath length or performs high-density difference operations to obtain the distribution of the rate of curvature change throughout the toolpath. Subsequently, the system compares the absolute value of the rate of curvature change at each point with a preset threshold. If it is found that the rate of curvature change at all points in a continuous toolpath segment is consistently higher than this threshold, the system identifies and marks this segment as a local abrupt change region, and records the start and end point positions of this region on the predetermined machining toolpath.

[0039] In one possible implementation, curvature gradient analysis is performed on the digital geometric model along a predetermined machining path to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold. This specifically includes steps S1021-S1024, as follows:

[0040] Step S1021: Discretize the predetermined machining toolpath into multiple coordinate points, and calculate the curvature value and curvature change rate at each coordinate point.

[0041] In step S1021, discretization means transforming a continuous geometric curve or path into a sequence of finite, ordered points by sampling with extremely small step sizes. A coordinate point refers to each point in this sequence, each defined by its precise position coordinates in three-dimensional space. The curvature value is a scalar used to quantify the degree of curvature of a curve at a given point; for example, the curvature value of a straight line is zero, while the curvature value of a small-radius arc is larger. The rate of change of curvature refers to the speed at which the curvature value changes along the toolpath length, describing how quickly the degree of curvature changes.

[0042] Specifically, the system first reads the predetermined machining toolpath generated in step S101. Mathematically, this toolpath may consist of multiple spline curves or circular arcs. The system sets a very small step size, such as 0.01 mm, and then, starting from the beginning of the toolpath, records the spatial coordinates of the current point for each step along the path, until the end of the toolpath, thus generating a dense set of tens of thousands of coordinate points. For each coordinate point in this set, the system calls a geometric analysis algorithm to calculate the curvature value of the original continuous toolpath at that point based on the positional information of that point and its immediate neighbors. After completing the curvature calculation for all points, the system performs numerical differentiation operations on the obtained curvature value sequence along the toolpath path, for example, using the central difference method, to obtain the rate of change of curvature corresponding to each coordinate point.

[0043] Step S1022: Perform a difference operation on the curvature change rate of adjacent processing points to obtain the second-order curvature change rate, and mark the processing points whose second-order curvature change rate exceeds the preset threshold as local mutation points.

[0044] In step S1022, the difference operation refers to a numerical method that uses a sequence of discrete points to approximate the calculation of derivatives. The second-order rate of change of curvature refers to the rate of change of curvature itself, that is, the second derivative of curvature with respect to path length. This value can very sensitively reflect the abruptness of geometric transitions. A local abrupt change point refers to the critical point on the entire toolpath where the geometric shape changes most drastically; it can be understood as a singularity or inflection point of change.

[0045] Specifically, the system retrieves the data list generated in step S1021, which contains the rate of curvature change for each coordinate point. The system iterates through this list, performing a difference operation on the rate of curvature change for each point to calculate the second-order rate of curvature change. This calculation is equivalent to taking the second derivative of the original curvature value. Subsequently, the system compares the absolute value of the calculated second-order rate of curvature change for each point with a threshold preset by process experts. This threshold defines the degree of geometrical abrupt change that requires special attention. If the absolute value of the second-order rate of curvature change for a processing point exceeds this preset threshold, the system identifies this point and adds a special marker for it as a local abrupt change point.

[0046] Step S1023: Using the local mutation point as the core, search for multiple neighboring mutation points that are within a preset distance range from the local mutation point and whose rate of curvature change is higher than the preset rate of curvature change.

[0047] In step S1023, the core concept refers to using the local mutation point marked in step S1022 as the center or starting point of the search. A preset distance range defines the size of a search window centered on the local mutation point, used to delineate the neighboring region. A preset rate of curvature change is a threshold value used for filtering; only points with sufficiently significant curvature changes are included in the final region. Neighborhood mutation points refer to those points near the local mutation point that also exhibit strong geometrical change characteristics.

[0048] Specifically, the system initiates a search procedure for each coordinate point marked as a "local mutation point." Centered on this local mutation point, the system expands along the toolpath in both forward and backward directions. The length of this expansion is determined by a preset distance range, for example, searching 3 mm forward and 3 mm backward, forming a search interval with a total length of 6 mm. The system checks all discrete coordinate points falling within this interval. For each point within the interval, the system reads the absolute value of the rate of curvature change calculated in step S1021 and compares it with a preset rate of curvature change threshold. All points with an absolute rate of curvature change higher than this threshold, along with the core local mutation point itself, are grouped into a set. All points in this set together constitute the final, complete local mutation region.

[0049] Step S1024: The region envelope formed by the local mutation point and the neighboring mutation point is taken as the local mutation region.

[0050] In step S1024, the region envelope refers to a continuous segment with a clear start and end point defined by all the points determined in step S1023—that is, a local mutation point and multiple neighboring mutation points—on the original machining toolpath. The local mutation region represents the machining segment with drastic geometric changes that is ultimately identified. This region, defined by the aforementioned region envelope, is the core target area for subsequent machining parameter adjustments, such as speed planning.

[0051] Specifically, the system first integrates all the points searched in step S1023. This set of points includes a core local mutation point and all neighboring mutation points surrounding it. Since these points are selected from the original discretized machining toolpath, each point has a unique sequential index or path length value to indicate its position within the entire toolpath. The system then iterates through this set of points, finding the point with the smallest sequential index and defining it as the starting point of the region's envelope. Simultaneously, the system finds the point with the largest sequential index and defines it as the ending point of the region's envelope. Finally, the system formally marks all continuous path segments from this starting point to this ending point on the original predetermined machining toolpath as an independent local mutation region. This newly generated local mutation region information, including its starting and ending positions on the entire toolpath, is stored for use in subsequent machining process optimization steps.

[0052] Step S103: Generate a predicted compensation value based on the curvature, curvature change rate, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region.

[0053] In step S103, the predicted compensation value refers to a pre-calculated adjustment amount used to proactively offset anticipated machining errors. This adjustment amount is not based on actual measurements, but rather on the analysis of the workpiece's geometric features to predict possible errors at specific locations and intervene in advance. For example, reducing the feed rate before entering a sharp corner is an example of predictive compensation.

[0054] Specifically, the system employs a built-in error prediction model. This model can be a neural network model trained on a large amount of experimental data, or a lookup table storing the correspondence between different geometric features and errors. For each machining point on the predetermined machining toolpath, the system extracts the curvature value and rate of change of curvature of that point from the analysis results of step S102. Simultaneously, the system calculates the distance from that machining point along the toolpath direction to the first local abrupt change zone to be encountered ahead; this distance is the relative position. The system uses these three key geometric feature parameters—curvature, rate of change of curvature, and relative position—as input variables and substitutes them into the error prediction model for calculation. Based on its internal mapping relationship, the model outputs one or a set of specific values, which are the predicted compensation values ​​for that machining point. This value can be an adjustment coefficient for the feed rate or a small offset for the normal feed position of the grinding wheel, aiming to proactively address deviations in the machining contour caused by lag in the dynamic response of the machine tool servo system or sudden changes in grinding force.

[0055] Please refer to Figure 2In one possible implementation, a predicted compensation value is generated based on the curvature, rate of curvature change, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region. This specifically includes steps S201-S210, as follows:

[0056] Step S201: For each machining point on the predetermined machining toolpath, calculate the curvature value and curvature change rate at the location of the machining point, and input the curvature and curvature change rate into the preset prediction compensation model to obtain the initial prediction compensation value of the machining point.

[0057] In step S201, the predetermined machining toolpath refers to a set of ordered coordinate points generated by CAM software based on the workpiece's 3D model before CNC machining, defining the trajectory of the tool's center point. A machining point represents any discrete location on this toolpath. The curvature value is a geometric quantity representing the degree of curvature of the toolpath at the machining point; a larger curvature value indicates a more abrupt turn. The rate of change of curvature refers to how quickly the curvature value changes along the toolpath, describing the transition speed from smooth to curved or vice versa. The preset prediction compensation model is a mathematical model, such as a neural network model or a multiple regression function, pre-established through extensive experimental data or simulation analysis. This model can predict the potential machining error based on the input geometric features. The initial prediction compensation value represents the preliminary error compensation amount output by the prediction compensation model after inputting the curvature and rate of change of curvature of a specific machining point into the model, without considering the influence of the point's relative position within the abrupt change zone.

[0058] Specifically, the system first iterates through each machining point on the predetermined machining toolpath. For the currently processed machining point, the system calculates the tangent vector and normal vector of the toolpath at that point using numerical differentiation based on the coordinate information of that point and its neighboring points, and further solves for the curvature value of that point. Subsequently, the system calculates the difference in curvature value between this point and the previous machining point, and divides it by the arc distance between the two points to obtain the rate of change of curvature. Next, the system uses the calculated curvature value and the rate of change of curvature as inputs into the internally stored preset prediction compensation model. After calculation, the model outputs a compensation value, which is the initial predicted compensation value for that machining point. The system temporarily saves this value for possible adjustments in subsequent steps.

[0059] Step S202: Determine whether the processing point is located within the local mutation region.

[0060] In step S202, the machining point refers to a specific location point on the predetermined machining toolpath currently being analyzed. A local abrupt change region refers to a specific three-dimensional spatial area on the workpiece model that is pre-identified and marked, characterized by features such as sharp corners, small rounded corners, or uneven surface connections.

[0061] Specifically, the system performs a spatial location determination operation. The system acquires the 3D coordinates of the current processing point and reads pre-loaded data describing the geometric extent of the local mutation zone. This geometric extent can be represented by a set of boundary surface equations, a closed triangular mesh model, or a polyhedron defined by its vertices. The system determines whether the coordinates of the current processing point fall within the closed spatial extent defined by the local mutation zone by executing a geometric test algorithm for points within the volume, such as ray casting or a determination based on a directed distance field. If the determination result is yes, the process proceeds to step S203; if the determination result is no, the process jumps to step S210.

[0062] Step S203: If the processing point is determined to be located in the local mutation region, the local mutation region is binarized to obtain a binary image.

[0063] In step S203, the local abrupt change region refers to the specific geometric region identified in step S202 that contains the current processing point. Binarization is an image processing technique used to convert an image with continuous grayscale or multiple color values ​​into an image with only two colors or values, typically black and white or 0 and 1. A binary image represents a digital image obtained after binarization, containing only two pixel values, one representing the target area and the other representing the background.

[0064] Specifically, once the system confirms that the processing point is located within a local mutation region, it creates a two-dimensional or three-dimensional rasterized representation of that region. This is equivalent to projecting or slicing the region onto a pixel grid. The system then iterates through each pixel or voxel in this grid. For each pixel, the system determines whether its center point lies within the geometric definition of the original local mutation region. If it does, the system assigns a value of 1 to the pixel, representing the target region. If it does not, the system assigns a value of 0 to the pixel, representing the background. After this process, the system obtains a binary image that clearly represents the shape and extent of the local mutation region, preparing it for subsequent morphological analysis.

[0065] Step S204: Perform morphological dilation on the binary image to obtain a dilated binary image.

[0066] In step S204, the binary image refers to the digital image generated in step S203, which uses 0 and 1 to represent the shape of the local abrupt change region. Morphological dilation is a basic image morphology operation that expands and grows the highlighted areas in the image (in this case, areas with a value of 1), which can be used to fill holes or smooth boundaries within a target region. The dilated binary image represents the new image obtained after performing a dilation operation on the original binary image; the region representing the local abrupt change region will be larger and fuller than the original region.

[0067] Specifically, the system defines a small structuring element, which is a small binary matrix, such as a 3x3 matrix of all 1s. The system then slides the center of this structuring element across each pixel of the binary image. At each location, the system checks if there is at least one pixel with a value of 1 within the area covered by the structuring element. If so, the pixel value at the corresponding center location in the newly generated dilated binary image is set to 1. If all pixel values ​​within the structuring element's coverage area are 0, the pixel value at the corresponding location in the new image remains 0. This operation extends the boundaries of the regions with values ​​of 1 outwards; the distance and shape of this extension depend on the size and shape of the structuring element used, resulting in a dilated binary image with smoother boundaries and greater internal connectivity.

[0068] Step S205: In the dilated binary image, extract the boundary contours of the local abrupt change regions and calculate the geometric center coordinates of the boundary contours.

[0069] In step S205, the dilated binary image refers to the image after dilation processing in step S204. The boundary contour refers to the set of pixels where the target region with a value of 1 and the background region with a value of 0 intersect in the image. The geometric center coordinates represent the position coordinates obtained by taking the arithmetic mean of the coordinates of all pixels on the boundary contour, also known as the centroid of the contour.

[0070] Specifically, the system first applies an edge detection algorithm, such as the Canny operator or simple neighborhood difference detection, to the dilated binary image to accurately extract the boundaries of regions with a value of 1. This results in a list containing the coordinates of all boundary pixels. The system then iterates through each pixel in this list. The system sums the X-coordinates of all boundary pixels and divides the sum by the total number of boundary pixels to obtain the X-coordinate of the geometric center. Similarly, the system performs the same calculation on all Y-coordinates to obtain the Y-coordinate of the geometric center. If processing in 3D space, this process is also performed on the Z-coordinate. The resulting coordinates are the geometric center coordinates of the dilated contour of the local abrupt change region.

[0071] Step S206: Calculate the Euclidean distance between the coordinates of the machining point and the coordinates of the geometric center, and use it as the first distance.

[0072] In step S206, the coordinates of the machining point refer to the three-dimensional or two-dimensional spatial position of the toolpath point currently being analyzed. The geometric center coordinates refer to the coordinates calculated in step S205, representing the approximate center of the local abrupt change region. Euclidean distance is used to represent the straight-line distance between two points in multidimensional space. The first distance is the name assigned to this specific Euclidean distance connecting the machining point and the geometric center.

[0073] Specifically, the system retrieves the coordinates of the current processing point, such as (Px, Py, Pz), and the coordinates of the geometric center calculated in step S205, such as (Cx, Cy, Cz), from memory. Then, the system applies the standard Euclidean distance calculation formula, which calculates the square root of the sum of the squares of the differences between the two points on each coordinate axis. The calculated scalar value is the first distance, which quantifies the distance of the processing point from the geometric center of the local abrupt change region.

[0074] Step S207: Substitute the coordinates of the processing point into the preset boundary contour equation, calculate the normal distance from the processing point to the boundary contour, and use it as the second distance.

[0075] In step S207, the coordinates of the machining point refer to the spatial location of the currently analyzed toolpath point. The preset boundary profile equation is a predefined mathematical function, such as an implicit equation F(x, y, z) equal to 0, which describes the boundary surface of the original local abrupt change zone. The normal distance represents the shortest distance from a point to a curve or surface, and the direction of the line connecting this shortest distance is perpendicular to the tangent or tangent plane of the curve or surface at the nearest point. The second distance is the name assigned to this specific normal distance from the machining point to the boundary profile.

[0076] Specifically, the system substitutes the coordinates (Px, Py, Pz) of the current processing point into the preset boundary profile equation F(x, y, z) for calculation. The preset boundary profile equation is a predefined implicit surface equation, and the absolute value of the function is usually proportional to the normal distance from the point to the surface, or it is directly the normal distance. The absolute value of F(Px, Py, Pz) is the normal distance from the point to the boundary. This distance reflects the distance of the processing point from the edge of the local abrupt change zone and is measured along a direction perpendicular to the boundary. The system calculates this distance value and names it the second distance.

[0077] Step S208: Based on the first distance and the second distance, calculate the membership coefficient of the processing point relative to the local mutation region using a preset membership function.

[0078] In step S208, the first distance refers to the distance from the processing point to the geometric center of the mutation zone. The second distance refers to the normal distance from the processing point to the boundary of the mutation zone. The preset membership function is a function designed based on fuzzy logic theory. It accepts one or more input variables and outputs a value between 0 and 1, used to describe the degree to which the input object belongs to a certain fuzzy set. The membership coefficient represents the result calculated after inputting the first distance and the second distance into the membership function. This coefficient is used to quantify the importance of the current processing point within the local mutation zone.

[0079] Specifically, the system uses the first distance calculated in step S206 and the second distance calculated in step S207 as two independent variables, inputting them into a pre-designed membership function. The design goal of this function is: when the first distance is small and the second distance is large, it means the processing point is deep inside the local mutation zone, far from the boundary, and the function should output a value close to 1; when the first distance is large or the second distance is small, it means the processing point is close to the edge of the central region of the mutation zone or the boundary of the entire mutation zone, and the function should output a value close to 0. For example, this function can be a two-dimensional Gaussian function or two one-dimensional membership functions, such as triangular or trapezoidal membership functions, combined using fuzzy operators such as the "AND operation". The value between 0 and 1 obtained after the function operation is the membership coefficient.

[0080] In one possible implementation, the preset membership function is: ;

[0081] Where μ(d1, d2) is the membership coefficient of the processing point, with a value range of [0, 1]. The closer it is to 1, the closer the processing point is to the core region of the local mutation zone. d1 is the first distance, d2 is the second distance, σ1 and σ2 are scale parameters that control the distance decay rate. The smaller the value, the more sensitive the distance is to the membership degree. σ1 can be used to adjust the influence range of the center of the local mutation zone, and σ2 can be used to adjust the influence range of the boundary of the local mutation zone.

[0082] Step S209: Using the membership coefficient as the distance influence factor, the distance influence factor is superimposed on the initial predicted compensation value to obtain the predicted compensation value.

[0083] In step S209, the membership coefficient refers to a value between 0 and 1 calculated in step S208, representing the importance of the processing point within the abrupt change zone. The distance influence factor is another name for the membership coefficient, emphasizing that it is derived from distance information and used to influence the final result. The initial predicted compensation value refers to the basic compensation amount calculated in step S201 based solely on curvature and the rate of change of curvature. The predicted compensation value represents the final predicted compensation amount applicable to the current processing point, obtained after correction by the distance influence factor based on the initial predicted compensation value.

[0084] Specifically, the system uses the membership coefficient calculated in step S208 as the distance influence factor. Then, based on the initial predicted compensation value obtained in step S201, the system applies this distance influence factor for correction. One implementation is to multiply the initial predicted compensation value by the distance influence factor. For example, if the initial predicted compensation value is -0.05 mm and the distance influence factor is 0.8, then the final predicted compensation value is -0.05 multiplied by 0.8, resulting in -0.04 mm. The significance of this operation is to adjust the compensation intensity using the relative position of the processing point within the abrupt change zone. When the processing point is located at the core of the abrupt change zone, the distance influence factor is close to 1, and the compensation effect is almost completely preserved; when the processing point is located at the edge of the abrupt change zone, the distance influence factor is close to 0, and the compensation effect is greatly weakened, thus achieving a smooth spatial transition of the compensation effect. The value obtained through this calculation is the final predicted compensation value for that processing point.

[0085] Step S210: If the processing point is not located in the local mutation region, the initial prediction compensation value is used as the prediction compensation value.

[0086] In step S210, the machining point refers to the toolpath point determined in step S202 as not located within any local abrupt change region. The initial predicted compensation value refers to the compensation value calculated in step S201 based solely on path curvature and the rate of change of curvature. The predicted compensation value represents the final predicted compensation amount determined for this machining point in this case.

[0087] Specifically, when the system concludes in step S202 that the current machining point is not within any predefined local abrupt change region, the system skips all intermediate image processing and distance calculation steps and directly executes this step. In this step, the system does not perform any additional calculations or corrections, and directly designates the initial predicted compensation value calculated for the machining point in step S201 as the final predicted compensation value for the machining point. This reflects that when the tool moves in a region with gentle geometry and stable machining conditions, only the dynamic error caused by the path curvature needs to be considered, without introducing complex corrections for specific local geometric features.

[0088] Step S104: Before machining begins, obtain the operating status parameters of the CNC grinding machine and determine the initial global process parameters in conjunction with the material properties of the workpiece to be machined.

[0089] In step S104, the operating status parameters refer to real-time data reflecting the current physical condition of the CNC grinding machine, such as spindle bearing temperature, coolant temperature, and ambient humidity collected by sensors. Material properties refer to the inherent physical and chemical characteristics of the workpiece to be processed, such as hardness, thermal conductivity, and elastic modulus. These properties directly affect the material removal behavior during the grinding process. Initial global process parameters refer to a basic, globally applicable set of machining parameters set for this machining task without considering local geometric changes and real-time deviations, such as the basic grinding wheel linear speed, basic workpiece rotation speed, and basic grinding feed rate.

[0090] Specifically, the moment the operator confirms all preparations are complete and issues the machining start command, the system sends data request commands to multiple sensors installed on key parts of the CNC grinding machine through the integrated sensor interface, thereby acquiring a series of real-time operating status parameters such as spindle motor temperature and guideway lubricating oil pressure. Simultaneously, the system reads the material property information corresponding to the grade of the workpiece to be processed from the machining task sheet or the associated material database, such as tool steel with a hardness of HRC60. The system inputs the collected operating status parameters and material property information into a built-in process parameter optimization decision module. This module, based on a pre-set expert rule base or empirical formula, corrects and optimizes a standard, universally applicable process parameter library, thereby generating a set of initial global process parameters most suitable for the current machine tool state and workpiece material, which will serve as the basis for the current machining.

[0091] In one possible implementation, the operating status parameters of the CNC grinding machine are obtained, and combined with the material properties of the workpiece to be processed, the initial global process parameters are determined, specifically including steps S1041-S1043, as follows:

[0092] Step S1041: Perform time-domain and frequency-domain analysis on the operating status parameters to extract time-domain and frequency-domain features.

[0093] In step S1041, time-domain analysis refers to a signal processing method used to directly study the waveform characteristics of a signal in the time dimension, such as calculating statistical quantities like the signal's mean, variance, and peak value. Frequency-domain analysis refers to a method of transforming a signal from the time domain to the frequency domain for analysis, used to reveal the frequency components and intensities contained in the signal, such as obtaining the signal's spectrum through Fourier transform. Time-domain features represent numerical values ​​extracted through time-domain analysis that describe the signal's characteristics as a function of time; for example, the root mean square value of a vibration signal can represent the magnitude of vibration energy. Frequency-domain features represent numerical values ​​extracted through frequency-domain analysis that describe the frequency structure characteristics of a signal; for example, the dominant frequency of a spindle vibration signal can indicate the presence of a specific periodic vibration source.

[0094] Specifically, the system collects real-time operating parameters of the CNC grinding machine through sensors deployed at key locations such as the spindle, feed motor, and bed. These parameters are typically time-series signals such as vibration, acoustic emission, spindle motor current, and temperature. The system then performs parallel time-domain and frequency-domain analyses on these signal data. In the time-domain analysis, the system calculates a series of statistics, including the signal's mean, standard deviation, root mean square value, kurtosis, and peak-to-peak value, to extract time-domain features reflecting the overall energy, fluctuation level, and impact characteristics of the signal. In the frequency-domain analysis, the system typically uses a Fast Fourier Transform (FFT) algorithm to convert the time-domain signal into a spectrum, and then extracts frequency-domain features such as the centroid frequency, frequency variance, and energy proportion of specific frequency bands from the spectrum to identify dynamic problems such as resonance and imbalance in the machine tool.

[0095] Step S1042: Generate corresponding quantization indicators based on time domain and frequency domain characteristics, and determine initial process parameters based on the quantization indicators in the preset historical process database.

[0096] In step S1042, the quantification index refers to a numerical measure that comprehensively evaluates the operating state of a CNC grinding machine in a specific aspect, obtained by fusing one or more time-domain features and frequency-domain features through a specific algorithm. For example, multiple features such as vibration, current, and temperature can be fused into a "machine tool stability index." The preset historical process database refers to a structured database that stores a large number of historical machining cases. Each record contains the machine tool state quantification index under a specific working condition, the workpiece material, and the corresponding combination of process parameters that has been verified as efficient or high-quality. The initial process parameters represent the closest set of process parameters matched from the historical database based solely on the quantification index of the current machine tool state.

[0097] Specifically, the system integrates the numerous time-domain and frequency-domain features obtained in step S1041 into one or a few quantitative indicators with clear physical meaning, such as "dynamic stability index" or "spindle health score," based on a preset fusion model, such as a weighted summation model or a neural network model. Then, the system uses this or these quantitative indicators as search keys to query a preset historical process database. The database matches one or more of the most similar historical machining cases based on the similarity of the quantitative indicators, such as finding the record with the closest Euclidean distance, and extracts the corresponding process parameters, such as grinding wheel speed, workpiece speed, feed rate, and depth of grinding. This set of parameters constitutes the initial process parameters.

[0098] Step S1043: Obtain the material properties of the workpiece to be processed, and modify the initial process parameters according to the material properties to generate the initial global process parameters.

[0099] In step S1043, material properties refer to the inherent physical, chemical, and mechanical properties of the material used in the workpiece to be processed, such as hardness, thermal conductivity, elastic modulus, and chemical composition. These properties directly affect the material's removal behavior and surface quality during the grinding process. The initial global process parameters represent the set of starting process parameters that are ultimately used to guide this processing task, obtained by further adjusting the initial process parameters according to the specific material properties of the workpiece to be processed.

[0100] Specifically, the system obtains detailed material properties of the workpiece to be processed from external sources, such as the machining task sheet or user input interface. For example, the material grade is GCr15 bearing steel, and the hardness is HRC62. Internally, the system maintains a material property correction rule library or correction function. The system compares the obtained material properties with those recorded in historical cases and activates the corresponding correction rules based on the differences. For example, if the hardness of the current workpiece is higher than that of workpieces in historical cases, the rule library will instruct the system to appropriately reduce the feed rate to prevent burning, and may also need to adjust the grinding wheel speed to maintain a suitable grinding ratio. Based on these rules, the system performs item-by-item correction calculations on the initial process parameters, ultimately generating a new set of process parameters that takes into account both the current real-time state of the machine tool and the material characteristics of the workpiece. This set of initial global process parameters can be used to initiate the subsequent grinding process.

[0101] Step S105: Control the CNC grinding machine to process the workpiece according to the initial global process parameters and the predetermined machining toolpath.

[0102] In step S105, the workpiece processing representation system controlling the CNC grinding machine sends the processing program and basic parameters to the CNC core of the machine tool. The CNC core decodes and converts them into electrical signals to drive each motion axis and the spindle, thereby initiating the physical material removal process.

[0103] Specifically, the system packages the predetermined machining toolpath program file generated in step S101 and the initial global process parameters determined in step S104, such as setting the grinding wheel spindle speed to 2000 rpm, the workpiece speed to 60 rpm, and the grinding feed rate to 50 mm per minute, into a complete machining task package. The system sends this task package to the central controller of the CNC grinding machine via the internal bus or industrial Ethernet. The central controller receives and parses these instructions, and then sends precise pulse and frequency signals to each servo drive and spindle inverter. The servo motors drive the worktable and grinding wheel head, causing the grinding wheel to move precisely along the predetermined machining toolpath. Simultaneously, the spindle motor drives the grinding wheel, and the workpiece spindle drives the workpiece to rotate at the set speed, officially beginning the grinding of the workpiece blank.

[0104] Step S106: During the processing, obtain the processing deviation between the actual processing contour of the current processing point and the digital geometric model, and generate a feedback correction amount based on the processing deviation.

[0105] In step S106, the actual machining profile refers to a set of three-dimensional coordinate data of the actual surface shape of the workpiece after grinding, obtained in real time by an online measuring device. Machining deviation refers to the geometric difference between the actual machining profile and the ideal digital geometric model at the same location point, typically expressed as the difference in normal distance. The feedback correction amount is an adjustment command calculated using a closed-loop control algorithm based on the measured machining deviation, used to correct the deviation.

[0106] Specifically, during the grinding process, an online measuring device, such as a high-frequency laser displacement sensor or a structured light scanning system, installed near the grinding wheel spindle box, follows the grinding wheel and performs a non-contact scan of the workpiece surface after machining. This acquires high-density three-dimensional point cloud data of the surface in real time, forming the actual machining contour. The system then uses a coordinate transformation algorithm to precisely align this point cloud data with the digital geometric model in the same spatial coordinate system. Next, the system calculates the normal distance from each point in the point cloud to the corresponding theoretical surface of the digital geometric model, obtaining a series of quantified machining deviation values. These deviation values ​​are used as input to a feedback control algorithm module, such as a proportional-integral-derivative (PID) controller. Based on the current deviation magnitude, the accumulation of historical deviations, and the rate of change of the deviation, this controller calculates a control output that effectively eliminates the deviation; this output is the feedback correction quantity.

[0107] In one possible implementation, the machining deviation between the actual machining profile of the current machining point and the digital geometric model is obtained, and a feedback correction amount is generated based on the machining deviation. Specifically, this includes steps S1061-S1066, as follows:

[0108] Step S1061: Collect a set of scattered coordinates representing the actual machining contour using a structured light scanner mounted on the grinding wheel spindle box of the CNC grinding machine.

[0109] In step S1061, the structured light scanner refers to a non-contact device that uses the principle of optical triangulation to measure three-dimensional contours. This device calculates the three-dimensional coordinates of surface points by projecting light of a specific pattern onto the surface of an object and capturing the deformation pattern. The grinding wheel spindle box is the core component of a CNC grinding machine that mounts and drives the grinding wheel's rotation. Mounting the structured light scanner here allows it to move in tandem with the grinding wheel, facilitating the measurement of the processing area. The actual processed contour represents the true physical surface shape of the workpiece after grinding. The scattered coordinate set represents the set of three-dimensional spatial coordinates of a series of discrete points described by the structured light scanner, which are defined based on the scanner's own coordinate system.

[0110] Specifically, after a grinding process is completed, the system controls a structured light scanner mounted on the grinding wheel spindle box to move above the surface of the workpiece to be measured. The system triggers the scanner to operate, projecting coded grating stripes onto the actual machined contour surface of the workpiece. Simultaneously, the scanner's camera captures images of the deformed stripes modulated by the workpiece surface contour from a different angle. The scanner's internal computing unit analyzes the degree of deformation of the stripes in the image and, based on the pre-calibrated geometric relationship between the camera and the projector, calculates the three-dimensional coordinates of thousands of points on the workpiece surface using a triangulation algorithm. These coordinate points collectively form a dense set of scattered coordinates, which accurately describes the actual machined contour of the current machining point, but all coordinate points are defined within the internal coordinate system of the structured light scanner.

[0111] Step S1062: Perform spatial coordinate transformation on the scattered coordinate set to convert the scattered coordinate set to the workpiece coordinate system of the digital geometric model to obtain the corresponding contour point cloud data.

[0112] In step S1062, spatial coordinate transformation refers to the process of converting the position information of points in one coordinate system to another target coordinate system through a series of mathematical operations, mainly rotation and translation. The workpiece coordinate system refers to a reference coordinate system set for the workpiece during the design and manufacturing process. The digital geometric model is usually established in this coordinate system, which serves as the unified benchmark for subsequent deviation comparisons. Contour point cloud data refers to the new data set where, after spatial coordinate transformation, the coordinates of all points have been converted to the workpiece coordinate system. At this point, the measurement data and the theoretical model are within the same spatial reference frame.

[0113] Specifically, before executing this step, the system has already obtained the spatial transformation relationship between the structured light scanner coordinate system and the CNC grinding machine workpiece coordinate system through a one-time calibration procedure. This relationship is usually represented by a 4x4 homogeneous transformation matrix. The system retrieves this pre-stored transformation matrix and then iterates through each 3D coordinate point in the scattered coordinate set obtained in step S1061. For each point, the system performs a matrix multiplication operation between the coordinates and the transformation matrix. The result of this operation is a new 3D coordinate, which is the corresponding position of the original point in the workpiece coordinate system. After completing this transformation process for all points in the scattered coordinate set, the system generates contour point cloud data. All points in this data are unified under the workpiece coordinate system, laying the foundation for subsequent direct comparison with the digital geometric model, which is also in the same coordinate system.

[0114] Step S1063: Perform least-squares registration between the contour point cloud data and the digital geometric model, and calculate the normal deviation between each discrete point and the contour point cloud data, using each discrete point on the digital geometric model as a reference, to form a normal deviation sequence.

[0115] In step S1063, least squares registration is an optimization algorithm for data alignment. Its goal is to find an optimal rigid body transformation that minimizes the sum of squared distances between corresponding point pairs in the contour point cloud data and the digital geometric model, thus achieving optimal spatial fit. Each discrete point on the digital geometric model refers to a series of representative sampling points extracted from the surface of the theoretical CAD model. These points collectively constitute the ideal contour used for comparison. Normal deviation refers to the signed distance from a discrete point on the digital geometric model to the actual contour point cloud data, calculated along the normal direction of the surface at that point's location, after accurate registration between the model and the point cloud. The positive or negative sign distinguishes between material excess or deficiency. The normal deviation sequence represents a list of values ​​arranged in a specific order for the normal deviation values ​​of all discrete points on the digital geometric model.

[0116] Specifically, the system first takes the contour point cloud data generated in step S1062 and the pre-loaded digital geometric model as input. The system initiates an iterative registration algorithm, such as the iterative nearest point algorithm. This algorithm first finds the nearest point in the contour point cloud data for each discrete point on the digital geometric model as the initial corresponding point, then calculates a rotation and translation transformation that minimizes the sum of squared distances between these corresponding point pairs, and applies this transformation to the entire contour point cloud data. This process is repeated, with each iteration updating the corresponding point relationships and recalculating the transformation, until the position and orientation of the contour point cloud data no longer change significantly, or the reduction in error between two iterations is lower than a preset small threshold, at which point the optimal registration state is considered to have been reached. After registration, the system again traverses each discrete point on the digital geometric model and calculates the surface normal vector at that point. Along the direction of this normal vector, the system calculates the shortest distance from the discrete point to the actual surface represented by the registered contour point cloud data, and assigns a positive or negative sign to this distance based on the actual surface's position inside or outside the normal direction, thereby obtaining the normal deviation of the point. The system collects the normal deviation values ​​of all discrete points to form an ordered normal deviation sequence.

[0117] Step S1064: Filter the normal deviation sequence to generate a processing deviation sequence.

[0118] In step S1064, filtering is a data processing technique aimed at extracting a smooth signal that reflects the true trend from noisy raw data. Commonly used methods include mean filtering, median filtering, or Gaussian filtering. The normal deviation sequence is the object of processing in this step, and it may contain random noise introduced by the measurement environment or equipment accuracy limitations. The machining deviation sequence refers to the result obtained after filtering the normal deviation sequence. The data points in this sequence are smoother and can more accurately reflect the true contour error caused by systematic factors in the machining process.

[0119] Specifically, the system receives the normal deviation sequence generated in step S1063. Due to factors such as minor vibrations and uneven surface reflection during the measurement process, this sequence contains some high-frequency, irregular fluctuations, which can interfere with the judgment of the actual processing error. To eliminate this noise, the system applies a digital filtering algorithm, such as Gaussian filtering, to the normal deviation sequence. When applying Gaussian filtering, each deviation value in the sequence is replaced by a weighted average value centered at a point determined by a Gaussian function. This weighted average value integrates information from that point and its neighboring points, with the influence of neighboring points decreasing with increasing distance. Through this calculation, isolated noise points and high-frequency jitter in the sequence can be effectively smoothed out, while preserving the overall shape and trend of the error profile. The smoothed sequence output after filtering is the processing deviation sequence, which provides a reliable data foundation for subsequent accurate identification of deviation areas and calculation of deviation values.

[0120] Step S1065: Based on the machining deviation sequence, determine the deviation areas and deviation values ​​in the actual machining contour where there is overcut or undercut.

[0121] In step S1065, overcutting refers to a machining defect where more material is removed during actual processing than the theoretical design, resulting in a workpiece size that is smaller than expected; this usually corresponds to a negative deviation value. Undercutting refers to a machining defect where less material is removed during actual processing than the theoretical design, resulting in a workpiece with excess material and a larger size; this usually corresponds to a positive deviation value. A deviation region refers to a geometric range on the workpiece contour where machining deviations exhibit continuous overcutting or undercutting. The deviation value is a quantitative indicator used to represent the severity of the error within a certain deviation region; it can be the maximum, minimum, or average value of the machining deviation within that region.

[0122] Specifically, the system performs point-by-point analysis on the machining deviation sequence generated in step S1064. The system iterates through the entire sequence, checking the sign of each deviation value. When the system detects a continuous sequence of points with all positive deviation values, it marks the corresponding workpiece geometry as an undercut region. Similarly, when it detects a continuous sequence of points with all negative deviation values, it marks it as an overcut region. After identifying a deviation region, the system further analyzes all deviation values ​​within that region. To obtain a deviation value that represents the overall error level of the region, the system calculates the maximum absolute value of all deviation values ​​within the region, or calculates the arithmetic mean of all deviation values. For example, for an undercut region, the system finds the largest positive deviation value as the deviation value; for an overcut region, it finds the largest negative deviation value as the deviation value. Finally, the system outputs a list containing the location information of all identified deviation regions and the deviation value associated with each region.

[0123] Step S1066: If the deviation value is determined to be greater than or equal to the preset tolerance threshold, the feedback correction amount is determined by interpolation based on the deviation value. The feedback correction amount includes the grinding wheel linear speed correction value, the workpiece rotation speed correction value, and the grinding wheel feed amount.

[0124] In step S1066, the preset tolerance threshold is a pre-set critical error value used to judge whether the processing quality is acceptable. Any deviation exceeding this threshold is considered unacceptable. Interpolation is a mathematical estimation method used to calculate the value at an unknown intermediate point among a series of discrete known data points. For example, it calculates the precise correction amount required for any deviation value by using the known correspondence between deviation and correction amount. The feedback correction amount refers to a set of specific process parameter adjustment values ​​calculated based on the deviation value exceeding the tolerance. This set of adjustment values ​​will be used in subsequent compensation processing to eliminate the discovered processing errors. Specifically, the correction amount includes the grinding wheel linear speed correction value, the workpiece rotation speed correction value, and the grinding wheel feed rate.

[0125] Specifically, the system compares the absolute value of each deviation determined in step S1065 with a preset tolerance threshold stored in the system. If a deviation value is greater than or equal to the threshold, the system determines that the machining error in that deviation area exceeds the quality standard and must be corrected. For this out-of-tolerance deviation value, the system queries a built-in correction model. This model is a multi-dimensional database or function that establishes the correspondence between the machining deviation magnitude and the correction values ​​of three process parameters: grinding wheel linear speed, workpiece speed, and grinding wheel feed rate. Since the database may only store correction values ​​corresponding to a few typical deviation values, for the current specific deviation value, the system uses interpolation to determine the precise correction amount. For example, if the database has correction values ​​corresponding to deviations of 5 micrometers and 10 micrometers, and the current deviation is 7 micrometers, the system will use linear interpolation to calculate the grinding wheel linear speed correction value, workpiece speed correction value, and grinding wheel feed rate corresponding to the 7-micrometer deviation. This entire set of calculated parameter adjustment values ​​constitutes the feedback correction amount, which the system then transmits to the controller of the CNC system for automatic adjustment of the machining parameters for the next operation.

[0126] Step S107: Weight and fuse the feedback correction amount and predicted compensation value corresponding to the current machining point to generate a composite correction instruction, and generate the final process parameters based on the composite correction instruction to control the CNC grinding machine to execute the final process parameters.

[0127] In step S107, weighted fusion refers to an information processing method that assigns different weights to correction signals from different sources based on their reliability or importance, and then combines them into a unified signal. The composite correction instruction is a comprehensive adjustment instruction that integrates predictive and feedback information. The final process parameters refer to the dynamically changing real-time process parameters obtained after applying the composite correction instruction to the basic process parameters, used to control the next processing instant.

[0128] Specifically, for the next small toolpath segment to be machined, the system simultaneously invokes two correction signals. One is the predicted compensation value obtained from the pre-calculation results in step S103, based on the current toolpath position. The other is the feedback correction amount obtained from the real-time calculation results in step S106, based on the measurement results of the previous machining instant. The system sends these two values ​​into a dynamic weighted fusion algorithm module. This algorithm adjusts the weight coefficients according to the positional characteristics of the current machining point: when the machining point is located in a geometrically flat area, the weight of the feedback correction amount is higher because the real-time measurement is more reliable; when the machining point is about to enter a marked local abrupt change zone, the weight of the predicted compensation value is significantly increased to achieve the advantages of feedforward control. Through weighted summation, the system generates a composite correction instruction that can both correct known deviations and anticipate future risks. Finally, the system superimposes this composite correction instruction onto the current process parameters, such as making a micrometer-level adjustment to the normal feed depth of the grinding wheel, thereby generating the final process parameters, and immediately sends these updated parameters to the CNC grinding machine controller to control the grinding behavior in the next tens of milliseconds.

[0129] In one possible implementation, the feedback correction amount and the predicted compensation value corresponding to the current processing point are weighted and fused to generate a composite correction instruction, specifically including steps S1071-S1075, as follows:

[0130] Step S1071: Obtain the geometric coordinates of the current processing point and calculate the shortest distance between the current processing point and the local abrupt change zone.

[0131] In step S1071, the current machining point refers to the instantaneous position point where the tool or grinding wheel contacts the workpiece and performs material cutting during CNC machining. Geometric position coordinates are used to represent the precise spatial position of the current machining point in the machine tool coordinate system or workpiece coordinate system, and are typically composed of a set of three-dimensional values ​​such as X, Y, and Z. The shortest distance represents the minimum Euclidean distance in three-dimensional space between the current machining point and the boundary or all points within the local abrupt change zone.

[0132] Specifically, during machining operations, the system monitors the servo motor encoder readings or program command positions within the CNC system in real time. Using this information, the system can accurately obtain the real-time geometric coordinates of the tool center point or grinding wheel contact point in the workpiece coordinate system. The system then performs geometric calculations with the geometric definition of a local abrupt change zone, such as a polygon composed of a series of vertices or a spatial surface patch. This calculation determines the straight-line distances from the current machining point to every point on the boundary of the zone and to all points within the zone, identifying the minimum value. This minimum value is then determined as the shortest distance between the current machining point and the local abrupt change zone.

[0133] Step S1072: Based on the shortest distance, use a preset distance weight mapping function to calculate the first weight coefficient corresponding to the predicted compensation value and the second weight coefficient corresponding to the feedback correction amount.

[0134] In step S1072, the shortest distance refers to the spatial distance between the current processing point and the local abrupt change zone calculated in step S1071. The preset distance weight mapping function is a predefined mathematical function that receives a distance value as input and outputs two weight coefficient values, the sum of which is typically designed to be 1. The predicted compensation value is a compensation amount pre-calculated for the local abrupt change zone based on historical data or simulation models, used to offset foreseeable systematic processing errors in that area. The first weight coefficient is a multiplication factor calculated by the mapping function corresponding to the predicted compensation value, used to determine the proportion of the predicted compensation value in the final correction instruction. The feedback correction amount is an adjustment amount calculated after online measurement of the actual contour deviation of the previous processing area, used to compensate for measured errors. The second weight coefficient is a multiplication factor calculated by the mapping function corresponding to the feedback correction amount, used to determine the proportion of the feedback correction amount in the final correction instruction.

[0135] Specifically, the system uses the shortest distance value calculated in step S1071 as the independent variable and inputs it into a pre-stored distance weight mapping function. The design logic of this function is as follows: when the shortest distance is very small, it means the processing point is about to enter or is currently in a high-incidence local abrupt change zone, in which case the prediction compensation is more valuable, and therefore the function will output a larger first weight coefficient and a smaller second weight coefficient. Conversely, when the shortest distance is large, it means the processing point is far from the abrupt change zone, and the processing state is stable, in which case feedback correction based on the measured results is more reliable, and the function will output a smaller first weight coefficient and a larger second weight coefficient. For example, this function can be an sigmoid logistic function or a piecewise linear function. By querying or calculating this function, the system can obtain the first weight coefficient corresponding to the predicted compensation value and the second weight coefficient corresponding to the feedback correction amount.

[0136] In one possible implementation, the mathematical formula for the preset distance weight mapping function is:

[0137] First weighting coefficient W1: Second weighting coefficient W2: ;

[0138] Where d is the shortest distance between the current processing point and the local mutation zone, d1 is the first distance threshold, d2 is the second distance threshold, W1 is the first weight coefficient, and W2 is the second weight coefficient.

[0139] When the shortest distance is less than the first distance threshold, the system relies entirely on the predicted compensation value, and the feedback correction amount is not involved. When the shortest distance is between the first and second distance thresholds, the predicted compensation value and the feedback correction amount undergo a linear smooth transition based on distance weights. The closer to the second distance threshold, the greater the weight of the feedback correction amount. When the shortest distance is greater than the second distance threshold, the system relies entirely on the feedback correction amount, and the predicted compensation value is not involved.

[0140] Step S1073: Multiply the predicted compensation value by the first weighting coefficient to obtain the weighted predicted compensation value.

[0141] In step S1073, the predicted compensation value refers to a preliminary error compensation suggestion value given by the prediction model for the local abrupt change zone to be processed. The first weighting coefficient is a numerical factor calculated based on distance in step S1072, used to adjust the influence of the predicted compensation value. The weighted predicted compensation value represents the result obtained after scaling the predicted compensation value using the first weighting coefficient, and this result represents the contribution of the prediction model to the correction command at the current processing point.

[0142] Specifically, the system first retrieves the predicted compensation value corresponding to the currently approaching local abrupt change region from the knowledge base or prediction model module. This value may be a specific toolpath offset or an adjustment value for a set of process parameters. Then, the system obtains the first weighting coefficient calculated in step S1072. Next, the system performs a multiplication operation, multiplying each component of the predicted compensation value by this first weighting coefficient. For example, if the predicted compensation value is a three-dimensional vector, then the X, Y, and Z components of the vector are multiplied by the first weighting coefficient respectively. The new value or vector obtained after the operation is the weighted predicted compensation value, and the system will temporarily store this result for subsequent synthesis.

[0143] Step S1074: Multiply the feedback correction amount by the second weighting coefficient to obtain the weighted feedback correction amount.

[0144] In step S1074, the feedback correction amount refers to a retrospective correction value calculated based on the online measurement results of the processed surface, aimed at eliminating errors that have occurred. The second weighting coefficient refers to a numerical factor calculated based on distance in step S1072, used to adjust the influence of the feedback correction amount. The weighted feedback correction amount represents the result obtained after scaling the feedback correction amount using the second weighting coefficient, and this result represents the contribution of real-time measurement feedback to the correction command at the current processing point.

[0145] Specifically, the system first retrieves the feedback correction amount generated from analyzing online measurement data in previous steps. This correction amount reflects the steady-state processing error in the non-abrupt region that is prevalent under current processing conditions. Simultaneously, the system obtains the second weighting coefficient. Subsequently, the system performs a multiplication operation, multiplying the feedback correction amount by this second weighting coefficient. This calculation process dynamically adjusts the measured error correction effect based on the distance between the current processing point and the abrupt change region. The new value obtained after the calculation is the weighted feedback correction amount, which the system also stores for use in the final instruction synthesis.

[0146] Step S1075: Add the weighted prediction compensation value and the weighted feedback correction amount to obtain the composite correction instruction.

[0147] In step S1075, the weighted prediction compensation value refers to the correction portion representing the contribution of the prediction model, calculated in step S1073. The weighted feedback correction amount refers to the correction portion representing the contribution of the measurement feedback, calculated in step S1074. The composite correction instruction represents the final correction instruction obtained by algebraically summing the two weighted correction amounts. This instruction integrates both predictive compensation and feedback compensation information and will be sent to the CNC system to perform precise machining adjustments.

[0148] Specifically, the system retrieves the weighted predicted compensation value calculated in step S1073 and the weighted feedback correction amount calculated in step S1074 from memory. The system directly adds these two values. The physical significance of this addition operation is that it dynamically merges the compensation amount used to cope with foreseeable sudden errors in the future and the compensation amount used to correct past steady-state errors according to the importance of the current position, thereby forming a comprehensive correction decision that is both forward-looking and adaptive. The final value obtained after addition is the composite correction instruction. The system will convert this instruction into a format that the CNC system can recognize, such as updating a tool radius compensation value or dynamically modifying a piece of G-code, and then send it to the machine tool controller. After receiving the instruction, the controller will immediately adjust the tool's motion trajectory or machining parameters.

[0149] The following describes a CNC grinding machine machining accuracy control system from the perspective of hardware processing in an embodiment of this invention. Please refer to [link / reference]. Figure 3 This is a schematic diagram of the structure of a CNC grinding machine machining accuracy control system in an embodiment of this application.

[0150] It should be noted that, Figure 3 The structure of a CNC grinding machine machining accuracy control system shown is merely an example and should not impose any limitations on the functionality and scope of application of the embodiments of the present invention.

[0151] like Figure 3 As shown, a CNC grinding machine machining accuracy control system includes a central processing unit (CPU) 301, which can execute various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage section 308 into a random access memory (RAM) 303, such as executing the methods described in the above embodiments. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0152] The following components are connected to I / O interface 305: input section 306 including audio input devices, push-button switches, etc.; output section 307 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 308 including a hard disk, etc.; and communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 309 performs communication processing via a network such as the Internet. Drive 310 is also connected to I / O interface 305 as needed. Removable media 311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 310 as needed so that computer programs read from them can be installed into storage section 308 as needed.

[0153] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 309, and / or installed from removable medium 311. When the computer program is executed by central processing unit (CPU) 301, it performs the various functions defined in the present invention.

[0154] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device.

[0155] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In each flowchart or block diagram, each block may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0156] Specifically, the CNC grinding machine machining accuracy control system of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, it implements the CNC grinding machine machining accuracy control method provided in the above embodiment.

[0157] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the CNC grinding machine machining accuracy control system described in the above embodiments; or it may exist independently and not assembled into the CNC grinding machine machining accuracy control system. The storage medium carries one or more computer programs, which, when executed by a processor of the CNC grinding machine machining accuracy control system, enable the CNC grinding machine machining accuracy control system to implement the CNC grinding machine machining accuracy control method based on IoT data encryption transmission provided in the above embodiments.

Claims

1. A method for controlling the machining accuracy of a CNC grinding machine, characterized in that, The method includes: Obtain the digital geometric model of the workpiece to be processed, and generate a predetermined machining toolpath based on the digital geometric model; Along the predetermined machining path, the curvature gradient analysis is performed on the digital geometric model to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold; Based on the curvature, rate of curvature change, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region, a predicted compensation value is generated. Before processing begins, the operating status parameters of the CNC grinding machine are obtained, and the initial global process parameters are determined in combination with the material properties of the workpiece to be processed. The CNC grinding machine is controlled to perform workpiece machining according to the initial global process parameters and the predetermined machining toolpath; During the processing, the processing deviation between the actual processing contour of the current processing point and the digital geometric model is obtained, and a feedback correction amount is generated based on the processing deviation; The feedback correction amount and predicted compensation value corresponding to the current processing point are weighted and fused to generate a composite correction instruction, and the final process parameters are generated based on the composite correction instruction to control the CNC grinding machine to execute the final process parameters. The step of generating a predicted compensation value based on the curvature, rate of curvature change, and relative position of each machining point on the predetermined machining toolpath to the local abrupt change region specifically includes: For each machining point on the predetermined machining toolpath, calculate the curvature value and the rate of curvature change at the location of the machining point, and input the curvature and the rate of curvature change into a preset prediction compensation model to obtain the initial prediction compensation value of the machining point; Determine whether the processing point is located within a local abrupt change region; If it is determined that the processing point is located within a local mutation region, then mathematical morphology methods are used to calculate the first distance between the processing point and the center of the local mutation region and the second distance between the processing point and the boundary of the local mutation region. Based on the first distance and the second distance, the membership coefficient of the processing point relative to the local mutation region is calculated using a preset membership function; The membership coefficient is used as a distance influence factor, and the distance influence factor is added to the initial predicted compensation value to obtain the predicted compensation value; If the processing point is not located in the local mutation region, then the initial prediction compensation value is used as the prediction compensation value; The process of acquiring the operating status parameters of the CNC grinding machine and determining the initial global process parameters in conjunction with the material properties of the workpiece to be processed specifically includes: Perform time-domain and frequency-domain analysis on the operating status parameters to extract time-domain and frequency-domain features; Based on the time-domain features and the frequency-domain features, corresponding quantization indicators are generated, and based on the quantization indicators, initial process parameters are determined in a preset historical process database. Obtain the material properties of the workpiece to be processed, and modify the initial process parameters according to the material properties to generate the initial global process parameters; The step of weightedly fusing the feedback correction amount corresponding to the current processing point and the predicted compensation value to generate a composite correction instruction specifically includes: Obtain the geometric coordinates of the current processing point and calculate the shortest distance between the current processing point and the local abrupt change region; Based on the shortest distance, the first weight coefficient corresponding to the predicted compensation value and the second weight coefficient corresponding to the feedback correction amount are calculated using a preset distance weight mapping function. Multiply the predicted compensation value by the first weighting coefficient to obtain the weighted predicted compensation value; Multiply the feedback correction amount by the second weighting coefficient to obtain the weighted feedback correction amount; The weighted prediction compensation value and the weighted feedback correction amount are added together to obtain the composite correction instruction.

2. The method according to claim 1, characterized in that, The step of performing curvature gradient analysis on the digital geometric model along the predetermined machining path to obtain local abrupt change regions where the rate of curvature change exceeds a preset threshold specifically includes: The predetermined machining toolpath is discretized into multiple coordinate points, and the curvature value and rate of change of curvature at each coordinate point are calculated. The curvature change rate of adjacent processing points is differentially calculated to obtain the second-order curvature change rate, and processing points whose second-order curvature change rate exceeds a preset threshold are marked as local abrupt change points. Using the local mutation point as the core, search for multiple neighboring mutation points that are within a preset distance range from the local mutation point and whose rate of curvature change is higher than a preset rate of curvature change. The region envelope formed by the local mutation point and the neighboring mutation point is defined as the local mutation region.

3. The method according to claim 1, characterized in that, The step of using mathematical morphology methods to calculate the first distance between the processing point and the center of the local mutation region and the second distance between the processing point and the boundary of the local mutation region specifically includes: The local mutation region is binarized to obtain a binary image; Perform morphological dilation on the binary image to obtain a dilated binary image; In the dilated binary image, the boundary contour of the local abrupt change region is extracted, and the geometric center coordinates of the boundary contour are calculated; Calculate the Euclidean distance between the coordinates of the processing point and the coordinates of the geometric center, and use it as the first distance; Substitute the coordinates of the processing point into the preset boundary contour equation to calculate the normal distance from the processing point to the boundary contour, which is then used as the second distance.

4. The method according to claim 1, characterized in that, The process of obtaining the machining deviation between the actual machining contour of the current machining point and the digital geometric model, and generating a feedback correction amount based on the machining deviation, specifically includes: A set of scattered coordinates representing the actual machining contour is acquired by a structured light scanner installed on the grinding wheel spindle box of the CNC grinding machine; The scattered coordinate set is transformed into the workpiece coordinate system of the digital geometric model to obtain the corresponding contour point cloud data. The contour point cloud data is registered with the digital geometric model using least squares, and the normal deviation between each discrete point and the contour point cloud data is calculated based on each discrete point on the digital geometric model to form a normal deviation sequence. The normal deviation sequence is filtered to generate a processing deviation sequence; Based on the processing deviation sequence, determine the deviation areas and deviation values ​​in the actual processing contour where there is overcut or undercutting; If the deviation value is determined to be greater than or equal to a preset tolerance threshold, the feedback correction amount is determined by interpolation based on the deviation value. The feedback correction amount includes the grinding wheel linear speed correction value, the workpiece rotation speed correction value, and the grinding wheel feed amount.

5. A CNC grinding machine machining accuracy control system, characterized in that, The CNC grinding machine machining accuracy control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the CNC grinding machine machining accuracy control system to perform the method as described in any one of claims 1-4.

6. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the CNC grinding machine machining accuracy control system, the CNC grinding machine machining accuracy control system performs the method as described in any one of claims 1-4.

7. A computer program product, characterized in that, When the computer program product is run on the CNC grinding machine machining accuracy control system, the CNC grinding machine machining accuracy control system performs the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Real-time control method, system and device for machining path of shaft linkage curved surface component

    CN120196046A

  • Numerical control machine tool machining reference point correction method and system, terminal and medium

    CN120428649A