Precision error distribution method and equipment for multi-axis numerical control machine tool and medium

By establishing a comprehensive error propagation model for machine tools and performing Sobol global sensitivity analysis, combined with heuristic optimization algorithms, the problem of lack of error propagation mechanism in traditional machine tool design was solved, and the synergistic optimization of machine tool accuracy and cost was achieved.

CN122044082APending Publication Date: 2026-05-15SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610234644.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-27
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Traditional machine tool precision design lacks quantitative analysis of error propagation mechanisms, leading to over-design or under-design, which fails to meet machining accuracy requirements and results in high costs.

Method used

A comprehensive error propagation model for machine tools is established. The global sensitivity coefficient of the error term is calculated using the Sobol global sensitivity analysis method. An optimization objective function is constructed, and the error distribution optimization model is solved using a heuristic optimization algorithm.

Benefits of technology

It enables the scientific quantification of machine tool precision design, avoids cost waste and substandard processing, and significantly improves the scientific and economic efficiency of the design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122044082A_ABST
    Figure CN122044082A_ABST
Patent Text Reader

Abstract

The invention provides a multi-axis numerical control machine tool precision error distribution method and device and belongs to the technical field of medium precision manufacturing and machine tool design. The method comprises the steps that a machine tool comprehensive error transmission model is established; the machine tool comprehensive error transfer model maps the geometric error of each motion axis of the machine tool into a space contour error of a tool nose point relative to a workpiece based on a multi-body system theory and a homogeneous coordinate transformation principle; performing global sensitivity analysis on the comprehensive error transfer model by adopting a Sobol global sensitivity analysis method, and calculating a total global sensitivity coefficient of each geometric error term to the contour error; by taking the total global sensitivity coefficient as a weight, constructing an optimization objective function, setting a constraint condition, and establishing an error allocation optimization model; solving the error allocation optimization model by adopting a heuristic optimization algorithm to obtain a tolerance allocation value of each geometric error term; according to the method, collaborative optimization of precision and cost is achieved, and scientificity and economical efficiency of machine tool design are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of precision manufacturing and machine tool design technology, and in particular to a method, equipment and medium for allocating precision errors in multi-axis CNC machine tools. Background Technology

[0002] With the rapid development of aerospace, optics, and precision instruments, the requirements for the machining accuracy of parts are increasing. As the "mother machine" of industry, the geometric accuracy of machine tools directly determines the final quality of the machined workpiece. However, a machine tool system is a typical multi-body complex system, containing multi-axis linkages and multiple geometric error sources, with complex nonlinear coupling relationships between these error sources.

[0003] Traditional machine tool precision design often relies on design experience or static precision standards (such as ISO standards), lacking quantitative analysis of the transmission mechanism from "machine tool component errors" to "workpiece final contour errors." This leads to two extremes: "over-design," where extremely high precision requirements are imposed on all components, resulting in a sharp increase in manufacturing costs; and "under-design," where the control of certain key error terms is neglected, causing the machine tool to fail to meet precision requirements when machining specific complex surfaces. Therefore, there is an urgent need for a method that can quantitatively reveal the error transmission law and, based on this, automatically allocate precision in a cost-performance-oriented manner. Summary of the Invention

[0004] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0005] According to a first aspect of this application, a method for allocating accuracy errors in a multi-axis CNC machine tool is provided, the method comprising the following steps:

[0006] S100, Establish a machine tool comprehensive error transmission model; the machine tool comprehensive error transmission model is based on multibody system theory and homogeneous coordinate transformation principle, and maps the geometric error of each motion axis of the machine tool into the spatial contour error of the tool tip relative to the workpiece.

[0007] S200, using the Sobol global sensitivity analysis method, performs global sensitivity analysis on the comprehensive error propagation model and calculates the total global sensitivity coefficient of each geometric error term to the contour error;

[0008] S300, using the total global sensitivity coefficient as the weight, construct an optimization objective function, set constraints, and establish an error allocation optimization model; wherein, the optimization objective function performs a weighted summation of the tolerances of each geometric error term, and the error term with higher sensitivity corresponds to a larger weight in the objective function;

[0009] S400, a heuristic optimization algorithm is used to solve the error allocation optimization model to obtain the tolerance allocation value of each geometric error term.

[0010] According to another aspect of this application, a non-transient computer-readable storage medium is also provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-described multi-axis CNC machine tool accuracy error allocation method.

[0011] According to another aspect of this application, an electronic device is also provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0012] The present invention has at least the following beneficial effects:

[0013] The multi-axis CNC machine tool precision error allocation method of this invention establishes a quantitative mapping relationship between abstract machine tool geometric errors and specific workpiece contour precision, enabling precision design to move from empirical qualitative to scientific quantitative, effectively avoiding the problems of "over-design" leading to cost waste or "under-design" leading to machining defects in traditional design. Using Sobol global sensitivity analysis, it not only quantifies the individual effects of each error term but also reveals the coupling effect between errors. Combined with discrete point analysis of machining positions, it accurately identifies key error terms and position-sensitive error terms throughout the entire stroke range, providing a scientific basis for differentiated precision allocation. Third, by constructing an optimization objective function with sensitivity coefficients as weights, it achieves "focusing on the big picture and letting go of the small details"—strictly controlling significant key errors and appropriately relaxing non-sensitive errors, minimizing manufacturing costs and machining difficulty while meeting workpiece contour requirements. Fourth, by solving the problem using heuristic optimization algorithms such as genetic algorithms, it can efficiently handle high-dimensional nonlinear constraint optimization problems, outputting a globally optimal error tolerance allocation scheme. This scheme can be directly mapped to the engineering precision indicators of machine tool components, guiding actual design and manufacturing. In summary, this invention achieves synergistic optimization of accuracy and cost, significantly improving the scientific and economic aspects of machine tool design. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A flowchart illustrating the accuracy error allocation method for multi-axis CNC machine tools provided in this embodiment of the invention.

