Self-adaptive compensation method and device based on on-machine measurement data and storage medium
Through the study of the deviation between the on-machine measurement data and the CAD model, the surface deformation mapping method is used to adaptively compensate the tool rail of the five-axis CNC machine tool, which solves the problem of complex surface machining errors and realizes high-precision and smooth tool rail compensation.
Patent Information
- Application Number
- CN202411870249.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing adaptive compensation technology is difficult to effectively deal with the machining errors of complex surfaces, especially in five-axis CNC machine tools. The traditional coordinate rigid transformation and surface mapping methods have limitations and cannot be applied to complex free surfaces.
Through the study of the deviation between the on-machine measurement data and the CAD model, the surface deformation mapping method is used to form a deformed CAD model, and the deformation model is used to adaptively compensate the tool rail to be processed to ensure the smoothness and accuracy of the tool rail after compensation.
It significantly reduces the processing error of complex surfaces, maintains the smoothness of the compensated tool rail, is suitable for all types of complex processing surfaces, and improves the surface quality after processing.
Smart Images

Figure CN119758869A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine tool tool adaptive compensation, 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 using traditional machining methods for machining, 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 technology can obtain three-dimensional digital information of the machining state of the workpiece. Through adaptive machining technology, the machine tool can adaptively change the machining strategy according to the measured machining state 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 the on-machine measurement data adapts to the adaptive processing of the 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 the benchmark alignment of parts, and solves the problem of rapid clamping and alignment of large rough benchmark errors or large volume and mass parts. 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 the slight changes in the geometric shape and position of the part, so as to realize the adaptive processing of shape change and position transformation. 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 contacts the workpiece surface to realize the on-machine measurement of the workpiece, so that the processing and detection of the part are integrated, which will greatly shorten the processing error detection time and can effectively avoid the error caused by the secondary clamping of the workpiece.
[0004] Regarding 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 refers to setting a global objective function and achieving adaptive compensation through methods such as coordinate rigid transformation and surface mapping. The existing coordinate rigid transformation method can only adjust the coordinate system of the tool path, but cannot achieve shape adjustment of each tool position point and tool axis vector, and is only applicable to scenes with small shape deformation. The existing method of constructing surface mapping can only be used for specific and simple surfaces, and is not applicable to complex free-form surfaces such as impellers.
[0006] Local compensation is a discrete (local) optimization method, which directly calculates the tool posture offset at discrete points, thereby discretely adjusting the tool posture to meet the trajectory optimization objective function, which is represented by the mirror compensation method. When the mirror compensation method is used, the smoothness of the modified tool path becomes worse, and a large number of filtering, interpolation or other denoising methods are required to maintain a good smoothness of the compensated tool path.
[0007] The combination of global compensation and local compensation is mainly aimed at the scene where the local deformation is large and the rigid transformation cannot meet the compensation requirements. It is necessary to further adjust the tool path locally based on the position adaptive compensation. This method is widely used in engineering practice. Compared with the one-step compensation of global compensation and the point-by-point modification of local compensation, the operation is simple, but the steps of this method are more complicated. Summary of the invention
[0008] The present disclosure aims to solve one of the technical problems in the related art at least to some 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 of 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 having strong applicability, and being applicable to various complex processing surfaces.
[0010] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0011] The first aspect of the present invention provides an adaptive compensation method based on on-machine measurement data, comprising:
[0012] Step S1, obtaining a CAD model of a workpiece to be processed, an on-machine measurement result, and a tool path to be compensated;
[0013] Step S2, setting the maximum value of the sum of squares of the distances from the on-machine measurement results to 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;
[0014] Step S3: adaptively compensate the tool path to be compensated by 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, and the contact position between the probe and the surface to be processed in the CAD model is used as the measurement point for on-machine measurement, which contains K measurement points in total. 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 parameter is (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 S(u k ,v k ) The product of the gradient vectors along the v direction is taken 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 {Δ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, using the gradient descent method to optimize the differentiable objective function E(β, C), so that the control points are progressively iterated 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 the 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 B-spline surface composed of surface point parameters (u k ,v k ) determines the position of the control point; and are the i-th basis function and j-th basis function of the B-spline surface, respectively. 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 ) is iteratively updated to 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 ) has a constraint range of: 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 ) has a constraint range of: 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] Determine whether it is necessary to modify the constraint range of the surface point parameters for further iterative optimization. Specifically:
[0028] For k > 1, for the parameter u in the iterative solution result k and v k make judgments respectively: If in the result of the iterative solution, u k ∈(u start , u start +δ u ) or u k ∈(u end -δ u , u end ), then update the constraint range of u in the surface point parameters (u k , v k ) to u k ∈(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 result of the iterative solution, v k ∈(v start , v start +δ v ) or v k ∈(v end -δ v , v end ), then update the constraint range of v in the surface point parameters (u k , v k ) to v k ∈(v k , v start , v start +δ v ) or v k ∈(v end -δ v , v end ), and calculate Δd k . Finally, update Δd k to the smaller value of the two calculations, and update the curve point parameters (u k , v k ) to the smaller value Δd kThe 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 {Δ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 make the control points progressively iterate to control the deformation of the surface, the expression of the differentiable objective function E(β, C) used is:
[0032]
[0033] The gradient of the differentiable objective function E(β,C) is calculated as follows:
[0034]
[0035] in, and are the i-th basis function and j-th basis function of the B-spline surface, respectively. 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, 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 position of the tool tip;
[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 ), deformation surface point 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 convert the surface point normal vector n corresponding to the tool center point position cq Tangent line τ 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 attitude plane, and the normal vector of the tool attitude plane is c cq , the tool axis vector V is revolved around the normal vector c of the tool posture plane cq Rotate θ to get the compensated tool axis vector V 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 a device 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 the distances from the on-machine measurement results to the surface to be processed in the CAD model as the 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 use the deformed surface to perform adaptive compensation on the tool path to be compensated to obtain the 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 described in 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 processing method based on on-machine measurement data, which realizes adaptive compensation of five-axis tool paths on complex surfaces through two steps. Compared with other existing methods, the significant advantages of this method are as follows:
[0061] 1. Use efficient measurement technology to obtain three-dimensional digital information of the workpiece processing state, and compensate and correct the theoretical tool path or theoretical model according to the measured processing state of the workpiece, which can significantly reduce the processing error after compensation. The proposed surface deformation method based on on-machine measurement has a very powerful surface deformation ability, which makes the deformed surface fit the measurement data better. 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 is 0.2mm. The tool path simulation data after compensation shows that the contour error after compensation will 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 the machine is studied to form a deformed CAD model to achieve adaptive compensation of the tool path to be processed. The deformed CAD model maintains the smoothness compared to 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 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 surfaces with sudden changes in curvature such as impellers.
[0063] 3. Strong versatility, applicable to all kinds of complex surfaces. In this method, B-spline surface is used as the deformation derivation form. This type of surface is applicable to the complex surfaces of most CAD models, so it can be applied to the deformation and compensation of various complex surfaces. Other global compensation methods often have more restrictions on surface applications and cannot compensate for various types of surfaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It 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 schematic diagram of the structure of an electronic device provided by an embodiment of the third aspect of the present invention. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. The following scheme is only used as an explanation of the inventive concept, and the specific scheme is not limited thereto. In addition, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, rather than the entire process.
[0067] On the contrary, the present application covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present application as defined by the claims. Further, in order to make the public have a better understanding of the present application, some specific details are described in detail in the detailed description of the present application below. Those skilled in the art can fully understand the present application without the description of these details.
[0068] An adaptive compensation method based on on-machine measurement data provided by the first aspect of the present disclosure is applied in the process of complex surface processing. The general processing process of complex surfaces includes parts positioning and clamping, rough machining, 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, so as to improve the accuracy of finishing. But 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 machining, 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 by 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 adaptive compensation method based on on-machine measurement data provided in an embodiment of the first aspect of the present disclosure includes the following steps:
[0071] Step S1, obtaining a CAD model of a workpiece to be processed, an on-machine measurement result 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 from the machine measurement results to 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 by using the obtained deformed surface to obtain the compensated tool path.
[0074] In some embodiments, in step S1, the on-machine measurement results involved in the 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 spindle of the machine tool is used to contact the surface of the workpiece 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-machine measurement result, it is subjected to denoising to obtain the denoised on-machine measurement result. Due to the influence of factors such as the environment, human operation, and sensor materials, the data in the actual measurement may contain a large amount of noise, resulting in large errors in the measurement results. Noise reduction can reduce these errors and improve the information density of the monitoring data. Use efficient data preprocessing methods to screen the effective information in the measured data and effectively remove unreasonable point data in the data, 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 position of the probe sphere center 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] Where r is the calibrated radius of the probe, d is the probe installation direction vector, and N is the surface to be processed at the measuring point p. n Theoretical normal vector of the workpiece to be processed. Suppose the CAD model of the workpiece to be processed is the same as the measured point p nThe corresponding surface point position is q n , record 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 fth 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: Solving the B-spline surface parameters at the measurement point
[0091] The complex surfaces in the CAD model 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), defined as the weighted sum of a series of control points; and are the i-th basis function and j-th basis function of the B-spline surface, respectively. The order is p, and 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 of the i-th row and j-th column in 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 of is equal to m+p+1, the node vector The first p+1 items in are equal, and the node vector The last p+1 terms in are equal; the node vector The length of 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] Suppose 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 obtain 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 not only used for the initial solution, but also for the subsequent control of the theoretical surface deformation process. It is necessary to iteratively solve the objective function and obtain the above related 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 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 ) has a constraint range of:
[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 ) has a constraint range of:
[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 solved 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 the iterative solution is u k ∈(u start ,u start +δ u ) or u k ∈(uend -δ u , u end ), then update the constraint range of u in (u k , v k ) to 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 in the result of iterative solution v k ∈ (v start , v start +δ v ) or v k ∈ (v end -δ v , v end ), then update the constraint range of v in (u k , v k ) to 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 nk of the surface point corresponding to the k-th measurement point p nk = S(u k , v k ) and calculate the corresponding surface normal vector n k = N(u 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 {Δ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 of the expected 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 the traditional gradient descent method or second-order optimization method.
[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, so that gradient solving methods such as BFGS (quasi-Newton method) or Levenberg-Marquardt method can be applied.
[0125] The gradient of the objective function E(β,C) is calculated as follows:
[0126]
[0127]
[0128] Where 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, optimizing the differentiable objective function shown in formula (17) by the gradient descent method, making the control points progressively iterative to control the deformation of the surface, and obtaining 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 dimension of the control point matrix 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 points {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 in combination with the following formula:
[0133]
[0134] Step S233: Update the value of the smoothing parameter β 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 obtain the deformed surface and deformed surface parameters (u opt ,v opt ).
[0137] The above steps obtain the deformed B-spline surface, which is used to guide the compensation of the tool path 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 corrected according to the compensation of 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: obtaining the NC program to be compensated, solving the tool center point, solving the surface parameters corresponding to the tool center point, and calculating the compensation value and the tool axis vector in sequence, 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 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 point 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 ), deformation surface point 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: Calculation of 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: Calculation of tool axis vector after compensation
[0150] The surface point normal vector n corresponding to the tool center point position cq Tangent line τ 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 line τ cq The formed plane is defined as the tool posture plane, and its normal vector is
[0154] The tool axis vector V is revolved around the tool posture plane normal vector c cq The rotation angle θ is used to obtain the compensated tool axis vector V 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 compensated NC program is also output in APT format, and the data format of each line is the tool tip point after compensation. and the knife 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 compensated tool path. The smoothness of the compensated tool path is significantly improved compared with the local adjustment method, that is, the maximum value and sum of squares of the acceleration and jerk of each axis of the processing program 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 with the existing compensation methods, the adaptive compensation method provided by the embodiment of the first aspect of the present disclosure first iteratively optimizes the deformed surface according to the measurement results, and then adaptively compensates the machining tool position point and tool axis vector according to the deformed surface. On the one hand, the powerful surface deformation ability ensures the good fit between the deformed surface and the measurement data, and on the other hand, the compensation method improves the smoothness of the compensation tool path, so that the quality of surface machining after compensation is improved.
[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 the distances from the on-machine measurement results to the surface to be processed in the CAD model as the 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 use the deformed surface to perform adaptive compensation on the tool path to be compensated to obtain the compensated tool path.
[0164] It should be noted that the above-mentioned 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 execute the adaptive compensation method of the above embodiment.
[0166] Reference below Figure 2 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. It should be noted that the electronic device in the embodiments of the present disclosure may include but is 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), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, servers, etc. Figure 2 The electronic device shown is only an example and should not bring any limitation to 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 processor, 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 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the electronic device are also stored. 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 touch pad, 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 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all 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, the present embodiment includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains 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 through 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 executed.
[0170] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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 containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit 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 of the above.
[0171] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a 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., via 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" etc. 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 may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0175] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and 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 that includes 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 not be performed in 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 technicians in the technical field to which the embodiments of the present application belong.
[0177] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk box (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 disk read-only memory (CDROM). In addition, 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 in a suitable manner if necessary, and then stored in a computer memory.
[0178] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0179] A person of ordinary skill in the art may understand that all or part of the steps carried out in the above-mentioned embodiment method may be completed by instructing the relevant hardware through a program, and the developed program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.
[0180] In addition, each functional unit in each embodiment 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 one 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 can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify 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 a CAD model of a workpiece to be processed, an on-machine measurement result, and a tool path to be compensated; Step S2, setting the maximum value of the sum of squares of the distances from the on-machine measurement results to 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; Step S3: adaptively compensate the tool path to be compensated by using the deformed surface to obtain a compensated tool path.
2. The adaptive compensation method according to claim 1, characterized in that: The on-machine measurement result in step S1 is an on-machine measurement result obtained after denoising the original on-machine measurement result.
3. The adaptive compensation method according to claim 1, characterized in that: The complex surface in the CAD model is composed of a series of B-spline surfaces. The contact position between the probe and the surface to be processed in the CAD model is used as the measuring point for on-machine measurement, which contains K measuring 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 (uk,vk), 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 S(u k ,v k ) The product of the gradient vectors along the v direction is taken 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 the normal distance is used as the first objective function, and the first objective function is iteratively optimized using the gradient descent method 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 {Δ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, using the gradient descent method to optimize the differentiable objective function E(β, C), so that the control points are progressively iterated 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 B-spline surface composed of surface point parameters (u k ,v k ) determines the position of the control point; and are the i-th basis function and j-th basis function of the B-spline surface, respectively. 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 ) is iteratively updated to 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 ) has the following constraints: uk∈(ustart,uend),vk∈(vstart,vend),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 ) has a constraint range of: 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; 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 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 +δ v ) or v k ∈(v end -δ v , v end ), then update the constraint range of v k in the surface point parameters (u k , v k ) to v k ∈(v start , v start +δ v ) or v k ∈(v end -δ v , v end ), and calculate Δd k . Finally, update Δd k to the smaller value of the two calculations, and update the curve point parameters (u k , v k ) to the (u k , v k , v k ) corresponding to the smaller value Δd k ; Otherwise, there is no need to modify the constraint range of the curve parameters; 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 {Δd k }.
5. The adaptive compensation method according to claim 3, characterized in that: 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 are the i-th basis function and j-th basis function of the B-spline surface, respectively. 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. The adaptive compensation method according to claim 3, characterized in that: 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 position of the tool tip; According to step S21, the surface point parameters (u, v) corresponding to the tool center point position Tc and the surface point T cq and the surface point normal vector n cq , and according to step S22 to step S23, the deformation surface point parameters (uopt, vopt) and deformation surface point corresponding to the tool center point position Tc are obtained. 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 convert the surface point normal vector n corresponding to the tool center point position cq Tangent line τ 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 attitude plane, and the normal vector of the tool attitude plane is c cq , the tool axis vector V is revolved around the normal vector c of the tool posture plane cq Rotate θ to get the compensated tool axis vector V opt ; 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.
7. The adaptive compensation method according to claim 6, characterized in that: The tool center point after compensation The calculation formula is:
8. The adaptive compensation method according to claim 6, characterized in that: 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 。 9. A device according to any one of claims 1 to 8, 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 the distances from the on-machine measurement results to the surface to be processed in the CAD model as the 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 use the deformed surface to adaptively compensate the tool path to be compensated to obtain the compensated tool path.
10. 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 8.
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
Off-line compensation method for contour error of machining path of four-axis lathe
CN109960215A
Cutter contact compensation and repair method for five-axis linear interpolation
CN117492410A
Large thin-walled workpiece overall deformation regional compensation method based on space-time interaction
CN118123590A