Adaptive compensation method and device based on in-machine measurement data and storage medium

By analyzing the deviation between machine measurement data and CAD model, and employing the B-spline surface deformation mapping method, the problem of low machining accuracy and efficiency of complex parts on five-axis CNC machine tools is solved. This achieves efficient and smooth adaptive compensation, which is suitable for machining complex curved surfaces.

CN119758869BActive Publication Date: 2025-10-21TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411870249.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-10-21
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Existing adaptive compensation technology cannot effectively handle the shape and position changes of complex parts in five-axis CNC machining, resulting in low machining accuracy and low efficiency. In particular, for complex free-form surfaces and large-volume, high-mass parts, existing methods have limitations and cumbersome operation procedures.

Method used

By analyzing the deviation between machine measurement data and the CAD model, a deformation mapping method based on B-spline surfaces is used to form a deformed CAD model, thereby achieving adaptive compensation for the toolpath to be machined. The control points are optimized using gradient descent and smoothing objective functions to generate a compensated toolpath with good smoothness.

Benefits of technology

It significantly reduces machining errors and improves machining quality. It is suitable for various complex curved surfaces, maintains toolpath smoothness, and is suitable for parts with complex curvature variations, thereby improving machining accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119758869B_ABST
    Figure CN119758869B_ABST
Patent Text Reader

Abstract

The application provides an adaptive compensation method based on in-machine measurement data, and belongs to the field of machine tool adaptive compensation. The method comprises the following steps: obtaining a CAD model of a workpiece to be machined, in-machine measurement results and a tool path to be compensated; setting a maximum value of a distance square sum of the in-machine measurement results to a machined surface in the CAD model as a target function, iteratively optimizing control points of the machined surface, minimizing the target function, and obtaining a deformed surface corresponding to the machined surface in the CAD model; and using the deformed surface to perform adaptive compensation on the tool path to be compensated, and obtaining a compensated tool path. The application can significantly reduce the machining error of the curved surface, ensure the smoothness of the compensated tool path, has strong applicability, and can be applied to various complex machining curved surfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of adaptive compensation for machine tool cutters, and is directed to an adaptive compensation method, device, and storage medium for on-machine measurement data of a five-axis CNC machine tool. Background Art

[0002] Adaptive machining technology is a typical embodiment of intelligent manufacturing and one of the effective methods to improve machining quality and machining accuracy. It has broad application prospects and practical needs. At present, there are many parts with complex structures or thin walls in the fields of aerospace, automobiles, ships, etc. When processed by traditional machining methods, there are problems such as machining deformation, uneven distribution of allowances, and tool wear affecting machining accuracy, resulting in low pass rate and machining efficiency. With the rapid development of computer technology and digital detection technology, the use of certain on-machine measurement technologies can obtain three-dimensional digital information of the machining status of the workpiece. Through adaptive machining technology, the machine tool can adaptively change the machining strategy according to the measured machining status of the workpiece, solving the contradiction between the parts being machined according to a predetermined program and the inability to adapt to changes in working conditions during the machining process.

[0003] The adaptive compensation method based on on-machine measurement data adapts to the adaptive processing of changes in geometric parameters such as the position, posture and shape of the workpiece by modifying the theoretical tool path or theoretical model. It is mainly used for part datum alignment, solving the problem of rapid clamping and alignment of part blanks with large rough datum errors or large volume and large mass. According to the actual on-machine measurement data of the part, the digital model of the part is modified in time and the processing is reprogrammed to adapt to slight changes in the part's geometric shape and position posture, thereby realizing adaptive processing of shape changes and position transformations. In recent years, with the development of high-end CNC machine tools, digital measurement technology is gradually being applied to the online measurement of five-axis machining centers. The trigger probe installed on the machine tool spindle is used to contact the workpiece surface to realize on-machine measurement of the workpiece, making the processing and detection of the part two-in-one, which will greatly shorten the processing error detection time and can effectively avoid the error caused by the secondary clamping of the workpiece.

[0004] For the adaptive compensation processing method based on measurement data, the existing compensation technology ideas mainly include local compensation, global compensation and a combination of the two.

[0005] Global compensation involves setting a global objective function and implementing adaptive compensation through methods such as coordinate rigid transformation and surface mapping. Existing coordinate rigid transformation methods only adjust the toolpath's coordinate system and cannot adjust the shape of individual tool positions and tool axis vectors. This makes them suitable only for scenarios with minor shape deformations. Existing surface mapping methods, on the other hand, are only suitable for specific, relatively simple surfaces and are not suitable for complex free-form surfaces such as impellers.

[0006] Local compensation is a discrete (local) optimization method that directly calculates the tool's pose offset at discrete points, thereby discretely adjusting the tool's pose to meet the trajectory optimization objective function. This method, typically referred to as mirror compensation, degrades the smoothness of the modified toolpath, requiring extensive filtering, interpolation, or other denoising methods to maintain a good smoothness after compensation.

[0007] This combination of global and local compensation is primarily targeted at surfaces with significant local deformation, where rigid transformations are insufficient and require further local toolpath adjustments based on position-adaptive compensation. This method is widely used in engineering practice. While simpler than global compensation, which allows for one-step compensation, and local compensation, which allows for point-by-point adjustments, this method is more complex. Summary of the Invention

[0008] The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent.

[0009] To this end, the first aspect of the present disclosure provides an adaptive compensation method based on on-machine measurement data. Before finishing or semi-finishing, based on the results of on-machine measurement and the deviation from the CAD model, the surface deformation mapping of the on-machine measurement is studied to form a deformed CAD model, thereby realizing adaptive compensation for the tool path to be processed, reducing the surface processing error in the next processing, ensuring the smoothness of the tool path after compensation, and strong applicability, and can be applied to various complex processing surfaces.