[0016] Figure 2A schematic diagram of the structure and topology of a three-axis precision machine tool provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] It should be noted that, based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Furthermore, this device and / or practice the method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.

[0019] The following will refer to Figure 1 The flowchart shown is a method for allocating accuracy errors in multi-axis CNC machine tools, which introduces such a method.

[0020] The method for allocating accuracy errors in multi-axis CNC machine tools may include the following steps:

[0021] S100, Establish a machine tool comprehensive error transmission model; the machine tool comprehensive error transmission model is based on multibody system theory and homogeneous coordinate transformation principle, and maps the geometric error of each motion axis of the machine tool into the spatial contour error of the tool tip relative to the workpiece.

[0022] The core of this step is to establish a mathematical mapping relationship from the geometric errors of each motion axis of the machine tool to the spatial contour error of the tool tip relative to the workpiece. , where X is the geometric error vector.

[0023] Furthermore, the machine tool integrated error propagation model is established through the following steps:

[0024] S110 defines the geometric error terms for each motion axis of the machine tool. For a three-axis machine tool, it includes at least three linear errors δ for each of the X-axis, Z-axis, and C-axis. x δ y δ z 3 angular errors ε x ε y ε z Including the interaxial perpendicularity error, there are a total of 21 geometric errors.

[0025] For three-axis (X-axis, Z-axis, C-axis) machine tools, 21 geometric errors are defined:

[0026] Each motion axis contains 3 linearity errors. and 3 angular errors Where U is the axis designation, U .

[0027] Interaxial perpendicularity error (3 items in total).

[0028] Organize all error terms into an input vector: ; where each component This corresponds to a specific geometric error.

[0029] S120, based on multibody system theory, uses a low-order volume array to describe the machine tool topology, sets the bed as an inertial coordinate system, and establishes the transformation relationship between adjacent bodies of the tool chain and the workpiece chain respectively.

[0030] Based on multibody system theory, a low-order volume array is used to describe the connection relationships of various components of a machine tool:

[0031] Tool chain: Bed (body 0) → X-axis slide (body 1) → Z-axis slide (body 2) → Tool (body 3);

[0032] Workpiece chain: Bed (body 0) → C-axis rotary table (body 4) → Workpiece (body 5).

[0033] A low-order volume operator is defined to provide a basis for the multiplication order of subsequent transformation matrices. The structure and topology of a three-axis precision machine tool are as follows: Figure 2 As shown.

[0034] S130, using the homogeneous coordinate transformation matrix, construct the ideal static transformation matrix between adjacent volumes respectively. Error static transformation matrix Ideal motion transformation matrix and error motion transformation matrix The actual transformation matrix is ​​obtained. .

[0035] For any adjacent body and The actual pose transformation is described by the product of four 4×4 homogeneous transformation matrices:

[0036] ;

[0037] in:

[0038] : Ideal static transformation matrix, describing the fixed installation position between two bodies (without error);

[0039] Error static transformation matrix, including installation position error and verticality error;

[0040] The ideal motion transformation matrix is ​​derived from motion commands (such as displacement). Corner )Decide;

[0041] Error motion transformation matrix, which contains 6 geometric errors during the motion process.

