Guide rail and screw error compensation control method based on data fitting analysis
Through data fitting analysis and multi-source sensing monitoring, real-time compensation of guide screw errors is achieved, the problem of inaccurate control of guide screw errors is solved, and the machining accuracy and production efficiency of machine tools are improved.
Patent Information
- Application Number
- CN202410760412.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-06-13
AI Technical Summary
In the prior art, the error control of guide rail lead screws is inaccurate, resulting in inaccurate size of machine tool processing parts and low production efficiency.
Using the guide screw error compensation control method based on data fitting analysis, the machine tool operation log is obtained, the control error record data is extracted, and the optimal compensation parameters are generated, and the multi-source sensing monitoring array is built to monitor and Perform error compensation control.
Effectively reduce control errors during processing, improve processing accuracy, reduce waste rate, and improve system stability and reliability.
Smart Images

Figure CN118689162B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a guide rail and lead screw error compensation control method based on data fitting analysis. Background Art
[0002] The stepper motor driving the ball screw and linear guide is a common transmission method. The stepper motor directly drives the ball screw to convert the rotation of the ball screw into linear movement, and the linear guide guides are used to guide the worktable and other workpieces. It can convert electrical pulse signals into mechanical motion, ensuring precise and efficient control, and is widely used in the field of CNC machine tools. Although the stepper motor driving the ball screw and linear guide transmission method has significant advantages, there is still the problem of inaccurate error control of the guide screw during machine tool processing due to the complex operating environment and improper motor parameter settings, which leads to inaccurate dimensions of machine tool processing parts and low production efficiency.
[0003] The prior art has the technical problem that the guide rail and lead screw error control is not precise, resulting in inaccurate dimensions of machine tool processed parts and low production efficiency. Summary of the invention
[0004] The present invention provides a guide rail and lead screw error compensation control method based on data fitting analysis, which is used to solve the technical problem in the prior art that the guide rail and lead screw error control is inaccurate, resulting in inaccurate size of machine tool processed parts and low production efficiency.
[0005] In view of the above problems, the present invention provides a guide rail and lead screw error compensation control method based on data fitting analysis, the method comprising: based on industrial big data, taking machine tool attribute information as a constraint, obtaining machine tool operation logs through online retrieval, wherein the machine tool attribute information includes equipment type, equipment specifications and service life; extracting control error record data from the machine tool operation log, screening the control error record data according to a preset control step and a preset monitoring index, and obtaining a sample control error set, wherein each sample control error includes historical monitoring data and control error data after the preset control step; with the purpose of optimizing the compensation of the control error data, optimizing the motor compensation parameters based on the motor control evaluation function, generating the optimal compensation parameters, and according to the historical monitoring data and The mapping association of the optimal compensation parameters constructs a sample training data set; using the sample training data set, supervised training is performed on the error compensation units to obtain a convergence error compensation unit, wherein the error compensation unit is constructed based on a multidimensional operator; a multi-source sensor monitoring array is built based on the preset monitoring indicators, and sensor monitoring is performed at a preset node through the multi-source sensor monitoring array to obtain a real-time monitoring data set; the real-time monitoring data set is input into the convergence error compensation unit for analysis to obtain a compensation control scheme, and the stepper motor of the next preset node is controlled and compensated according to the compensation control scheme, thereby realizing error compensation for the guide rail screw of the next preset node, wherein the time interval between the preset node and the next preset node is the preset control step size.
[0006] One or more technical solutions provided in the present invention have at least the following technical effects or advantages:
[0007] The method provided by the embodiment of the present invention obtains the machine tool operation log, extracts the control error record data from the machine tool operation log, and screens it. With the purpose of optimizing the compensation control error data, the motor compensation parameter is optimized based on the motor control evaluation function to generate the optimal compensation parameter, and a sample training data set is constructed. The error compensation unit is supervised and trained to obtain a convergence error compensation unit. A real-time monitoring data set is obtained through a multi-source sensor monitoring array. The real-time monitoring data set is input into the convergence error compensation unit for analysis to obtain a compensation control scheme, and control compensation is performed on the stepper motor of the next preset node, thereby realizing error compensation for the guide rail and lead screw. The method achieves the technical effect of controlling and compensating the stepper motor based on industrial big data, combined with big data analysis, machine learning, real-time monitoring and intelligent control technologies, thereby realizing error compensation for the guide rail and lead screw, which can effectively reduce the control error in the machining process, improve machining accuracy, reduce the scrap rate, and further improve the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1A schematic flow chart of the guide rail and lead screw error compensation control method based on data fitting analysis provided by the present invention.
[0009] Figure 2 A schematic diagram of the process of optimizing motor compensation parameters in the guide rail and screw error compensation control method based on data fitting analysis provided by the present invention. DETAILED DESCRIPTION
[0010] The present invention provides a guide rail screw error compensation control method based on data fitting analysis, which is used to solve the technical problem that the guide rail screw error control is inaccurate in the prior art, resulting in inaccurate size of machine tool processing parts and low production efficiency. The stepper motor is controlled and compensated, thereby realizing error compensation for the guide rail screw, which can effectively reduce the control error in the processing process, improve processing accuracy, reduce the scrap rate, and further improve the stability and reliability of the system.
[0011] Below, the technical solutions in the present invention will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments of the present invention. It should be understood that the present invention is not limited to the example embodiments described herein. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. It should also be noted that, for the convenience of description, only the parts related to the present invention are shown in the accompanying drawings, rather than all of them.
[0012] like Figure 1 As shown, the present invention provides a guide rail and lead screw error compensation control method based on data fitting analysis, the method comprising:
[0013] Based on industrial big data and with machine tool attribute information as a constraint, machine tool operation logs are retrieved online, wherein the machine tool attribute information includes equipment type, equipment specifications and service life.
[0014] Specifically, the guide screw is a key component of the machine tool. The accuracy of the guide screw directly affects the machining accuracy of the machine tool. Through the precise positioning and stability of the guide screw, high-precision machining and positioning of the workpiece can be achieved. However, in the actual process, due to the inadequate setting of the motor parameters, the guide screw has errors, which makes the size of the machine tool processed parts inaccurate and the production efficiency low. Therefore, doing a good job of guide screw error compensation is of great practical significance to improving the machining accuracy, service life and production efficiency of machine tools.
[0015] In order to realize the guide screw error compensation control, the machine tool attribute information is first clarified, including the equipment type, equipment specifications and equipment service life, among which the equipment type is such as lathe, milling machine, grinder, etc., the equipment specifications are such as processing range, accuracy level, power, etc., and the service life refers to the working time of the equipment and the estimated remaining life. Then, by using computer terminal equipment, the Internet is connected to the retrieval device, and the corresponding machine tool attribute information is input as the retrieval condition, and the machine tool operation log including the operating status, processing accuracy, fault record, control error and other key information of the machine tool is retrieved in the industrial big data. The industrial big data refers to the general term for various types of data and related technologies and applications generated in the industrial field around the typical intelligent manufacturing model, from customer needs to all aspects of the product life cycle. Through online retrieval based on industrial big data and machine tool attribute information, the machine tool operation log can be obtained comprehensively and efficiently, providing strong support for the control, optimization and production management of machine tool guide screw error compensation.
[0016] The control error record data is extracted from the machine tool operation log, and the control error record data is screened according to a preset control step and a preset monitoring index to obtain a sample control error set, wherein each sample control error includes historical monitoring data and control error data after the preset control step.
[0017] Furthermore, the preset monitoring indicators at least include a load indicator, a vibration indicator, an ambient temperature and an ambient humidity.
[0018] Specifically, the recorded data related to the control error is specifically extracted from the acquired machine tool operation log, including the control error values of the machine tool in different processing stages and different working conditions. The preset control step and the preset monitoring index are determined. The preset control step refers to the time interval of each compensation in the time series, which can be set according to actual needs. For example, the preset control step can be set to every 5 minutes. The preset monitoring indicators include load indicators, vibration indicators, ambient temperature and ambient humidity, which are used to provide important information about the machine tool processing process and help identify potential problems in the operation of the machine tool. Then, according to the preset control step and the preset monitoring indicators, the extracted control error record data is filtered. Optionally, the data is first divided into different time periods according to the preset control step, and then the data is filtered by the preset monitoring indicators in each time period. The screened control error data are combined to obtain a sample control error set, in which each sample control error includes historical monitoring data and control error data after a preset control step, wherein historical monitoring data refers to previous monitoring data used to predict or analyze the current control error, and control error data after a preset control step refers to the difference data between the actual output of the motor and the expected output, including lateral deviation, longitudinal deviation, and angular deviation. The obtained sample control error set is preprocessed, such as data cleaning, outlier processing, and missing value filling, to ensure data quality and consistency. Through the above screening process, a representative and predictive sample control error set can be effectively extracted from the machine tool operation log, laying a foundation for accurate and reliable data support for subsequent analysis and application.
[0019] With the purpose of optimizing the compensation of the control error data, the motor compensation parameters are optimized based on the motor control evaluation function to generate the optimal compensation parameters, and a sample training data set is constructed based on the mapping association between the historical monitoring data and the optimal compensation parameters.
[0020] Specifically, in machine tool processing, motor control parameters, such as current, speed, acceleration, etc., will directly affect the motor's output torque and dynamic performance, thereby affecting the screw's transmission accuracy and workpiece processing accuracy. By optimizing the motor control parameters, the guide screw error caused by improper motor control can be reduced and the overall performance of the machine tool can be improved.
[0021] Determine a motor control evaluation function, which can quantify the performance of the motor control parameters. By taking the compensation of the control error data as the optimization goal, based on the motor control evaluation function, the value of the compensation parameter is continuously changed, and the corresponding evaluation function value is calculated to optimize the motor control parameters. One or more termination conditions are set, such as the number of iterations, the convergence degree of the evaluation function value, etc., to find the compensation parameter combination that makes the evaluation function reach the optimal value, that is, the optimal compensation parameter. Extract features related to motor performance, such as input voltage, current, speed, etc. from historical monitoring data, use the optimal compensation parameter as a label, associate it with the extracted features, and construct a mapping relationship. The mapping relationship indicates which compensation parameter should be used to achieve the best control effect under specific working conditions, and then organize the obtained mapping association relationship to construct a sample training data set. Each set of data in the sample training data set includes historical monitoring data and optimal compensation parameters. By optimizing the motor compensation parameters and constructing a sample training data set, the accuracy and effect of subsequent guide screw error compensation control can be improved.
[0022] The sample training data set is used to perform supervised training on the error compensation units to obtain converged error compensation units, wherein the error compensation units are constructed based on multidimensional operators.
[0023] Specifically, according to the characteristics of the error data, a multidimensional operator is selected to construct an error compensation unit. The multidimensional operator includes a linear transformation, a nonlinear activation function, a convolution operation, a pooling operation, etc. Optionally, a neural network structure is selected as the error compensation unit. The network structure includes a fully connected network, a convolutional neural network or a recurrent neural network, etc. The neural network structure can process multidimensional input data and generate output data. The multidimensional input data is such as historical monitoring data, and the output data is a compensation value. Using a sample training data set, the historical monitoring data in the sample training data set is used as input, and the optimal compensation parameter is used as the target output. The error compensation unit is supervised and trained until a preset number of iterations is reached or the convergence condition is met, and the model training is completed to obtain a converged error compensation unit. Through supervised training, the converged error compensation unit can learn the error pattern in the historical data, and predict and compensate for future errors accordingly, thereby providing more accurate and effective compensation, thereby significantly improving the positioning accuracy and repeatability of the guide screw.
[0024] A multi-source sensor monitoring array is built based on the preset monitoring indicators, and sensor monitoring is performed at preset nodes through the multi-source sensor monitoring array to obtain a real-time monitoring data set.
[0025] Specifically, according to the preset monitoring indicators, select the appropriate sensor type. For example, for ambient temperature monitoring, you can choose thermistors, thermocouples or infrared temperature sensors. For vibration monitoring, you can choose vibration displacement sensors. Considering the size, shape and spatial distribution of the monitoring indicators of the monitoring area, design the layout of the sensors, and install the sensors on the preset nodes according to the designed array layout to build a multi-source sensor monitoring array. During the installation of the sensors, the stability and reliability of the sensors must be ensured, and after the installation is completed, the sensors must be calibrated to ensure the accuracy of the output data. Through the multi-source sensor monitoring array, at the preset nodes, start the sensors for data monitoring, collect sensor monitoring data, and integrate them according to time sequence and location information to form a real-time monitoring data set. By building a multi-source sensor monitoring array, the motor operating status and operating environment can be fully monitored, thereby improving the accuracy and reliability of subsequent error compensation schemes.
[0026] The real-time monitoring data set is input into the convergence error compensation unit for analysis to obtain a compensation control scheme, and the stepper motor of the next preset node is controlled and compensated according to the compensation control scheme, thereby achieving error compensation for the guide rail screw of the next preset node, wherein the time interval between the preset node and the next preset node is the preset control step.
[0027] Specifically, the real-time monitoring data set obtained by collecting sensor data is input into the convergence error compensation unit, and the convergence error compensation unit processes and analyzes the data in the real-time monitoring data set, and generates a compensation control scheme based on the data analysis results. The compensation control scheme includes how to control and compensate the stepper motor to reduce or eliminate the adverse effects caused by the error, such as adjusting the motor's speed, acceleration, position and other parameters. When the next preset node arrives, the control system controls and compensates the stepper motor according to the compensation scheme generated by the convergence error compensation unit, and then realizes the error compensation of the guide screw of the next preset node through the compensated motor to ensure that the guide screw can run and process according to the expected path and accuracy. The time interval between the preset node and the next preset node is the preset control step length, which represents the frequency of monitoring and compensating the error. The convergence error compensation unit realizes real-time monitoring and dynamic compensation of the machine tool error, and then controls the guide screw error compensation, so as to achieve the technical effect of improving the processing accuracy and stability, service life and production efficiency of the machine tool.
[0028] In one embodiment, Figure 2As shown, the motor compensation parameter optimization based on the motor control evaluation function includes: reading the motor control parameters and parameter rated intervals, wherein the motor control parameters include step angle, step speed, number of steps, acceleration and deceleration; randomly generating a plurality of initial motor control parameters based on the parameter rated interval, wherein the plurality of initial motor control parameters satisfy preset random constraints and preset quantity constraints; based on the motor control evaluation function, optimizing the motor compensation parameters using the plurality of initial motor control parameters to obtain the optimal compensation parameters.
[0029] Specifically, first read the control parameters of the stepper motor, the control parameters include step angle, step speed, number of steps, acceleration and deceleration, etc., and at the same time, obtain the parameter rating interval of the control parameters according to the design specifications of the motor, the technical manual provided by the manufacturer or the actual test data, that is, the maximum and minimum values allowed by each parameter. Then, within the parameter rating interval, based on the preset random constraints and preset quantity constraints, randomly generate multiple initial motor control parameters, the preset random constraints such as uniform distribution, normal distribution, etc., the preset quantity constraints are the number of initial parameter groups to be generated, set according to actual needs, and then use the randomly generated initial motor control parameters as the starting point for optimizing the motor compensation parameters. Finally, use the randomly generated multiple initial motor control parameters, combined with the motor control evaluation function, to optimize the motor compensation parameters. The optimization algorithm can be a gradient-based optimization algorithm, such as gradient descent, conjugate gradient method, etc., or a heuristic algorithm based on population search, such as genetic algorithm, particle swarm optimization algorithm, etc., selected according to actual needs. In the optimization process, one or more optimal solutions, that is, optimal compensation parameters, are obtained through continuous iteration and search. By optimizing the motor compensation parameters, the optimal motor compensation parameters can be obtained, and then the guide rail and lead screw error compensation control can be realized to improve the machining accuracy and stability of the machine tool.
[0030] Furthermore, the method of randomly generating multiple initial motor control parameters based on the parameter rated interval includes: randomly generating a motor control parameter set based on the parameter rated interval; calculating the Euclidean distance between the first parameter and the second parameter in the motor control parameter set in sequence to obtain a first distance, wherein the first parameter and the second parameter are any two parameters in the motor control parameter set; if the first distance meets a preset distance threshold, the second parameter is eliminated, and conversely, if the first distance does not meet the preset distance threshold, the second parameter is retained; performing iterative analysis until all parameters in the motor control parameter set are analyzed, and determining whether the number of parameters in the remaining motor control parameter set meets the preset number constraint; if so, setting the parameters in the remaining motor control parameter set as the initial motor control parameters to obtain the multiple initial motor control parameters.
[0031] Specifically, according to the rated interval of the control parameters of the stepper motor, a random value is generated within the rated interval of each parameter through a random generation algorithm to form a set of parameters, and the above operation is repeated to generate a motor control parameter set, and the random generation algorithm is such as a pseudo-random number generator. Each parameter in the generated motor control parameter set meets the restriction of the rated interval of the parameter. Then, the Euclidean distance between each pair of parameters in the motor control parameter set, that is, the first parameter and the second parameter, is calculated to obtain a first distance, wherein the first parameter and the second parameter are any two parameters in the motor control parameter set, and the Euclidean distance is used to quantify the difference between different parameters in the motor control parameter set. Then, the first distance calculated for each pair of parameters is compared with a preset distance threshold, and the preset distance threshold is the minimum distance that should be maintained between the two parameters to ensure that the two parameters have sufficient difference. When the first distance meets the preset distance threshold, that is, it is less than or equal to the preset distance threshold, it means that the positions of the two parameters in the parameter space are too close, which may cause redundancy in the subsequent parameter optimization process or reduce the optimization efficiency, so one of the parameters, such as the second parameter, needs to be eliminated. On the contrary, if the first distance is greater than the preset distance threshold, the two parameters are retained.
[0032] Repeat the above process, traverse all parameters in the motor control parameter set, and in each iteration process, remove or retain parameters according to the Euclidean distance between parameters and the preset distance threshold. The iteration process continues until all parameter pairs in the motor control parameter set are analyzed. After the iteration is completed, the screened remaining motor control parameter set is obtained, and the number of parameters in the parameter set is checked and judged. When the number of parameters in the remaining motor control parameter set meets the preset data constraint, that is, reaches or exceeds the predetermined minimum number of parameters, the parameters in the remaining motor control parameter set are set as the initial motor control parameters to obtain multiple initial motor control parameters. Through computational analysis, it can be ensured that the generated initial motor control parameter set has sufficient dispersion in the parameter space, which helps to improve the efficiency of the subsequent parameter optimization process and the possibility of finding the global optimal solution.
[0033] Furthermore, the method of optimizing the motor compensation parameters based on the motor control evaluation function and using the multiple initial motor control parameters includes: evaluating the multiple initial motor control parameters respectively based on the motor control evaluation function to obtain multiple fitnesses; setting the multiple initial motor control parameters as multiple initial solutions, arranging them from large to small according to fitnesses, and generating an initial solution sequence; selecting the first N initial solutions of the initial solution sequence as head solutions, and the last M initial solutions as tail solutions, wherein the sum of N and M is the number of initial solutions, and N is less than M; randomly clustering the M tail solutions based on the N head solutions to obtain N domains, and performing tail solution mutation update in the N domains according to a preset mutation strategy to generate N updated domains, wherein if the fitness of the mutated tail solution is greater than the fitness of the head solution in the updated domain, replacing the head solution with the mutated tail solution; performing iterative optimization until a preset optimization number threshold is met, outputting the current N domains, and selecting the head solution of the optimal domain in the current N domains to set as the optimal compensation parameter.
[0034] Specifically, first, the motor control evaluation function is used to evaluate multiple initial motor control parameters, and the fitness of each parameter is calculated. The parameter fitness reflects the performance of the parameter in motor control. The higher the fitness value, the better the performance of the parameter combination. Then, the multiple initial motor control parameters are set as multiple initial solutions, and the multiple initial motor control parameters, i.e., multiple initial solutions, are sorted from large to small according to their fitness to form an initial solution sequence.
[0035] Then, the first N initial solutions are selected from the initial solution sequence as head solutions, and the head solutions represent parameters with relatively good performance. The last M initial solutions are tail solutions, and the tail solutions represent parameters with relatively poor performance. M and N are both positive integers, and M and N are pre-set values. Their sum is equal to the total number of initial solutions, and N is less than M. The head solutions are used to randomly cluster the tail solutions, and the M tail solutions are randomly assigned to the N head solutions. Each head solution corresponds to a domain, forming N domains, and each domain contains a head solution and several tail solutions. In each domain, the tail solution is mutated and updated according to the preset mutation strategy. The preset mutation strategy includes step angle to find the optimal step length, step speed to find the optimal step length, number of steps to find the optimal step length, acceleration to find the optimal step length, and deceleration to find the optimal step length. Through mutation update, the tail solution may approach the head solution or find a better solution. The fitness of the mutated tail solution is evaluated. If the fitness of the mutated tail solution is greater than the fitness of the head solution in the update domain, the mutated tail solution replaces the original head solution to ensure that the solution with the highest fitness in the domain is always kept as the head solution. After mutation and replacement, the solution set in each domain is updated to form N update domains.
[0036] Finally, the above-mentioned process of tail solution variation update and head solution replacement is repeated to perform iterative optimization. Each iteration will update the solutions in N domains and try to find better motor control parameters. The iterative process continues until the preset optimization number threshold is met. The preset optimization number threshold is set according to the actual situation to ensure that the algorithm has enough time to find the optimal solution or a solution close to the optimal solution. When the number of iterations reaches the preset optimization number threshold, the optimization process is stopped, and the current N domains are output, and the head solution with the highest sum of fitness in the current N domains is set as the optimal compensation parameter for subsequent motor control. By combining fitness sorting, domain updating and mutation strategies, the optimal solution or a solution close to the optimal solution can be effectively searched in the motor control parameter space. Through continuous iteration and updating, the algorithm can gradually approach the optimal motor control parameters, thereby improving the accuracy and reliability of the subsequent motor compensation control scheme, achieving the error compensation accuracy of the guide rail screw, and achieving the effect of improving the machining accuracy and stability of the machine tool.
[0037] Furthermore, the expression of the motor control evaluation function is: ;in, is the adaptability of the control parameters of the i-th motor, is the first weight, is the second weight, is the third weight, is the compensation time of the control parameters of the i-th motor, is the energy consumption of the control parameters of the i-th motor, is the lateral compensation data of the i-th motor control parameter, is the lateral deviation in the control error data, is the longitudinal compensation data of the i-th motor control parameter, is the longitudinal deviation in the control error data, is the angle compensation data of the i-th motor control parameter, is the angular deviation in the control error data.
[0038] Specifically, the motor control evaluation function comprehensively considers the compensation time, energy consumption, and the deviation between the compensation data and the control error data. The specific expression is: ; is the adaptability of the control parameters of the i-th motor, is the first weight, is the second weight, is the third weight, which determines the relative importance of each performance indicator in the overall fitness. is the compensation time of the i-th motor control parameter, indicating the time required to complete the compensation. is the energy consumption of the control parameter of the i-th motor, indicating the energy consumed when executing the control, is the lateral compensation data of the i-th motor control parameter, is the lateral deviation in the control error data, is the longitudinal compensation data of the i-th motor control parameter, is the longitudinal deviation in the control error data, is the angle compensation data of the i-th motor control parameter, is the angle deviation in the control error data. The optimization goal is to find one or more sets of motor control parameters so that the evaluation function The value of is the minimum, which can reduce the analysis time and energy consumption as much as possible while ensuring the control accuracy, and improve the response timeliness.
[0039] Furthermore, the method utilizes the sample training data set to perform supervised training on the error compensation unit, including: obtaining a preset analysis operator, wherein the preset analysis operator includes at least a BP neural network, a support vector machine, and a random decision forest; selecting a first analysis operator, and constructing a first analysis channel based on the first analysis operator, wherein the first analysis operator is any one of the preset analysis operators; dividing the sample training data set into Q equal parts, and selecting Q times without replacement to obtain a first training set, and obtaining Q training sets in sequence; utilizing the Q training sets to perform supervised training and cross-validation on the first analysis channel, respectively, to obtain Q convergent first analysis channels that meet the expected convergence constraints, and constructing a convergent first analysis model in parallel based on the Q convergent first analysis channels, wherein the output of the convergent first analysis model is the mode of the Q convergent first analysis channels; and generating the error compensation unit based on the convergent first analysis model.
[0040] Specifically, a preset analysis operator is obtained, and the preset analysis operator includes at least BP neural network, support vector machine and random decision forest, etc. The operator will be used to construct different analysis channels. One is selected from the preset analysis operators as the first analysis operator, and the first analysis operator is any one of the preset analysis operators. For example, a BP neural network is selected from the preset analysis operators, then the first analysis operator is a BP neural network, and then according to the selected BP neural network, the architecture of the neural network is defined, and the weights and biases of the network are initialized to construct the first analysis channel.
[0041] The sample training data set is divided into Q parts, where Q depends on the size of the data set and the number of cross-validation required, and is a positive integer. Then, Q times are selected from the segmented data set using sampling without replacement to ensure that each selected training set is independent, and Q different training sets are obtained, each of which will be used to train the BP neural network separately. Use each training set to supervise the training of the BP neural network, and when training each BP neural network, the generalization ability of the model is evaluated by cross-validation to ensure that the network can perform well on unseen data. Set a convergence constraint, such as the reduction in the verification error in multiple consecutive iterations is less than a certain threshold, or reaches a preset maximum number of iterations. When the condition is met, the BP neural network is considered to have converged, and Q converged BP neural networks that meet the expected convergence constraints are obtained, that is, Q converged first analysis channels. Then, the Q converged BP neural networks are combined in parallel to build a convergence first analysis model, and the output of the convergence first analysis model is the mode of the outputs of the Q convergence first analysis channels. When new data is input, each BP neural network will output a prediction result, and the result with the most occurrences in the prediction result will be used as the final output of the convergence first analysis model. Based on the converged first analysis model, an error compensation unit is generated, and the error compensation unit is used to compensate the original motor control parameters to reduce the control error. In addition to an analysis model, assuming a BP neural network, other preset analysis operators, such as support vector machines, random decision forests, etc., are used to build more analysis channels, and training and cross-validation are performed until the expected convergence constraints are reached to obtain multiple converged analysis models. By dividing the training data set into equal parts for training, obtaining multiple channels, and building analysis models through multiple channels, the accuracy and robustness of the prediction can be improved, thereby generating a more reliable error compensation unit, improving the reliability of subsequent error compensation, and ensuring the stable operation of the machine tool.
[0042] Furthermore, generating the error compensation unit based on the convergent first analysis model includes: obtaining a first convergence degree of the convergent first analysis model, wherein the first convergence degree is a convergence degree mean of the Q convergent first analysis channels; obtaining a plurality of convergence analysis models and a plurality of convergence degrees in sequence, and setting a plurality of trusted weights according to the plurality of convergence degrees; building the error compensation unit based on the plurality of convergence analysis models and the plurality of trusted weight mappings, wherein the output of the error compensation unit is a weighted result of the plurality of convergence analysis models.
[0043] Specifically, the first convergence degree of the convergent first analysis model is calculated. The convergence degree can be an index to measure the performance of the model, such as accuracy, F1 score, mean square error, etc. The first convergence degree is the convergence mean of the Q convergent first analysis channels. For each convergent analysis model in turn, the corresponding convergence degree is calculated. The convergence degree reflects the performance of each model. Then, according to the convergence degree of each model, the corresponding credible weight is set. The credible weight reflects the credibility of the prediction results of each model. The higher the convergence degree, the higher the credible weight of the model. Finally, based on multiple convergent models and the credible weights corresponding to each model, an error compensation unit is built. The output of the error compensation unit is the weighted result of the multiple convergent analysis models. When new input data enters the error compensation unit, each model will output a prediction result, collect the prediction results of all convergent analysis models, and perform weighted summation according to their respective credible weights to obtain the final output of the error compensation unit. Then, through the output result, the motor control parameters are compensated and controlled, so as to realize the error compensation of the guide screw, and improve the machining accuracy, service life and production efficiency of the machine tool.
[0044] Through the technical solutions of the above-mentioned embodiments, the guide rail and screw error compensation control method based on data fitting analysis provided by the present invention controls and compensates the stepper motor based on industrial big data, combining big data analysis, machine learning, real-time monitoring and intelligent control technologies, thereby realizing error compensation for the guide rail and screw, which can effectively reduce the control error in the processing process, improve processing accuracy, reduce the scrap rate, and further improve the technical effect of the stability and reliability of the system.
[0045] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0046] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.
Claims
1. A guide rail and screw error compensation control method based on data fitting analysis, characterized in that: The method comprises: Based on industrial big data, with machine tool attribute information as a constraint, the machine tool operation log is retrieved online, wherein the machine tool attribute information includes equipment type, equipment specification and service life; Extracting control error record data from the machine tool operation log, screening the control error record data according to a preset control step and a preset monitoring index, and obtaining a sample control error set, wherein each sample control error includes historical monitoring data and control error data after the preset control step; For the purpose of optimizing the compensation of the control error data, optimizing the motor compensation parameters based on the motor control evaluation function, generating the optimal compensation parameters, and constructing a sample training data set according to the mapping association between the historical monitoring data and the optimal compensation parameters; Using the sample training data set, supervised training is performed on the error compensation unit to obtain a converged error compensation unit, wherein the error compensation unit is constructed based on a multidimensional operator; Building a multi-source sensor monitoring array based on the preset monitoring indicators, and performing sensor monitoring at preset nodes through the multi-source sensor monitoring array to obtain a real-time monitoring data set; Inputting the real-time monitoring data set into the convergence error compensation unit for analysis to obtain a compensation control scheme, and controlling and compensating the stepper motor of the next preset node according to the compensation control scheme, thereby realizing error compensation of the guide rail lead screw of the next preset node, wherein the time interval between the preset node and the next preset node is the preset control step length; Among them, based on the motor control evaluation function, the motor compensation parameters are optimized, including: Reading motor control parameters and parameter rated intervals, wherein the motor control parameters include step angle, step speed, number of steps, acceleration and deceleration; Randomly generating a plurality of initial motor control parameters based on the parameter rated interval, wherein the plurality of initial motor control parameters satisfy a preset random constraint and a preset quantity constraint; Based on the motor control evaluation function, optimizing the motor compensation parameters using the multiple initial motor control parameters to obtain the optimal compensation parameters; Wherein, a plurality of initial motor control parameters are randomly generated based on the parameter rated interval, including: randomly generating a motor control parameter set based on the parameter rating interval; sequentially calculating the Euclidean distance between a first parameter and a second parameter in the motor control parameter set to obtain a first distance, wherein the first parameter and the second parameter are any two parameters in the motor control parameter set; If the first distance meets the preset distance threshold, the second parameter is discarded; otherwise, if the first distance does not meet the preset distance threshold, the second parameter is retained; Performing iterative analysis until all parameters in the motor control parameter set are analyzed, and determining whether the number of parameters in the remaining motor control parameter set meets the preset number constraint; If the conditions are met, the parameters in the remaining motor control parameter set are set as initial motor control parameters to obtain the multiple initial motor control parameters.
2. The method according to claim 1, characterized in that The preset monitoring indicators at least include load indicators, vibration indicators, ambient temperature and ambient humidity.
3. The method according to claim 1, characterized in that: Based on the motor control evaluation function, optimizing the motor compensation parameters using the multiple initial motor control parameters includes: Based on the motor control evaluation function, the multiple initial motor control parameters are evaluated respectively to obtain multiple fitness levels; The multiple initial motor control parameters are set as multiple initial solutions, and are arranged from large to small according to fitness, to generate an initial solution sequence; Selecting the first N initial solutions of the initial solution sequence as head solutions and the last M initial solutions as tail solutions, wherein the sum of N and M is the number of initial solutions, and N is less than M; Based on the N head solutions, the M tail solutions are randomly clustered to obtain N domains, and in the N domains, the tail solutions are mutated and updated according to the preset mutation strategy to generate N update domains. If the fitness of the mutated tail solution is greater than the fitness of the head solution in the update domain, the mutated tail solution is used to replace the head solution; Iterative optimization is performed until a preset optimization number threshold is met, the current N fields are output, and the head solution of the optimal field in the current N fields is selected and set as the optimal compensation parameter.
4. The method according to claim 1, characterized in that: The expression of the motor control evaluation function is: ; in, is the adaptability of the control parameters of the i-th motor, is the first weight, is the second weight, is the third weight, is the compensation time of the control parameters of the i-th motor, is the energy consumption of the control parameters of the i-th motor, is the lateral compensation data of the i-th motor control parameter, is the lateral deviation in the control error data, is the longitudinal compensation data of the i-th motor control parameter, is the longitudinal deviation in the control error data, is the angle compensation data of the i-th motor control parameter, is the angular deviation in the control error data.
5. The method according to claim 1, characterized in that Using the sample training data set, supervised training is performed on the error compensation unit, including: Obtaining a preset analysis operator, wherein the preset analysis operator includes at least a BP neural network, a support vector machine, and a random decision forest; Selecting a first analysis operator, and constructing a first analysis channel according to the first analysis operator, wherein the first analysis operator is any one of the preset analysis operators; Divide the sample training data set into Q equal parts, select Q times without replacement to obtain a first training set, and obtain Q training sets in sequence; Using the Q training sets to perform supervised training and cross-validation on the first analysis channels respectively, to obtain Q convergent first analysis channels that meet the expected convergence constraints, and to build a convergent first analysis model in parallel based on the Q convergent first analysis channels, wherein the output of the convergent first analysis model is the mode of the Q convergent first analysis channels; The error compensation unit is generated based on the converged first analysis model.
6. The method according to claim 5, characterized in that Generating the error compensation unit based on the converged first analysis model includes: Acquire a first convergence degree of the convergent first analysis model, wherein the first convergence degree is a mean convergence degree of the Q convergent first analysis channels; sequentially obtaining a plurality of convergence analysis models and a plurality of convergence degrees, and setting a plurality of credible weights according to the plurality of convergence degrees; The error compensation unit is constructed based on the multiple convergence analysis models and the multiple trusted weight mappings, wherein the output of the error compensation unit is a weighted result of the multiple convergence analysis models.