[0010] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:

[0011] A first aspect of the present invention provides an adaptive compensation method based on on-machine measurement data, comprising:

[0012] Step S1, obtaining the CAD model of the workpiece to be processed, the on-machine measurement results and the tool path to be compensated;

[0013] Step S2: setting the maximum value of the sum of squares of distances from the on-machine measurement results to the surface to be processed in the CAD model as an objective function, iteratively optimizing the control points of the surface to be processed to minimize the objective function, and obtaining a deformed surface corresponding to the surface to be processed in the CAD model;

[0014] Step S3: adaptively compensate the tool path to be compensated using the deformed surface to obtain a compensated tool path.

[0015] In some embodiments, the on-machine measurement result in step S1 is an on-machine measurement result obtained by denoising the original on-machine measurement result.

[0016] In some embodiments, the complex surface in the CAD model is composed of a series of B-spline surfaces. The contact positions between the probe and the surface to be machined in the CAD model are used as measurement points for on-machine measurement, with a total of K measurement points. Step S2 specifically includes the following steps:

[0017] Step S21: record the actual measurement result of the kth measurement point as p nk , let p nk The corresponding surface point position is q nk , let p nk The corresponding surface point parameters are (u k ,v k ), q nk =S(u k ,v k ), S(·) is the B-spline surface function, and S(u k ,v k ) along the u direction and the gradient vector S(u k ,v k ) The product of the gradient vector along the v direction is used as the surface point normal vector n k , p nk With q nk The minimum distance between nk With q nk The normal distance Δd k , and use the normal distance as the first objective function, and use the gradient descent method to iteratively optimize the first objective function to solve the surface point parameters (u k ,v k ), output the surface point parameter set corresponding to each measurement point {(u k ,v k )}、surface point set {q nk}、Surface point normal vector set {n k} and the normal distance set from the measurement point to the surface point {Δd k};

[0018] Step S22: Assume the objective function is The objective function is a non-differentiable function. By introducing the smoothing parameter β, the objective function E(C) is transformed into a differentiable objective function E(β, C), where C is the control point matrix of the B-spline surface.

[0019] Step S23: Optimize the differentiable objective function E(β, C) by using the gradient descent method, make the control points progressively iterate to control the surface deformation, and obtain the deformed surface and deformed surface parameters (u opt ,v opt ).

[0020] In some embodiments, in step S21, the iterative optimization of the first objective function using a gradient descent method specifically includes:

[0021] Calculate the gradient of the first objective function along the u and v directions respectively

[0022]

[0023] Among them, S(u k ,v k ) is the surface parameter (u k ,v k ) determines the position of the control point; and They are the i-th basis function and the j-th basis function of the B-spline surface, basis function and The orders of C are p and q respectively; i,j is the control point in the i-th row and j-th column of the control point matrix C, and the dimension of the control point matrix C is m×n;

[0024] Define the constraint range and use the gradient descent method to adjust the surface point parameters (u k ,v k ) to iteratively update and obtain Δd k The minimum value of the corresponding surface point parameter (u k ,v k ),in:

[0025] For k=1, set the surface point parameters (u k ,v k ) is constrained to: u k ∈(u start ,u end ),v k ∈(v start ,v end ),u start 、u end are the upper and lower limits of the parameter u, v start 、v end are the upper and lower limits of the parameter v, respectively.

[0026] For k>1, set the surface point parameters (u k ,v k ) is constrained to: u k ∈(u k-1 -δ u ,u k-1 +δ u ),v k ∈(v k-1 -δ v, v k-1 +δ v ), δ u and δ v are small quantities corresponding to the u and v directions respectively;

[0027] Judge whether it is necessary to modify the constraint range of the surface point parameters for further re-iteration optimization. Specifically:

