Cutter shaft instruction smoothing method and device based on Kalman filtering
Through Kalman filtering method and particle swarm optimization algorithm, the problem of unsmoothing tool axis instructions in five-axis linked CNC machine tools is solved, the processing quality and accuracy are improved, and the curvature and acceleration peak value are reduced.
Patent Information
- Application Number
- CN202510538444.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-01
AI Technical Summary
The prior art fails to effectively ensure the smoothness of the tool axis instructions in the G-code machining instructions of five-axis linked CNC machine tools, resulting in the impact of machining quality and accuracy.
Using Kalman filtering method, by establishing a knife axis vector error transformation model, combining Kalman filtering theory and particle swarm optimization algorithm, filtering smoothing processing of knife axis instructions is carried out, particle swarm fitness function is established, filter parameters are optimized, and smoothness and error constraints on G code knife axis instructions are achieved.
It significantly improves the processing quality and accuracy, reduces the fitted curvature peak, rotation axis acceleration and agility peak, and improves the processing effect.
Smart Images

Figure CN120406303A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to numerical control machining, and more specifically, relates to a tool axis instruction smoothing method and device based on Kalman filtering. Background Art
[0002] Five-axis CNC machine tools offer significant advantages in machining complex curved surfaces such as impellers and blades. However, when generating G-code machining instructions, the primary consideration is the part's contour and shape errors, with little attention paid to the smoothness of the tool axis instructions within the G-code. Consequently, tool axis smoothness for complex curved parts is often difficult to guarantee, and even small, anomalous reversals can occur in certain locations.
[0003] Generally speaking, the internal structure of a CNC system can be divided into three main steps: corner smoothing, speed planning, and interpolation. If the input tool axis command is not smooth, the spline curve generated by corner smoothing will have large local curvature and severe curvature fluctuations, which in turn leads to unreasonable speed range division in speed planning and frequent acceleration and deceleration. Reflecting this in actual machining, due to the physical limitations of the machine tool's rotary axis, it is necessary to consider constraints such as maximum acceleration and maximum agility. Therefore, in the position where the tool axis command is not smooth, frequent acceleration and deceleration will occur, which will have a significant impact on the surface quality and machining efficiency of the part.
[0004] At present, the commonly used tool axis optimization methods do not consider the optimization of the tool axis instructions in the G code, and do not consider the error constraints during tool axis optimization, which will seriously affect the processing quality and processing accuracy. Summary of the Invention
[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a tool axis instruction smoothing method and device based on Kalman filtering, which aims to solve the problem of non-smooth tool axis instructions.
[0006] To achieve the above object, according to one aspect of the present invention, a tool axis instruction smoothing method based on Kalman filtering is provided, the method comprising the following steps:
[0007] (1) A tool axis vector error transformation model is established based on the kinematics of a five-axis machine tool. The tool axis vector error transformation model transforms the tool axis vector error in a three-dimensional working coordinate system into a single-axis error of a rotary axis in a two-dimensional master-slave collaborative space;
[0008] (2) Determine the strategy for taking the measured and predicted values in the Kalman theory in combination with the tool axis optimization scenario, and determine the error constraint conditions based on the properties of the Kalman filter;
[0009] (3) Establish a particle swarm fitness function by considering both the smoothness of the tool axis command and the utilization rate of the tool axis vector tolerance during filtering and smoothing. Optimize the filtering parameters based on the particle swarm fitness function, and then determine the values of the measured value and the predicted value based on the optimized filtering parameters and the value-taking strategy.
[0010] (4) Based on the Kalman filtering theory, perform filtering and smoothing on the G-code tool axis command by combining the values of the measured value and the predicted value, as well as the optimized filtering parameters and the error constraint conditions, and simultaneously constrain the filtering error of the G-code tool axis command.
[0011] Furthermore, for AC double turntable type and AC double swivel head type five-axis machine tools, the mathematical expression of the corresponding tool axis vector error conversion model is:
[0012]
[0013] For A rotary B swivel type five-axis machine tools, the mathematical expression of the corresponding tool axis vector error conversion model is:
[0014]
[0015] In the formula, Δ i is the tool axis vector error of the i-th tool axis command point in the workpiece coordinate system, A i and B i are the i-th tool axis commands in the G-code, and δ A,i , δ B,i , δ C,i are the single-axis errors of the A-axis, B-axis, and C-axis of the i-th tool axis command point in the master-slave cooperation space, respectively.
[0016] Furthermore, adopt a value-taking strategy of zonal Gaussian filtering for the measured value.
[0017] Furthermore, the adaptive adjustment of the filtering window is carried out according to the following formula:
[0018]
[0019] Among them, the initial window length is 2w + 1, and the number of data in the point set sequence to be filtered and smoothed is n.
[0020] Furthermore, adopt a value-taking strategy of Bezier spline fitting for the predicted value, and the predicted value is calculated according to the following formula:
[0021]
[0022] Among them, x i is the predicted value, Y i-1 is the end point of the Bezier spline fitted according to the optimal estimated value, e is the unit vector of the end point tangent vector, ex is the component of e on the horizontal axis, Δs i-1 is the travel interval between the (i - 1)-th and the i-th cutter axis command points.
[0023] Furthermore, the particle swarm fitness function is:
[0024]
[0025] In the formula, U is the cutter axis command smoothness, U max is the maximum value of the fitting curvature, U f is the fluctuation frequency of the fitting curvature, J is the cutter axis vector tolerance utilization rate, J min is the maximum value of the cutter axis vector tolerance utilization rate.
[0026] Furthermore, the calculation formula for the cutter axis command smoothness U is:
[0027]
[0028] Furthermore, the calculation formula for the cutter axis command tolerance margin V is:
[0029]
[0030] In the formula, N is the total number of cutter axis command points, l i is the cutter axis vector error of the i-th cutter axis command point, and L is the cutter axis vector tolerance.
[0031] The present invention also provides a cutter axis command smoothing system based on Kalman filtering. The system includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it executes the cutter axis command smoothing method based on Kalman filtering as described above.
[0032] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the cutter axis command smoothing method based on Kalman filtering as described above.
[0033] Generally speaking, compared with the prior art by the above technical solutions conceived by the present invention, the cutter axis command smoothing method and device provided by the present invention mainly have the following beneficial effects:
[0034] 1. The method realizes the filtering and smoothing of the G-code cutter axis command within the cutter axis vector error constraint, so as to avoid the influence on the machining quality and machining accuracy caused by not considering the cutter axis command optimization and the error constraint during the cutter axis optimization, thereby improving the machining quality and machining accuracy.
[0035] 2. By establishing a cutter axis vector error transformation model, filtering and smoothing the cutter axis command and performing error constraint in the two-dimensional master-slave collaborative space, compared with the processing in the three-dimensional space, the calculation method is simplified and the calculation efficiency is improved.
[0036] 3. By establishing a fitness function for the adaptive optimization design of filtering parameters, compared with the traditional parameter debugging work relying on subjective experience, in the face of different or complex machining scenarios, while ensuring the final filtering and smoothing effect, the efficiency and accuracy of parameter values can be significantly improved.
[0037] 4. By strategically selecting the measured value and predicted value in the Kalman theory to conform to the smoothing research scenario of the G-code cutter axis command, the Kalman filtering theory is innovatively applied to the smoothing research of the cutter axis command. At the same time, using the properties of the Kalman filter itself to directly perform cutter axis vector error constraint, the fitting curvature peak value of the cutter axis command can be reduced by more than 70%, while ensuring a tolerance utilization rate of more than 90%. And the peak value of the rotational axis acceleration can be reduced by more than 65% and the peak value of the jerk can be reduced by more than 60%, thereby improving the machining quality. Brief Description of the Drawings
[0038] Figure 1 is a schematic diagram of the steps of the cutter axis command smoothing method based on Kalman filtering provided by the embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of the cutter axis vector error under the workpiece coordinate system provided by the embodiment of the present invention;
[0040] Figure 3 is a flow chart of the Kalman measurement value error constraint provided by the embodiment of the present invention;
[0041] Figure 4 is a schematic diagram of obtaining the predicted value by cubic Bezier spline fitting provided by the embodiment of the present invention;
[0042] Figure 5 is a flow chart of the optimization design of filtering parameters provided by the embodiment of the present invention;
[0043] Figure 6 is a schematic diagram of the Kalman filtering smoothing process of the cutter axis command provided by the embodiment of the invention. Detailed Embodiment
[0044] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0045] The present invention provides a tool axis command smoothing method based on Kalman filtering. The method realizes the filtering and smoothing of G-code tool axis commands within the constraint of tool axis vector error, so as to avoid the influence on machining quality and machining accuracy caused by not considering tool axis command optimization and error constraint during tool axis optimization.
[0046] Please refer to Figure 1 and Figure 6 , the method mainly includes the following steps:
[0047] S1, establish a tool axis vector error transformation model based on the kinematics of a five-axis machine tool. The tool axis vector error transformation model transforms the tool axis vector error in the three-dimensional working coordinate system into the single-axis error of the rotating axis in the two-dimensional master-slave cooperation space.
[0048] Establish a tool axis vector error transformation model based on the kinematics of a five-axis machine tool, and transform the tool axis vector error in the three-dimensional workpiece coordinate system into the single-axis error of the rotating axis in the two-dimensional master-slave cooperation space, so as to transfer the filtering and smoothing and error constraints into the two-dimensional space and simplify the calculation method.
[0049] Taking the AC double-turntable type five-axis machine tool as an example, the two-dimensional master-slave cooperation space [s pi , s qi is defined according to the following formula:
[0050]
[0051] In the formula, ΔX i , ΔY i , ΔZ i , ΔA i , ΔC i respectively represent the increments of the i-th tool position point in the G-code on the X, Y, Z, A, and C axes.
[0052] For AC double-turntable type and AC double-swing head type five-axis machine tools, the mathematical expression of the corresponding tool axis vector error conversion model is:
[0053]
[0054] For the A-rotating B-swinging type five-axis machine tool, the mathematical expression of the corresponding tool axis vector error conversion model is:
[0055]
[0056] In the formula, Δ i is the tool axis vector error of the i-th tool axis command point in the workpiece coordinate system, A i and B i are the i-th tool axis commands in the G-code, δ A,i , δ B,i, δ C,i are the single-axis errors of the A-axis, B-axis, and C-axis of the i-th tool axis command point in the master-slave collaborative space, respectively.
[0057] Specifically, in five-axis machining, for the rotary axes, the generally given constraint is the tool axis vector tolerance in the workpiece coordinate system. As Figure 2 shown, P is the tool tip point and Q is the tool axis vector, both defined in the workpiece coordinate system. We have P = (x, y, z) and Q = (i, j, k), where (x, y, z) is the position coordinate of the tool tip point and (i, j, k) is the unit direction cosine of the tool axis.
[0058] Taking the AC double-turret five-axis machine tool as an example, let Q i = (i, j, k) be the i-th command tool axis vector in the G-code, and Q i ’ = (i’, j’, k’) be the actual tool axis vector. The corresponding rotary axis commands are (A i , C i ). Then the tool axis vector error Δ in the workpiece coordinate system is the included angle between the spatial vectors Q i and Q i ’. If the single-axis errors of the two rotary axes are δ A and δ C respectively, then combining with the five-axis kinematic transformation model of the tool axis direction:
[0059]
[0060] we have:
[0061]
[0062] Also, since:
[0063] Q i ·Q i ’ = ||Q i ||||Q i ’||cosΔ
[0064] we have:
[0065]
[0066] Therefore, similarly, for a general five-axis machine tool with a typical structure, if the i-th tool axis command in the G-code is (A i , C i ) or (A i , B i ), the single-axis errors of the corresponding rotary axes in the master-slave collaborative space are δ A,i , δ B,i , δ C.i respectively, and the corresponding tool axis vector error in the workpiece coordinate system is Δi , the following conclusions can be drawn: For the AC double-turntable type and AC double-tilting head type five-axis machine tools,
[0067]
[0068] For the A-rotating and B-tilting type five-axis machine tools,
[0069]
[0070] where i = 1, 2, …, N is the serial number of the tool axis command points.
[0071] S2. Combine the tool axis optimization scenario to determine the value-taking strategies of the measured value and the predicted value in the Kalman theory, and determine the error constraint conditions based on the properties of the Kalman filter.
[0072] Adopt the value-taking strategy of piecewise Gaussian filtering for the measured value and the value-taking strategy of Bezier spline fitting for the predicted value.
[0073] The adaptive adjustment of the filtering window is carried out according to the following formula:
[0074]
[0075] where the initial window length is 2w + 1 and the number of data in the point set sequence to be filtered and smoothed is n.
[0076] The predicted value is calculated according to the following formula:
[0077]
[0078] where x i is the predicted value, Y i-1 is the end point of the Bezier spline fitted according to the optimal estimated value, e is the unit vector of the end point tangent vector, e x is the component of e on the horizontal axis, and Δs i-1 is the travel interval between the (i - 1)-th and the i-th tool axis command points.
[0079] In one embodiment, it includes the following steps:
[0080] (S21) For the error constraint of filtering and smoothing, let E Z , E x , E Y be the errors of the measured value, the predicted value, and the optimal estimated value respectively, and Δ * be the tolerance. If it satisfies:
[0081]
[0082] then there is:
[0083] EY = E x + K·(E Z - H·E x ) < Δ *
[0084] Wherein, K is the Kalman gain value in the Kalman filtering theory, and H is the measurement transfer matrix in the Kalman filtering theory.
[0085] Therefore, when performing Kalman filtering smoothing on the tool axis command, if it is ensured that both the measured value and the predicted value are within the tolerance, according to the Kalman filtering theory, the optimal estimated value of the tool axis command that has been smoothed and whose error satisfies the constraint conditions can be obtained.
[0086] (S22) For the value of the measured value, in order to avoid the problem that the overall filtering window is too small due to the constraint that the local error does not exceed the limit during global filtering, a strategy of partitioned Gaussian filtering is adopted for processing. Let the length of the filtering window be 2w + 1, then based on the one-dimensional Gaussian distribution with a mean of 0 the weight factor is:
[0087]
[0088] Then, after normalization processing, the weight matrix can be obtained:
[0089]
[0090] Wherein, Therefore, for the data sequence to be filtered [n i (i = 1, 2,..., 2w + 1) within the filtering window, the Gaussian filtering result n' w+1 of the center point data n w+1 is:
[0091]
[0092] Meanwhile, for partitioned filtering, boundary processing is required to ensure that the data at the boundary of adjacent intervals is continuous and has a smooth transition. The embodiment of the present invention gives a boundary processing method for adaptive adjustment of the filtering window. Let the length of the filtering window of the interval be 2w + 1, and the actual filtering window be W, then W is adaptively adjusted according to the following formula:
[0093]
[0094] Wherein, n is the amount of data in the point set to be filtered and smoothed.
[0095] For the error constraint of the measured value, such as Figure 3As shown, an iterative processing strategy of "error detection - filtering window feedback adjustment" is adopted during the Gaussian filtering process in each filtering interval. The purpose is to obtain the maximum filtering window length within the tolerance constraint range of the cutter axis vector to ensure the most sufficient filtering and smoothing of the cutter axis command.
[0096] (S23) For the value of the predicted value, considering the error constraint and smoothness requirements, as Figure 4 shown, based on the convex hull property and endpoint tangent vector property of the Bezier spline, Bezier spline fitting is used for value taking.
[0097] The cubic Bezier spline formula defined by four control points is as follows:
[0098]
[0099] where u ∈ [0, 1] is the spline parameter, and P i is the control point.
[0100] ① Take the optimal estimated values Y i-4 、Y i-3 、Y i-2 、Y i-1 of the first four rounds in the i-th round. Assume that they are all on a cubic Bezier spline, and let the corresponding spline parameters be:
[0101]
[0102] That is, assume that these four points are equally parametrically distributed on this cubic Bezier spline. According to the formula of the cubic Bezier spline, the equations for the four control points P i (i = 0, 1, 2, 3) are as follows:
[0103]
[0104] where,
[0105]
[0106] Also, because the Bezier spline has the endpoint interpolation property, that is
[0107]
[0108] Therefore, the coordinates of the four control points can be inversely calculated.
[0109] ② According to the control point coordinates and the endpoint tangent vector property of the Bezier spline, the unit vector e in the tangent vector direction of the end point of this cubic Bezier spline can be obtained:
[0110]
[0111] ③Based on the end point Y of this section of the Bezier spline i-1 , the unit vector e of the end point tangent vector, and the travel interval Δs between the (i - 1)-th round and the i-th round i-1 , the value of x can be obtained through the following formula i , and used as the predicted value for the i-th round:
[0112]
[0113] where e x is the component of e on the horizontal axis.
[0114] For the error constraint of the predicted value, considering the convex hull property and endpoint interpolation property of the Bezier spline, after obtaining the predicted value x i , error detection is performed. If it exceeds the limit, it is adjusted to the error boundary, so that the control polygon is within the tolerance range, thereby ensuring that the predicted value meets the error constraint.
[0115] S3. Meanwhile, considering the smoothness of the tool axis command and the utilization rate of the tool axis vector tolerance during filtering and smoothing, a particle swarm fitness function is established. Based on the particle swarm fitness function, the filtering parameters are optimized, and then the values of the measured value and the predicted value are determined based on the optimized filtering parameters and the value-taking strategy.
[0116] The tool axis command tolerance margin V is calculated according to the following formula:
[0117]
[0118] where N is the total number of tool axis command points, l i is the tool axis vector error of the i-th tool axis command point, and L is the tool axis vector tolerance.
[0119] The fitness function for parameter optimization design is calculated according to the following formula:
[0120]
[0121] where U is the smoothness of the tool axis command, U max is the maximum value of the fitting curvature, U f is the fluctuation frequency of the fitting curvature, J is the utilization rate of the tool axis vector tolerance, and J min is the maximum value of the utilization rate of the tool axis vector tolerance.
[0122] Specifically, the update of the position and velocity during the particle swarm optimization search process is performed according to the following formula:
[0123]
[0124] where X i=(x i,1 , x i,2 , …, x i,D ) and V i =(v i,1 , v i,2 , …, v i,D ) are the position and velocity of the i-th particle in the D-dimensional search space respectively; c1 and c2 are learning factors, usually taking c1 = c2 = 1.5, and r1 and r2 are random numbers uniformly distributed between [0, 1]; p best,i =(p i,1 , p i,2 , …, p i,D ) and g best =(g1, g2, …, g D ) are the individual best extreme value and the global best extreme value respectively; w is the inertia weight, usually using a dynamic value:
[0125]
[0126] where t is the current search round and T is the set maximum search round, usually taking w max = 0.9, w min = 0.4.
[0127] There are two key parameters in step S2, namely the standard deviation σ of Gaussian filtering and the covariance coefficient of Kalman filtering Therefore, the particle swarm search space dimension is two-dimensional, that is, X i =(σ i , Kqr i ), and each X i is a set of parameter combinations.
[0128] For the fitness function, the optimization objectives to be considered are the smoothness of the tool axis command and the utilization rate of the tool axis vector tolerance, which are measured by U and J respectively.
[0129] For U, it is defined using the fitting curvature of the uniform cubic B-spline curve. Let the curvature value of the i-th (i = 1, 2, …, N) tool axis command point be k i . Combining with the curvature formula, we have:
[0130]
[0131] where P(u) is the expression of the uniform cubic B-spline curve and u ∈ [0, 1] is the spline parameter.
[0132] Define the smoothness U of the tool axis command as:
[0133]
[0134] It can be seen that the smaller the value of U, the smoother the tool axis command.
[0135] For J, let the tool axis vector error of the i-th tool axis command point be l i , and the tool axis vector tolerance be L. To unify the optimization trend, J is defined as:
[0136]
[0137] In addition to U and J, the fluctuation frequency U f of the fitting curvature, the maximum value U max of the fitting curvature, and the maximum value J min of the utilization rate of the tool axis vector tolerance are also influencing factors that need to be concerned about. To comprehensively improve the smoothness of the tool axis command and the utilization rate of the tool axis vector tolerance, it is also necessary to make the above indicators as small as possible. Therefore, considering comprehensively, the fitness function for the optimization design of the tool axis command path filtering smoothing parameters is established as follows:
[0138]
[0139] Among them, the second-order difference of the fitting curvature is used to measure its fluctuation frequency U f , that is:
[0140] U f = Δ 2 k
[0141] Therefore, when using the particle swarm algorithm to optimize the key parameters in the tool axis command filtering smoothing method, the individual extreme value p best and the global extreme value g best are calculated based on the fitness function F.
[0142] For the i-th (i = 1, 2,..., N) particle, denote the fitness value of its t-th (t = 1, 2,..., T) round of search as F i,t , and for it satisfies:
[0143] F i,r = min(F i,t )
[0144] Then there is:
[0145] p best,i = (σ i,r , K qr,i,r )
[0146] If for all satisfy:
[0147] F n,r = min(F i,t )
[0148] Then we have:
[0149] g best =(σ n,r ,K qr,n,r )
[0150] In summary, as Figure 5 shown, based on the established particle swarm optimization fitness function, the optimal parameter combination is updated, so as to continuously optimize the fitness function during the search process, and finally the parameter combination X = (σ, Kqr) that meets the termination conditions is searched, which is used as the optimal parameter value in the Kalman filter smoothing of the tool axis command.
[0151] S4. Based on the Kalman filter theory, combining the measured values and the predicted values, as well as the optimized filter parameters and error constraint conditions, the G-code tool axis command is filtered and smoothed, and at the same time, the filtering error of the G-code tool axis command is constrained.
[0152] Specifically, the recursive iteration process of the Kalman filter theory is as follows:
[0153]
[0154] Among them, A is the state transition matrix; H is the measurement transition matrix; x is the predicted value, which is the result of this moment predicted according to the optimal estimate value of the previous moment; Px is the covariance of the predicted value; Y is the optimal estimate value, which is the output result; Py is the covariance of the optimal estimate value; K is the Kalman gain; Q is the process covariance; R is the measurement covariance; Z is the measured value, which is the initial input value.
[0155] Verified by simulation and actual experiments, after the tool axis command is filtered and smoothed, the peak value of its fitting curvature can be reduced by more than 70%, the peak value of the rotational axis acceleration can be reduced by more than 65%, and the peak value of the jerk can be reduced by more than 60%. Furthermore, it can effectively improve the machining defects caused by the unevenness of the tool axis command.
[0156] The present invention also provides a tool axis command smoothing system based on the Kalman filter. The system includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it executes the above-mentioned tool axis command smoothing method based on the Kalman filter.
[0157] The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the above-mentioned tool axis command smoothing method based on the Kalman filter.
[0158] Those skilled in the art can easily understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A cutter axis command smoothing method based on Kalman filtering, characterized in that, The method includes the following steps: (1) Establish a cutter axis vector error transformation model based on the kinematics of a five-axis machine tool. The cutter axis vector error transformation model transforms the cutter axis vector error in a three-dimensional working coordinate system into a single-axis error of the rotating axis in a two-dimensional master-slave collaborative space; (2) Determine the value-taking strategies of the measured value and the predicted value in the Kalman theory in combination with the cutter axis optimization scenario, and determine the error constraint conditions based on the properties of the Kalman filter; (3) Establish a particle swarm fitness function by simultaneously considering the cutter axis command smoothness and the utilization rate of the cutter axis vector tolerance during filtering and smoothing. Optimize the filtering parameters based on the particle swarm fitness function, and then determine the values of the measured value and the predicted value based on the optimized filtering parameters and value-taking strategies; (4) Based on the Kalman filter theory, perform filtering and smoothing processing on the G-code cutter axis command in combination with the values of the measured value and the predicted value, as well as the optimized filtering parameters and error constraint conditions, and simultaneously constrain the filtering error of the G-code cutter axis command.
2. The method for smoothing the tool axis command based on Kalman filtering according to claim 1, characterized in that: For AC double-turntable type and AC double-swing head type five-axis machine tools, the mathematical expression of the corresponding cutter axis vector error conversion model is: For A-rotating B-swinging type five-axis machine tools, the mathematical expression of the corresponding cutter axis vector error conversion model is: Where, Δ i is the tool axis vector error of the i-th tool axis command point in the workpiece coordinate system, A i and B i are the i-th tool axis commands in the G code, and δ A,i , δ B,i , δ C,i are the single-axis errors of the A-axis, B-axis, and C-axis of the i-th tool axis command point in the master-slave collaborative space, respectively.
3. The method for smoothing the tool axis command based on Kalman filtering according to claim 1, wherein: Adopt a value-taking strategy of partition Gaussian filtering for the measured value.
4. The method for smoothing the tool axis command based on Kalman filtering according to claim 3, wherein: The adaptive adjustment of the filtering window is carried out according to the following formula: where the initial window length is 2w + 1, and the number of data in the point set sequence to be filtered and smoothed is n.
5. The method for smoothing the cutter axis command based on Kalman filtering according to claim 1, characterized in that: Adopt a value-taking strategy of Bezier spline fitting for the predicted value, and the predicted value is calculated according to the following formula: where x i is the predicted value, Y i-1 is the end point of the Bezier spline fitted according to the optimal estimated value, e is the unit vector of the end point tangent vector, e x is the component of e on the horizontal axis, Δs i-1 is the travel interval between the (i - 1)-th and the i-th cutter axis command points.
6. The tool axis command smoothing method based on Kalman filtering according to claim 1, characterized in that: The particle swarm fitness function is: Where U is the smoothness of the cutter axis command, U max is the maximum value of the fitted curvature, U f is the fluctuation frequency of the fitted curvature, J is the cutter axis vector tolerance utilization rate, J min is the maximum value of the cutter axis vector tolerance utilization rate.
7. The method for smoothing the tool axis command based on Kalman filtering according to claim 6, characterized in that: The calculation formula for the axis command smoothness U is:
8. The method for smoothing the tool axis command based on Kalman filtering according to claim 6, wherein: The calculation formula for the cutter axis command tolerance margin V is: where N is the total number of cutter axis command points, l i is the cutter axis vector error of the i-th cutter axis command point, and L is the cutter axis vector tolerance.
9. A cutter axis command smoothing system based on Kalman filtering, characterized in that: The system includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it executes the cutter axis command smoothing method based on the Kalman filter according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the cutter axis command smoothing method based on the Kalman filter according to any one of claims 1-8.
Citation Information
Cited By
Policy neural network output path smoothing method based on Kalman filtering
CN121559896A