Method and device for setting motion control parameters of numerical control machine tool

By constructing an optimized objective function and mathematical model, and combining chaotic mapping and multi-level iterative optimization, the problem of low randomness of PID parameters in the tuning of motion control parameters of CNC machine tools is solved, and the tuning accuracy is improved.

CN121541583APending Publication Date: 2026-02-17JUGANG JINGGONG (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511811864.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In the existing technology, CNC machine tools neglect the control of mathematical models when tuning motion control parameters, resulting in low randomness of the initial values ​​of PID parameters, which affects the accuracy of the tuned motion control parameters.

Method used

By constructing an optimization objective function, a mathematical model is established based on the performance indicators and design variables of the CNC machine tool. The upper and lower limits of the PID parameters are identified, and initial values ​​are generated using chaotic mapping. Multi-level iterative optimization is performed to determine the global optimal solution. The response curve is verified in a virtual simulation environment, and key indicators are extracted to tune the motion control parameters.

Benefits of technology

This improves the randomness of the initial values ​​of PID parameters and the accuracy of the tuned motion control parameters, enabling efficient tuning of motion control parameters for CNC machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541583A_ABST
    Figure CN121541583A_ABST
Patent Text Reader

Abstract

The invention discloses a setting method and device for motion control parameters of a numerical control machine tool, and relates to the technical field of numerical control machine tools, corresponding PID parameters are determined based on recognition of a mathematical model of the numerical control machine tool in motion control parameter dimensions, and a corresponding parameter set is constructed according to the upper limit and the lower limit of the PID parameters. And the initial value of the PID parameter is determined based on each parameter set and the chaotic sequence corresponding to the chaotic mapping, so that the randomness of the initial value of the PID parameter is improved. Therefore, a corresponding globally optimal solution is determined based on multi-stage iteration of each initial population; determining a corresponding optimal parameter according to the recognition of the global optimal solution; the corresponding virtual simulation environment is matched according to the mathematical model, the corresponding response curve is determined based on the virtual simulation environment, the optimal parameters and the model of the numerical control machine tool, the multiple key indexes are extracted according to the response curve to determine the set motion control parameters, and the accuracy of the set motion control parameters is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of CNC machine tools, and more particularly to a method and apparatus for setting motion control parameters of CNC machine tools. Background Technology

[0002] With the development of technology, CNC machine tools are gradually being applied to people's lives and are used for multi-dimensional CNC machining of workpieces. CNC machine tools have multiple motion control parameters. In the existing technology, multiple performance indicators of CNC machine tools are collected and corresponding objective functions are constructed. Based on the objective function, multiple motion control parameters of CNC machine tools are predicted and local screening is performed on multiple motion control parameters. However, the control of the mathematical model of CNC machine tools in the dimension of motion control parameters is ignored, which affects the randomness of the initial value of PID parameters and leads to low accuracy of the tuned motion control parameters. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and apparatus for setting motion control parameters of a CNC machine tool.

[0004] This invention provides a method for tuning motion control parameters of a CNC machine tool, including: Multiple performance indicators of CNC machine tools are collected, and a corresponding optimization objective function is constructed based on these indicators. In this optimization objective function, each performance indicator has a corresponding weight coefficient. The design variables and corresponding constraints of the CNC machine tool are collected, and the mathematical model of the CNC machine tool in the dimension of motion control parameters is determined based on the design variables, corresponding constraints and the optimization objective function. Based on the identification of the mathematical model of CNC machine tool in the dimension of motion control parameters, the corresponding PID parameters are determined. The corresponding parameter set is constructed according to the upper and lower limits of the PID parameters. The initial value of the PID parameters is determined based on the chaotic sequence corresponding to each parameter set and the chaotic mapping. An initial population is constructed based on the initial values ​​of each PID parameter; the corresponding global optimal solution is determined through multi-level iterations of each initial population; and the corresponding optimal parameters are determined based on the identification of the global optimal solution. The corresponding virtual simulation environment is matched according to the mathematical model. Based on the virtual simulation environment, the optimal parameters and the model of the CNC machine tool, the corresponding response curve is determined. Based on the response curve, several key indicators are extracted to determine the calibrated motion control parameters.

[0005] This invention provides a device for setting motion control parameters of a CNC machine tool, which is applied to the above-described method for setting motion control parameters of a CNC machine tool.

[0006] Compared with the prior art, the beneficial effects of the present invention are: In this embodiment of the invention, the method involves collecting multiple performance indicators of a CNC machine tool and constructing a corresponding optimization objective function based on these indicators. Each performance indicator has a corresponding weight coefficient within the objective function. The design variables and corresponding constraints of the CNC machine tool are collected, and a mathematical model of the CNC machine tool in the dimension of motion control parameters is determined based on these variables, constraints, and the objective function. Corresponding PID parameters are determined based on the identification of this mathematical model. A corresponding parameter set is constructed based on the upper and lower limits of the PID parameters. Initial values ​​of the PID parameters are determined based on each parameter set and the chaotic sequence corresponding to the chaotic mapping. This method introduces a mathematical model of the CNC machine tool in the dimension of motion control parameters, thereby controlling the model and improving the randomness of the initial values ​​of the PID parameters.

[0007] Therefore, an initial population is constructed based on the initial values ​​of each PID parameter; the corresponding global optimal solution is determined through multi-level iterations of each initial population; the corresponding optimal parameters are determined based on the identification of the global optimal solution; the corresponding virtual simulation environment is matched according to the mathematical model; the corresponding response curve is determined based on the virtual simulation environment, the optimal parameters, and the model of the CNC machine tool; multiple key indicators are extracted from the response curve to determine the tuned motion control parameters; the optimal parameters are introduced, and the response curve is controlled, realizing virtual simulation of the CNC machine tool in the dimension of motion control parameters, and improving the accuracy of the tuned motion control parameters. Attached Figure Description

[0008] Figure 1 This is a flowchart illustrating the method for tuning motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating step S11 in the method for setting motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 3 This is a flowchart illustrating step S12 in the method for setting motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 4 This is a flowchart illustrating step S13 in the method for tuning motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 5 This is a flowchart illustrating step S14 in the method for setting motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 6 This is a flowchart illustrating step S15 in the method for setting motion control parameters of a CNC machine tool according to an embodiment of the present invention. Figure 7 This is an iterative schematic diagram of the method for tuning motion control parameters of a CNC machine tool in an embodiment of the present invention; Figure 8 This is a schematic diagram of the response curve of the method for tuning motion control parameters of a CNC machine tool according to an embodiment of the present invention; Figure 9 This is a schematic diagram of curve optimization for the method of tuning motion control parameters of CNC machine tools in this embodiment of the invention. Detailed Implementation

[0009] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0010] Please see Figures 1 to 9 A method for tuning motion control parameters of a CNC machine tool, applied to CNC machine tool scenarios; the method for tuning motion control parameters of a CNC machine tool includes: Step S11: Collect multiple performance indicators of the CNC machine tool, and construct a corresponding optimization objective function based on the multiple performance indicators of the CNC machine tool; in the optimization objective function, multiple performance indicators have corresponding weight coefficients; Step S12: Collect the design variables and corresponding constraints of the CNC machine tool, and determine the mathematical model of the CNC machine tool in the dimension of motion control parameters based on the design variables, corresponding constraints and the optimization objective function of the CNC machine tool. Step S13: Based on the identification of the mathematical model of the CNC machine tool in the dimension of motion control parameters, determine the corresponding PID parameters, construct the corresponding parameter set according to the upper and lower limits of the PID parameters, and determine the initial value of the PID parameters based on the chaotic sequence corresponding to each parameter set and the chaotic mapping. Step S14: Construct an initial population based on the initial values ​​of each PID parameter; determine the corresponding global optimal solution based on multi-level iterations of each initial population; determine the corresponding optimal parameters based on the identification of the global optimal solution; Step S15: Match the corresponding virtual simulation environment according to the mathematical model, determine the corresponding response curve based on the virtual simulation environment, optimal parameters and CNC machine tool model, and extract multiple key indicators based on the response curve to determine the calibrated motion control parameters.