[0028] For k > 1, for the parameter u in the iterative solution result k and v k Judge respectively: If in the iterative solution result, u k ∈(u start , u start +δ u ) or u[[ID=​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​The corresponding (u k ,v k ); otherwise, there is no need to modify the constraint range of the curve parameters;

[0029] According to the surface point parameters (u k ,v k )Calculate p nk The corresponding surface point position q nk =S(u k ,v k ), and calculate the corresponding surface point normal vector n k ;

[0030] According to the above steps, all the measurement points are traversed and the surface point parameter set corresponding to each measurement point is output {(u k ,v k )}、surface point set {q nk}、Surface point normal vector set {n k} and the normal distance set from the measurement point to the surface point {Δd k}.

[0031] In some embodiments, in step S23, in the process of optimizing the differentiable objective function E(β, C) by using the gradient descent method to progressively iterate the control points to control the deformation of the surface, the expression of the differentiable objective function E(β, C) is:

[0032]

[0033] The gradient of the differentiable objective function E(β, C) is calculated as follows:

[0034]

[0035] in, and They are the i-th basis function and the j-th basis function of the B-spline surface, basis function and The orders of C are p and q respectively; i,j is the control point in the i-th row and j-th column of the control point matrix C, and the dimension of the control point matrix C is m×n;

[0036] After the iteration is terminated, the control point matrix C of the optimized B-spline surface is output opt , and obtain the deformed surface and deformed surface point parameters corresponding to the surface to be processed in the CAD model according to the control point matrix.

[0037] In some embodiments, in step S3, when the deformed surface is used to adaptively compensate the tool path to be compensated, it is necessary to realize the tool tip position T tThe specific steps of simultaneous compensation of tool axis vector V include:

[0038] Calculate the tool center point position T according to the following formula c :

[0039] T c =T t +R·V

[0040] Where R is the tool radius, T t is the tool tip position;

[0041] According to step S21, the tool center point position T is obtained. c The corresponding surface point parameters (u, v), surface point T cq and the surface point normal vector n cq , and obtain the tool center point position T according to steps S22 to S23 c The corresponding deformation surface point parameters (u opt ,v opt ), deformed surface points and the normal vector of the deformed surface point

[0042] Set the tool center point position T c Corresponding deformed surface points and surface point T cq The normal component of the difference is used as the tool center point compensation value, and the compensated tool center point is obtained.

[0043] Assume that the tangent line of two adjacent tool center points is the difference between the surface points corresponding to the positions of the two adjacent tool center points, and the normal vector n of the surface point corresponding to the tool center point position is cq and the tangent line τ at the tool center cq The plane formed is defined as the tool cutting plane, and the tool center point position T c The normal vector of the corresponding deformed surface point Projected onto the cutting plane of the tool, the projection vector is Calculate the projection vector and the surface point normal vector n cq The angle θ is determined by the tool axis vector V and the tool center point tangent τ cq The formed plane is defined as the tool posture plane, and the normal vector of the tool posture plane is c cq , the tool axis vector V is centered around the normal vector c of the tool posture plane cq Rotate θ to get the tool axis vector V after compensation opt ;

[0044] According to the tool center point after compensation and the compensated tool axis vector V opt Calculate the compensated tool position and obtain the compensated tool path.

[0045] In some embodiments, the compensated knife center point The calculation formula is:

[0046]

[0047] In some embodiments, the projection vector The calculation formula is:

[0048]

[0049] The calculation formula of the angle θ is:

[0050] Normal vector c cq The calculation formula is:

[0051]

[0052] Compensated tool axis vector V opt The calculation formula is:

[0053] V opt =Vcosθ+(c cq ×V)sinθ+(c cq ·V)(1-cosθ)c cq .

[0054] A second aspect of the present invention provides an apparatus according to the adaptive compensation method described in any embodiment of the first aspect of the present invention, comprising:

[0055] The first module is used to obtain the CAD model of the workpiece to be processed, the on-machine measurement results and the tool path to be compensated;

[0056] The second module is used to set the maximum value of the sum of squares of distances from the on-machine measurement results to the surface to be processed in the CAD model as an objective function, iteratively optimize the control points of the surface to be processed to minimize the objective function, and obtain a deformed surface corresponding to the surface to be processed in the CAD model;

[0057] The second module is used to perform adaptive compensation on the tool path to be compensated by using the deformed surface to obtain a compensated tool path.

[0058] A third aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the adaptive compensation method according to any embodiment of the first aspect of the present invention.

[0059] Compared with the prior art, the present invention has the following characteristics and beneficial effects:

[0060] This method provides an adaptive compensation machining method based on on-machine measurement data, achieving adaptive compensation of five-axis tool paths for complex curved surfaces in two steps. Compared with other existing methods, this method has the following significant advantages:

[0061] 1. Use efficient measurement technology to obtain three-dimensional digital information of the workpiece processing status, and compensate and correct the theoretical tool path or theoretical model based on the measured processing status of the workpiece, significantly reducing the processing error after compensation. The proposed surface deformation method based on on-machine measurement has a very strong surface deformation capability, which makes the deformed surface fit the measurement data well. Therefore, the tool path compensated by the deformed surface can significantly reduce the processing error. Taking the processing of a certain model of integral impeller as an example, the processing contour error of a blade before compensation was 0.2mm. The tool path simulation data after compensation showed that the contour error after compensation would be reduced to 0.02mm.

[0062] 2. Based on the results of on-machine measurement and the deviation from the CAD model, the deformation of the surface measured on-machine is studied to form a deformed CAD model, and adaptive compensation is achieved for the tool path to be processed. The deformed CAD model maintains the smoothness of the original CAD model, and the compensation tool path is generated based on the deformed CAD model, so the compensated tool path can also maintain good smoothness. After compensation, the acceleration of each axis and the sum of the squares of the acceleration of the machining program are significantly reduced compared to other compensation methods. Therefore, compared with other compensation methods, the surface quality after processing by this method is significantly improved. This advantage is more obvious in the processing of complex curved surfaces with sudden changes in curvature, such as impellers.

[0063] 3. High versatility, applicable to all types of complex surfaces. In this method, B-spline surfaces are used as the deformation derivation form. This surface type is suitable for most complex surfaces in CAD models and can therefore be applied to the deformation and compensation of a variety of complex surfaces. Other global compensation methods often have more limitations in surface application and cannot compensate for a variety of surface types. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is an overall flow chart of an adaptive compensation method based on on-machine measurement data provided by an embodiment of the first aspect of the present invention.

[0065] Figure 2 It is a structural diagram of an electronic device provided by an embodiment of the third aspect of the present invention. DETAILED DESCRIPTION

[0066] In order to make the objectives, technical solutions, and advantages of this application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to explain this application and are not intended to limit this application. The following scheme is merely an illustration of the inventive concept and the specific scheme is not limited thereto. In addition, for ease of description, the accompanying drawings only show the parts related to the present invention, rather than the entire process.

[0067] On the contrary, this application covers any alternatives, modifications, equivalents, and solutions made within the spirit and scope of this application as defined by the claims. Furthermore, to facilitate a better understanding of this application, certain specific details are described in detail below in the detailed description of this application. Those skilled in the art will be able to fully understand this application without these details.

[0068] The first aspect of the present disclosure provides an adaptive compensation method based on on-machine measurement data, which is applied in the process of complex surface processing. The general processing process of complex surfaces includes parts positioning and clamping, rough processing, semi-finishing, finishing, measurement and inspection, etc. Generally speaking, adaptive compensation processing is to further improve the processing accuracy, and it mainly acts in finishing. Specifically, after semi-finishing, measurement is applied, and the tool path of finishing is adjusted according to the measurement data, thereby improving the accuracy of finishing. However, in fact, with the rise of methods such as precision casting, powder metallurgy, and 3D printing, the use of preformed blanks has become a trend. Adaptive compensation processing can act on a variety of process links, not limited to rough processing, semi-finishing, and finishing processes. Adaptive processing solves the problem of unqualified final processing of parts caused by errors in the blank or the previous processing, and has broad application prospects. The adaptive compensation method provided in the first aspect of the present disclosure is intended to provide effective guidance for subsequent processing after obtaining measurement data.

[0069] See also Figure 1 The technical route of the adaptive compensation method provided in the embodiment of the first aspect of the present disclosure is to control the deformation of the surface measured on the machine based on the deviation between the result of on-machine measurement and the surface of the CAD model before the next processing, obtain the deformed surface, realize adaptive compensation of the tool path to be processed, and reduce the surface processing error in the next processing.

[0070] Specifically, an embodiment of the first aspect of the present disclosure provides an adaptive compensation method based on on-machine measurement data, comprising the following steps:

[0071] Step S1, obtaining a CAD model of a workpiece to be processed, on-machine measurement results, and a tool path to be compensated, wherein the tool path to be compensated contains processing parameters;

[0072] Step S2: setting the maximum value of the sum of squares of the distances between the machine measurement results and the surface to be processed in the CAD model as the objective function, iteratively optimizing the control points of the surface to be processed to minimize the objective function, and obtaining a deformed surface corresponding to the surface to be processed in the CAD model;

[0073] Step S3: adaptively compensate the tool path to be compensated using the obtained deformed surface to obtain a compensated tool path.

[0074] In some embodiments, in step S1, the on-machine measurement results involved in the present method include but are not limited to contact probes, sliding probes, optical imaging point cloud data, etc. Taking the contact probe as an example, the on-machine measuring device installed on the machine tool spindle is used to contact the workpiece surface to detect the accuracy of the blank or semi-finished part, thereby obtaining point cloud coordinate data of the workpiece processing surface.

[0075] Furthermore, in step S1, after obtaining the on-device measurement results, they are subjected to denoising to obtain the denoised on-device measurement results. Due to factors such as the environment, human operation, and sensor materials, actual measurement data may contain a significant amount of noise, resulting in significant errors in the measurement results. Noise reduction can reduce these errors and increase the information density of the monitoring data. By utilizing efficient data preprocessing methods to filter valid information from the measured data, the team effectively removes unreasonable data points, thereby improving the reliability and accuracy of the measurement model.

[0076] In a specific embodiment of the present application, filtering and denoising are performed on the obtained on-machine measurement results, and the specific steps are as follows:

[0077] In machine measurement, the probe position recorded by the machine tool is assumed to be the probe lower end position p t , let the center position of the probe be p c , the contact position p between the probe and the surface to be processed n , p n As the measuring point for on-machine measurement. c With p n The calculation formula is as follows:

[0078] p c =p t +r·d (1)

[0079] p n =p c -r·N (2)

[0080] Among them, r is the calibration radius of the probe, d is the probe installation direction vector, N is the surface to be processed at the measuring point p n The theoretical normal vector of the workpiece to be processed. Suppose the CAD model of the workpiece to be processed is the same as the measurement point p nThe corresponding surface point position is q n , note the measurement point p n and the surface point position q n The difference is Δp n , satisfying the following formula:

[0081] Δp n =Δd·N=p n -q n (3)

[0082] Where Δd is the measurement point p n and the surface point position q n The normal distance between .

[0083] The Gaussian filtering method is used to reduce the noise of the point cloud data and remove the random factors in the measurement process. The normal distance of each measurement point in the point cloud data is filtered, and the normal distance of the fth measurement point after filtering is set to The calculation formula is as follows:

[0084]

[0085] Among them, neighborhood(p nf ) is the Euclidean space neighborhood of the f-th measurement point, p nf is the actual measurement result of the fth measurement point, w fg is the weight of the gth measurement point in the Euclidean space neighborhood of the fth measurement point, Δd g is the actual measurement result p of the gth measurement point in the Euclidean space neighborhood of the fth measurement point ng With p ng The corresponding surface point position q ng The normal distance between them. Weight w fg The calculation formula is as follows:

[0086]

[0087] d fg =||p nf -p ng || (6)

[0088] Among them, d fg is the distance between the fth measurement point and the gth measurement point in its Euclidean space neighborhood, and σ is the standard deviation of the Gaussian distribution.

[0089] In some embodiments, step S2 specifically includes the following steps:

[0090] Step S21: Calculate the parameters of the B-spline surface at the measurement point

[0091] The complex surfaces in CAD models are generally composed of a series of B-spline surfaces. The definition of B-spline surfaces is as follows:

[0092]

[0093] Where S(u,v) is the position of the control point on the B-spline surface determined by the surface parameters (u,v), which is defined as the weighted sum of a series of control points; and They are the i-th basis function and the j-th basis function of the B-spline surface, basis function The order is p, the basis function The order is q; let C be the control point matrix of m×n dimensions, C i,j is the control point in the i-th row and j-th column of the control point matrix, that is, the row and column numbers of the control points correspond to the numbers of the aforementioned basis functions; and Corresponding to the increasing node vectors in the u and v directions, the node vector The length is equal to m+p+1, the node vector The first p+1 terms in are equal, and the node vector The last p+1 terms in are equal; the node vector The length is equal to n+q+1, the node vector The first q+1 items in are equal, and the node vector The last q+1 items in are equal; the ranges of parameters u and v are u start ≤u≤u end ,v start ≤v≤v end ,u start ,u end are the upper and lower limits of the parameter u, v start ,v end are the upper and lower limits of the parameter v respectively.

[0094] The gradient vectors of the B-spline surface at the surface parameters (u, v) are T u (u,v) and T v (u,v), the corresponding normal vector is N(u,v), the expression is as follows:

[0095]

[0096] N(u,v)=T u (u,v)×T v (u,v) (10)

[0097] Assume that the surface point parameter of the B-spline surface corresponding to the kth measurement point is (u k ,v k), and the surface point parameters (u k ,v k ), the first objective function is:

[0098]

[0099] Among them, p nk is the actual measurement result of the kth measurement point, Δd k For p nk The corresponding surface point position q nk The normal distance between .

[0100] The first objective function is solved by iterative optimization, and the Truncated Newton Conjugate-Gradient (TNC) iterative optimization method is introduced to solve it. The TNC iterative optimization method can be used to solve p nk The corresponding q nk , and p nk The corresponding surface point position q nk The normal distance Δd k , surface point parameters (u k ,v k ) and the surface point normal vector n k =N(u k ,v k This method is used not only for the initial solution but also for subsequent control of the surface deformation process. It requires iteratively solving the objective function to obtain the above-mentioned variables. The specific steps of the TNC iterative optimization method include:

[0101] Step S211: Input and initialize parameters

[0102] Input target B-spline surface S(u,v), measurement point set {p nk}, surface parameter range (u start ,u end ,v start ,v end ), initialize the iteration parameters u0=0.5,v0=0.5.

[0103] Step S212: define a first objective function as shown in formula (11).

[0104] Step S213: Calculate the gradient of the first objective function along the u and v directions. The gradient calculation formula is as follows:

[0105]

[0106] Step S214: Define the constraint range and use the gradient descent method to adjust the surface point parameters (u k ,vk ) for iterative update

[0107] For k=1, set the surface point parameters (u k ,v k ) is constrained to:

[0108] u k ∈(u start ,u end ),v k ∈(v start ,v end )(14)

[0109] For k>1, set the surface point parameters (u k ,v k ) is constrained to:

[0110] u k ∈(u k-1 -δ u ,u k-1 +δ u ),v k ∈(v k-1 -δ v ,v k-1 +δ v )(15)

[0111] Among them, δ u and δ v They are small quantities corresponding to the u and v directions, respectively. In a specific embodiment of the present application, δ is set u =δ v =0.05;u k-1 and v k-1 is the k-1th surface point parameter.

[0112] A gradient descent method is used to iteratively solve the problem. A specific embodiment is to iteratively optimize the minimum value Δd based on the TNC method. k , the corresponding parameter is (u k ,v k ).

[0113] Step S215: Check the range of the surface point parameters to determine whether the constraint range of the surface point parameters needs to be modified to further iterate the optimization.

[0114] For k>1, the parameter u in the iterative solution result k and v k Make judgments respectively: If the result of iterative solution is u k ∈(u start ,u start +δ u ) or u k ∈(uend -δ u , u end ), then update u in (u k , v k ), and the constraint range of u is u k ∈(u k , u start , u start +δ u ) or u k ∈(u end -δ u , u end ), and calculate Δd using the updated surface point parameters. k , if v in the result of iterative solution k ∈(v start , v start +δ v ) or v k ∈(v end -δ v , v end ), then update v in (u k , v k ), and the constraint range of v is v k ∈(v k , v start , v start +δ v ) or v k ∈(v end -δ v , v end ), and calculate Δd using the updated surface point parameters. k , finally update Δd k to the smaller value of the two calculations, and update the surface point parameters (u k , v k ) to the (u k , v k , v k ) corresponding to this smaller value Δd; otherwise, there is no need to modify the constraint range of the curve parameters.

[0115] Step S216: Calculate the position q of the surface point corresponding to the k-th measurement point p nk = S(u nk , v k , v k ) and calculate the corresponding surface normal vector n k = N(u[[ID=9�]] k , v k ) using formulas (9) and (10);

[0116] Step S217, repeat steps S213 to S216 until all measurement points are calculated, and output the surface point parameter set {(u k ,v k )}、surface point set {q nk}、Surface point normal vector set {n k} and the normal distance set from the measurement point to the surface point {Δd k}.

[0117] Step S22: Objective function setting and iterative gradient calculation

[0118] The goal of controlling the deformation of the B-spline surface is to gradually approach the on-machine measurement data. The objective function is set to E(C), and the expression is as follows:

[0119]

[0120] Where K is the total number of measurement points; C represents the control point matrix;

[0121] The goal of this step is to optimize the control point matrix C so that the objective function E(C) is minimized. Although the above objective function E(C) is the objective function for the desired minimum contour error, it is a non-differentiable function. There are two difficulties in optimizing it: (1) Non-smoothness: Because the maximum value operation will lead to the non-differentiability of the objective function, especially when multiple measurement points have similar maximum distances, the objective function will have an inflection point. (2) Difficulty in gradient calculation: Since the objective function is non-differentiable, it cannot be directly solved using traditional gradient descent methods or second-order optimization methods.

[0122] In order to solve the above non-differentiable objective function, a smooth maximum function is used to approximate the maximum operation method. The smooth maximum function used is a variant of the softmax function, denoted as E(β,C), and the expression is as follows:

[0123]

[0124] Where β is a smoothing parameter. When β→∞, the objective function shown in formula (17) is consistent with the objective function shown in formula (16). This method makes the objective function differentiable by introducing a smoothing term, thereby enabling the application of gradient-based solutions such as the BFGS (quasi-Newton method) or the Levenberg-Marquardt method.

[0125] The gradient of the objective function E(β,C) is calculated as follows:

[0126]

[0127]

[0128] Among them, C is the m×n dimension control point matrix, C i,j is the control point in the i-th row and j-th column of the control point matrix C.

[0129] Step S23: Optimize the differentiable objective function shown in formula (17) by the gradient descent method, so that the control points are gradually iterated to control the deformation of the surface, and obtain a deformed surface corresponding to the surface to be processed in the CAD model. The specific steps include:

[0130] Step S231: Input and initialize parameters

[0131] Input the initial control point matrix C0 of the B-spline surface, the control point matrix dimension is m×n, and initialize the B-spline surface according to the initial control point matrix C0; input the actual measurement result set of the measurement point {p nk}, smoothing parameter β value, initial normal distance set {Δd k} and initial learning rate α, the initial normal distance set {Δd k} is the normal distance set {Δd k}.

[0132] Step S232: Iteratively solve the control point matrix C based on formulas (17) to (20) and the following formula:

[0133]

[0134] Step S233: Update the smoothing parameter β value and dynamically adjust the learning rate α.

[0135] Step S234: Update the B-spline surface according to the updated B-spline surface control point matrix C; calculate the normal distance Δd point by point using formula (11) k , and calculate the corresponding surface point parameters (u k ,v k ) and the surface point normal vector n k .

[0136] Step S235: Repeat steps S232 to S234 until the termination condition is reached, and then terminate the iteration. Output the control point matrix C of the optimized B-spline surface. opt , and according to the control point matrix, the deformed surface and deformed surface parameters (u opt ,v opt ).

[0137] The above steps result in a deformed B-spline surface, which is used to guide the tool path compensation in the next step.

[0138] It can be understood that the embodiments of the present disclosure are based on the results of on-machine measurement and the deviation from the CAD model, and study the surface deformation mapping of on-machine measurement to form a deformed CAD model, realize adaptive compensation of the tool path to be processed, and adopt efficient measurement technology to obtain three-dimensional digital information of the processing state of the workpiece. The theoretical tool path or theoretical model is compensated and corrected according to the measured processing state of the workpiece, and the processing error is significantly reduced after compensation.

[0139] In some embodiments, the obtained deformed surface is used to adaptively compensate the tool path to be compensated in step S3, specifically by obtaining the NC program to be compensated, sequentially solving the tool center point, solving the surface parameters corresponding to the tool center point, and calculating the compensation value and tool axis vector, and finally obtaining the compensated NC program. Step S3 specifically includes:

[0140] Step S31: Calculate the tool center point of the tool path to be compensated

[0141] According to the deformed surface obtained in step S2, the adaptive compensation of the tool path is further realized. Because the tool path to be compensated is a five-axis trajectory, it is necessary to realize the simultaneous compensation of the tool tip point position and the tool axis vector. The NC program to be compensated is a file in APT format, and the data format of each line is the tool tip point position T t and the tool axis vector V. Taking the most commonly used ball-end tool as an example, the tool radius is R, then the tool center point position T c The calculation formula is:

[0142] T c =T t +R·V (22)

[0143] Step S32: Solving the surface parameters corresponding to the tool center point

[0144] Get the knife center point position T c Then, the tool center position T can be obtained according to step S21. c The corresponding B-spline surface point parameters (u, v), surface point T cq and the surface point normal vector n cq , and obtain the tool center point position T according to steps S22 to S23 c The corresponding deformation surface point parameters (u opt ,v opt ), deformed surface points and the normal vector of the deformed surface point

[0145] Step 33: Calculate the tool center point and tool axis vector after compensation

[0146] Step S331: Calculate the tool center point after compensation

[0147] Set the tool center point position Tc Corresponding deformed surface points and surface point T cq The normal component of the difference is used as the tool center point compensation value, and the compensated tool center point is obtained. The knife center point after compensation The specific calculation formula is:

[0148]

[0149] Step S332: Calculate the tool axis vector after compensation

[0150] The surface point normal vector n corresponding to the tool center point position cq and the tangent line τ at the tool center cq The plane formed is defined as the tool cutting plane, where the tangent line τ of the lth tool center point cql Define the surface point T corresponding to the position of the l+1th tool center point cq(l+1) The surface point T corresponding to the position of the l tool center points cql The difference, τ cql =T cq(l+1) -T cql , let the normal vector of the tool cutting plane be Set the tool center point position T c The normal vector of the corresponding deformed surface point Projected onto the cutting plane of the tool, the projection vector is The calculation formula is as follows:

[0151]

[0152] Let the projection vector and the surface point normal vector n cq The angle is The positive and negative directions of θ follow the general right-hand rule.

[0153] The tool axis vector V and the tool center point tangent τ cq The formed plane is defined as the tool posture plane, and its normal vector is

[0154] The tool axis vector V is centered around the tool posture plane normal vector c. cq The tool axis vector V after the rotation angle θ is compensated opt , the specific calculation formula of the tool axis vector after compensation is:

[0155] V opt =Vcosθ+(c cq ×V)sinθ+(c cq ·V)(1-cosθ)c cq (25)

[0156] Step 34: Calculate the tool center point T after compensation according to step S33 c opt and the compensated tool axis vector V opt , generate the compensated NC program.

[0157] Step S3 gives the values ​​of the tool position point and tool axis vector after compensation, and the tool position point after compensation is solved inversely according to formula (22). The NC program to be compensated is compensated in the APT format file, and the data format of each tool tip point is tool tip point T t And tool axis vector V. Therefore, the NC program after compensation is also output in APT format, and the data format of each line is the tool tip point after compensation. and the tool axis vector V opt .

[0158] It can be understood that step S3 realizes adaptive compensation of the tool path to be processed through the deformed CAD model, and modifies a series of tool position points and tool axis vectors one by one for the program to be processed. This compensation method takes into account the theoretical surface and the deformed surface, ignores the tangential component, and only considers the normal component, so the compensation effect of the tool position point and tool axis vector is smoother. This method avoids the phenomenon of sudden changes in speed or acceleration in the tool path after compensation. The smoothness of the compensated tool path is significantly improved compared with the local adjustment method, that is, the acceleration of each axis of the processing program and the maximum value and sum of squares of the acceleration after compensation are significantly reduced compared with other compensation methods. Therefore, compared with other compensation methods, the surface quality after processing by this method is significantly improved. This advantage is more obvious in the processing of complex surfaces with sudden changes in curvature such as impellers.

[0159] Compared to existing compensation methods, the adaptive compensation method provided by the first embodiment of the present disclosure first iteratively optimizes the deformation surface based on the measurement results, and then adaptively compensates the tool position point and tool axis vector based on the deformation surface. On the one hand, the powerful surface deformation capability ensures a good fit between the deformed surface and the measured data. On the other hand, the compensation method improves the smoothness of the compensated tool path, thereby improving the quality of the surface processing after compensation.

[0160] The second aspect of the present invention provides an adaptive compensation device based on on-machine measurement data, comprising:

[0161] The first module is used to obtain the CAD model of the workpiece to be processed, the on-machine measurement results and the tool path to be compensated;

[0162] The second module is used to set the maximum value of the sum of squares of distances from the on-machine measurement results to the surface to be processed in the CAD model as an objective function, iteratively optimize the control points of the surface to be processed to minimize the objective function, and obtain a deformed surface corresponding to the surface to be processed in the CAD model;

[0163] The second module is used to perform adaptive compensation on the tool path to be compensated by using the deformed surface to obtain a compensated tool path.

[0164] It should be noted that the aforementioned explanation of the embodiment of the adaptive compensation method based on on-machine measurement data is also applicable to the adaptive compensation device of this embodiment, and will not be repeated here.

[0165] In order to implement the above embodiment, the embodiment of the present disclosure further proposes a computer-readable storage medium on which a computer program is stored. The program is executed by a processor to perform the adaptive compensation method of the above embodiment.

[0166] Reference below Figure 2 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. It should be noted that the electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs, desktop computers, and servers. Figure 2 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0167] like Figure 2 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 into a random access memory (RAM) 103. Various programs and data required for the operation of the electronic device are also stored in the RAM 103. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0168] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 2 The electronic device is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0169] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, this embodiment includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0170] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0171] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0172] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the adaptive compensation method.

