Portal frame milling machine error compensation system and method for achieving high-precision machining
Through multimodal sensors and deep reinforcement learning modules, the optimal error compensation strategy is generated, and the processing parameters are dynamically adjusted, which solves the problem that traditional methods are difficult to adapt to dynamic changes, and achieves high-precision and dynamic error compensation.
Patent Information
- Application Number
- CN202510567970.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-06-13
AI Technical Summary
The error compensation method of traditional gantry milling machines is difficult to adapt to the dynamic changes in the processing process, and the compensation accuracy is insufficient and the operation is cumbersome, resulting in low machining accuracy and efficiency.
Multimodal sensors are used to collect error data in real time, and the optimal error compensation strategy is generated through data processing, feature extraction and deep reinforcement learning modules, and the processing parameters are dynamically adjusted for real-time correction.
It realizes high-precision and dynamic error compensation, improves processing accuracy and production automation level, and reduces human error and operational complexity.
Smart Images

Figure BDA0005386388260000062 
Figure BDA0005386388260000071 
Figure BDA0005386388260000072
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine tool processing precision control, and in particular to a gantry milling machine error compensation system and method for achieving high-precision processing. Background Art
[0002] With the increasing requirements for high-precision processing in the manufacturing industry, gantry milling machines are widely used in mold processing, aerospace, etc. However, in the actual processing process, affected by factors such as the elastic deformation, thermal deformation of the machine tool structure, and changes in the processing environment, machining errors are likely to occur, which in turn affect the processing quality and efficiency. Especially when processing complex parts, even a small deviation in machining precision may lead to unqualified final products.
[0003] Existing error compensation methods mostly correct based on pre-measuring errors and setting fixed compensation parameters. Although this method can play a certain role in the initial stage, its adaptability is poor. During the processing process, due to the continuous changes in load, environmental temperature, cutting conditions, etc., the fixed compensation parameters are difficult to reflect the error changes in real time, resulting in limited compensation effects. At the same time, traditional methods rely on manual measurement and parameter setting, which are cumbersome, inefficient, and there are human errors, making it difficult to meet the requirements of high-precision and dynamic compensation.
[0004] In addition, traditional technologies mostly focus on the correction of static errors, are slow to respond to the changes in dynamic errors, and the compensation strategy lacks flexibility. Especially during long-term operation or complex working conditions, the errors are difficult to effectively control, seriously restricting the stability of processing quality and the automation level of equipment. Summary of the Invention
[0005] The purpose of the present invention is to provide a gantry milling machine error compensation system and method for achieving high-precision processing, which solves the problems that the traditional fixed compensation parameter method is difficult to adapt to the dynamic changes in the processing process, has insufficient compensation accuracy, and is cumbersome to operate.
[0006] To achieve the above object, the present invention is realized through the following technical solutions: A gantry milling machine error compensation system for achieving high-precision processing, comprising: A multi-modal sensor module for real-time collecting error data during the processing of the gantry milling machine, and the error data at least includes temperature, vibration, strain, and position error; A data processing module for preprocessing the error data during the processing of the gantry milling machine to generate preprocessed error data; A feature extraction module for extracting features from the preprocessed error data by using a convolutional neural network to generate feature vectors; A deep reinforcement learning module for training and optimizing the feature vectors by using a deep reinforcement learning algorithm to generate an optimal error compensation strategy; The compensation module dynamically adjusts the machining parameters of the gantry milling machine according to the optimal error compensation strategy, and corrects the errors in the machining process in real time.
[0007] Preferably, the multi-modal sensor module at least includes: A temperature sensor for collecting temperature error data during the machining process of the gantry milling machine in real time; A vibration sensor for collecting vibration error data during the machining process of the gantry milling machine in real time; A strain sensor for collecting strain error data during the machining process of the gantry milling machine in real time; A displacement sensor for collecting position error data during the machining process of the gantry milling machine in real time.
[0008] Preferably, the data processing module includes: A denoising module for removing noise from the error data during the machining process of the gantry milling machine; A normalization module for normalizing the error data during the machining process of the gantry milling machine; A filtering module for filtering the error data during the machining process of the gantry milling machine to remove high-frequency interference; A data generation module for generating preprocessed error data.
[0009] Preferably, the feature extraction module includes: A data receiving module for receiving the preprocessed error data output from the data processing module; A convolutional neural network module for performing convolutional feature extraction on the preprocessed error data using a convolutional neural network to generate a feature vector.
[0010] Preferably, the steps of performing convolutional feature extraction on the preprocessed error data using a convolutional neural network to generate a feature vector include: Performing a convolution operation on the preprocessed error data X to obtain convolution features, and the convolution operation is: Y = f(X * W + b); where X is the input preprocessed error data, W is the convolution kernel weight, b is the bias, * is the convolution operation, f is the activation function, and Y is the feature output by the convolution layer; Performing a non-linear transformation on the feature Y output by the convolution layer to obtain activation features, and the transformation is: Z = σ(Y); where Z is the feature output by the activation layer, and σ is the activation function; Performing a pooling operation on the feature Z output by the activation layer to obtain the pooled feature, and the pooling operation is: P = maxpool(Z); Among them, P is the feature output by the pooling layer, and maxpool represents the max pooling operation; Perform a linear transformation on the feature P output by the pooling layer to obtain the final feature vector. The transformation is: V = W f ·P + b f ; Among them, V is the feature vector output by the fully connected layer, and W f is the weight of the fully connected layer, and b f is the bias.
[0011] Preferably, the deep reinforcement learning module includes: A state input module for receiving the feature vector output by the feature extraction module; An error calculation module for calculating an error signal based on the current error state and the target error; the current error state is the real-time error data during the processing, and the target error is the preset ideal processing accuracy; A reward function module for calculating a reward signal based on the error signal of the error calculation module; A policy network module for adjusting the policy according to the reward signal to generate a compensation policy; A value network module for receiving the feature vector of the state input module and the compensation policy generated by the policy network module, and estimating the long-term return value of executing the corresponding compensation policy in each state; A training module for jointly training the policy network module and the value network module through a deep reinforcement learning algorithm according to the feature vector received by the state input module, the compensation policy generated by the policy network module, and the long-term return value estimated by the value network module, and outputting the optimal error compensation policy.
[0012] Preferably, the training module includes: Receive the feature vector output by the state input module as the current state s t , receive the compensation policy generated by the policy network module as the current action a t , and receive the long-term return value estimated by the value network module as the current return R t ; Use the deep reinforcement learning algorithm based on the Actor-Critic architecture, with the current state s t , the current action a t , and the current return R t as inputs, and jointly optimize through the policy network module and the value network module; According to the loss function L critic =(R t -E(s t )) 2 Train the value network module, where E(st ) The return value estimated by the value network module for state s t ; Train the policy network module according to the loss function L actor =-logπ(a t |s t )(R t -E(s t )) where π(a t |s t ) is the probability of the policy network module generating action a t under state s t ; Jointly optimize the policy network module and the value network module by minimizing L critic and L actor to output the optimal error compensation strategy.
[0013] Preferably, the compensation module includes: An error correction module for receiving the error compensation strategy output by the deep reinforcement learning module and generating an error correction signal; A compensation amount calculation module for calculating the compensation amount according to the error correction signal and the machining error data obtained in real time; A real-time adjustment module for correcting the error in the machining process in real time according to the calculated compensation amount.
[0014] Preferably, the calculation formula of the compensation amount is: Δx t =f(error t , compensation strategy); where Δx t is the compensation amount at time t; error t is the real-time machining error at time t; compensation strategy is the optimal error compensation strategy output by the deep reinforcement learning module; f is a function for determining the compensation amount according to the real-time machining error and the error compensation strategy.
[0015] The present invention also provides a gantry milling machine error compensation method for achieving high-precision machining, including the following steps: Use a multi-modal sensor to collect the error data in the machining process of the gantry milling machine in real time; Preprocess the collected error data to generate preprocessed error data; Use a convolutional neural network to extract features from the preprocessed error data to generate feature vectors; Train and optimize the feature vectors based on the deep reinforcement learning algorithm to generate the optimal error compensation strategy; Dynamically adjust the processing parameters of the gantry milling machine according to the generated optimal error compensation strategy, and correct the errors in the processing process in real time.
[0016] In summary, the present invention includes at least one of the following beneficial technical effects: 1. The present invention uses a feature extraction module combined with a convolutional neural network to extract features from the preprocessed error data and generate feature vectors, achieving real-time and accurate acquisition of error information during the processing process, and providing accurate input data for subsequent error compensation strategies. Compared with the feature extraction methods based on fixed error models in the prior art, the present invention solves the problem that traditional solutions are difficult to effectively cope with the dynamic changes of errors caused by working conditions, and significantly improves the adaptability and accuracy of error compensation.
[0017] 2. The present invention uses a deep reinforcement learning module to train and optimize the feature vectors through a deep reinforcement learning algorithm to generate an optimal error compensation strategy, achieving the technical effect of dynamically optimizing the error compensation scheme, enabling the system to automatically adjust the compensation strategy according to the changes in the actual processing process. Compared with the method that relies on preset compensation parameters in the prior art, the present invention solves the deficiency that fixed compensation strategies are difficult to adapt to different working condition changes, and greatly improves the real-time performance and accuracy of compensation.
[0018] 3. The present invention uses a compensation module to dynamically adjust the processing parameters of the gantry milling machine according to the optimal error compensation strategy, and correct the errors in the processing process in real time, achieving the effect of automatically and real-time adjusting the processing parameters to correct the errors. Compared with the traditional method of correcting by manually setting fixed compensation parameters, the present invention eliminates the errors caused by manual operations by calculating and adjusting the compensation amount in real time, and improves the production efficiency and processing quality.
[0019] 4. The error compensation strategy of the present invention combined with deep reinforcement learning solves the limitations of traditional compensation methods when facing complex and changeable processing conditions. By automatically generating and optimizing the error compensation strategy by the system, it achieves an efficient and accurate error correction effect. Compared with the method that relies on manual intervention and single compensation strategies in the prior art, the present invention can flexibly cope with complex errors in the processing process through an intelligent compensation strategy, and significantly improves the processing accuracy and production automation level of the gantry milling machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is the system architecture diagram of the present invention; Figure 2 is the schematic flow chart of the method of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0021] The following is combined with the attached Figure 1 - attached Figure 2, a further detailed description of the present invention will be given.
[0022] The embodiment of the present invention provides a gantry milling machine error compensation system for achieving high-precision machining, including: A multi-modal sensor module for real-time collecting error data during the machining process of the gantry milling machine, where the error data at least includes temperature, vibration, strain, and position error; In this embodiment, the multi-modal sensor module is configured at key parts of the gantry milling machine, including but not limited to the spindle, workbench, crossbeam, and guide rail parts. The multi-modal sensor module is used to synchronously collect various error data reflecting the machining state in real time during the machining process of the gantry milling machine, providing basic data support for subsequent error compensation.
[0023] In this embodiment, the multi-modal sensor module preferably includes a temperature sensor, a vibration sensor, a strain sensor, and a displacement sensor, which are respectively used to collect error data of corresponding types to cover the main error sources during the machining process of the gantry milling machine.
[0024] The temperature sensor is used to real-time collect the temperature data of each key component of the gantry milling machine during the machining process. Since there is a thermal deformation phenomenon during the machining process, especially the thermal expansion of the spindle, guide rail, and the workpiece itself will introduce significant geometric errors, so the accurate acquisition of temperature error is of great significance for error compensation. The temperature sensor is preferably distributed near the spindle of the milling machine, the support part of the guide rail, and the fixed position of the workpiece to obtain comprehensive temperature distribution information.
[0025] The vibration sensor is used to real-time collect the vibration error data of the gantry milling machine during the machining process. During the machining process, due to factors such as tool cutting, the small clearance of the machine tool movement mechanism, and the dynamic response of the driving component, it will cause minute or even cumulative vibration errors. The vibration sensor is usually preferably installed at positions such as the spindle seat, crossbeam, and bed body that are easily affected by dynamic loads, and can detect minute vibration changes during the machining process in a timely manner, thereby providing a dynamic feedback basis for subsequent compensation.
[0026] The strain sensor is used to real-time collect the strain change data of the key components of the gantry milling machine. The structure of the milling machine may undergo elastic deformation or minute plastic deformation under the action of machining loads. The strain sensor can accurately measure the strain of the local structure, and then calculate the displacement or geometric change caused by the force. By real-time monitoring the strain data, the structural deformation trend can be detected at an early stage, assisting the compensation strategy to intervene in advance and avoiding the decline of machining accuracy caused by cumulative errors.
[0027] The displacement sensor is used to collect the position error data in real time during the machining process of the gantry milling machine. Position error is the most intuitive factor affecting machining accuracy, mainly stemming from factors such as servo drive error, feedback control lag, and mechanism thermal expansion. The displacement sensor is preferably set at the feedback end of the machine tool motion axis system, such as on the actual motion paths of the X, Y, and Z axes, to detect the deviation between the motion command and the actual position in real time, thereby providing accurate position error information.
[0028] In practical applications, the multi-modal sensor module is connected to the high-speed communication interface of the machine tool control system to achieve real-time transmission of error data. Preferably, the sensor module is configured with a high-speed synchronous acquisition mechanism to ensure that different types of error data correspond to the same machining state at the same moment, avoiding data distortion caused by sampling delay.
[0029] To ensure data consistency and comparability, in this embodiment, the multi-modal sensor module preferably uses a unified timestamp to mark all collected data, facilitating subsequent data fusion processing and time series modeling. At the same time, to reduce the data redundancy, the sensor module can be configured with a data pre-screening function, such as threshold judgment, moving window averaging, etc., to filter out invalid data points.
[0030] Furthermore, during the data acquisition process, the error data D can be organized into a multi-dimensional vector in the following form: D t =[T t ,V t ,S t ,L t ; where, D t is the error data vector at time t; T t is the corresponding temperature error data; V t is the vibration error data; S t is the strain error data; L t is the position error data.
[0031] The multi-modal error data D t will be used as the input of the subsequent data processing module. After denoising, normalization, and filtering operations, features are further extracted and provided for the deep reinforcement learning module for policy training.
[0032] By configuring the multi-modal sensor module, not only can the machining state of the gantry milling machine be comprehensively perceived from different angles, but also the accuracy and robustness of error detection can be improved through multi-source information complementarity, providing a high-quality data basis for the subsequent error compensation strategy based on feature extraction and deep learning optimization.
[0033] In this embodiment, the design of the multimodal sensor module takes into account real-time performance, accuracy, and system compatibility, enabling the present invention to operate continuously and stably in an actual complex machining environment and ensuring the dynamic optimization and compensation effect of machining accuracy.
[0034] A data processing module preprocesses the error data during the machining process of the gantry milling machine to generate preprocessed error data. In this embodiment, the data processing module is arranged between the multimodal sensor module and the feature extraction module. Its main function is to perform a series of preprocessing operations on the collected raw error data to improve the accuracy and stability of subsequent feature extraction and error compensation.
[0035] In this embodiment, the data processing module preferably includes a denoising module, a normalization module, a filtering module, and a data generation module. Each module works collaboratively in the established data flow order to ensure that the output error data has good data quality and statistical consistency.
[0036] In this embodiment, the denoising module is used to remove the random noise introduced by environmental interference, sensor noise, or signal sampling error in the error data. Preferably, the denoising module can adopt methods such as moving average, outlier rejection, or wavelet transform denoising to reduce the high-frequency random fluctuations in the data.
[0037] Let the original error data sequence be: X = {x 1 , x 2 , …, x n}; where, x i represents the raw error data collected at the i-th moment; n is the length of the data sequence.
[0038] The denoised data sequence can be obtained through the following formula: where, is the denoised data; x j is the raw error data; k is the half-width of the sliding window, that is, the number of samples included in the window; 2k + 1 is the width of the sliding window, that is, the number of samples included.
[0039] In a specific implementation, the denoising module can also adopt the method of wavelet threshold denoising, decompose the error data by wavelet, and apply soft threshold or hard threshold processing to the high-frequency components in the wavelet domain to suppress the noise components.
[0040] In this embodiment, the normalization module is used to perform normalization operations on the denoised error data. Since the dimensions and value ranges of different types of error data (temperature, vibration, strain, displacement) vary greatly, directly inputting them into the feature extraction module will cause feature learning deviation. Therefore, it is necessary to unify the data scale.
[0041] The normalization operation preferably adopts the linear normalization (Min-Max Scaling) method, and its processing formula is: where x i is the input data; x min and x max are respectively the minimum and maximum values in this data sequence; x i ′ is the normalized data value.
[0042] Through the normalization process, data from different sources are mapped to a unified interval, usually [0, 1] or [-1, 1], which is convenient for subsequent processing by the convolutional neural network and deep learning module.
[0043] In this embodiment, the filtering module is used to further filter the normalized error data. The main purpose is to remove the remaining high-frequency interference components and enhance the smoothness and continuity of the data.
[0044] Preferably, the filtering module can adopt a low-pass filter. The typical filter form is a first-order low-pass filter, and its filtering process can be described by the following difference equation: y[n] = (1 - α) × y[n - 1] + α × x[n]; where y[n] is the filtered output signal; x[n] is the input data at the current moment (data after denoising and normalization); y[n - 1] is the output data at the previous moment; α is the smoothing factor of the filter, and 0 ≤ α ≤ 1.
[0045] The filtering operation can effectively suppress high-frequency noise while retaining the low-frequency effective error signal, ensuring that the subsequent feature extraction module extracts the essential change trend of the machining error rather than the instantaneous noise fluctuation.
[0046] In this embodiment, the data generation module is used to organize and generate structured preprocessed error data based on the data after denoising, normalization, and filtering, as the standard input format for the subsequent feature extraction module.
[0047] The preprocessed error data can be packed into a vector set in the form of a time series, and can be specifically expressed as: where D tis the error feature vector at time t; T is the total number of sampling steps.
[0048] Each D t Preferably includes temperature error feature T t , vibration error feature T t , strain error feature S t and position error feature L t , and the specific organization is: D t = [T t , V t , S t , L t ; Through this data generation method, the time correlation and category distinguishability of various error information can be effectively retained, improving the efficiency and accuracy of subsequent feature extraction and learning strategy generation.
[0049] Preferably, after completing the above preprocessing process, the data processing module can also perform auxiliary operations such as data caching, batch processing, and abnormal data marking according to the system configuration when necessary to adapt to different processing tasks and real-time requirements.
[0050] In this embodiment, through the above series of denoising, normalization, filtering, and data generation steps, the data processing module can convert complex, multi-source, and heterogeneous raw error data into unified, clean, and structured preprocessed error data, providing a solid data foundation for subsequent feature extraction based on convolutional neural network and generation of deep reinforcement learning compensation strategy in the present invention.
[0051] The feature extraction module uses a convolutional neural network to extract features from the preprocessed error data and generate a feature vector; In this embodiment, the feature extraction module is used to extract effective features from the preprocessed error data output by the data processing module, providing key input data for the subsequent generation of error compensation strategies. The feature extraction module performs operations such as multi-layer convolution, activation, pooling, and fully connected on the preprocessed error data by using a convolutional neural network (CNN), and finally generates a feature vector.
[0052] The data receiving module. In this embodiment, the data receiving module is responsible for receiving the preprocessed error data output by the data processing module. The preprocessed error data has been denoised, normalized, and filtered, so it has high quality. The main task of the data receiving module is to ensure the smooth transfer of data and prepare the data to enter the convolutional neural network module for feature extraction.
[0053] Convolutional neural network module. The convolutional neural network module is the most crucial part in this embodiment and is responsible for extracting convolutional features from the preprocessed error data. Through the combination of multiple convolutional layers, activation layers, pooling layers, and fully connected layers, the convolutional neural network conducts multi-level feature learning and abstraction on the input data, thereby being able to efficiently extract the deep feature information in the error data.
[0054] Convolution operation. The first step of the convolutional neural network is to perform a convolution operation on the input preprocessed error data. Let the input preprocessed error data be X. The convolution operation extracts features through the convolution kernel W and the bias b, and the calculation formula is: Y = f(X * W + b); Among them, X is the input preprocessed error data, with a shape of m×n, where m and n respectively represent the dimensions of the data; W is the convolution kernel weight, with a shape of k×l, where k and l are the sizes of the convolution kernel; b is the bias term, with the same shape as W; * is the convolution operation, which means sliding the convolution kernel W and the input data X in space and performing element multiplication and summation; f is the activation function, usually using the ReLU (Rectified Linear Unit) function for non-linear transformation. The ReLU activation function is defined as: f(x) = max(0, x); This function can introduce non-linearity into the network and help improve the expression ability of the network.
[0055] The output Y of the convolution operation is a convolutional feature map (Feature Map), which represents the local features extracted by the convolution kernel from the input data.
[0056] Activation operation. After the convolution operation, the convolutional neural network will perform non-linear activation on the output of the convolutional layer to enhance the expression ability of the network. Assuming the output of the convolutional layer is Y, the activation operation will be processed through the activation function σ (usually using the ReLU activation function) to obtain the activation feature Z, and the calculation formula is: Z = σ(Y); Among them, Z is the feature output by the activation layer; σ is the activation function, usually using the ReLU activation function, that is: σ(x) = max(0, x); The activation operation can introduce non-linear features and help the network better capture complex patterns and relationships.
[0057] Pooling operation. After the convolutional layer and the activation layer, the convolutional neural network usually performs a pooling operation to reduce the size of the feature map and retain important feature information. The pooling operation often uses max pooling (Max Pooling), and its calculation formula is: P = maxpool(Z); Among them, P is the feature output by the pooling layer; Z is the feature output by the activation layer; maxpool represents the max pooling operation, which usually slides a window of a fixed size in the feature map and selects the maximum value within each window as the output.
[0058] The pooling operation can effectively reduce the dimension of the feature, reduce the computational complexity, and improve the robustness of the network.
[0059] For the fully connected operation, after the pooling operation, the convolutional neural network performs a linear transformation on the output feature P of the pooling layer to obtain the final feature vector V. The calculation formula for the fully connected operation is: V = W f ·P + b f ; where V is the feature vector output by the fully connected layer, representing the high-level features finally extracted by the network; W f is the weight matrix of the fully connected layer, with a shape of m×n, used to map the pooled features to the final feature space; b f is the bias term of the fully connected layer.
[0060] The output V of the fully connected layer is the final feature vector, which contains the high-level feature information of the input data and can provide effective support for the generation of subsequent error compensation strategies.
[0061] In this embodiment, the feature extraction module performs operations such as multi-layer convolution, activation, pooling, and fully connected on the preprocessed error data through a convolutional neural network, and finally generates a high-dimensional feature vector. The structure of the convolutional neural network and the operations of each layer (convolution, activation, pooling, and fully connected) work together, enabling the network to automatically learn and extract the features that can best reflect the essence of the machining error from the input error data, thereby providing an important basis for subsequent error compensation.
[0062] The deep reinforcement learning module trains and optimizes the feature vector through a deep reinforcement learning algorithm to generate an optimal error compensation strategy; The deep reinforcement learning module in this embodiment is the core component of the entire error compensation system, responsible for generating an optimal error compensation strategy by training and optimizing the feature vector, thereby effectively compensating for the errors generated during the machining process. This module includes multiple sub-modules: a state input module, an error calculation module, a reward function module, a policy network module, a value network module, and a training module. Through the collaborative action of these modules, the deep reinforcement learning module can continuously optimize the compensation strategy and improve the machining accuracy.
[0063] The state input module. In this embodiment, the state input module is used to receive the feature vector output from the feature extraction module. The feature vector V is the error data processed by the convolutional neural network, which contains various error information in the current processing state. The state input module takes the feature vector V t as the current state s of the system t , providing state information for the subsequent reinforcement learning process.
[0064] The error calculation module. The role of the error calculation module is to calculate the error signal based on the current error state and the target error. The current error state s t is extracted from the real-time error data during the processing, while the target error e target is the preset ideal processing accuracy. The goal of error calculation is to quantify the error in the processing and provide an effective feedback signal for the reward function module. Assuming the error in the current processing state is e current , the error calculation formula can be expressed as: error_signal = e current - e target ; This error signal reflects the deviation between the error in the current state and the ideal state, providing a basis for subsequent policy adjustment.
[0065] The reward function module. The reward function module calculates the reward signal based on the error signal from the error calculation module. The reward signal is used to guide the deep reinforcement learning algorithm to optimize the policy, enabling the system to move towards the goal of reducing the processing error.
[0066] Assuming the error signal is error_signal, the design goal of the reward function is to encourage reducing the error and punish increasing the error. The reward signal r t can be calculated according to the following formula: r t = -|error_signal|; where r t represents the reward signal generated at time t, and the reward value decreases as the error signal increases, encouraging the system to approach the target error.
[0067] The policy network module. The policy network module adjusts the compensation policy based on the reward signal and generates the optimal compensation action. This module generates an action a t by inputting the current state s t , and this action is used to control the behavior of the system, thereby reducing the error. The policy network represents the probability distribution of selecting action a t in state s t by outputting π(a t |s t ).
[0068] The goal of the policy network is to maximize the cumulative reward and improve the error compensation effect by adjusting the policy π(a t |s t ). After being trained, the output of the policy network will gradually tend to select compensation actions that are beneficial to reducing errors.
[0069] Value network module. The value network module receives the state input s t and the compensation policy a t output by the policy network, and estimates the long-term return value R t of executing this compensation policy in the current state. The goal of the value network is to evaluate the long-term benefits of taking a certain policy in each state, so as to provide an effective optimization basis for the policy network.
[0070] The output R t of the value network can be expressed by the following formula: where R t is the estimated long-term return value; is the expected return after executing the action a t in the state s t , which is usually estimated by the value network.
[0071] Training module. The training module is the core part of the deep reinforcement learning algorithm, responsible for jointly training based on the feature vector s t received by the state input module, the compensation policy a t generated by the policy network, and the long-term return value R t estimated by the value network, and outputting the optimal error compensation policy.
[0072] The training module uses a deep reinforcement learning algorithm based on the Actor-Critic architecture for policy optimization. Specifically, the Actor-Critic algorithm combines the policy network (Actor) and the value network (Critic), and jointly optimizes by minimizing the following loss functions: Loss function L critic of the value network: where R t is the actually obtained long-term return value; is the return value estimated by the value network for the state s t .
[0073] Loss function L actor of the policy network: Where: π(a t |s t ) is the probability that the policy network generates action a t under state s t ; is the difference between the current action a t and the expected return, serving as the advantage signal in reinforcement learning.
[0074] By minimizing the loss functions L critic and L actor , the training module can jointly optimize the policy network and the value network, thereby generating an optimal error compensation policy.
[0075] The deep reinforcement learning module in this embodiment realizes the effective training and optimization of the error compensation policy through the deep reinforcement learning algorithm of the Actor-Critic architecture, combined with the state input module, the policy network module, the value network module, and the training module. This module can dynamically adjust the compensation policy during the machining process, gradually optimize the machining accuracy, and ensure that the gantry milling machine can maintain a high machining accuracy under different working conditions.
[0076] The compensation module dynamically adjusts the machining parameters of the gantry milling machine according to the optimal error compensation policy, and corrects the errors in the machining process in real time.
[0077] The compensation module in this embodiment is the key part of the error compensation system of the gantry milling machine for achieving high-precision machining. It is responsible for adjusting the machining parameters in real time according to the optimal error compensation policy output by the deep reinforcement learning module, and correcting the errors generated in the machining process. The design structure of the compensation module includes an error correction module, a compensation amount calculation module, and a real-time adjustment module. Through the collaborative work of these three parts, the system can quickly calculate and adjust the compensation amount according to the actual errors in the machining process, thereby effectively correcting the machining errors.
[0078] Error correction module. In this embodiment, the main function of the error correction module is to receive the optimal error compensation policy output by the deep reinforcement learning module, and generate an error correction signal according to this policy. The error correction signal Δx t is the main signal for correcting machining errors, representing the compensation amount that needs to be applied at time t.
[0079] Specifically, the deep reinforcement learning module calculates a set of optimized compensation policies based on the real-time error data and the target error. After being processed by the error correction module, this policy generates an appropriate correction signal. This signal can be applied to the adjustment of various machining parameters, such as cutting speed, feed rate, machining path, etc., to correct the errors in the machining in real time. The calculation of the error correction signal is based on the compensation policy output by the deep reinforcement learning module and the error data in the current machining process.
[0080] The compensation amount calculation module, whose function is to calculate the specific compensation amount Δx based on the error correction signal and the machining error data obtained in real time t . The compensation amount is the compensation measure that the system should take at the current moment t, usually expressed as the adjustment amount of the machining parameters
[0081] The calculation formula is as follows Δx t = f(error t , compensation strategy); where, Δx t represents the compensation amount that needs to be applied at moment t; this compensation amount is usually the value required for adjusting the machining error, and determines the correction amplitude of the machining parameters; error t is the real-time machining error at moment t, which is the gap between the actual machining state and the ideal machining state obtained through the error calculation module or other error measurement devices, reflecting the deviation of the current machining state; compensation strategy is the optimal error compensation strategy output by the deep reinforcement learning module, which is the optimal solution obtained by training the feature vector based on the deep reinforcement learning algorithm and can dynamically adjust the system compensation according to the real-time error; f is the function for calculating the compensation amount, which outputs the required compensation amount according to the real-time machining error and the error compensation strategy. The form of this function can be linear or non-linear, and the specific implementation is set according to the system requirements and different machining environments
[0082] The goal of this calculation process is to quickly calculate the compensation amount according to the current error information, so as to adjust the various parameters in the machining process in real time, thereby eliminating the error and ensuring the machining accuracy
[0083] The real-time adjustment module, whose main function is to correct the error in the machining process in real time according to the compensation amount Δx provided by the compensation amount calculation module t . Specifically, the real-time adjustment module will dynamically modify the machining parameters of the gantry milling machine, such as the feed speed, cutting depth, cutting path, etc., so that the error in the machining process can be corrected immediately
[0084] The real-time adjustment process is continuous. Whenever the real-time machining error error t is detected, the system will calculate the corresponding compensation amount Δx through the compensation amount calculation module according to the current error and the optimal compensation strategy t , and precisely correct the machining process through the real-time adjustment module
[0085] The compensation amount Δx tAs a correction signal, it will be transmitted to the control system, which then adjusts the mechanical motion or other relevant processing parameters according to these signals. This adjustment process ensures that each processing stage of the gantry milling machine can be as close as possible to the ideal processing accuracy, avoiding the accumulation of errors.
[0086] In this embodiment, the compensation module realizes the real-time dynamic correction of errors in the processing process through the collaborative work of the error correction module, the compensation amount calculation module and the real-time adjustment module. The system can accurately calculate and timely adjust the processing parameters according to the optimal error compensation strategy output by the deep reinforcement learning module, ensuring high precision in the processing process of the gantry milling machine.
[0087] Through the above method, the compensation module can effectively improve the processing accuracy of the gantry milling machine, reduce the influence of errors on the processing quality, and ensure that the final processing result meets the design requirements.
[0088] The present invention also provides a method for compensating errors of a gantry milling machine for achieving high-precision processing, including the following steps: Use a multi-modal sensor to collect error data during the processing of the gantry milling machine in real time; Preprocess the collected error data to generate preprocessed error data; Use a convolutional neural network to extract features from the preprocessed error data to generate feature vectors; Based on the deep reinforcement learning algorithm, train and optimize the feature vectors to generate an optimal error compensation strategy; Dynamically adjust the processing parameters of the gantry milling machine according to the generated optimal error compensation strategy to correct the errors in the processing process in real time.
[0089] The method of this embodiment can be used to execute the above system embodiment, and its principle and technical effects are similar, so they will not be elaborated here.
[0090] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A gantry milling machine error compensation system for high-precision machining, characterized in that: include: A multimodal sensor module, used for real-time acquisition of error data during the machining process of the gantry milling machine, wherein the error data includes at least temperature, vibration, strain and position error; The data processing module pre-processes the error data in the machining process of the gantry milling machine and generates pre-processed error data; The feature extraction module uses a convolutional neural network to extract features from the preprocessed error data and generate a feature vector; Deep reinforcement learning module, which trains and optimizes feature vectors through deep reinforcement learning algorithms to generate optimal error compensation strategies; The compensation module dynamically adjusts the machining parameters of the gantry milling machine according to the optimal error compensation strategy and corrects the errors in the machining process in real time.
2. The error compensation system for a gantry milling machine for high-precision machining according to claim 1, characterized in that: The multimodal sensor module at least comprises: Temperature sensor, used to collect temperature error data in real time during the processing of the gantry milling machine; Vibration sensor, used to collect vibration error data in real time during the machining process of the gantry milling machine; Strain sensors are used to collect real-time strain error data during the machining process of the gantry milling machine; Displacement sensor, used to collect position error data in real time during the machining process of the gantry milling machine.
3. The error compensation system for a gantry milling machine for high-precision machining according to claim 1, characterized in that: The data processing module comprises: De-noising module, used to remove noise from error data during gantry milling machine processing; Normalization module, used to normalize the error data during the processing of the gantry milling machine; The filter module is used to filter the error data during the processing of the gantry milling machine to remove high-frequency interference; The data generation module is used to generate preprocessed error data.
4. The error compensation system for a gantry milling machine for high-precision machining according to claim 1, characterized in that: The feature extraction module comprises: A data receiving module, used for receiving error data pre-processed from the output of the data processing module; The convolutional neural network module is used to perform convolution feature extraction on the preprocessed error data using a convolutional neural network to generate a feature vector.
5. The error compensation system for a gantry milling machine for high-precision machining according to claim 4, characterized in that: The step of using a convolutional neural network to extract convolution features from the preprocessed error data to generate a feature vector comprises: The preprocessed error data X is subjected to a convolution operation to obtain a convolution feature, wherein the convolution operation is: Y = f(X*W+b); Among them, X is the input preprocessed error data, W is the convolution kernel weight, b is the bias, * is the convolution operation, f is the activation function, and Y is the feature of the convolution layer output; The feature Y output by the convolutional layer is transformed nonlinearly to obtain the activated feature. The transformation is: Z = σ(Y); Among them, Z is the feature of the activation layer output, and σ is the activation function; The feature Z output by the activation layer is pooled to obtain the pooled feature. The pooling operation is: P = maxpool(Z); Among them, P is the feature output by the pooling layer, and maxpool represents the maximum pooling operation; The feature P output by the pooling layer is linearly transformed to obtain the final feature vector. The transformation is: V=W f ·P+b f ; Among them, V is the feature vector output by the fully connected layer, W f is the weight of the fully connected layer, b f For bias.
6. The error compensation system for a gantry milling machine for high-precision machining according to claim 1, characterized in that: The deep reinforcement learning module includes: A state input module, used for receiving a feature vector outputted by a feature extraction module; An error calculation module is used to calculate an error signal according to a current error state and a target error; the current error state is real-time error data during the machining process, and the target error is a preset ideal machining accuracy; A reward function module, used for calculating a reward signal according to an error signal of the error calculation module; The strategy network module is used to adjust the strategy according to the reward signal and generate the compensation strategy; The value network module is used to receive the feature vector of the state input module and the compensation strategy generated by the strategy network module, and estimate the long-term return value of executing the corresponding compensation strategy in each state; The training module is used to jointly train the policy network module and the value network module through a deep reinforcement learning algorithm based on the feature vector received by the state input module, the compensation strategy generated by the policy network module and the long-term return value estimated by the value network module, and output the optimal error compensation strategy.
7. The error compensation system for a gantry milling machine for high-precision machining according to claim 6, characterized in that: The training module includes: The feature vector output by the receiving state input module is taken as the current state s t , receiving the compensation strategy generated by the strategy network module as the current action a t , receiving the long-term return value estimated by the value network module as the current return R t ; Using the deep reinforcement learning algorithm based on the Actor-Critic architecture, the current state s t 、Current action a t and the current return R t As input, it is jointly optimized by the policy network module and the value network module; According to the loss function L critic =(R t -E(s t )) 2 Training value network module, where E(s t ) is the value network module for state s t Estimated return value; According to the loss function L actor =-logπ(a t |s t )(R t -E(s t )) training strategy network module, where π(a t |s t ) is the policy network module in state s t Next generate action a t probability; By minimizing L critic With L actor The strategy network module and the value network module are jointly optimized to output the optimal error compensation strategy.
8. The error compensation system for a gantry milling machine for high-precision machining according to claim 1, characterized in that: The compensation module comprises: An error correction module, used to receive the error compensation strategy output by the deep reinforcement learning module and generate an error correction signal; A compensation amount calculation module, used for calculating the compensation amount according to the error correction signal and the processing error data acquired in real time; The real-time adjustment module is used to correct the errors in the machining process in real time according to the calculated compensation amount.
9. The error compensation system for a gantry milling machine for high-precision machining according to claim 8, characterized in that: The calculation formula of the compensation amount is: Δx t =f(error t ,compensation strategy); Where Δx t is the compensation amount at time t; error t is the real-time machining error at time t; compensation strategy is the optimal error compensation strategy output by the deep reinforcement learning module; f is the function that determines the compensation amount based on the real-time machining error and the error compensation strategy.
10. A gantry milling machine error compensation method for high-precision machining, applied to a gantry milling machine error compensation system for high-precision machining as claimed in any one of claims 1 to 9, characterized in that: The following steps are involved: Use multimodal sensors to collect error data in real time during the machining process of the gantry milling machine; Preprocessing the collected error data to generate preprocessed error data; A convolutional neural network is used to extract features from the preprocessed error data and generate feature vectors; Train and optimize feature vectors based on deep reinforcement learning algorithms to generate optimal error compensation strategies; The machining parameters of the gantry milling machine are dynamically adjusted according to the generated optimal error compensation strategy to correct the errors in the machining process in real time.
Citation Information
Cited By
Dynamic error compensation method and system for main shaft of gantry machining center
CN121028678A
A gantry machining center spindle dynamic error compensation method and system
CN121028678B
Cutter position detection system and intelligent adjusting system of gantry forming grinding machine
CN121199836A