[0042] Taking the X-axis (body 0 → body 1) as an example, let the commanded displacement be... The 6 errors are Under the small angle assumption ( Under these conditions, the error motion transformation matrix is:

[0043] ;

[0044] The transformation matrices for other axes can be constructed similarly.

[0045] S140: The tool forming point coordinates are sequentially transferred to the workpiece coordinate system through each adjacent body transformation to obtain the actual tool tip pose. The actual tool tip pose is subtracted from the ideal tool tip pose to obtain the spatial contour error vector. and take Euclidean norm as a scalar profile error As the output of the machine tool integrated error propagation model, the machine tool integrated error propagation model is expressed as a function of 21 geometric error variables. nonlinear functions ; The values ​​represent the positional deviations of the tool tip in the X-axis, Y-axis, and Z-axis directions, respectively; k = 1, 2, ..., 21; x k Let k be the geometric error variable.

[0046] Let the homogeneous coordinates of the tool forming point in the tool coordinate system be... In practice, the coordinates of the tool tip in the workpiece coordinate system are obtained through a closed-loop kinematic chain:

[0047] ;

[0048] Among them, each This is the actual transformation matrix after substituting in the errors. Similarly, setting all errors to zero, we obtain the ideal tool tip coordinates. .

[0049] The spatial contour error vector is the difference between the actual and ideal coordinates:

[0050] ;

[0051] In the formula These represent the positional deviations of the tool tip in the X, Y, and Z directions, respectively.

[0052] To obtain a unified accuracy evaluation index, the Euclidean norm of the error vector is taken as the scalar profile error output:

[0053] ;

[0054] The final machine tool integrated error propagation model is obtained as follows: ;in, The position of the motion axis command indicates that the model has a position dependency.

[0055] This step establishes a comprehensive machine tool error propagation model, creating a quantitative mathematical mapping relationship between 21 abstract geometric errors and specific workpiece contour accuracy. This allows subsequent error analysis and precision design to be based on a precise physical model, avoiding the subjectivity and blindness of traditional experience-based design. The model uses a homogeneous coordinate transformation matrix to describe the error propagation process, fully characterizing the nonlinear coupling effect and position dependence between error terms, providing a high-fidelity input function for global sensitivity analysis. The model output uses Euclidean norms to compress the three-dimensional error vector into a single scalar index, which not only conforms to engineering evaluation practices for contour accuracy but also significantly reduces the computational complexity of subsequent analysis and optimization. This modeling method is universal and can be extended to multi-axis machine tools of any configuration; it can be reused simply by adjusting the low-order volume array and error term definitions.

[0056] S200, using the Sobol global sensitivity analysis method, performs global sensitivity analysis on the comprehensive error propagation model and calculates the total global sensitivity coefficient of each geometric error term to the contour error;

[0057] Furthermore, step S200 includes the following steps:

[0058] S210, based on the design allowable range of each geometric error term, normalize the parameter space to [0,1]. 21 Hypercube.

[0059] First, based on the machine tool design specifications or the accuracy class of similar machine tools, determine the physical value range of 21 geometric errors: ,in, and The first Lower and upper limits of the term error (e.g., X-axis positioning error) Since the 21 errors have different dimensions (micrometers, arcseconds, radians), direct sensitivity analysis would lead to dimensional interference. Therefore, normalization is required to map all parameters to the dimensionless interval [0,1].

[0060] ;

[0061] The normalized parameter space is a 21-dimensional unit hypercube [0,1]. 21 Each dimension corresponds to a normalized geometric error.

[0062] Normalization eliminates the weight bias caused by differences in dimensions and orders of magnitude among different error terms, enabling subsequent sampling and analysis to be performed in a unified mathematical space. After mapping the physical parameter space to a unit hypercube, sampling can be performed directly using the standardized Sobol low-discrepancy sequence, without the need to design a separate sampling strategy for each error term. The explicit upper and lower bounds provide feasible design space boundaries for subsequent optimization steps, ensuring that the analysis results are consistent with engineering practice.

[0063] S220, using Sobol low-difference sequences to generate two independent sets of data. dimensional sampling matrices A and B, The sample size.

[0064] Two independent sets of sequences are generated using the Sobol sequence generator. 3D sampling matrix and ,in For sample size (usually taken as in engineering practice) (Estimation stability needs to be guaranteed). The Sobol sequence is a deterministic, low-discrepancy sequence generated recursively based on binary fractions. Its distribution uniformity in a unit hypercube is better than that of purely random sampling (Monte Carlo), and its convergence speed is from... Improve to near .

[0065] Specific generation method (using MATLAB as an example):

[0066] % Generate Sobol sequence handle

[0067] sob=sobolset(21,'Skip',1e3); % Skip the first 1000 points to improve uniformity

[0068] % Generate matrix A (N samples)

[0069] A = net(sob, N);

[0070] % Reinitialize or generate independent matrix B using different jumps

[0071] sob=sobolset(21,'Skip',1e3+N); % Skip more points to ensure independence

[0072] B = net(sob, N);

[0073] matrix and Each row represents a set of 21 normalized error sample values, and each column corresponds to a specific error term.

[0074] Using Sobol low-discrepancy sequences instead of pure random sampling achieves more uniform parameter space coverage with the same sample size, improving the accuracy and convergence speed of variance estimation; two independent sampling matrices are generated. and This is a core requirement of the Sobol method, providing the foundation for subsequent construction of the cross matrix and calculation of the first-order partial variance; sample size A reasonable choice can strike a balance between computational cost and estimation accuracy. In engineering, 5000 samples are usually sufficient to obtain robust sensitivity ranking.

[0075] S230, for the i-th error, use the matrix Replace the i-th column of matrix A with the i-th column to construct matrix A. .

[0076] For the Term error ( Construct a cross matrix Its dimensions and , same( The construction rule is: the first... List taken from The The column is taken from [the previous column]. The corresponding column. Described mathematically as:

[0077] ;

[0078] in, For matrix No. Line number Column elements, For matrix No. Line number Column elements.

[0079] The physical meaning of this matrix lies in: fixing the values ​​of the other 20 error terms and... Same, only the first Item error replaced with Independent samples in the data, thus examining the first in isolation. The impact of term error variations on the output.

[0080] Cross-matrix construction is the core technique of the Sobol method. It "mixes" two independent sets of samples, changing the value of the target variable while keeping other variables constant, thereby isolating the variable's independent contribution. Compared to traditional double cyclic sampling, this method only requires... The first-order effects of all 21 errors can be estimated with just one model call, greatly improving computational efficiency; the construction process is simple and clear, easy to program and implement, and has a high degree of parallelism.

[0081] S240, connects A, B and Substituting each row of samples into the machine tool integrated error propagation model yields the corresponding contour error output vector. , and .

[0082] All sample matrices generated in steps S220 and S230 ( , And 21 For each row of the data, perform inverse normalization to restore the actual error value in physical space:

[0083] ;

[0084] Then, the 21 inversely normalized error values ​​are substituted into the machine tool integrated error propagation model established in step S100. Calculate the corresponding scalar profile error. Store the calculation results as follows:

[0085] :matrix Output for each sample;

[0086] :matrix Output for each sample;

[0087] : No. The output of each sample in the cross matrix .

[0088] It should be noted that if a discrete point analysis is performed subsequently, i.e., step S260, then at each discrete processing location... Repeat the above model call to obtain the position-related output vector.

[0089] This step, through model calculations on a large number of samples, transforms the abstract error distribution into concrete contour error distribution data, providing a statistical basis for subsequent variance estimation; all calculation processes are inherently parallelizable (different samples, different cross matrices, and different locations can all be calculated independently), and multi-core CPUs or clusters can be used to significantly shorten computation time; output vector , and It fully preserves the correspondence between samples and outputs, providing the necessary data structure for variance decomposition.

[0090] S250, Estimate total variance and the first-order partial variance of the error of the i-th term :

[0091] ;

[0092] ;

[0093] Where i and j are the indexes of the geometric errors; For matrix No. The model output for row samples; For matrix No. The model output for row samples; The contour error output value is calculated by substituting the sample in the j-th row of the i-th construction matrix into the machine tool error model.

[0094] Based on the output vector obtained in step S240, the total variance is calculated using a Monte Carlo integral estimator. Passing the exam First-order partial variance of the term error .

[0095] Total variance estimation formula (sample variance):

[0096]

[0097] This formula is an unbiased estimate, which characterizes the total fluctuation of the model output in the parameter space.

[0098] First-order partial variance estimation formula (Sobol' covariance estimator):

[0099] ;

[0100] The mathematical principle of this estimator is based on the variance decomposition identity. It is unbiased under the condition of independent samples and has good numerical stability.

[0101] when When the time limit is reached, the estimated value may fluctuate slightly. In engineering, this can be addressed by increasing the... Alternatively, run the test multiple times and take the average to improve robustness.

[0102] The above estimator can directly calculate the variance contribution from the model output data without making any simplification or linearization assumptions to the model, thus fully preserving all the nonlinear characteristics of the original model. The estimation formula only involves simple multiplication and summation operations, making it highly efficient and suitable for large-scale sensitivity analysis. Total variance... It reflects the overall uncertainty level of the workpiece contour error, while the first-order partial variance... The quantitative method then gives the first The share of uncertainty that can be explained by the single effect of the term error provides a direct basis for subsequent sensitivity ranking.

[0103] S260, according to and Determine the overall global sensitivity coefficient. .

[0104] when When the value is close to 1, it indicates that this error (including its interaction with all other errors) explains almost all of the output variance and is the absolute critical error.

[0105] when When it is close to 0, it indicates that the error and its interaction have almost no effect on the output, and the control can be greatly relaxed;

[0106] Compare With first-order sensitivity :like Significantly greater than This indicates that the error mainly affects accuracy through its coupling with other errors, and simply controlling it cannot completely eliminate the risk.

[0107] After completing the sensitivity calculation for a single location, if a location discrete point analysis (preferred step S260) is performed, it is necessary to calculate the mean and fluctuation range of the sensitivity coefficient of each error term with respect to the location, and comprehensively identify the key error terms.

[0108] Total global sensitivity coefficient The core output of the Sobol analysis provides a complete ranking of the importance of each error, including both individual and interaction effects, overcoming the shortcomings of traditional methods that ignore coupling. This coefficient can be directly used as weights in subsequent optimization steps, forming a seamless connection from error mechanism analysis to optimization model construction. Through analysis... As the location changes, it is possible to further identify error items that are sensitive only in specific machining areas, providing guidance for "local reinforcement" in machine tool design or "sensitivity avoidance" in machining processes; the resulting list of critical errors enables engineers to precisely allocate limited precision resources to the most critical aspects, achieving the best balance between cost and performance.

[0109] Furthermore, the global sensitivity analysis also includes the following steps:

[0110] S270: Select multiple discrete machining positions along each motion axis in the machine tool machining space, and repeat steps S210 to S260 for each discrete position to obtain the distribution curve of the sensitivity coefficient of each geometric error term as a function of the machining position.

[0111] The purpose of this step is to reveal the variation of the sensitivity coefficients of each geometric error term with the machining position, and to identify position-dependent critical errors. The specific implementation is as follows:

[0112] 1. Determination of Discrete Machining Location Set

[0113] Within the machine tool machining space, representative discrete positions are selected along each motion axis to form a set of position sampling points. The selection principle should cover the entire stroke of the machine tool while also considering critical machining areas (such as areas with large changes in workpiece contour curvature). Taking a three-axis (X, Z, C) machine tool as an example:

[0114] Selected at equal intervals along the X-axis One location: (like (covering the X-axis travel);

[0115] Selected at equal intervals along the Z-axis One location: (like );

[0116] For the C-axis (rotation axis), select according to the typical machining radius or angle of the workpiece. One corner: (like (Including 0°, 45°, 90°, etc.).

[0117] For point-to-point machining (such as drilling), only the location of the tool tip needs to be considered; for contour machining (such as surface milling), key feature points need to be selected along the toolpath. Location set The scale needs to balance computational cost and representativeness, typically the total number of positions Keep it between 50 and 200.

[0118] For each discrete position Perform the complete Sobol global sensitivity analysis process (i.e., steps S210~S260):

[0119] Maintain the error parameter design range constant;

[0120] Regenerate or reuse an existing sampling matrix (To save computation, the same set of samples can usually be reused, but the error model needs to be called again for different locations.)

[0121] 2. Repeat the Sobol analysis for each position.

[0122] For each position When each group of samples is substituted into the error propagation model established by S100, the fixed motion command is as follows: Corresponding coordinate values ​​(e.g.) ), calculate the contour error output at this location. ;

[0123] Obtain the total global sensitivity coefficient vector at this location. .

[0124] 3. Construct sensitivity-location distribution curves

[0125] By summing up the calculation results for all locations, we can obtain each error term. Discrete data of sensitivity coefficients varying with location:

[0126]

[0127] By sorting these data by position coordinates (such as the X-axis coordinate), a sensitivity-position distribution curve can be plotted. For multi-axis simultaneous machining, a 3D scatter plot or contour plot can be used to display the distribution of sensitivity in the machining space.

[0128] For example: Assuming only 10 positions are selected along the X-axis (Z and C are fixed), the X-axis positioning error is obtained. The curve showing the sensitivity coefficient as a function of the X-coordinate. If a peak is observed at X=200mm (a sharp increase in sensitivity), it indicates that the sensitivity is near that location. The impact on machining accuracy is far greater than in other areas.

[0129] By selecting multiple discrete positions throughout the machine tool's entire stroke and repeating Sobol analysis, a complete spectrum of the sensitivity coefficients of each geometric error term as a function of machining position was obtained. This expands the originally static global sensitivity index into dynamic information with spatial distribution characteristics, enabling the accurate identification of "position-related critical errors" that are sensitive only in specific machining areas. This information has significant guiding value for machine tool design and process planning: for globally sensitive errors (high mean, small fluctuation), strict control is required throughout the entire stroke; for position-sensitive errors (medium mean, large fluctuation), local precision enhancement measures (such as increasing local guideway stiffness) can be adopted in sensitive areas, or sensitive areas can be actively avoided during machining programming, thereby achieving precise allocation of precision resources. At the same time, the sensitivity distribution curve also provides a basis for setting constraints in the subsequent error allocation optimization model (for example, different contour thresholds can be set for different areas, or additional penalty terms can be assigned to position-sensitive errors in the objective function).

[0130] S271, Identify location-related key error terms based on the mean and fluctuation amplitude of the distribution curve.

[0131] After obtaining the distribution data of the sensitivity of each error term as a function of location, it is necessary to establish quantitative criteria to screen out the "location-related key error terms" from the 21 errors. The specific implementation is as follows:

[0132] 1. Calculate the statistical characteristics of each error term.

[0133] For the The term error is based on its sensitivity coefficient at all discrete locations. Calculate the following two key statistics:

[0134] mean This characterizes the average significance of the error across the entire machining space.

[0135] Fluctuation range (e.g., range or standard deviation):

[0136] ;

[0137] or coefficient of variation ,in, The standard deviation is given. The fluctuation range reflects the degree to which the sensitivity changes drastically with location.

[0138] 2. Set dual judgment thresholds

[0139] Based on engineering experience or design goals, set two thresholds:

[0140] Mean threshold (like Error terms exceeding this value are considered to be of "some importance";

[0141] Fluctuation Amplitude Threshold (like or coefficient of variation threshold (like Error terms exceeding this value are considered "position-sensitive".

[0142] 3. Key errors in classification and identification

[0143] Based on the above statistics and thresholds, all error terms are divided into three categories:

[0144] Globally sensitive type: and (or These types of errors maintain high sensitivity throughout the entire machining space and must be strictly controlled across the entire stroke range.

[0145] Location-sensitive: and (or While the overall mean of this type of error may be moderate, it can increase sharply at certain specific locations, becoming a local critical error.

[0146] Non-sensitive type: These types of errors have minimal impact on machining accuracy, allowing for a significant relaxation of tolerances.

[0147] For example: Suppose the X-axis pitch angle error of a certain machine tool Mean sensitivity (below the threshold) ), but the fluctuation range Furthermore, observation of the curve reveals that it rises sharply at both ends of the X-axis. According to the above rules, although the average value of this error is not high, it is "position-sensitive" and needs to be controlled in the areas at both ends (e.g., by adding local support or using error compensation).

[0148] 4. Output a list of key errors

[0149] The final output includes two categories of key error lists:

[0150] List of critical global error items (requires strict control throughout the entire stroke);

[0151] List of location-sensitive error items (differentiated control strategies need to be developed based on the specific processing area), and the location range of the sensitive area (e.g., X∈[a,b]) can be attached if necessary.

[0152] This step, by introducing a dual discrimination criterion of mean and fluctuation amplitude, scientifically classifies 21 errors into three categories: globally sensitive, positionally sensitive, and insensitive, achieving a refined characterization of error importance. Compared with traditional methods that only rank based on a single global sensitivity index, this method can identify those hidden critical errors that are "inconspicuous in normal times but fatal in specific locations," avoiding machine tool failures in certain areas due to ignoring positional correlation. At the same time, the classification results provide more accurate input for subsequent error allocation optimization: globally sensitive errors need to be allocated with tight tolerances under full-stroke constraints, while positionally sensitive errors can have position-weighted terms introduced into the objective function (e.g., applying additional penalties to sensitive areas), thereby achieving true "on-demand allocation." In addition, the analysis results can also be used to guide machine tool assembly and debugging (e.g., focusing on calibrating sensitive areas) and machining process planning (e.g., optimizing tool paths to avoid sensitive areas), further expanding the engineering application value of this invention.

[0153] S300, using the total global sensitivity coefficient as the weight, construct an optimization objective function, set constraints, and establish an error allocation optimization model; wherein, the optimization objective function performs a weighted summation of the tolerances of each geometric error term, and the error term with higher sensitivity corresponds to a larger weight in the objective function;

[0154] Furthermore, the optimization objective function minF(X) is in the form of a tolerance-weighted norm; minF(X) satisfies the following relationship:

[0155] ;

[0156] Where n is the total number of geometric error terms involved in the optimization; For the first The overall global sensitivity coefficient of the term error, Regarding error tolerance A monotonically decreasing function. This indicates manufacturing costs or processing difficulty.

[0157] Furthermore, =x i -2 .

[0158] The core of this step is to use the total global sensitivity coefficient obtained in step S200. As weights, an optimization objective function is constructed to quantify the "cost-accuracy" trade-off, providing a mathematical basis for subsequent genetic algorithm solutions. The specific implementation is as follows:

[0159] 1. Definition of design variables

[0160] The design variables are the tolerance allocation values ​​for 21 geometric errors, denoted as... ,in Indicates the first Tolerance for term errors (e.g.) The tolerance value, in micrometers or arcseconds). The feasible range for each variable is determined by the design range in step S210. Determined, that is: These boundaries reflect the physical limitations of machine tool manufacturing capabilities (for example, the straightness of guideways cannot be infinitely small or infinitely large).

[0161] 2. Obtaining the weighting coefficients

[0162] The weighting coefficients are directly derived from the total global sensitivity coefficients calculated in step S200. ( ). Characterized the first The percentage contribution of an error, both individually and in combination with all other errors, to the total variance of the workpiece contour error indicates its overall impact on machining accuracy. The larger the value, the more significant the overall impact of the error on machining accuracy.

[0163] 3. Choice of cost function

[0164] Cost function Used for quantizing error tolerance The corresponding manufacturing cost or processing difficulty. According to common engineering knowledge, the tighter the tolerance (i.e., ... The smaller the value, the higher the manufacturing cost typically becomes (non-linearly and rapidly). This invention preferably uses the reciprocal square form: =x i -2 .

[0165] The rationale for this form is that:

[0166] when hour, This reflects the physical constraint that "the higher the precision, the higher the cost."

[0167] when When it increases, The cost decays at a quadratic rate, which aligns with engineering experience that costs decrease rapidly as tolerances are relaxed.

[0168] The inverse square form is mathematically well-differentiable (although subsequent genetic algorithms do not rely on derivatives), and multiplying it by the sensitivity weights naturally creates a "penalty" mechanism: for errors with high sensitivity, if a larger tolerance is assigned, then... The term will increase dramatically, forcing the optimization algorithm to tend to assign it a smaller tolerance; conversely, even if a low-sensitivity term is assigned a larger tolerance, its contribution will be smaller.

[0169] 4. Mathematical expression of the objective function

[0170] The final optimization objective function is as follows:

[0171] ;

[0172] The physical meaning of this function is: to seek a set of tolerance allocations while satisfying machining accuracy constraints. This minimizes the weighted total manufacturing cost. Where, the weights... This ensures that tolerances for high-impact errors are tightened first, while tolerances for low-impact errors can be appropriately relaxed, thus achieving "allocation on demand".

[0173] This objective function will be a component of the fitness function in step S400 of the genetic algorithm. In genetic algorithms, fitness is typically defined as the reciprocal of the objective function (or the reciprocal after adding a penalty term) to transform the minimization problem into a fitness maximization problem.

[0174] By constructing an objective function with sensitivity coefficients as weights, "on-demand configuration" of error allocation is achieved—critical errors that significantly affect machining accuracy are strictly controlled, while insensitive errors are appropriately relaxed, minimizing manufacturing costs while ensuring the workpiece contour meets requirements. The objective function adopts a tolerance-weighted norm form, which is mathematically concise and physically meaningful. Terms with higher sensitivity are penalized more during optimization, guiding the algorithm to automatically converge towards "precise input." A cost function is also introduced. This approach directly links the optimization objective to the cost-tolerance relationship in engineering practice, avoiding over-design that solely focuses on "minimizing error." Furthermore, its reciprocal square form offers good mathematical differentiation, effectively distinguishing the cost differences between various tolerance schemes. The objective function design is also universal; when changing workpiece or machine tool types, only the sensitivity coefficient needs to be updated. and design range No modification to the function form is required; ultimately, together with the accuracy constraint, it forms a complete optimization model, providing a clear objective guide for subsequent genetic algorithm solutions.

[0175] S400, a heuristic optimization algorithm is used to solve the error allocation optimization model to obtain the tolerance allocation value of each geometric error term.

[0176] Furthermore, the heuristic optimization algorithm is a genetic algorithm, and the solution process includes the following steps:

[0177] S410 determines the dimensions of design variables based on the number of machine tool geometric errors, sets the preset population size, and sets the preset crossover probability and mutation probability.

[0178] Determine the dimensions of design variables based on the number of geometric error terms defined in step S110. Set the core parameters for running the genetic algorithm:

[0179] Population size : Usually take A balance needs to be struck between computational efficiency and population diversity. For 21-dimensional problems, it is recommended to... .

[0180] Crossover probability : Usually take This controls the frequency of gene exchange between individuals. Preferred .

[0181] Mutation probability : Usually take To ensure population diversity. Preferred selection. .

[0182] Maximum number of generations : Usually take This is one of the termination conditions. Preferred. .

[0183] Convergence threshold Used to determine whether fitness has stagnated, such as .

[0184] Punishment factor : The penalty coefficient used when constructing the fitness function; take a large positive number, such as .

[0185] Reasonable parameter initialization ensures the genetic algorithm's exploration capability and convergence efficiency in the 21-dimensional search space; population size The settings balance computational burden with global search capability; the selection of crossover and mutation probabilities controls the trade-off between local development and global exploration of the algorithm, avoiding premature convergence or random walks; the preset maximum number of generations and convergence threshold provide the algorithm with clear stopping criteria, avoiding meaningless iterative calculations.

[0186] S420 uses floating-point encoding for the model parameter space, directly representing the values ​​of each geometric error term in a continuous real number space.

[0187] Using a floating-point encoding scheme, each design variable (No. The term error tolerance is directly encoded as a gene locus on the chromosome. An individual (chromosome) is represented by a vector of 21 floating-point numbers:

[0188] ;

[0189] The initial population is generated randomly: for each individual, for each gene In its corresponding design range The values ​​are randomly selected from a uniform distribution. For example:

[0190] import numpy as np

[0191] lb=np.array([...]) # 21 lower bounds

[0192] ub=np.array([...]) # Maximum of 21

[0193] population=np.random.uniform(low=lb,high=ub,size=(M,21)).

[0194] Floating-point encoding directly represents design variables in a continuous real number space, avoiding the precision loss and "Hamming cliff" problem caused by discretization in binary encoding; each gene directly corresponds to the error tolerance of physical meaning, without the need for decoding and conversion, resulting in high computational efficiency; it is naturally compatible with subsequent operations such as arithmetic crossover and Gaussian mutation, and can smoothly search for the optimal solution in a continuous space; for 21-dimensional continuous optimization problems, floating-point encoding is the industry standard choice.

[0195] S430, decode each individual in the current population, substitute it into the error allocation optimization model, and calculate the objective function value as the fitness of the individual.

[0196] For each individual in the current population Perform the following operations:

[0197] Substitute into the objective function: Calculate the objective function value ,in, The sensitivity coefficient is obtained in step S260.

[0198] Verify machining accuracy constraints: [This refers to the process of] individual [items / processes]. Substituting the error propagation model from step S100, into the discrete point set of the processing path... (From step S270) Calculate the maximum profile error .

[0199] Calculate the penalty: If If the penalty is zero, then a penalty is applied; otherwise, the penalty term is zero.

[0200] ;

[0201] in, For penalty factors (e.g.) ).

[0202] Calculating fitness: The fitness function is defined as the reciprocal of the sum of the objective function and the penalty term, transforming the minimization problem into a maximization problem.

[0203] ;

[0204] When an individual violates the precision constraint, the penalty term causes the denominator to increase sharply, the fitness to approach 0, and thus it is eliminated in subsequent selections.

[0205] The fitness function cleverly transforms a multi-constraint optimization problem into an unconstrained single-objective maximization problem, using a penalty term to ensure that the evolutionary process always moves towards the feasible region; the objective function... This embodies a cost-sensitivity weighted sum, enabling the algorithm to automatically pursue the lowest-cost solution while maintaining accuracy; penalty factor The selection ensures that individuals that violate the constraints are almost never selected, but does not completely lose diversity (if the penalty is too large, it may cause all infeasible solutions to have a fitness of 0, reducing population diversity); this fitness calculation method is naturally compatible with the selection mechanism of genetic algorithms and can effectively handle constrained optimization problems.

[0206] S440 assesses chromosome fitness and selects individuals with higher fitness to enter the next generation according to a set probability; performs crossover operations on the chromosomes of the parent population to generate a offspring population representing the new solution set; and performs mutation operations on the offspring chromosomes to increase population diversity.

[0207] Genetic operations are performed on the current population (parent generation) to generate a new offspring population. This process is repeated until the number of offspring individuals reaches the population size. .

[0208] 1. Select Operation

[0209] In the roulette wheel selection method, the probability of an individual being selected is directly proportional to its fitness:

[0210] ;

[0211] Simultaneously, an elite retention strategy is introduced: the most fit individual member in the current population is selected. Individuals (e.g.) It can be directly copied to the next generation to prevent the optimal solution from being lost in crossover mutation.

[0212] 2. Cross operations

[0213] With preset crossover probability Perform arithmetic crossover on the selected parent pairs. For the parent... and Generate two offspring :

[0214] ;

[0215] ;

[0216] in, The random numbers are uniformly distributed. Arithmetic crossover ensures that the offspring genes remain in a continuous space and retain the superior traits of the parents.

[0217] 3. Mutation operation

[0218] With preset mutation probability Uniform variation is applied to each gene in the offspring. For genes... The mutated value is:

[0219] ;

[0220] in, For in the interval Uniformly distributed random numbers within the range. Usually taken (That is, 10% of the design interval width). If the variation exceeds... If the boundary conditions are not met, boundary adjustments (such as truncation or reflection) are performed. Uniform variation enhances the local search capabilities and diversity of the population.

[0221] Roulette wheel selection increases the probability of high-fitness individuals reproducing, guiding the population towards superior regions; the elite retention strategy ensures monotonic convergence of the algorithm, preventing the optimal solution from degenerating; arithmetic crossover generates new solutions in a continuous space, maintaining gene continuity better than binary crossover and being simpler to implement; uniform mutation prevents the population from getting trapped in local optima through random perturbation in local neighborhoods, while also varying the time of mutation. The design interval is adaptively adjusted to take into account the dimensional differences of different error terms; the synergistic effect of the three factors enables the genetic algorithm to have efficient global search capabilities in 21-dimensional space.

[0222] S450, determine whether the algorithm meets the termination conditions, the termination conditions include: reaching the preset maximum number of iterations, or the average change in fitness of adjacent generations is less than the preset convergence threshold.

[0223] The dual termination condition balances computational efficiency and convergence reliability: the maximum number of generations serves as a safety net to avoid infinite loops; the fitness convergence criterion terminates the algorithm early when it has stabilized, saving computational resources; continuous multi-generation checks prevent misjudgment of convergence due to single random fluctuations; this mechanism enables the algorithm to stop in time after obtaining a satisfactory solution and output the current best individual.

[0224] S460: If any termination condition is met, the iteration stops and the global optimal solution is output, which is the optimized geometric error term assignment value of the machine tool; if not, the process returns to step S430 for the next generation evolution.

[0225] After evolution stops, the individual with the highest fitness in the current population will be selected. The output is the optimization result. This individual is the error tolerance allocation scheme that satisfies the machining accuracy constraint and minimizes the objective function. The output needs to be inversely normalized (if normalized values ​​are used during encoding) and includes the corresponding objective function value and maximum contour error verification value for engineering design use.

[0226] The output directly corresponds to the engineering tolerance index of 21 geometric errors, which designers can use to formulate the accuracy requirements of each motion axis (such as positioning accuracy, straightness, angular error, etc.). The result is obtained under the global optimization framework, which not only ensures the workpiece processing quality, but also minimizes the manufacturing cost, realizing scientific and economical precision design. At the same time, the allocation scheme can serve as the benchmark for subsequent machine tool assembly, debugging and error compensation, forming a closed loop from design to manufacturing.

[0227] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0228] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiments.

[0229] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0230] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0231] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0232] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0233] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0234] The electronic device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments in this application.

[0235] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different system components (including memory and processor).

[0236] The memory stores program code that can be executed by the processor, causing the processor to perform the steps in the various embodiments described in this specification.

[0237] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0238] The memory may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0239] A bus can represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus structures.

[0240] Electronic devices can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable user interaction with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be achieved through input / output (I / O) interfaces. Furthermore, electronic devices can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapters. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0241] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0242] Embodiments of the present invention also provide a computer program product including program code, which, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above in various exemplary embodiments of the present invention.