[0173] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, Python, and conventional procedural programming languages ​​such as "C-" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0174] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0175] 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 number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.

[0176] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0177] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wires (electronic devices), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). Furthermore, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing it in a suitable manner if necessary, and then storing it in a computer memory.

[0178] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0179] Those skilled in the art will understand that all or part of the steps carried out in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the developed program can be stored in a computer-readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.

[0180] In addition, the functional units in the various embodiments of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into a module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0181] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. An adaptive compensation method based on on-machine measurement data, characterized in that: include: Step S1, obtaining the CAD model of the workpiece to be processed, the on-machine measurement results and the tool path to be compensated; Step S2: setting the maximum value of the sum of squares of distances from the on-machine measurement results to the surface to be processed in the CAD model as an objective function, iteratively optimizing the control points of the surface to be processed to minimize the objective function, and obtaining a deformed surface corresponding to the surface to be processed in the CAD model; Step S3, using the deformed surface to adaptively compensate the tool path to be compensated to obtain a compensated tool path; In step S3, when the deformed surface is used to adaptively compensate the tool path to be compensated, the tool tip position T t The specific steps of simultaneous compensation of tool axis vector V include: Calculate the tool center point position T according to the following formula c : T c =T t +R·V Where R is the tool radius, T t is the tool tip position; Calculate the tool center point position T c The corresponding surface point parameters (u, v), surface point T cq and the surface point normal vector n cq , and find the tool center point position T c The corresponding deformation surface point parameters (u opt ,v opt ), deformed surface points and the normal vector of the deformed surface point Set the tool center point position T c Corresponding deformed surface points and surface point T cq The normal component of the difference is used as the tool center point compensation value, and the compensated tool center point is obtained. Assume that the tangent line of two adjacent tool center points is the difference between the surface points corresponding to the positions of the two adjacent tool center points, and the normal vector n of the surface point corresponding to the tool center point position is cq and the tangent line τ at the tool center cq The plane formed is defined as the tool cutting plane, and the tool center point position T c The normal vector of the corresponding deformed surface point Projected onto the cutting plane of the tool, the projection vector is Calculate the projection vector and the surface point normal vector n cq The angle θ is determined by the tool axis vector V and the tool center point tangent τ cq The formed plane is defined as the tool posture plane, and the normal vector of the tool posture plane is c cq , the tool axis vector V is centered around the normal vector c of the tool posture plane cq Rotate θ to get the tool axis vector V after compensation opt ; According to the tool center point after compensation and the compensated tool axis vector V opt Calculate the tool position after compensation and obtain the tool path after compensation; The tool center point after compensation The calculation formula is: The projection vector The calculation formula is: The calculation formula of the angle θ is: Normal vector c cq The calculation formula is: Compensated tool axis vector V opt The calculation formula is: V opt =Vcosθ+(c cq ×V)sinθ+(c cq ·V)(1-cosθ)c cq 。 2. The adaptive compensation method according to claim 1, wherein: The on-machine measurement result in step S1 is an on-machine measurement result obtained by denoising the original on-machine measurement result.