[0011] refer to Figure 2 In step S11, the specific steps are as follows: S111: Based on the detection of CNC machine tools, the corresponding performance data space is determined, and multiple performance indicators of CNC machine tools are determined by traversing the performance data space; the multiple performance indicators include response curve error, settling time, and overshoot. S112: Construct the corresponding optimization objective function based on the response curve error, settling time, and overshoot; at the same time, collect the scene content of the CNC machine tool, and adjust the weight coefficients of multiple performance indicators based on the scene content of the CNC machine tool.

[0012] In the embodiments of this application, a corresponding performance data space is determined based on the detection of the CNC machine tool, and multiple performance indicators of the CNC machine tool are determined according to the traversal of the performance data space. The multiple performance indicators include response curve error, settling time, and overshoot. This is compatible with the determination of the corresponding performance data space based on the detection of the CNC machine tool. The accuracy of the multiple performance indicators of the CNC machine tool is ensured by considering the overall traversal of the performance data space.

[0013] At this point, a raw dataset for evaluating the machine tool's motion performance is constructed, namely the performance data space. This space consists of specific measurable physical data, primarily derived from the dynamic responses of each machine tool axis (such as the spindle and feed axes) under typical input commands (step, ramp, and sinusoidal signals). Data is collected using high-precision sensors (encoders, linear scales, and current sensors) and stored in time-series format to form a complete performance data space. For example, the core data space of a spindle speed control system is a function of the speed over time. f(t) It records the entire process from the issuance of the command to the steady state.

[0014] By systematically analyzing the performance data space, quantitative indicators are extracted to evaluate system performance. The entire time series f(t) is traversed, and key control indicators are calculated: response curve error: the deviation between the output value f(t) and the reference value T(t) is calculated point by point. e(t) =∣f(t) T(t)∣ This reflects instantaneous tracking accuracy. Settling time: By traversing the response curve, determine the earliest time point at which the system enters and maintains within the ±2% error band of the steady-state value, measuring the response speed. Overshoot: By traversing the curve, find the maximum peak value exceeding the steady-state value, calculate its percentage relative to the steady-state value, and evaluate stability.

[0015] Specifically, for CNC machine tools, the spindle is selected as the test object, and a step speed command (e.g., 0 rpm → 10000 rpm) is applied in Matlab simulation or on the physical machine tool. The actual spindle speed is recorded using virtual or physical sensors. f(t) The complete time series of the dataset constitutes the core performance data space of the CNC machine tool spindle under this working condition.

[0016] Based on the speed response curve of CNC machine tool spindle f(t)Response curve error: Using 10000 rpm as a reference value, calculate the error at each moment (e.g., at 0.5 seconds, the actual speed is 6000 rpm, and the error is 4000 rpm). Settling time: Set a ±2% error band (9800–10200 rpm). Traversing the curve, it is found that the speed stabilizes in this range after 1.1 seconds, so the settling time Ts = 1.1 seconds. Overshoot: Traversing the curve, the maximum peak value is found to be 10500 rpm, and the steady-state value is 10000 rpm, resulting in an overshoot. Mp =(10500 10000) / 10000×100%=5%.

[0017] Furthermore, a corresponding optimization objective function is constructed based on the response curve error, settling time, and overshoot. Simultaneously, scene content of the CNC machine tool is collected, and the weight coefficients of multiple performance indicators are adjusted based on the scene content of the CNC machine tool, which takes into account the overall consideration of response curve error, settling time, and overshoot, ensuring the accuracy of the corresponding optimization objective function.

[0018] At this point, the independent performance indicators extracted from S111 are integrated into a single optimization objective function, serving as the core basis for parameter tuning. The function typically takes the form of a weighted sum, and its general model is as follows: F(A) = ω1J1 + ω2J2 + ω3J3 ,in J1, J2, J3 These represent the quantized values ​​of response curve error, settling time, and overshoot, respectively. ω1, ω2, ω3 Here are the weighting coefficients. The quantification methods for the indicators are as follows: Response curve error: The dynamic tracking accuracy is comprehensively reflected by the integral of the absolute value of the error over time, ∫∣e(t)∣dt. Settling time: Directly use the time value Ts (unit: seconds). Overshoot: Take a percentage value (e.g., 5% is denoted as 5). The final objective function can be expressed as... F(A)=ω1∫∣e(t)∣dt+ω2Ts+ω3Mp The optimization algorithm needs to minimize this function value to improve overall performance.

[0019] By analyzing specific application scenarios (such as processing task type, accuracy requirements, material properties, etc.), the weight coefficients in the objective function are dynamically adjusted to achieve scenario-based tuning. The core logic is as follows: High-precision scenarios: Prioritize increasing... ω1 (Error weights) and ω3 (Overshoot weighting) to reduce tracking bias and oscillation. High-efficiency scenarios: increased weighting. ω2 (Adjusting time weights) improves response speed. The relative magnitude of the weight coefficients directly reflects the value orientation of the optimization algorithm, ensuring that the parameters are adapted to actual needs.

[0020] Specifically, for CNC machine tool spindle control, based on the index values ​​of S111 (such as...) Ts =1.1s、 Mp =5%), construct the objective function: F(A) = ω1 × (error integral) + ω2 × 1.1 + ω3 × 5 At this time, the weighting coefficient ω1, ω2, ω3It has not yet been determined and needs to be dynamically adjusted according to the needs of the scenario through the next sub-step.

[0021] Assuming a CNC machine tool is used for high-precision machining of titanium alloy bladed disks for aerospace applications, the scenario requirements are analyzed as follows: Core requirement: Precision is the top priority (reducing vibration and overcutting), efficiency is secondary. Weighting: Set ω1=0.6 (highest priority, ensuring contour accuracy). ω3=0.3 (Second highest priority, suppressing overshoot vibration). Setting ω2 =0.1 (lowest priority, allowing for sacrifice in response speed). The final customized objective function is: F(A) = 0.6 × (error integral) + 0.1 × (setting time) + 0.3 × (overshoot) quantity) This function will guide subsequent optimization algorithms to ensure that the parameter tuning results meet the actual needs of high-precision machining scenarios.

[0022] refer to Figure 3 In step S12, the specific steps are as follows: S121: Monitor the CNC machine tool in real time and mark the design variables and corresponding constraints of the CNC machine tool; determine the first sub-mathematical model based on the optimization objective function and the design variables of the CNC machine tool; S122: Based on the optimization objective function and the constraints of the CNC machine tool, determine the second sub-mathematical model, and determine the mathematical model of the CNC machine tool in the dimension of motion control parameters according to the first and second sub-mathematical models.

