A polar coordinate plane contour machining trajectory compensation method
By using the polar coordinate plane contour machining trajectory compensation method, measuring instruments and mathematical functions are used to correct machine tool errors and generate smooth optimized trajectories. This solves the machining deviation problem caused by machine tool accuracy errors and achieves efficient trajectory optimization.
Patent Information
- Application Number
- CN202211482498.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Due to machine tool precision errors and mechanical stress deviations, the machined parts deviate from their theoretical shapes. Existing technologies make it difficult to quickly and effectively correct the trajectory, and replacing machine tools is costly and difficult to adjust.
A polar coordinate plane contour machining trajectory compensation method is adopted. The polar coordinates of the actual trajectory points are obtained by measuring instruments, compared with the theoretical trajectory, and the trajectory is trimmed and smoothed by using the sigmoid function and the moving average method to generate an optimized machining trajectory.
It achieves fast and effective trajectory optimization, generates smooth machining trajectories, is applicable to most polar coordinate plane contour machining, is simple and practical, and ensures machining accuracy.
Smart Images

Figure CN115857433B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of numerical control machining, in particular to a polar coordinate plane contour machining trajectory compensation method. BACKGROUND
[0002] Manufacturing industry has always played a main role in the process of world industrialization, and the rise of a country's economy depends largely on the development of manufacturing industry. Machine tools, as the mother machine of manufacturing industry development, play a crucial role. As the world's manufacturing plant, China's machine tools have precision errors and mechanical stress deviations due to long-term work wear, and the devices and theoretical shapes processed have small differences, which do not meet the precision requirements. Considering economic effects, the cost of replacing machine tools is too high, and the stress adjustment and structure correction technology of machine tools is difficult, and the adjustment time is long, which is also difficult to implement, and adjusting the machining trajectory can well avoid the defects existing in the machine.
[0003] In actual production process, when processing devices according to standard coordinate trajectory, due to the precision error and mechanical stress deviation of the machining machine tool, the formed trajectory will have partial deviation from the theoretical shape. Without considering replacing the machining equipment, in order to eliminate the part error, the standard machining trajectory needs to be modified. If the trajectory point data is modified one by one by manual, the number of modified points is large and the modification amount is difficult to control, which is easy to cause large interference between the trajectory points and cannot be effectively processed. The present application provides a polar coordinate plane machining trajectory compensation method, which can quickly optimize the machining trajectory and obtain an ideal machining trajectory route. SUMMARY
[0004] The present application aims to provide a polar coordinate plane contour machining trajectory compensation method to solve the problems encountered in the background art.
[0005] To achieve the above-mentioned purpose, the technical scheme of the present application is as follows:
[0006] A polar coordinate plane contour machining trajectory compensation method, comprising the following steps:
[0007] S1, data acquisition: using a measuring instrument to measure the actual machined workpiece to obtain the related workpiece trajectory point polar coordinates; wherein the measuring instrument used is a cam instrument.
[0008] S2, comparative analysis: comparing the actual machining trajectory polar coordinates with the theoretical machining trajectory polar coordinates to determine the adjustment range and adjustment focus;
[0009] S3, trimming trajectory: determining the trimming curve according to the adjustment focus and adjustment range, adjusting the theoretical machining trajectory point polar coordinates, and obtaining the optimized machining trajectory.
[0010] S4, smooth trajectory: using a moving average method combined with adjusting the characteristic value of the key to smooth the optimized trajectory;
[0011] S5, practical verification: the optimized machining trajectory is used for actual machining to confirm the final effect.
[0012] The above scheme specifically includes the following calculation process:
[0013] In step S1, in the polar coordinate plane, the standard machining trajectory point polar coordinate matrix A is:
[0014]
[0015] Where theta1…theta(n) is a continuous polar angle value;
[0016] By measuring the actual workpiece formed by the measuring instrument, the related cam trajectory point polar coordinates are obtained using the same polar angle as matrix A, and the polar coordinate matrix is B:
[0017]
[0018] Calculate the polar radius difference coordinate matrix C between the actual trajectory point and the theoretical point under the same polar angle:
[0019]
[0020] In step S2, the polar radius difference in matrix C is compared with the allowable error, and if the polar radius difference absolute value exceeds the allowable error, the trajectory point is judged to be modified, the continuous modified trajectory point determines the adjustment range D, and the related coordinate difference matrix is D:
[0021]
[0022] The polar radius difference absolute value maximum point is taken as the adjustment key, and the coordinate matrix D is divided into two parts, and if the polar radius difference absolute value maximum point coordinate is (theta(k), Drho(k)), the front and rear matrices are matrix D1 and matrix D2 respectively:
[0023]
[0024] In step S3, the sigmoid function is used to adjust the key and the adjustment range to determine the modified curve;
[0025] The adjustment coefficient c is set, the adjustment increment corresponding to each polar angle is determined according to the sigmoid function, and the adjustment increment calculation equation and the sigmoid function corresponding to the polar angle in matrix D1 are as follows, wherein k is a set value:
[0026] Arho(n) = c * Drho * sigmoid((m - p) / (k - p + 1))
[0027] sigmoid(x) = 1 / (1 + exp(-2 * k * x + k))
[0028] Similarly, the adjustment increment calculation equation of the polar angle corresponding to the matrix D2 is (the sigmoid function is the same):
[0029] Arho(n) = c * Drho * sigmoid((k + 1 - n) / (q - k))
[0030] The polar radius increment matrix AD1 and AD2 corresponding to the matrix D1 and the matrix D2 are obtained:
[0031]
[0032]
[0033] The polar radius values of the matrix A are respectively subtracted from the corresponding polar radius increment matrix AD1 and AD2, and the optimized matrix EA1 and EA2 are obtained:
[0034]
[0035] The trajectory point data in the matrix A that needs to be adjusted is replaced with the matrix EA1 and EA2, and the compensation matrix EA is obtained:
[0036]
[0037] In step S4, the polar radius values in the matrix EA are smoothed by the moving average method combined with the characteristic value, and the adjustment key (theta(k), Erho(k)) is the characteristic value, the sliding window size is (2m+1), k corresponds to the adjustment key, and the determination equation of m and the smoothed polar radius calculation equation are:
[0038] m = min(|t - k|, mMax)
[0039]
[0040] According to the smoothed polar radius coordinates of Srho(t), the final optimized machining trajectory matrix SA is obtained:
[0041]
[0042] The compensation trajectory SA is applied to the actual trajectory machining to compensate for the deficiency of the machining hardware conditions.
[0043] Compared with the prior art, the present application has the following advantages: 1. It is suitable for most polar coordinate plane contour machining trajectory compensation, and has simple design, easy understanding, simple online implementation and strong practicability; 2. The compensation error increment is calculated based on the sigmoid function, the parameter of which is adjustable, and the generated increment value is in 'S' shape, which is smooth in transition; 3. The sliding average method is combined with eigenvalue processing for smoothing, which ensures the accuracy of the adjustment focus and makes the final machining trajectory smoother, which is beneficial to the machining of the numerical control machine tool. BRIEF DESCRIPTION OF DRAWINGS
[0044] The disclosure of the present application will be described with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of the present application. In the drawings, the same reference numerals are used to refer to the same parts. Among them:
[0045] Figure 1 is the workflow diagram of the present application;
[0046] Figure 2 is the standard trajectory diagram of the cam of the present application;
[0047] Figure 3 is the related trajectory diagram of the cam of the present application;
[0048] Figure 4 is the polar error diagram of the theoretical trajectory and the actual trajectory of the present application.
[0049] Reference numerals: 10-theoretical machining trajectory diagram; 11-actual trajectory diagram measured after machining; 12-machining trajectory diagram after compensation; 13-adjustment focus; 14-polar error trajectory; 15-polar compensation trajectory; 16-permissible error. DETAILED DESCRIPTION
[0050] In order to make the technical means, creative features, purposes and effects achieved by the present application easy to understand, the present application will be further described in detail in conjunction with the drawings. These drawings are simplified schematic diagrams, and only schematically show the basic structure of the present application.
[0051] According to the technical scheme of the present application, those skilled in the art can propose a plurality of structure modes and implementation modes which can be replaced with each other without changing the essential spirit of the present application. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical scheme of the present application, and should not be regarded as the whole or as a limitation or restriction on the technical scheme of the present application.
[0052] The technical scheme of the present application will be further described in detail below in conjunction with the drawings and examples.
[0053] Example 1, as Figure 1As shown, a polar coordinate plane contour machining trajectory compensation method comprises the following steps:
[0054] S1, data acquisition: using measuring instruments to measure the actual machining forming workpiece, obtaining the related workpiece trajectory point polar coordinates; wherein the measuring instrument used is a cam instrument.
[0055] S2, comparative analysis: comparing the actual machining trajectory polar coordinates with the theoretical machining trajectory polar coordinates, determining the adjustment range and adjustment focus;
[0056] S3, trimming trajectory: determining the trimming curve through the adjustment focus and adjustment range, adjusting the theoretical machining trajectory point polar coordinates to obtain the optimized machining trajectory;
[0057] S4, smooth trajectory: using the sliding average method combined with the characteristic value of the adjustment focus to smooth the optimized trajectory;
[0058] S5, practical verification: using the optimized machining trajectory for actual machining to confirm the final effect.
[0059] Specifically, the following calculation process is included:
[0060] In step S1, under the polar coordinate plane, the standard machining trajectory point polar coordinate matrix A is:
[0061]
[0062] Wherein, theta1…theta(n) is a continuous polar angle value;
[0063] By measuring the actual machining forming workpiece, the same polar angle as matrix A is used to obtain the related cam trajectory point polar coordinates, and the polar coordinate matrix is B:
[0064]
[0065] Calculate the polar radius difference coordinate matrix C between the actual trajectory point and the theoretical point under the same polar angle:
[0066]
[0067] In step S2, the polar radius difference in matrix C is compared with the allowable error, if the polar radius difference absolute value exceeds the allowable error, it is judged as the trajectory point that needs to be trimmed, the continuous trajectory point that needs to be trimmed determines the adjustment range D, and the related coordinate difference matrix is D:
[0068]
[0069] The coordinate matrix D is divided into two parts with the maximum point of the absolute value of the polar radius difference as the adjustment focus. If the maximum point of the absolute value of the polar radius difference is (theta(k), Drho(k)), the front and rear matrices are matrix D1 and matrix D2 respectively:
[0070]
[0071] In step S3, the sigmoid function is used to adjust the focus and the adjustment range to determine the modified curve;
[0072] The adjustment coefficient c is set, the sigmoid function is used as the adjustment curve to determine the polar radius adjustment value of each polar angle, the adjustment increment calculation equation of the polar angle in the matrix D1 is determined, and the sigmoid function is used, wherein k is a set value:
[0073] Arho(n)=c*Drho*sigmoid((m-p) / (k-p+1)
[0074] sigmoid(x)=1 / (1+exp(-2*k*x+k))
[0075] Similarly, the adjustment increment calculation equation of the polar angle in the matrix D2 is (the sigmoid function is the same):
[0076] Arho(n)=c*Drho*sigmoid((k+1-n) / (q-k))
[0077] The polar radius increment matrix AD1 and AD2 corresponding to the matrix D1 and the matrix D2 are obtained:
[0078]
[0079] The polar radius values of the matrix A are respectively subtracted by the corresponding polar radius increment matrix AD1 and AD2, and the optimized matrix EA1 and EA2 are obtained:
[0080]
[0081] The trajectory point data in the matrix A that needs to be adjusted is replaced by the matrix EA1 and the matrix EA2, and the compensation matrix EA is obtained:
[0082]
[0083] In step S4, the polar radius values in the matrix EA are smoothed by the moving average method combined with the characteristic value, the adjustment focus (theta(k), Erho(k)) is the characteristic value, the size of the sliding window is (2m+1), k corresponds to the adjustment focus, and the determination equation of m and the smoothed polar radius calculation equation are:
[0084] m=m(|t-k|,mMax)
[0085]
[0086] According to the smoothed polar coordinate of S rho (t), the final optimized machining trajectory matrix S A can be obtained:
[0087]
[0088] The compensation trajectory S A is applied to actual trajectory machining to make up for the deficiency of machining hardware conditions.
[0089] Embodiment 2, Figure 1 is a cam machining trajectory optimization schematic process according to an embodiment of the present application. In the process, S1 is data acquisition: using a cam instrument to measure a machined cam to obtain cam trajectory point polar coordinates; S2 is comparative analysis: compared with theoretical cam trajectory coordinates to determine adjustment points and adjustment ranges; S3 is trajectory generation: using a sigmoid function to calculate polar radius compensation values to generate new cam machining trajectories; S4 is smooth trajectory: using a sliding average method to optimize trajectories in combination with adjustment points for processing; and S5 is practical verification: applying the optimized cam trajectory to actual machining to confirm final effects.
[0090] As shown in Figure 2 , 10 is a cam theoretical machining trajectory, A (theta n ,r n ) is its corresponding polar coordinates, n = 1, 2, 3…360, theta n is a complete circle, r n is the corresponding polar radius; a local enlargement is performed on Figure 1 , and Figure 3 is a local enlarged view, wherein 11 is a trajectory formed by measured trajectory points B (theta n ,r2 n ) of an actually machined cam. The difference between the polar radii is calculated by formula 1
[0091] d rn =r2 n -r n Formula 1
[0092] The polar radius difference is compared with the allowable error, the allowable error in this scheme is selected as 0.2, the adjustment range is determined and the error maximum point is selected as the adjustment point, and it is obtained that n = 129 is the adjustment point (theta129, r129), and the adjustment range is n e (113, 154).
[0093] r3 n =c*r 129 *sigmoid ((n-p) / (k-p+1)) Formula 2
[0094] sigmoid(x) = 1 / (1 + exp(-2*k*x+k)) Equation 3
[0095] Set the adjustment coefficient c as 0.85, the adjustment coefficient k in the sigmoid function in Equation 3 as 5, p in Equation 2 as 113, and k as 129. The adjustment range corresponding to the first half of the polar radius compensation matrix C(θ n ,r3 n ) is calculated by Equation 2 and Equation 3. The polar radius compensation matrix of the second half is obtained in the same way. The compensation polar radius two-dimensional graph is shown in FIG. 15. Figure 4
[0096] m = min(|t-k|, mMax) Equation 4
[0097]
[0098] The theoretical machining trajectory point is subtracted by the corresponding polar radius increment matrix to obtain the corresponding compensation matrix D(θ n ,r4 n ). The compensation matrix D(θ n ,r4 n ) is smoothed by the sliding average method combined with the characteristic value. The calculation formula is Equation 4 and Equation 5. Set mMax = 2 to obtain the machining matrix E(θ n ,r5 n ) after compensation. The corresponding trajectory is shown in FIG. 12. Figure 3
[0099] The optimized cam trajectory is applied to actual machining to confirm the final effect.
[0100] It should be noted that although the present specification is described according to each embodiment, not every embodiment contains only one independent technical solution. The description manner of the specification is only for the sake of clarity. The skilled person should consider the specification as a whole. The technical solutions in each embodiment can be combined to form other embodiments that can be understood by the skilled person.
[0101] The above specific embodiments further detail the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A polar plane contour machining trajectory compensation method, characterized in that, It comprises the following steps: S1, data acquisition: using measuring instruments to measure the actual processing formed workpiece, obtaining the relevant workpiece trajectory point polar coordinates; S2, comparative analysis: comparing the actual processing trajectory polar coordinates with the theoretical processing trajectory polar coordinates to determine the adjustment range and adjustment focus; S3, trimming trajectory: determining the trimming curve through the adjustment focus and adjustment range, adjusting the theoretical processing trajectory point polar coordinates to obtain the optimized processing trajectory; S4, smoothing trajectory: using the sliding average method combined with the characteristic value of the adjustment focus to smooth the optimized trajectory; S5, practical verification: using the optimized processing trajectory for actual processing to confirm the final effect.
2. The polar plane contour machining trajectory compensation method according to claim 1, characterized in that: In step S1, the measuring instrument used is a cam instrument.
3. The polar coordinate plane contour machining trajectory compensation method according to claim 1, characterized in that: In step S1, under the polar coordinate plane, the standard processing trajectory point polar coordinate matrix A is: Where theta1…theta(n) are continuous polar angle values; By measuring the actual processing formed workpiece, the polar angle is used to obtain the relevant cam trajectory point polar coordinates, and the polar coordinate matrix B is: The polar radius difference coordinate matrix C between the actual trajectory point and the theoretical point under the same polar angle is calculated: In step S2, the polar radius difference in matrix C is compared with the allowable error, and if the polar radius difference absolute value exceeds the allowable error, the trajectory point is determined to be trimmed, the continuous trajectory point to be trimmed determines the adjustment range D, and the related coordinate difference matrix is D: Taking the polar radius difference absolute value maximum point as the adjustment focus, the coordinate matrix D is divided into two parts, and if the polar radius difference absolute value maximum point coordinate is (theta(k), Drho(k)), the front and rear matrices are matrix D1 and matrix D2 respectively: In step S3, the trimming curve is determined by the sigmoid function adjustment focus and adjustment range; Set the adjustment coefficient c, determine the polar radius adjustment value of each polar angle according to the sigmoid function as the adjustment curve, and the adjustment increment calculation equation of the polar angle corresponding to matrix D1 is: Arho(n)=c*Drho*sigmoid((m-p) / (k-p+1)) sigmoid(x)=1 / (1+exp(-2*k*x+k)) Similarly, the adjustment increment calculation equation of the polar angle corresponding to matrix D2 is: Arho(n)=c*Drho*sigmoid((k+1-n) / (q-k)) The polar radius increment matrix AD1 and AD2 corresponding to matrix D1 and matrix D2 are obtained: Subtract the corresponding polar radius increment matrix AD1 and AD2 from the polar radius value of matrix A to obtain the optimized matrix EA1 and EA2: Replace the data of the trajectory points to be adjusted in matrix A with matrix EA1 and EA2 to obtain the compensation matrix EA: In step S4, the polar radius value in the matrix EA is smoothed by the moving average method combined with the characteristic value, the adjustment key (theta(k), Erho(k)) is the characteristic value, the size of the moving window is (2m+1), k corresponds to the adjustment key, the determination equation of m and the smoothed polar radius calculation equation are: m = min(|t-k|, mMax) According to the smoothed polar radius coordinates of Srho(t), the final optimized machining trajectory matrix SA can be obtained: The compensation trajectory SA is applied to the actual trajectory machining to make up for the deficiency of the machining hardware conditions.
Citation Information
Patent Citations
Identical graduation method for measuring contour curve of Archimedes screw cam
CN102032888A
Three-axis linkage contour error compensation control method for cylinder cam machining
CN102662351A