3. The adaptive compensation method according to claim 1, wherein: The complex surface in the CAD model is composed of a series of B-spline surfaces. The contact positions between the probe and the surface to be machined in the CAD model are used as measurement points for on-machine measurement. There are K measurement points in total. Step S2 specifically includes the following steps: Step S21: record the actual measurement result of the kth measurement point as p nk , let p nk The corresponding surface point position is q nk , let p nk The corresponding surface point parameters are (u k ,v k ), q nk =S(u k ,v k ), S(·) is the B-spline surface function, and S(u k ,v k ) along the u direction and the gradient vector S(u k ,v k ) The product of the gradient vector along the v direction is used as the surface point normal vector n k , p nk With q nk The minimum distance between nk With q nk The normal distance Δd k , and use the normal distance as the first objective function, and use the gradient descent method to iteratively optimize the first objective function to solve the surface point parameters (u k ,v k ), output the surface point parameter set corresponding to each measurement point {(u k ,v k )}、surface point set {q nk }、Surface point normal vector set {n k } and the normal distance set from the measurement point to the surface point {Δd k }; Step S22: Assume the objective function is The objective function is a non-differentiable function. By introducing the smoothing parameter β, the objective function E(C) is transformed into a differentiable objective function E(β, C), where C is the control point matrix of the B-spline surface. Step S23: Optimize the differentiable objective function E(β, C) by using the gradient descent method, make the control points progressively iterate to control the surface deformation, and obtain the deformed surface and deformed surface parameters (u opt ,v opt ).