[0023] In the embodiments of this application, the CNC machine tool is monitored in real time, and the design variables and corresponding constraints of the CNC machine tool are marked; based on the optimization objective function and the design variables of the CNC machine tool, the first sub-mathematical model is determined, which is compatible with the overall consideration of the optimization objective function and the design variables of the CNC machine tool, and ensures the accuracy of the first sub-mathematical model.

[0024] At this point, in the CNC machine tool control system, the design variable is typically the gain parameter of the PID controller. Depending on the machine tool control architecture, such as the spindle using current-speed dual closed-loop PID speed regulation and the feed axis using speed-position dual closed-loop PID angle control, the variables that need to be marked include the current loop... Kpc, Kic, Kdc Speed ​​ring Kpω, Kiω, Kdω and position ring Kpp, Kip, Kdp Constraints are based on hardware limitations, stability requirements, and engineering experience, setting reasonable value ranges for each variable (e.g., ...). [Kmin,Kmax] This is to ensure the safe operation of the system.

[0025] By combining the optimization objective with the design variables, we can construct the basic mathematical framework for the optimization problem, the standard form of which is: find (All design variables) min (Optimize the objective function); where, find Some of the PID parameters to be optimized are listed. min Some parts specify that the optimization direction is to minimize the objective function. F(A) This model is an unconstrained optimization problem, which forms the basis for introducing constraints later.

[0026] Specifically, for CNC machine tools, the spindle is selected as the optimization target. Based on its current-speed dual closed-loop PID speed control scheme, six design variables are marked: the current loop... Kpc, Kic, Kdc and speed ring Kpω, Kiω, Kdω Based on motor specifications, driver capacity, and stability requirements, a uniform conservative constraint range, such as [0, 100], is set for all parameters to ensure that parameter searches are conducted within a safe and feasible range.

[0027] For CNC machine tools, the objective function customized for the high-precision bladed disk machining scenario in step S11 is... F(A) Combined with the six labeled design variables, construct the first sub-mathematical model. :find(Kpc,Kic,Kdc,Kpω,Kiω,Kdω) This model indicates that a set of PID parameters needs to be found in a six-dimensional parameter space to achieve the desired overall performance index. F(A) Minimize. This model does not yet include constraints, laying the foundation for subsequent steps.

[0028] Furthermore, based on the optimization objective function and the constraints of the CNC machine tool, a second sub-mathematical model is determined. Based on the first and second sub-mathematical models, the mathematical model of the CNC machine tool in the dimension of motion control parameters is determined, which is compatible with the overall consideration of the first and second sub-mathematical models and ensures the accuracy of the mathematical model of the CNC machine tool in the dimension of motion control parameters.

[0029] At this point, the constraints marked in S121 are precisely described mathematically, constructing an independent constraint model to define the search boundary of the optimization algorithm. This model consists of a series of inequality constraints, ensuring that all parameter searches are conducted within a safe and feasible region. Its general mathematical form is: stKimin≤Ki≤Kimax ;in, Ki Representing the i One design variable, Kimin and Kimax These are its lower and upper bounds, respectively. This model only defines the feasible region and does not involve the optimization objective.

[0030] By integrating the objective-variable model (first sub-model) and the constraint model (second sub-model), a complete constrained optimization mathematical model is formed. This model provides explicit solution instructions for intelligent optimization algorithms: under given constraints, find the optimal combination of variables that optimizes the objective function. It includes the optimization objective, design variables, and constraints.

[0031] Specifically, for CNC machine tools, the constraint range [0, 100] set for the six PID parameters is used to construct the second sub-mathematical model: st0≤Kpc≤100;st0≤Kic≤100;st0≤Kdc≤100;st0≤Kpω≤100; st0≤Kiω≤100;st0≤Kdω≤100; The model defines a six-dimensional hypercube search space, ensuring that all parametric solutions fall within this safe region.

[0032] For CNC machine tools, the first sub-model and the second sub-model are merged to obtain a complete mathematical optimization model: find (Kpc,Kic,Kdc,Kpω,Kiω,Kdω);st0≤Kpc,Kic,Kdc,Kpω,Kiω,Kdω≤100 The text precisely describes the parameter tuning problem for machine tool spindle control: finding a set of PID parameters within a six-dimensional hypercube space to achieve comprehensive performance indicators tailored for high-precision bladed disk machining scenarios. F(A) Minimize. This model will serve as the direct input to the improved CSA algorithm.

[0033] refer to Figure 4 In step S13, the specific steps are as follows: S131: Collect the mathematical model of the CNC machine tool in the dimension of motion control parameters, identify the mathematical model, output the corresponding PID parameters, and determine the upper and lower limits of the PID parameters based on the detection of the PID parameters. S132: Construct a corresponding parameter set based on the upper and lower limits of the PID parameters. This parameter set serves as a parameter container for the chaotic mapping. Simultaneously, collect the chaotic mapping and generate the corresponding chaotic sequence based on the chaotic mapping. Determine the initial values ​​of the PID parameters according to each parameter set and the chaotic sequence corresponding to the chaotic mapping.

[0034] In the embodiments of this application, a mathematical model of the CNC machine tool in the dimension of motion control parameters is acquired, and the mathematical model is identified to output the corresponding PID parameters. The upper and lower limits of the PID parameters are determined based on the detection of the PID parameters, which is compatible with the overall consideration of PID parameter detection and ensures the accuracy of the upper and lower limits of the PID parameters.

[0035] At this point, by analyzing the complete mathematical model constructed in step S12, all parameters to be adjusted are accurately identified. A constrained optimization model containing the optimization objective, design variables, and constraints is collected; the model is then analyzed... find In this section, all design variables are extracted. In the context of this invention, these design variables are the gain parameters of each PID controller in the CNC machine tool control system. For example, for a current-speed dual closed-loop system of a spindle, the identified parameters include the gain parameters of the current loop and the speed loop. Kp, Ki, Kd .

[0036] Set safe and reasonable value ranges (constraints) for the identified PID parameters to ensure the optimization process is effective and does not cause system instability. The determination of parameter boundaries should be based on the following: System stability theory: Analyze closed-loop stability using the Routh criterion or Nyquist criterion to calculate the theoretically feasible range of the parameters. Physical hardware limitations: Refer to the rated current / voltage of the servo driver and motor to avoid excessively large parameters that could lead to output saturation or integral saturation. Engineering experience: Based on debugging experience with similar machine tools, set a conservative initial search range to reduce invalid calculations. Determine a lower limit for each parameter. Kmin and upper limit Kmax Together, they constitute the optimization space.

[0037] Specifically, for the optimization of spindle control in CNC machine tools, the complete mathematical model constructed in step S12 is collected: find (Kpc,Kic,Kdc,Kpω,Kiω,Kdω);st0≤Kpc,Kic,Kdc,Kpω,Kiω,Kdω≤100 By analyzing the find part, six PID parameters to be optimized were clearly identified: the current loop parameter... Kpc, Kic, Kdc and the speed ring Kpω,Ki ω、Kdω These parameters will be the direct objects of operation for subsequent optimization algorithms.

[0038] The boundary determination process for the six PID parameters of the machine tool is as follows: Theoretical analysis: based on motor parameters (such as moment of inertia) J =0.05, damping coefficient B =0.005), the theoretical parameter range was derived through stability analysis. Hardware considerations: The physical upper limit of the parameters was calculated by consulting the servo driver manual and combining the maximum output current / voltage. Empirical setting: Combining theoretical and hardware limitations with engineering experience, a unified conservative boundary was set for all parameters: a lower limit. Kmin =0 (negative gain has no practical significance), upper limit Kmax =100 (a sufficiently large empirical value). The optimization space for each PID parameter is determined to be [0,100], serving as a container for subsequent generation of the initial population and iterative search.