[0243] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and are not intended to limit the scope of the invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the invention.

Claims

1. A method for allocating accuracy errors in a multi-axis CNC machine tool, characterized in that, The method includes the following steps: S100, Establish a machine tool comprehensive error transmission model; the machine tool comprehensive error transmission model is based on multibody system theory and homogeneous coordinate transformation principle, and maps the geometric error of each motion axis of the machine tool into the spatial contour error of the tool tip relative to the workpiece. S200, using the Sobol global sensitivity analysis method, performs global sensitivity analysis on the comprehensive error propagation model and calculates the total global sensitivity coefficient of each geometric error term to the contour error; S300, using the total global sensitivity coefficient as the weight, construct an optimization objective function, set constraints, and establish an error allocation optimization model; wherein, the optimization objective function performs a weighted summation of the tolerances of each geometric error term, and the error term with higher sensitivity corresponds to a larger weight in the objective function; S400, a heuristic optimization algorithm is used to solve the error allocation optimization model to obtain the tolerance allocation value of each geometric error term.

2. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, The machine tool integrated error propagation model is established through the following steps: S110 defines the geometric error terms for each motion axis of the machine tool. For a three-axis machine tool, it includes at least three linear errors δ for each of the X-axis, Z-axis, and C-axis. x δ y δ z 3 angular errors ε x ε y ε z Including interaxial perpendicularity error, there are a total of 21 geometric errors; S120, based on multibody system theory, uses a low-order volume array to describe the machine tool topology, sets the bed as an inertial coordinate system, and establishes the transformation relationship between adjacent volumes of the tool chain and the workpiece chain respectively. S130, using the homogeneous coordinate transformation matrix, construct the ideal static transformation matrix between adjacent volumes respectively. Error static transformation matrix Ideal motion transformation matrix and error motion transformation matrix The actual transformation matrix is ​​obtained. ; S140: The tool forming point coordinates are sequentially transferred to the workpiece coordinate system through each adjacent body transformation to obtain the actual tool tip pose. The actual tool tip pose is subtracted from the ideal tool tip pose to obtain the spatial contour error vector. and take Euclidean norm as a scalar profile error As the output of the machine tool integrated error propagation model, the machine tool integrated error propagation model is expressed as a function of 21 geometric error variables. nonlinear functions ; The values ​​represent the positional deviations of the tool tip in the X-axis, Y-axis, and Z-axis directions, respectively; k = 1, 2, ..., 21; x k Let k be the geometric error variable.

3. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, Step S200 includes the following steps: S210, based on the design allowable range of each geometric error term, normalize the parameter space to [0,1]. 21 Hypercube; S220, using Sobol low-difference sequences to generate two independent sets of data. dimensional sampling matrices A and B, For sample size; S230, for the i-th error, use the matrix Replace the i-th column of matrix A with the i-th column to construct matrix A. ; S240, connects A, B and Substituting each row of samples into the machine tool integrated error propagation model yields the corresponding contour error output vector. , and ; S250, Estimate total variance and the first-order partial variance of the error of the i-th term : ; ; Where i and j are the indexes of the geometric errors; For matrix No. The model output for row samples; For matrix No. The model output for row samples; The contour error output value is calculated by substituting the sample in the j-th row of the i-th construction matrix into the machine tool error model; S260, according to and Determine the overall global sensitivity coefficient. .

4. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, The global sensitivity analysis also includes the following steps: S2 70. Select multiple discrete machining positions along each motion axis in the machine tool machining space, and repeat steps S210 to S260 for each discrete position to obtain the distribution curve of the sensitivity coefficient of each geometric error term as a function of the machining position. S271, Identify location-related key error terms based on the mean and fluctuation amplitude of the distribution curve.

5. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, The optimization objective function minF(X) is in the form of tolerance-weighted norm; minF(X) satisfies the following relationship: ; Where n is the total number of geometric error terms involved in the optimization; For the first The overall global sensitivity coefficient of the term error, Regarding error tolerance A monotonically decreasing function. This indicates manufacturing costs or processing difficulty.

6. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, The constraints of the error allocation optimization model include: design allowable range constraints for each geometric error term and workpiece machining accuracy constraints.

7. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 1, characterized in that, The heuristic optimization algorithm is a genetic algorithm, and the solution process includes the following steps: S410 determines the dimensions of design variables based on the number of machine tool geometric errors, sets the preset population size, and sets the preset crossover probability and mutation probability. S420 uses floating-point encoding for the model parameter space, directly representing the values ​​of each geometric error term in a continuous real number space; S430, decode each individual in the current population, substitute it into the error allocation optimization model, and calculate the objective function value as the fitness of the individual; S440 assesses chromosome fitness and selects individuals with higher fitness to enter the next generation according to a set probability; performs crossover operations on the chromosomes of the parent population to generate a new offspring population representing the new solution set; and performs mutation operations on the offspring chromosomes to increase population diversity. S450, determine whether the algorithm meets the termination condition, the termination condition includes: reaching the preset maximum number of iterations, or the average change in fitness of adjacent generations is less than the preset convergence threshold. S460: If any termination condition is met, the iteration stops and the global optimal solution is output, which is the optimized geometric error term assignment value of the machine tool; if not, the process returns to step S430 for the next generation evolution.

8. The method for allocating accuracy errors in multi-axis CNC machine tools according to claim 5, characterized in that, =x i -2 。 9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the multi-axis CNC machine tool accuracy error allocation method as described in any one of claims 1-8.

10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.