4. The adaptive compensation method according to claim 3, characterized in that: In step S21, the iterative optimization of the first objective function using the gradient descent method specifically includes: Calculate the gradient of the first objective function along the u and v directions respectively Among them, S(u k ,v k ) is the surface parameter (u k ,v k ) determines the position of the control point; and They are the i-th basis function and the j-th basis function of the B-spline surface, basis function and The orders of C are p and q respectively; i,j is the control point in the i-th row and j-th column of the control point matrix C, and the dimension of the control point matrix C is m×n; Define the constraint range and use the gradient descent method to adjust the surface point parameters (u k ,v k ) to iteratively update and obtain Δd k The minimum value of the corresponding surface point parameter (u k ,v k ),in: For k=1, set the surface point parameters (u k ,v k ) is constrained to: u k ∈(u start ,u end ),v k ∈(v start ,v end ),u start 、u end are the upper and lower limits of the parameter u, v start 、v end are the upper and lower limits of the parameter v, respectively. For k>1, set the surface point parameters (u k ,v k ) is constrained to: u k ∈(u k-1 -δ u ,u k-1 +δ u ),v k ∈(v k-1 -δ v ,v k-1 +δ v ), δ u and δ v are the small quantities corresponding to the u and v directions respectively; Determine whether the constraint range of the surface point parameters needs to be modified for further iterative optimization. Specifically: For k > 1, for the parameters u k and v k in the iterative solution result, make judgments respectively: If in the iterative solution result, u k ∈(u start , u start +δ u ) or u k ∈(u end -δ u , u end ), then update the constraint range of u k in the surface point parameters (u k , v k ) to be u k ∈(u start , u start +δ u ) or u k ∈(u end -δ u , u end ), and calculate Δd k using the updated surface point parameters. If in the iterative solution result, v k ∈(v start , v start +δ<00001​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ According to the surface point parameters (u k ,v k )Calculate p nk The corresponding surface point position q nk =S(u k ,v k ), and calculate the corresponding surface point normal vector n k ; According to the above steps, all the measurement points are traversed and the surface point parameter set corresponding to each measurement point is output {(u k ,v k )}、surface point set {q nk }、Surface point normal vector set {n k } and the normal distance set from the measurement point to the surface point {Δd k }.

5. The adaptive compensation method according to claim 3, wherein: In step S23, in the process of optimizing the differentiable objective function E(β, C) by using the gradient descent method to make the control points progressively iterate to control the deformation of the surface, the expression of the differentiable objective function E(β, C) used is: The gradient of the differentiable objective function E(β, C) is calculated as follows: in, and They are the i-th basis function and the j-th basis function of the B-spline surface, basis function and The orders of C are p and q respectively; i,j is the control point in the i-th row and j-th column of the control point matrix C, and the dimension of the control point matrix C is m×n; After the iteration is terminated, the control point matrix C of the optimized B-spline surface is output opt , and obtain the deformed surface and deformed surface point parameters corresponding to the surface to be processed in the CAD model according to the control point matrix.

6. A device according to the adaptive compensation method according to any one of claims 1 to 5, characterized in that: include: The first module is used to obtain the CAD model of the workpiece to be processed, the on-machine measurement results and the tool path to be compensated; The second module is used to set the maximum value of the sum of squares of distances from the on-machine measurement results to the surface to be processed in the CAD model as an objective function, iteratively optimize the control points of the surface to be processed to minimize the objective function, and obtain a deformed surface corresponding to the surface to be processed in the CAD model; The second module is used to perform adaptive compensation on the tool path to be compensated by using the deformed surface to obtain a compensated tool path.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the adaptive compensation method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for compensating central point of double-turntable five-axis linked numerical control machining rotary tool

    CN101980091A

  • Five-shaft drum-type cutter radius compensation method based on AC type five-shaft numerical control machine tool post-processing

    CN107357256A