[0039] Furthermore, a corresponding parameter set is constructed based on the upper and lower limits of the PID parameters, which serves as a parameter container for the chaotic mapping. Simultaneously, chaotic mappings are collected, and corresponding chaotic sequences are generated based on these mappings. The initial values ​​of the PID parameters are determined according to each parameter set and the chaotic sequences corresponding to the chaotic mappings, taking into account the overall consideration of each parameter set and the chaotic sequences corresponding to the chaotic mappings, thus ensuring the randomness of the initial values ​​of the PID parameters. At the same time, a mathematical model of the CNC machine tool in the dimension of motion control parameters is introduced to control the mathematical model of the CNC machine tool in the dimension of motion control parameters, thereby improving the randomness of the initial values ​​of the PID parameters.

[0040] At this point, the independent boundaries of each PID parameter determined in S131 are integrated into a multidimensional bounded space, serving as the operational canvas for the chaotic mapping. Specifically, this is achieved by combining the value ranges of each parameter. [minKi,maxKi] We construct an n-dimensional hyperrectangle (or hypercube if the boundaries are the same). This parameter container ensures that the initial values ​​generated by subsequent chaotic mappings all fall within the safe and feasible region, avoiding invalid or dangerous parameter combinations and providing a clear search boundary for the optimization algorithm.

[0041] This invention utilizes chaos theory to generate high-quality, uniformly distributed random numbers to replace traditional pseudo-random numbers. It employs the Circle chaotic mapping, whose sequence possesses randomness, uniformity, and ergodicity, effectively covering the search space, avoiding initial point clustering, thereby enhancing global search capabilities and preventing premature convergence. By iterating the Circle mapping formula, a chaotic sequence distributed within the [0,1] interval is generated, exhibiting statistical properties superior to ordinary random numbers.

[0042] A linear transformation maps the chaotic sequence to a parameter container, generating the initial population for the CSA algorithm. The transformation formula is: Initial value = minKi ​​+ chaotic value × (maxKi) minKi) Group the mapped parameter values ​​by dimension (each n Each value constitutes an individual, and all combinations of individuals form the initial population. This method ensures that the initial solution is uniformly distributed within the feasible region, laying the foundation for efficient global search.

[0043] Specifically, for the six PID parameters of the CNC machine tool spindle control, the established unified boundary [0, 100] is used. The six one-dimensional spaces are combined to construct a six-dimensional hypercube parameter container. Each dimension corresponds sequentially to... Kpc, Kic, Kdc Kpω, Kiω, Kdω And all dimensions are 100. This container is the data form for filling the initial points of the chaotic map.

[0044] For machine tool initialization, select Circle chaotic mapping and set control parameters (such as...). a=0.5, b=0.2 If 200 initial individuals (each with 6 parameters) need to be generated, a chaotic sequence of length 200 × 6 = 1200 is generated iteratively. Each value in the sequence is uniformly distributed within [0, 1], providing a basis for subsequent parameter mapping.

[0045] For the uniform boundary [0,100] of the machine tool, the transformation formula simplifies to: Initial value = 100 × chaos value For example, the first 6 values ​​of the chaotic sequence (0.1, 0.5, 0.9, 0.2, 0.8, 0.4) are mapped to the initial parameter combination (10, 50, 90, 20, 80, 40). This is repeated 200 times to generate 200 uniformly distributed six-dimensional parameter combinations, which constitute the initial population of the CSA algorithm.

[0046] refer to Figure 5 In step S14, the specific steps are as follows: S141: Collect the initial values ​​of each PID parameter, and construct the corresponding initial population by superimposing the initial values ​​of each PID parameter. The individuals in the initial population will be evenly distributed in the entire feasible solution space defined by the mathematical model constraints. S142: Collect the iteration start point, maximum number of iterations, and search threshold. Based on the iteration start point, maximum number of iterations, and search threshold, trigger multi-level iterations for each initial population and determine the corresponding global optimal solution during the multi-level iterations of each initial population. S143: Determine the corresponding optimal solution label based on the identification of the global optimal solution, and determine the corresponding optimal parameters based on the tracing of the optimal solution label.

[0047] In the embodiments of this application, the initial values ​​of each PID parameter are collected, and the initial values ​​of each PID parameter are superimposed to construct the corresponding initial population. The individuals in the initial population are evenly distributed throughout the feasible solution space defined by the mathematical model constraints.

[0048] At this point, all initial parameter data generated in step S13 are collected as the basis for constructing the initial population. These initial values ​​are generated as chaotic sequences through Circle chaotic mapping, and then mapped to the boundaries of each PID parameter through linear transformation. [minKi,maxKi] The specific values ​​within. For a value that needs optimization. n Each parameter and population size are: N The task involves collecting data sets that include N×n These are numerical values, which have not yet been organized into a structured solution.

[0049] The scattered initial values ​​are structured to form an initial population that the optimization algorithm can directly manipulate. Swarm intelligence optimization algorithms treat each complete solution (a set of PID parameters) as a search entity; therefore, it is necessary to... N×n Each initial value is ordered sequentially. n They are combined in groups. The resulting initial population contains... N Each individual is a... n dimensional vector, for example, the 1st dimension vector i Each individual is represented as [K1i,K2i,...,Kni] .

[0050] The feasible solution space is defined by the mathematical model constraints of step S12, i.e., the multidimensional region enclosed by the boundaries of each PID parameter (such as the six-dimensional hypercube of a machine tool). Since the initial values ​​originate from the Circle chaotic mapping, the ergodicity and uniformity of its sequence are completely preserved in the initial population after linear transformation. This characteristic ensures that the population fully covers the feasible region, avoids initial point clustering, thereby enhancing the global exploration capability and reducing the risk of getting trapped in local optima.

[0051] Specifically, for CNC machine tools, review step S13: a unified boundary [0, 100] was set for the 6 PID parameters. The output of step S132 was collected: 200 × 6 = 1200 chaotic values ​​in the [0, 1] interval were generated through Circle chaotic mapping, and then subjected to linear transformation. y=100×λ Convert to 1200 initial parameter values ​​within the range [0, 100]. The collected values ​​are these 1200 initial values ​​that have not yet been grouped.

[0052] For the machine tool, the 1200 initial values ​​are grouped into groups of 6 values ​​each. For example, the first 6 values ​​(10, 50, 90, 20, 80, 40) form individual #1, the next 6 values ​​form individual #2, and so on, until 200 individuals are formed. These 200 individuals together constitute the initial population, and each individual represents a complete set of dual-loop PID parameter schemes for the spindle, ready to be input into the CSA algorithm.

[0053] The feasible solution space is a six-dimensional hypercube [0, 100]. 6 The 200 individuals constructed through chaotic initialization exhibit a macroscopically uniform distribution within this space. This means that regardless of where the optimal parameters are located in the space, there is a high probability that the initial individuals exist in their vicinity. This allows the CSA algorithm to simultaneously initiate searches from multiple potential regions, laying the foundation for efficiently finding the global optimum.

[0054] Furthermore, the iteration start point, maximum number of iterations, and search threshold are collected. Based on the iteration start point, maximum number of iterations, and search threshold, each initial population is triggered to carry out multi-level iterations. During the multi-level iteration process of each initial population, the corresponding global optimal solution is determined. This approach takes into account the overall considerations in the multi-level iteration process of each initial population and ensures the accuracy of the corresponding global optimal solution.

[0055] At this point, to optimize the algorithm's configuration rules and termination conditions, ensuring a controllable and efficient process, the core parameters to be collected include: Iteration start point: usually fixed at 1, serving as the algorithm's initial generation; Maximum number of iterations. (T)A hard upper limit on computation is required to prevent infinite execution; a balance must be struck between computational cost and solution accuracy. A soft termination condition can be used, such as a fitness threshold (stopping when the objective function value is better than a preset value) or a convergence threshold (stopping when the optimal fitness improvement is less than the minimum value after several consecutive generations). Additionally, control parameters specific to the CSA algorithm (such as search control coefficients) need to be collected. p1,p2,α,β,ρ,c1,c2 and the probability of prey perception P (This allows for fine-tuning of search behavior.)

[0056] The core of the optimization algorithm drives the initial population to evolve in a loop. Starting from the initial point, the algorithm enters the main loop and iterates continuously until the maximum number of iterations or the search threshold is met. In each iteration, individuals in the population update their position (PID parameters) by simulating predation behavior. Key operations include: updating internal state: dynamically adjusting search parameters (such as...) based on the number of iterations. μ,ω, a The initial phase focuses on global exploration, while the later phase emphasizes local development. Position update: Individuals calculate new positions based on their own historical best, the population's global best, and the CSA mathematical model. Boundary handling: Check if the new position exceeds the boundary of the feasible solution space; if so, correct it to the boundary to ensure the validity of the solution.

[0057] After each iteration, the following steps need to be performed: substitute the new positions (PID parameters) into the simulation model and calculate the objective function. F(A) The value is used as the fitness. The fitness of all individuals in the current generation is compared with their historical best, and the optimal position of each individual is updated accordingly. If the current generation's optimal fitness is better than the historical global best, the global optimal position and global optimal fitness are updated. When the iteration terminates, the final recorded global optimal position is the global optimal solution for the optimization task.

[0058] Specifically, for machine tool spindle optimization, the iteration start point is set to 1, the maximum number of iterations T=300 (to ensure sufficient search), and the convergence threshold is an improvement of less than 0.001 in the optimal fitness over 50 consecutive generations. Validation parameters are directly used: (α,β,ρ)= (4.0,3.0,2.0), (c1,c2)=(2.0,1.8), P=0.1 It is used to control the exploration and development of color-changing factors in subsequent iterations.

[0059] For the machine tool, starting with 200 individuals of S141, the algorithm enters a fort=1to300 loop from the first generation. In the tt-th generation, the algorithm first updates μ, ω, and a according to the formula, and then updates the position of each individual one by one. For example, individual #78 calculates a new PID parameter set based on its own optimality, the population optimality, and the CSA formula. If a value in the new parameter exceeds [0,100] (such as -5 or 150), it is corrected to 0 or 100.

[0060] For the machine tool, after the t-th iteration, 200 new parameter sets are substituted into the Matlab model to calculate the fitness. Assuming that the fitness of individual #78 (0.08) is optimal for this generation and better than the historical global optimum (0.09), the global optimum fitness is updated to 0.08, and its PID parameter set is recorded. This process is repeated until the 300th generation. If the optimal fitness does not improve significantly after the 285th generation, the algorithm terminates with the final recorded global optimum position (e.g., ...). (Kpc=45.2,Kic=12.8,...) This is the global optimal solution for the machine tool.

[0061] Therefore, the corresponding optimal solution label is determined based on the identification of the global optimal solution, and the corresponding optimal parameters are determined by tracing the optimal solution label. This approach takes into account the overall consideration of tracing the optimal solution label and ensures the accuracy of the corresponding optimal parameters.

[0062] At this point, the final result of the iterative search is solidified and labeled, forming a clear and traceable output. After the iteration terminates in step S142, the algorithm identifies the optimal solution in the entire search process, which is mathematically represented by the minimum objective function value. F(A)min And its corresponding coordinates in the multidimensional parameter space. To facilitate subsequent calls, the algorithm packages this information of the global optimal solution into a tag, which contains at least two parts: one is the optimal performance index that quantifies the best overall performance (i.e., F(A)min The first is the specific combination of all PID parameters when this performance is achieved, which is the optimal solution coordinate vector.

[0063] The process of transforming the abstract internal optimal solution markers of the algorithm into specific, engineering-application-ready optimal parameter values ​​is achieved through simple data extraction and tracing: the algorithm directly reads the coordinate portion of the optimal solution based on the generated optimal solution markers. Each component of this coordinate vector corresponds to a specific PID parameter. By mapping these values ​​one-to-one with the parameter names, the final optimal parameter combination that can be directly applied to the CNC machine tool control system can be obtained.

[0064] Specifically, for the optimization of spindle control in CNC machine tools, after 300 iterations in step S142, it is assumed that the minimum objective function value recorded by the improved CSA algorithm is... F(A)min=0.048 The algorithm then generates an optimal solution marker, which records the optimal performance metric of 0.048, and an optimal solution coordinate vector containing six values, such as (45.2, 12.8, 5.1, 78.9, 33.4, 9.7). This vector precisely corresponds to the six PID parameters. Kpc,Kic,Kdc,Kp ω,Kiω,Kdω The optimal value of ).

[0065] The final optimal parameters are determined by tracing back: The optimal solution marker generated for the machine tool in the previous step is read, and the optimal solution coordinate vector (45.2, 12.8, 5.1, 78.9, 33.4, 9.7) is extracted from it. The six values ​​in this vector are then arranged in a preset order (current loop). Kpc, Kic, Kdc Speed ​​ring Kpω,Kiω,Kdω The mapping was performed, and the optimal motion control parameters for the machine tool in the high-precision bladed disk machining scenario were finally determined as follows: current loop proportional gain. Kpc =45.2, Integral Gain Kic =12.8, Differential Gain Kdc =5.1; Speed ​​loop proportional gain Kpω =78.9, Integral Gain Kiω =33.4, Differential Gain Kdω =9.7, this set of specific parameter values ​​is the final output of the entire CSA-based optimization parameter tuning method, which can be used for virtual simulation verification in step S15.

[0066] refer to Figure 6 In step S15, the specific steps are as follows: S151: Configure the optimal parameters obtained after optimization into the corresponding controllers of the CNC machine tool. At the same time, collect the mathematical model and determine the corresponding virtual simulation environment based on the mathematical model and the corresponding CNC machine tool. S152: Collect the model of the CNC machine tool and mark the comparison parameters corresponding to the optimal parameters. Based on the virtual simulation environment, the optimal parameters and the corresponding comparison parameters, determine the corresponding response curves to obtain two sets of response curves. S153: Based on the comparison of two sets of response curves, the response difference region is determined, and multiple key indicators are extracted based on the identification of the response difference region. The multiple key indicators include rise time, settling time and steady-state error. The corresponding optimization rate is determined based on the multiple key indicators. If the optimization rate is greater than the preset optimization rate threshold, the tuned motion control parameters are determined.

[0067] In the embodiments of this application, the optimized parameters obtained after optimization are configured into the corresponding controllers of the CNC machine tool. At the same time, a mathematical model is collected, and the corresponding virtual simulation environment is determined based on the mathematical model and the corresponding CNC machine tool. This approach takes into account both the mathematical model and the corresponding CNC machine tool, ensuring the accuracy of the corresponding virtual simulation environment.

[0068] At this point, the target of the configuration is the controller model in the virtual simulation environment, not the physical machine tool, to ensure the safety and repeatability of the test. Based on the control architecture of the CNC machine tool (such as a current-speed dual closed-loop PID speed control scheme for the spindle), the optimal parameter combination obtained in step S143 needs to be precisely mapped to the corresponding PID controller module in the simulation model. Specifically, each value in the optimal parameters needs to be configured to the P, I, and D gain input ports of the current loop and speed loop PID controllers in the simulation model.

[0069] To construct a high-fidelity digital twin platform, accurately reproduce the dynamic behavior of the target CNC machine tool and ensure the effectiveness of parameter verification. This requires acquiring the complete mathematical model of the machine tool control system constructed in step S12, which defines the overall system structure (such as a cascade closed-loop control scheme) and signal flow relationships.

[0070] The construction of a virtual simulation environment involves concretizing this abstract model into a runnable simulation module. This requires two key inputs: first, a mathematical model providing the blueprint; and second, the specific model and parameters of the CNC machine tool, providing precise physical parameters. The latter includes detailed physical parameters of the controlled motor (such as the spindle motor), such as its moment of inertia. J Damping coefficient B Torque constant Kt back electromotive force constant Ke Armature resistance R and inductor L By using these physical parameters in professional simulation software (such as Matlab / Simulink) to build modules such as motors, inverters, and loads, and connecting them to a PID controller according to mathematical model logic, a closed-loop, high-fidelity dynamic system is formed, i.e., a virtual simulation environment.

[0071] Specifically, for the spindle control optimization of CNC machine tools, the optimal parameter combination output in step S143 is obtained: (Kpc =45.2,Kic=12.8,Kdc=5.1,Kpω=78.9,Kiω=33.4,Kdω=9.7) In the Matlab / Simulink virtual simulation environment of the machine tool, the PID controller modules representing the spindle current loop and speed loop were positioned. The first three values ​​(45.2, 12.8, 5.1) were configured into the P, I, and D gain settings of the current loop PID controller, respectively; the last three values ​​(78.9, 33.4, 9.7) were configured into the P, I, and D gain settings of the speed loop PID controller, respectively. The optimal parameters have been successfully injected into the virtual controller, preparing for subsequent simulation tests.

[0072] Step S12 involves collecting the mathematical model (spindle current-speed dual closed-loop structure) and its model information. Next, the technical manual is consulted based on the model number to obtain the key physical parameters of the spindle motor: moment of inertia. J=0.05kg\cdotpm2 Damping coefficient B=0.005N\cdotpm\cdotps Torque constant Kt=0.8N\cdotpm / A wait.

[0073] In the Matlab / Simulink environment, a simulation model of a three-phase asynchronous motor and its driver for the spindle was built using these parameters. Following the cascade closed-loop structure of the mathematical model, a PID controller module with optimal parameters was connected to the motor model to form a complete closed-loop control system. The virtual simulation environment for the machine tool is ready to run and evaluate the performance of the optimal parameters.

[0074] Furthermore, the model of the CNC machine tool is collected, and the corresponding comparison parameters are marked. Based on the virtual simulation environment, the optimal parameters, and the corresponding comparison parameters, the corresponding response curves are determined to obtain two sets of response curves. This approach takes into account the overall considerations of the virtual simulation environment, the optimal parameters, and the corresponding comparison parameters, ensuring the accuracy of the corresponding response curves.

[0075] At this point, collecting the CNC machine tool's model number is significant because it allows us to trace or obtain the machine tool's original configuration before optimization. This data is the most direct source for finding comparison parameters. Next, the comparison parameters are marked. These parameters refer to the PID parameter values ​​actually applied to the CNC machine tool's controller before this optimization, typically obtained through traditional empirical methods, trial and error, or the equipment's factory default settings. Marking these parameters serves as a baseline for evaluating the performance of the new parameters, representing the performance level before optimization.

[0076] The optimization effect is quantitatively demonstrated by conducting two independent simulation experiments under completely identical conditions in the same virtual simulation environment. The premise of the experiment is that the two simulations must be conducted under exactly the same virtual simulation environment and the same input stimuli. This is a fundamental principle to ensure the fairness and validity of the comparison. The only different variable is the PID parameters configured in the controller.

[0077] The specific operation consists of two steps: First, a benchmark simulation is performed, where the comparison parameters are configured into the virtual controller, the simulation is run, and the curve of the system output changing over time is recorded, i.e., the response curve before optimization; Second, an optimization simulation is performed, where the optimal parameters are configured into the same environment, the simulation is run under the same excitation, and the output curve is recorded, i.e., the response curve after optimization.

[0078] Specifically, the specific model number is collected, and the currently used spindle control PID parameters are read from the CNC system's configuration file or equipment maintenance record. Assume the original parameters read are: current loop... (Kpc=20.0,Kic=5.0,Kdc= 1.0) Speed ​​ring (Kpω=40.0,Kiω=15.0,Kdω=2.0) We label this set of parameters as the comparison parameters, which represent the actual operating state of the machine tool before CSA optimization and serve as the benchmark for subsequent performance comparisons.

[0079] For CNC machine tools, a Simulink virtual simulation environment was built using step S151, and a unified input stimulus was set: a step speed signal that jumps from 0 rpm to 10000 rpm. A benchmark simulation was performed: the comparison parameters (20.0, 5.0, 1.0, 40.0, 15.0, 2.0) were configured into the PID controller, the simulation was run, and the spindle speed response curve was recorded and marked as the response curve before optimization.

[0080] Next, optimization simulation was performed: the optimal parameters (45.2, 12.8, 5.1, 78.9, 33.4, 9.7) were configured in the same controller, and the simulation was run again under the same step input. The new response curves were recorded and marked as the optimized response curves. Two response curves generated under the same conditions were obtained, which intuitively showed the difference in the dynamic performance of the machine tool spindle before and after optimization, providing a data basis for the next step of quantitative analysis.

[0081] Therefore, the response difference region is determined based on the comparison of two sets of response curves, and several key indicators are extracted based on the identification of this response difference region. These key indicators include rise time, settling time, and steady-state error. The corresponding optimization rate is determined based on these key indicators. If the optimization rate is greater than the preset optimization rate threshold, the tuned motion control parameters are determined. This approach takes into account the overall consideration of multiple key indicators, ensuring the accuracy of the corresponding optimization rate. At the same time, optimal parameters are introduced, and the response curve is controlled, realizing virtual simulation of CNC machine tools in the dimension of motion control parameters and improving the accuracy of the tuned motion control parameters.

[0082] At this point, the visualized curves obtained in step S152 are transformed into quantifiable performance index data, achieving a crucial leap from qualitative observation to quantitative analysis. Placing the two response curves before and after optimization on the same coordinate system, the regions of inconsistency in their shape, velocity, and steady-state characteristics represent the response difference regions, visually demonstrating the effect of parameter optimization. From these difference regions, based on the definitions in control theory, key indicators for measuring the dynamic and steady-state performance of the system are precisely extracted, including: rise time (…). Tr Settling time: The time required for the response to jump from 10% to 90% of the steady-state value, reflecting the system's response speed. Ts Steady-state error: The shortest time it takes for the response to enter and remain permanently within the ±2% or ±5% error band of the steady-state value, comprehensively measuring both speed and damping characteristics. es The deviation between the actual steady-state output and the expected output after the system transition ends is used to measure the final control accuracy.

[0083] Converting absolute performance metrics into relative measures of improvement enhances persuasiveness. The optimization rate is a relative metric, calculated using the following formula: ; This formula is suitable for metrics such as rise time, settling time, and steady-state error, where smaller values ​​are better. The results are presented intuitively as a percentage or decimal to show the performance improvement.

[0084] One or more optimization rate thresholds need to be preset as the minimum standard for success (e.g., the optimization rate of all indicators must be >30%). The calculated actual optimization rate is compared with the threshold: if all indicators meet or exceed the threshold, the optimization is successful, and the optimal parameters of S143 are determined as the tuned motion control parameters; if any indicator fails to meet the standard, it is necessary to return to the upstream step (e.g., adjust the objective function weights or algorithm parameters) and re-tune.

[0085] Specifically, comparing the two step response curves (0 rpm to 10000 rpm) obtained in step S152, it is clear that the optimized curve is steeper, reaches the target value faster, and has less overshoot. These inconsistencies represent the response difference regions. Through precise measurement, key indicators were extracted and compiled into comparative data: Before optimization: rise time. Tr =1.4516s, adjustment time Ts =1.7178s, steady-state error es =0.8862%. Optimized rise time: Tr =0.9246s, adjustment time Ts =1.0954s, steady-state error es =0.0168%.

[0086] For machine tools, the optimization rate is calculated based on the indicator data: Rise time optimization rate: (1.4516) 0.9246) / 1.4516≈36.31%. Adjustment time optimization rate: (1.7178) (1.0954) / 1.7178≈36.23%. Steady-state error optimization rate: (0.8862%) (0.0168%) / 0.8862%≈98.10%, these results precisely quantify the performance improvement brought about by the optimal parameters.

[0087] For the high-precision bladed disk machining requirements of machine tools, the preset optimization rate threshold is 30%. Comparing the actual optimization rates: rise time 36.31% > 30% (satisfied), settling time 36.23% > 30% (satisfied), steady-state error 98.10% > 30% (satisfied). Since all indicators exceed the threshold, the optimal parameter combination for S143 is finally confirmed. (Kpc=45.2,Kic=12.8,Kdc=5.1,Kpω=78.9,Kiω=33.4,Kdω=9.7) are the final motion control parameters after machine tool tuning, which can be deployed to the actual controller to improve machining performance.

[0088] In another embodiment of this application, existing CNC machine tools mainly adopt a cascade closed-loop control scheme. The spindle uses a current-speed dual closed-loop PID speed regulation scheme, while the X, Y, and Z axes use a speed-position dual closed-loop PID angle control scheme. Standard PID formula: in, , , These represent proportional gain, integral gain, and derivative gain, respectively. This represents the error between the current expected value and the output value. This represents the system's input control quantity. In the current control cycle, the CNC machine tool system first acquires real-time data for each axis motor through various sensors (such as linear scales, Hall effect sensors, and current sensors), inputting this data into the corresponding feedback loop regulator. The output of the previous outer loop is used as the input to the inner loop, and finally, a set of PWM pulse width modulation signals is output to control the on / off state of power devices (such as IGBTs), thereby driving the motor to output precise torque to achieve the target speed or angle. When the system input acts on the motor, the motor outputs a time-domain response curve. Based on the performance parameters of the system response curve, the performance index function is designed and optimized as follows: In the formula: These are weighting coefficients used to balance various performance parameters and adjust the focus of optimization. The absolute value of the error between all output values ​​and the input reference value of the response curve in the time domain; The settling time is the time required for the response curve to enter and remain within an allowable error band (typically ±2% or ±5%) near the steady-state value. The overshoot is the percentage of the response curve exceeding the steady-state value by the maximum amount. The smaller this value, the more stable the system. To optimize the performance index values, a constrained optimization task is constructed based on the above objective function, and its mathematical model is shown below: in, For each PID controller, all parameters must be selected according to the controlled object and the input tracking target. and These represent the lower and upper limits of the optimization space for each PID parameter, respectively. This is the input reference value. For the spindle motor, this reference value is the target speed, and for the non-spindle motor, it is the target position.

[0089] To achieve rapid optimization of a constrained objective, a suitable optimization algorithm is needed. The Chameleon Swarm Algorithm (CSA) is a novel metaheuristic algorithm for solving global numerical optimization problems. Its basic inspiration comes from the dynamic behavior of chameleons navigating and searching for food in trees, deserts, and swamps. This algorithm mathematically models the chameleon's food-finding behavior, including rotating its eyes to locate prey and rapidly launching its sticky tongue to grab it. It then enables multiple "chameleons" to move and communicate within the search space to find the optimal solution, featuring simple deployment and rapid convergence. Similar to traditional optimization algorithms, the Chameleon Swarm Algorithm is prone to getting trapped in local optima. Therefore, an improvement is made to the standard Chameleon Swarm Algorithm by using a Circle chaotic map to initialize the population distribution, thereby enriching the population's diversity. The Circle chaotic map possesses the characteristics of randomness, uniformity, and order. The formula for initializing the population positions is shown below: in, For each individual in the chameleon population in the first Initial values ​​in dimensional space; and Table 1 Upper and lower limits in dimensional space; and These represent control weights, with commonly used values ​​of 0.5 and 0.2. Represents a random decimal number between 0 and 1. Each individual chameleon discovers prey while roaming and searching for it, utilizing its previous location and information exchange with other members of the group. The mathematical description of its position update strategy during foraging is as follows: in, For individuals In the In 3D space, the first The position of the next iteration. To perceive the probability of prey. It is a positive coefficient used to control the algorithm development capability. For individuals in a population exist The optimal position in the 1D space after t iterations. It is a random number between (0, 1). index in (0,1) Random numbers generated uniformly at a given location. This represents an individual adjusting their direction. This is a search capability parameter that updates with the number of iterations, and its expression is: in, The three constant values ​​are used to control an individual's exploration capability. This represents the current iteration number. This represents the maximum number of iterations. An individual searches for prey by rotating its eyes; the mathematical description of this process is: in, For the first The position of the chameleon's center of gravity in the next iteration. This represents the individual's position after the position transformation. It is represented as a rotation matrix for rotating the individual position. express Vectors that are mutually orthogonal. This represents the random rotation angle of an individual. Limit the rotation angle to 0 to between.

[0090] Individuals capture prey by ejecting their tongues; the velocity update expression for this process is similar to that of particle swarm optimization, and its mathematical description is as follows: in, Indicates the process The speed of updates after each iteration It is the first The speed of the next iteration Let t be the position of the individual after the t-th iteration. It is the globally optimal position. For the local optimal position, and A random number between (0,1) and They are respectively and The control factor, The inertial weight decreases linearly with the number of iterations, and its expression is: in, These are parameters that control the chameleon's ability to develop. When the chameleon's tongue strikes its prey, this is calculated using the third equation of motion: in, Indicates the current tongue projection speed. The speed of the previous iteration, Given the current individual position. Acceleration is derived based on kinematic principles. The expression that varies with the current iteration number t: In the above scheme, the parameters to be optimized are selected according to the optimization object, the optimization performance index function is constructed, and a mathematical model of the optimization task is constructed. The improved Chameleon optimization algorithm is used to optimize the optimization performance index function, and a set of PID parameters for the current loop, speed loop and position loop that meet the optimal performance is output.

[0091] The advantages of this invention are as follows: by introducing an improved intelligent optimization algorithm to tune the motion control parameters of CNC machine tools, the stability and accuracy of motor output can be taken into account at the same time. Compared with the traditional empirical method or trial-and-error PID parameter tuning method, this invention can achieve rapid, accurate and stable tuning of control parameters under complex working conditions with multi-axis coupling and strong nonlinearity, saving R&D time and costs, and significantly improving tuning efficiency and production efficiency.

[0092] This invention provides a device for setting motion control parameters of a CNC machine tool, which is applied to the above-described method for setting motion control parameters of a CNC machine tool.

[0093] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for tuning motion control parameters of a CNC machine tool, characterized in that, include: Collect multiple performance indicators of CNC machine tools, and construct corresponding optimization objective functions based on these indicators; In this optimization objective function, multiple performance metrics have corresponding weight coefficients; The design variables and corresponding constraints of the CNC machine tool are collected, and the mathematical model of the CNC machine tool in the dimension of motion control parameters is determined based on the design variables, corresponding constraints and the optimization objective function. Based on the identification of the mathematical model of CNC machine tool in the dimension of motion control parameters, the corresponding PID parameters are determined. The corresponding parameter set is constructed according to the upper and lower limits of the PID parameters. The initial value of the PID parameters is determined based on the chaotic sequence corresponding to each parameter set and the chaotic mapping. An initial population is constructed based on the initial values ​​of each PID parameter; the corresponding global optimal solution is determined through multi-level iterations of each initial population; and the corresponding optimal parameters are determined based on the identification of the global optimal solution. The corresponding virtual simulation environment is matched according to the mathematical model. Based on the virtual simulation environment, the optimal parameters and the model of the CNC machine tool, the corresponding response curve is determined. Based on the response curve, several key indicators are extracted to determine the calibrated motion control parameters.

2. The method for tuning motion control parameters of a CNC machine tool according to claim 1, characterized in that, The system collects multiple performance indicators of the CNC machine tool and constructs a corresponding optimization objective function based on these indicators. In this optimization objective function, several performance metrics have corresponding weight coefficients, including: Based on the detection of CNC machine tools, the corresponding performance data space is determined, and multiple performance indicators of CNC machine tools are determined by traversing this performance data space; the multiple performance indicators include response curve error, settling time, and overshoot. The corresponding optimization objective function is constructed based on the response curve error, settling time, and overshoot. At the same time, the scene content of the CNC machine tool is collected, and the weight coefficients of multiple performance indicators are adjusted based on the scene content of the CNC machine tool.

3. The method for tuning motion control parameters of a CNC machine tool according to claim 1, characterized in that, The process of collecting the design variables and corresponding constraints of the CNC machine tool, and determining the mathematical model of the CNC machine tool in the dimension of motion control parameters based on the design variables, corresponding constraints, and the optimization objective function, includes: The CNC machine tool is monitored in real time, and its design variables and corresponding constraints are marked. Based on the optimization objective function and the design variables of the CNC machine tool, the first sub-mathematical model is determined. Based on the optimization objective function and the constraints of the CNC machine tool, the second sub-mathematical model is determined. Based on the first and second sub-mathematical models, the mathematical model of the CNC machine tool in the dimension of motion control parameters is determined.

4. The method for tuning motion control parameters of a CNC machine tool according to claim 1, characterized in that, The method involves identifying the mathematical model of the CNC machine tool in the dimension of motion control parameters to determine the corresponding PID parameters, constructing corresponding parameter sets based on the upper and lower limits of the PID parameters, and determining the initial values ​​of the PID parameters based on the chaotic sequences corresponding to each parameter set and the chaotic mapping, including: The mathematical model of the CNC machine tool in the dimension of motion control parameters is collected and the mathematical model is identified to output the corresponding PID parameters. The upper and lower limits of the PID parameters are determined based on the detection of the PID parameters.

5. The method for tuning motion control parameters of a CNC machine tool according to claim 4, characterized in that, The method of determining corresponding PID parameters based on the identification of mathematical models of CNC machine tools in the dimension of motion control parameters, constructing corresponding parameter sets according to the upper and lower limits of PID parameters, and determining the initial values ​​of PID parameters based on the chaotic sequences corresponding to each parameter set and the chaotic mapping, further includes: A parameter set is constructed based on the upper and lower limits of the PID parameters, and this parameter set serves as a parameter container for the chaotic mapping. At the same time, the chaotic mapping is collected, and the corresponding chaotic sequence is generated based on the chaotic mapping. The initial values ​​of the PID parameters are determined according to each parameter set and the chaotic sequence corresponding to the chaotic mapping.

6. The method for tuning motion control parameters of a CNC machine tool according to claim 1, characterized in that, The process involves constructing an initial population based on the initial values ​​of each PID parameter; determining the corresponding global optimal solution through multi-level iterations of each initial population; and determining the corresponding optimal parameters based on the identification of the global optimal solution, including: The initial values ​​of each PID parameter are collected, and the initial values ​​of each PID parameter are superimposed to construct the corresponding initial population. The individuals in the initial population will be evenly distributed throughout the feasible solution space defined by the mathematical model constraints.

7. The method for tuning motion control parameters of a CNC machine tool according to claim 6, characterized in that, An initial population is constructed based on the initial values ​​of each PID parameter; the corresponding global optimal solution is determined through multi-level iterations of each initial population. Determining the corresponding optimal parameters based on the identification of the global optimal solution also includes: The iteration start point, maximum number of iterations, and search threshold are collected. Based on the iteration start point, maximum number of iterations, and search threshold, each initial population is triggered to carry out multi-level iterations, and the corresponding global optimal solution is determined during the multi-level iteration process of each initial population. The corresponding optimal solution label is determined based on the identification of the global optimal solution, and the corresponding optimal parameters are determined by tracing back the optimal solution label.

8. The method for tuning motion control parameters of a CNC machine tool according to claim 1, characterized in that, The process involves matching a mathematical model to a corresponding virtual simulation environment, determining the corresponding response curve based on this virtual simulation environment, optimal parameters, and the model of the CNC machine tool, and extracting multiple key indicators from the response curve to determine the calibrated motion control parameters, including: The optimized parameters obtained from this set of optimizations are configured into the corresponding controllers of the CNC machine tools. At the same time, mathematical models are collected, and the corresponding virtual simulation environment is determined based on the mathematical models and the corresponding CNC machine tools.

9. The method for tuning motion control parameters of a CNC machine tool according to claim 8, characterized in that, The process of matching a mathematical model with a corresponding virtual simulation environment, determining a corresponding response curve based on the virtual simulation environment, optimal parameters, and the model of the CNC machine tool, and extracting multiple key indicators from the response curve to determine the calibrated motion control parameters, also includes: The model of the CNC machine tool is collected, and the comparison parameters corresponding to the optimal parameters are marked. Based on the virtual simulation environment, the optimal parameters and the corresponding comparison parameters, the corresponding response curves are determined to obtain two sets of response curves. The response difference region is determined by comparing the two sets of response curves, and several key indicators are extracted based on the identification of this response difference region. These key indicators include rise time, settling time, and steady-state error. The corresponding optimization rate is determined based on these key indicators. If the optimization rate is greater than the preset optimization rate threshold, the tuned motion control parameters are determined.

10. A device for setting motion control parameters of a CNC machine tool, characterized in that, The motion control parameter tuning device for the CNC machine tool is applied to the motion control parameter tuning method for the CNC machine tool as described in any one of claims 1-9.