CNN-GRU Mold Pulling Rod Strain Prediction Method Based on Attention Mechanism
The CNN-GRU model with an attention mechanism addresses the inefficiencies in clamping mechanism assembly by predicting rod strain, enhancing efficiency and quality through automated adjustments.
Patent Information
- Application Number
- CN202411796934.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing mold clamping and assembly methods rely heavily on the experience of technical workers, resulting in low assembly efficiency, difficult to guarantee quality, and inaccurate assembly results, which makes it difficult to meet the high efficiency and high accuracy requirements of modern injection molding equipment.
The CNN-GRU clamping tension rod strain prediction method is adopted based on the attention mechanism. By constructing a multi-input and multi-output clamping mechanism tensile rod strain prediction model, the convolutional neural network and the gated cycle unit combined with the SE attention mechanism are used to achieve accurate prediction of the tensile rod strain.
It realizes accurate prediction of the strain of the pull rod during the assembly and adjustment of the mold clamping mechanism, avoids uncertainty in manual operation, significantly improves assembly efficiency and quality, and provides reliable technical guarantees for the assembly and debugging of the mold clamping mechanism.
Smart Images

Figure CN119272806B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of injection molding machine assembly and commissioning, and particularly relates to a method for predicting the strain of the mold clamping tie rods based on the attention mechanism of CNN-GRU. Background Art
[0002] The mold clamping mechanism is the core component and the main carrier for realizing the main functions of an injection molding machine, and mainly consists of a fixed template, a moving template, a rear template, four tie rods, tie rod nuts correspondingly arranged on each tie rod, toggle levers and a hydraulic system. As the main actuator in the injection molding process, the mold clamping mechanism undertakes the tasks of keeping the mold closed under high pressure and ensuring the sealing of the mold cavity during injection. The assembly quality of this component directly affects the molding quality of injection products and the service life of the machine. Mold clamping assembly and adjustment is a crucial step in the assembly process of the injection molding machine's mold clamping mechanism, and has a great impact on the assembly efficiency, quality and assembly consistency of the injection molding machine. The specific steps of mold clamping assembly and adjustment are to adjust the relative position of the tie rod nut on the tie rod according to the degree of strain deviation of the tie rod, and then adjust the parallelism between the fixed template and the moving template to ensure that the strains generated by the four tie rods due to tensile forces during mold clamping are uniform and reduce the off-load ratio. During the assembly and commissioning process, the degree of tie rod strain deviation and the off-load ratio are key indicators for measuring the assembly quality of the mold clamping mechanism. Uneven stress on the tie rods may cause tie rod deformation and unstable mold closing, thereby affecting the accuracy of injection products and the long-term stability of the machine.
[0003] Currently, the existing mold clamping assembly and adjustment methods still have some limitations. First of all, the mold clamping assembly and adjustment process highly depends on the experience of technical workers, and the skills and experience of personnel are difficult to quantify. Especially in mass production, the efficiency of manual debugging is low and is easily affected by human factors, resulting in difficulty in ensuring assembly consistency. In addition, manual assembly cannot be accurately predicted. To ensure that the product meets the assembly requirements, assembly technicians need to spend a lot of time on a cumbersome adjustment process, constantly repeating the process of "assembly - testing - disassembly - adjustment - testing". The operation steps are cumbersome and time-consuming. This assembly and adjustment method is difficult to meet the requirements of modern injection molding equipment production for high efficiency and high precision. Summary of the Invention
[0004] In order to overcome the above-mentioned deficiencies in technology, the present invention provides a method for predicting the strain of the mold clamping tie rods based on the attention mechanism of CNN-GRU. Based on the assembly requirements and characteristics of the mold clamping mechanism, the present invention constructs a multi-input multi-output mold clamping mechanism tie rod strain prediction model that integrates a convolutional neural network with an attention mechanism and a gated recurrent unit to achieve accurate prediction of the tie rod strain during the assembly and adjustment process.
[0005] Term Explanation:
[0006] 1. CNN: Convolutional Neural Network, convolutional neural network.
[0007] 2. GRU: Gated Recurrent Unit, a gated recurrent unit.
[0008] 3. LSTM: Long Short-Term Memory, a long short-term memory network.
[0009] 4. SE: Squeeze-and-Excitation, squeeze and excitation.
[0010] 5. Adam: Adaptive Moment Estimation, adaptive moment estimation.
[0011] 6. RMSE: Root Mean Squared Error, root mean squared error.
[0012] 7. MAE: Mean Absolute Error, mean absolute error.
[0013] 8. : R-squared, coefficient of determination.
[0014] The technical solution adopted by the present invention to overcome its technical problems is as follows:
[0015] A method for predicting the strain of the clamping tie rod of a CNN-GRU combined mold based on an attention mechanism, comprising the following steps:
[0016] S1. Collect the data of the installation and adjustment process of the clamping mechanism of the injection molding machine and construct a historical database;
[0017] S2. Preprocess the data of the installation and adjustment process of the clamping mechanism obtained in step S1, construct a sample data set with the preprocessed data of the installation and adjustment process of the clamping mechanism, and divide the sample data set into a training set and a test set;
[0018] S3. Construct a multi-input and multi-output prediction model for the strain of the clamping tie rod of the clamping mechanism by using a CNN-GRU network structure combined with an SE attention mechanism, determine the input, output and network parameters of the prediction model for the strain of the clamping tie rod of the clamping mechanism, and use the training set to train the prediction model for the strain of the clamping tie rod of the clamping mechanism;
[0019] S4. Use the test set to predict the installation and adjustment process of the clamping mechanism through the trained prediction model for the strain of the clamping tie rod of the clamping mechanism, perform anti-normalization on the prediction result to obtain the adjusted predicted value of the tie rod strain, and evaluate the final prediction result through evaluation indexes;
[0020] S5. Deploy the trained strain prediction model of the mold - closing mechanism tie rods to the actual production site. During mold - closing adjustment, input the real - time collected data into the strain prediction model of the mold - closing mechanism tie rods, and the strain prediction model of the mold - closing mechanism tie rods outputs the predicted value of the tie - rod strain after the current adjustment operation.
[0021] Further, in step S1, the data during the mold - closing mechanism adjustment process includes: the current - moment tie - rod strain value during the adjustment of the four tie rods, the rotation angle of the tie - rod nuts corresponding during the adjustment process, and the tie - rod strain value after adjustment.
[0022] Further, in step S1, the injection - molding machine mold - closing mechanism at least includes a fixed platen, a moving platen, a rear platen, four tie rods, tie - rod nuts respectively arranged on each tie rod, toggle levers, and a hydraulic system. Collecting the data during the injection - molding machine mold - closing mechanism adjustment process specifically includes:
[0023] Determine the data variables to be collected, including the strain value of the mold - closing mechanism tie rods and the corresponding rotation angle of the tie - rod nuts;
[0024] According to the requirements of collecting adjustment data and the structural characteristics of the mold - closing mechanism, select a data - collection device and arrange the data - collection device. Symmetrically install two strain sensors near the fixed platen on each tie rod to collect the tie - rod strain value during mold - closing loading, and install a magnetic - grating encoder on each tie - rod nut to collect the rotation angle of the tie - rod nut during the adjustment process;
[0025] Before the start of the mold - closing mechanism adjustment, install and calibrate the strain sensors and magnetic - grating encoders. During the mold - closing mechanism adjustment process, through the data - collection and processing module, synchronously collect, store, and pre - process the data collected by all sensors, where all sensors include all strain sensors and all magnetic - grating encoders;
[0026] Construct a historical database for storing the original data of the mold - closing mechanism adjustment process and the data of the mold - closing mechanism adjustment process after pre - processing. The historical database is used to record the detailed data during each mold - closing mechanism adjustment process, at least including the mold - closing mechanism model, tie - rod strain value, tie - rod nut rotation angle, and equipment status.
[0027] Further, step S2 specifically includes:
[0028] Screen the data of the mold - closing mechanism adjustment process obtained in step S1, use the isolation forest algorithm to identify and delete outliers. Through an unsupervised outlier - detection method based on random segmentation, randomly select data features and perform segmentation, gradually separate possible outliers, identify and isolate data points that do not conform to the normal pattern, and delete the abnormal data to ensure that the selected data samples are adjustment data under normal conditions;
[0029] Normalize the filtered normal sample data, and normalize the input data and output data to the range between 0 and 1;
[0030] Store the normalized sample data and construct a sample data set;
[0031] Randomly divide the sample data set in the historical database into a training set and a test set according to a preset ratio, where the number of the training set is greater than that of the test set.
[0032] Further, in step S2, the normalization process for the filtered normal sample data specifically includes:
[0033] Perform a linear transformation on the sample data using the min-max normalization method, and calculate the minimum value of the data and the maximum value , and scale the sample data to the target interval [0, 1] according to the normalization formula; the normalization formula is expressed as follows:
[0034] (1)
[0035] In formula (1), is the normalized sample data, is the original sample data, is the minimum value of the sample data, is the maximum value of the sample data.
[0036] Further, in step S3, a multi-input multi-output clamping mechanism tie rod strain prediction model is constructed using a CNN-GRU network structure combined with an SE attention mechanism, and the inputs, outputs and network parameters of the clamping mechanism tie rod strain prediction model are determined, specifically including:
[0037] Determine the input variables and output variables of the clamping mechanism tie rod strain prediction model: Use the current tie rod strain values during the installation and adjustment of the four tie rods and the corresponding tie rod nut rotation angles during the installation and adjustment as eight input variables, and use the four tie rod strain values after installation and adjustment as output variables;
[0038] Determine the network structure of the clamping mechanism tie rod strain prediction model: Select a double-layer one-dimensional convolutional neural network CNN and a gated recurrent unit network GRU and fuse the SE attention mechanism to construct the clamping mechanism tie rod strain prediction model. The network structure of the clamping mechanism tie rod strain prediction model sequentially includes an input layer, a CNN layer, an SE attention mechanism layer, a GRU layer and an output layer;
[0039] Determine the number of network layers, the number of units in each layer, the number of iterations and the learning rate of the clamping mechanism tie rod strain prediction model, and use the Adam optimizer to update the network parameters.
[0040] Further, the input layer is used to take the original data of the die - closing mechanism assembly and adjustment process as the input of the die - closing mechanism tie - rod strain prediction model. Specifically, the original data of the die - closing mechanism assembly and adjustment process is pre - processed and then input into the die - closing mechanism tie - rod strain prediction model;
[0041] The CNN layer includes a convolution operation and an activation function, and is used to perform convolution processing on the input data of the die - closing mechanism assembly and adjustment process, extract the local features and spatial features of the input data, and transfer the learned data features to the SE attention mechanism layer. The convolution expression is as follows:
[0042] (2)
[0043] In formula (2), C represents the convolution output, X is the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the weight matrix of the j - th convolution kernel, b is the bias term, and * is the convolution operation;
[0044] The SE attention mechanism layer includes a global average pooling layer and two fully - connected layers, and is used to evaluate the weights of the CNN convolution features. By means of compression and excitation operations, it adjusts the feature channel weights, uses the weight coefficients to perform weighted averaging on the features of each channel, selectively enhances the attention to key features, and suppresses unimportant or irrelevant features;
[0045] The GRU layer includes an update gate and a reset gate. The GRU layer is used to selectively retain and transfer the information input at the previous moment by using a gating mechanism. Among them, the update gate is used to control how much information is selected from the current input and the historical state to update the current state, and the reset gate is used to control whether the candidate hidden state depends on the previous - moment state and store the short - term changes of the data. It predicts the output by establishing the mapping relationship between the input variables and the output prediction target. The mathematical expression of the GRU layer is as follows:
[0046] (3)
[0047] (4)
[0048] (5)
[0049] (6)
[0050] In formulas (3)-(6), and respectively represent the update gate and the reset gate, represents the current hidden state, represents the candidate hidden state, and both represent the weight matrices of the update gate, and both represent the weight matrix for resetting the gate, and both represent the weight matrix for the hidden state, 、 、 respectively represent the offsets for the update gate, reset gate, and hidden state, represents the Sigmoid activation function, represents the input value at the current moment, represents the output value at the previous moment, and tanh represents the hyperbolic tangent activation function, represents the dot product operation;
[0051] The output layer includes a fully connected layer, which is used to take the output of the GRU layer as the input and output the prediction result of the tie-bar strain of the mold clamping mechanism through the fully connected layer.
[0052] Furthermore, in step S4, the evaluation indexes include the root mean square error RMSE, mean absolute error MAE, and coefficient of determination ; the calculation formulas for the evaluation indexes RMSE, MAE, are as follows respectively:
[0053] (7)
[0054] (8)
[0055] (9)
[0056] In formulas (7)-(9), n represents the total number of samples, represents the true value of the tie-bar strain of the sample, represents the predicted value of the tie-bar strain of the sample, represents the average value of the true values of the tie-bar strains of the samples.
[0057] Furthermore, step S5 specifically includes:
[0058] Integrate the trained and optimized prediction model of the tie-bar strain of the mold clamping mechanism into the assembly and adjustment system of the actual production line;
[0059] During the assembly and adjustment operation of the mold clamping mechanism, the tie-bar strain values and the corresponding tie-bar nut rotation angles during the assembly and adjustment process of the four tie-bars are collected in real time through the sensors configured at the actual production site, and the collected data is used as the input variables of the prediction model of the tie-bar strain of the mold clamping mechanism. Calculate according to the parameters of the trained prediction model of the tie-bar strain of the mold clamping mechanism, and output the predicted value of the tie-bar strain under the current assembly and adjustment operation.
[0060] The beneficial effects of the present invention are:
[0061] According to the requirements of assembly and adjustment data acquisition and the structural characteristics of the die-closing mechanism, the present invention designs a data acquisition scheme. During the assembly and adjustment process of the die-closing mechanism, two sensors, namely strain sensors and magnetic grating encoders, are used to collect the data of the die-closing mechanism assembly and adjustment process. After preprocessing the data, a sample data set is obtained, and a multi-input multi-output die-closing mechanism tie-bar strain prediction model integrating convolutional neural network (CNN), gated recurrent unit (GRU), and SE attention mechanism is constructed, realizing the accurate prediction of the tie-bar strain during the assembly and adjustment process of the die-closing mechanism. This method effectively avoids the uncertainty caused by differences in workers' experience in manual operations, and at the same time realizes the early prediction of the assembly and adjustment results, significantly improving the assembly efficiency and assembly quality, and providing a reliable technical guarantee for the assembly and commissioning of the die-closing mechanism. Brief Description of the Drawings
[0062] Figure 1 It is a flowchart of the CNN-GRU die-closing tie-bar strain prediction method based on the attention mechanism described in the embodiment of the present invention.
[0063] Figure 2 It is a schematic installation diagram of the strain sensor used for data acquisition during the assembly and adjustment process of the die-closing mechanism of an injection molding machine described in the embodiment of the present invention.
[0064] Figure 3 It is a schematic installation diagram of the magnetic grating encoder used for data acquisition during the assembly and adjustment process of the die-closing mechanism of an injection molding machine described in the embodiment of the present invention.
[0065] Figure 4 It is a schematic network structure diagram of the die-closing mechanism tie-bar strain prediction model based on the attention mechanism of CNN-GRU described in the embodiment of the present invention.
[0066] Figure 5 It is a strain prediction result diagram of the first tie-bar of the die-closing mechanism obtained by the die-closing mechanism tie-bar strain prediction model based on the attention mechanism of CNN-GRU described in the embodiment of the present invention.
[0067] Figure 6 It is a strain prediction result diagram of the second tie-bar of the die-closing mechanism obtained by the die-closing mechanism tie-bar strain prediction model based on the attention mechanism of CNN-GRU described in the embodiment of the present invention.
[0068] Figure 7 It is a strain prediction result diagram of the third tie-bar of the die-closing mechanism obtained by the die-closing mechanism tie-bar strain prediction model based on the attention mechanism of CNN-GRU described in the embodiment of the present invention.
[0069] Figure 8 It is a strain prediction result diagram of the fourth tie-bar of the die-closing mechanism obtained by the die-closing mechanism tie-bar strain prediction model based on the attention mechanism of CNN-GRU described in the embodiment of the present invention.
[0070] Figure 2 and Figure 3 Among them, 1. Fixed template, 2. Moving template, 3. Rear template, 4. Tie rod, 5. Tie rod nut, 6. Toggle link, 7. Hydraulic cylinder, 8. Strain sensor, 9. Magnetic grating encoder. Specific implementation mode
[0071] To facilitate a better understanding of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The following is only exemplary and does not limit the protection scope of the present invention.
[0072] The present invention discloses a method for predicting the strain of the clamping tie rod based on the attention mechanism of CNN-GRU, including the following steps:
[0073] S1. Collect the data of the installation and adjustment process of the clamping mechanism of the injection molding machine and construct a historical database;
[0074] S2. Preprocess the data of the installation and adjustment process of the clamping mechanism obtained in step S1, construct a sample data set with the preprocessed data of the installation and adjustment process of the clamping mechanism, and divide the sample data set into a training set and a test set;
[0075] S3. Construct a multi-input and multi-output prediction model for the strain of the clamping tie rod by using the CNN-GRU network structure combined with the SE attention mechanism, determine the input, output and network parameters of the prediction model for the strain of the clamping tie rod, and use the training set to train the prediction model for the strain of the clamping tie rod;
[0076] S4. Use the test set to predict the installation and adjustment process of the clamping mechanism through the trained prediction model for the strain of the clamping tie rod, perform anti-normalization on the prediction result to obtain the adjusted predicted value of the tie rod strain, and evaluate the final prediction result through evaluation indicators;
[0077] S5. Deploy the trained prediction model for the strain of the clamping tie rod to the actual production site. When performing clamping installation and adjustment, input the real-time collected data into the prediction model for the strain of the clamping tie rod, and the prediction model for the strain of the clamping tie rod outputs the predicted value of the tie rod strain after the current installation and adjustment operation.
[0078] To better understand the above technical solution, the exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. These are only exemplary embodiments of the present invention. However, it should be understood that the present invention can be implemented in various forms and is not limited to the embodiments described herein. These embodiments are for those skilled in the art to more clearly and thoroughly understand the present invention.
[0079] The method for predicting the strain of the clamping tie rod based on the attention mechanism of CNN-GRU described in this embodiment, as Figure 1 shown, includes the following steps:
[0080] S1. Collect the data during the assembly and adjustment process of the clamping mechanism of the injection molding machine and construct a historical database.
[0081] Specifically, as Figure 2 shown, the clamping mechanism of the injection molding machine at least includes a fixed platen 1, a moving platen 2, a rear platen 3, four tie rods 4, tie rod nuts 5 correspondingly arranged on each tie rod, toggle links 6 and a hydraulic system. Among them, the hydraulic system at least includes a hydraulic cylinder 7.
[0082] In this embodiment, the data during the assembly and adjustment process of the clamping mechanism includes: the current tie rod strain value during the assembly and adjustment process of the four tie rods, the rotation angle of the corresponding tie rod nut during the assembly and adjustment process, and the tie rod strain value after the assembly and adjustment.
[0083] In this embodiment, the collected data comes from the production line of the assembly workshop of an injection molding machine manufacturing enterprise, and a total of 92 groups of original assembly and adjustment data are obtained. Specifically, collect the data during the assembly and adjustment process of the clamping mechanism of the injection molding machine, as Figure 2 and Figure 3 shown, specifically including:
[0084] 1) Determine the data variables to be collected, including the tie rod strain value of the clamping mechanism and the rotation angle of the corresponding tie rod nut. These variables directly affect the force state and strain distribution of the clamping mechanism and are the basic data for predicting the tie rod strain value subsequently.
[0085] 2) Select a data acquisition device according to the requirements of collecting data during the assembly and adjustment and the structural characteristics of the clamping mechanism, and arrange the data acquisition device. Two strain sensors 8 are symmetrically installed at the position close to the fixed platen 1 on each tie rod 4 to collect the tie rod strain value during the clamping load. A magnetic grating encoder 9 is installed on each tie rod nut 5 to collect the rotation angle of the tie rod nut during the assembly and adjustment process. Preferably, the two strain sensors 8 are symmetrically installed at the position 1.5 times the tie rod diameter away from the side close to the fixed platen 1 on the tie rod 4. This position is the tie rod strain uniform area, which can more accurately reflect the strain situation of the tie rod during the clamping load, so the measurement result at this position is more accurate; the magnetic grating encoder 9 is selected according to the outer diameter size of the tie rod nut 5. In this embodiment, a circular magnetic grating encoder is selected.
[0086] 3) Install and calibrate the strain sensors 8 and the magnetic grating encoders 9 before the start of the assembly and adjustment of the clamping mechanism to ensure the accuracy of the collected data. During the assembly and adjustment process of the clamping mechanism, the data acquisition and processing module synchronously collects, stores and preprocesses the data collected by all sensors to ensure the quality and consistency of the data. Among them, all sensors include all strain sensors 8 and all magnetic grating encoders 9. In this embodiment, there are a total of 8 strain sensors 8 and 4 magnetic grating encoders 9.
[0087] 4) Construct a historical database for storing the original data and pre - processed data of the die - closing mechanism assembly and adjustment process. The historical database is used to record the detailed data of each die - closing mechanism assembly and adjustment process for subsequent data query, analysis, and training of the die - closing mechanism tie - rod strain prediction model. The detailed data of each die - closing mechanism assembly and adjustment process includes at least the die - closing mechanism model, tie - rod strain value, tie - rod nut rotation angle, and equipment status. Among them, the equipment includes all sensors for data acquisition, as well as other auxiliary tools and test benches used in the assembly and adjustment process.
[0088] S2. Pre - process the die - closing mechanism assembly and adjustment process data obtained in step S1, construct a sample data set with the pre - processed die - closing mechanism assembly and adjustment process data, and divide the sample data set into a training set and a test set.
[0089] Specifically, step S2 specifically includes:
[0090] 1) Screen the die - closing mechanism assembly and adjustment process data obtained in step S1, use the Isolation Forest algorithm to identify and delete outliers. Through an unsupervised outlier detection method based on random segmentation, randomly select data features and perform segmentation to gradually separate possible outliers. Identify and isolate data points that do not conform to the normal pattern, and delete the abnormal data to ensure that the selected data samples are assembly and adjustment data in a normal state. Specifically, after automatically screening out abnormal data using the Isolation Forest algorithm, further review the data marked as abnormal to ensure that the eliminated data does not conform to the conventional debugging pattern, and delete the existing abnormal data to ensure, to the greatest extent, that the selected data samples are die - closing debugging data in a normal state, ensuring the accuracy and representativeness of the data.
[0091] 2) Normalize the screened normal sample data, and normalize the input data and output data to the range between 0 and 1. The normalization of the screened normal sample data specifically includes:
[0092] Use the min - max normalization method to perform a linear transformation on the sample data, calculate the minimum value and the maximum value of the data, and scale the sample data to the target interval [0, 1] according to the normalization formula for easy training. The normalization formula is as follows:
[0093] (1)
[0094] In formula (1), is the normalized sample data, is the original sample data, is the minimum value of the sample data, is the maximum value of the sample data.
[0095] 3) Store the normalized sample data and construct a sample data set for the subsequent update, verification, and optimization of the mold-closing mechanism tie-bar strain prediction model.
[0096] 4) Randomly divide the sample data set in the historical database into a training set and a test set according to a preset ratio of 7:3, where 70% of the data is used as the training set for parameter learning and model training of the mold-closing mechanism tie-bar strain prediction model, and 30% of the data is used as the test set for evaluating the prediction performance of the mold-closing mechanism tie-bar strain prediction model.
[0097] Specifically, in this embodiment, after deleting the identified outliers from the 92 groups of original mold-closing mechanism assembly and adjustment data obtained through the above preprocessing process, the remaining 88 groups of sample data are used to construct a sample data set, and 62 groups of data are used as the training set for training the mold-closing mechanism tie-bar strain prediction model, and 26 groups of data are used as the verification set for verifying the mold-closing mechanism tie-bar strain prediction model.
[0098] S3. Construct a multi-input multi-output mold-closing mechanism tie-bar strain prediction model using a CNN-GRU network structure combined with an SE attention mechanism, determine the inputs, outputs, and network parameters of the mold-closing mechanism tie-bar strain prediction model, and use the training set to train the mold-closing mechanism tie-bar strain prediction model.
[0099] In this embodiment, constructing a multi-input multi-output mold-closing mechanism tie-bar strain prediction model using a CNN-GRU network structure combined with an SE attention mechanism and determining the inputs, outputs, and network parameters of the mold-closing mechanism tie-bar strain prediction model specifically include:
[0100] 1) Determine the input variables and output variables of the mold-closing mechanism tie-bar strain prediction model: Use the current tie-bar strain values during the assembly process of the four tie-bars and the corresponding tie-bar nut rotation angles during the assembly process as eight input variables, and use the four tie-bar strain values after assembly as output variables.
[0101] 2) Determine the network structure of the mold-closing mechanism tie-bar strain prediction model: Select a two-layer one-dimensional convolutional neural network (CNN) and a gated recurrent unit network (GRU) and fuse the SE attention mechanism to construct the mold-closing mechanism tie-bar strain prediction model. As Figure 4 shown, the network structure of the mold-closing mechanism tie-bar strain prediction model sequentially includes an input layer, a CNN layer, an SE attention mechanism layer, a GRU layer, and an output layer.
[0102] 3) Determine the number of network layers, the number of units in each layer, the number of iterations, and the learning rate of the mold-closing mechanism tie-bar strain prediction model, and use the Adam optimizer to update the network parameters.
[0103] Further, the input layer is used to take the original data of the die - closing mechanism assembly and adjustment process as the input of the die - closing mechanism tie - rod strain prediction model. Specifically, the original data of the die - closing mechanism assembly and adjustment process is pre - processed and then input into the die - closing mechanism tie - rod strain prediction model, which helps to improve the training effect and prediction accuracy of the model.
[0104] The CNN layer includes a convolution operation and an activation function, and is used to perform convolution processing on the input data of the die - closing mechanism assembly and adjustment process, extract the local features and spatial features of the input data, and transfer the learned data features to the SE attention mechanism layer. The convolution expression is as follows:
[0105] (2)
[0106] In formula (2), C represents the convolution output, X is the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the weight matrix of the j - th convolution kernel, b is the bias term, and * is the convolution operation.
[0107] The SE attention mechanism layer includes a global average pooling layer and two fully - connected layers, and is used to evaluate the weights of the CNN convolution features, adjust the feature channel weights through compression and excitation operations, use the weight coefficients to perform weighted averaging on the features of each channel, selectively enhance the attention to key features, and suppress unimportant or irrelevant features.
[0108] The GRU layer includes an update gate and a reset gate. The GRU layer is used to selectively retain and transfer the information input at the previous moment by using a gating mechanism. Among them, the update gate is used to control how much information is selected from the current input and the historical state to update the current state, and the reset gate is used to control whether the candidate hidden state depends on the previous - moment state and store the short - term changes of the data. The output is predicted by establishing a mapping relationship between the input variables and the output prediction target. The mathematical expression of the GRU layer is as follows:
[0109] (3)
[0110] (4)
[0111] (5)
[0112] (6)
[0113] In formulas (3) - (6), and respectively represent the update gate and the reset gate. represents the current hidden state. represents the candidate hidden state. and Both represent the weight matrix of the update gate, and both represent the weight matrix of the reset gate, and both represent the weight matrix of the hidden state, 、 、 represent the offsets of the update gate, reset gate, and hidden state respectively, represents the Sigmoid activation function, represents the input value at the current time, represents the output value at the previous time, and tanh represents the hyperbolic tangent activation function, represents the dot product operation.
[0114] The output layer includes a fully connected layer, which is used to take the output of the GRU layer as input and output the predicted result of the tie rod strain of the die closing mechanism through the fully connected layer.
[0115] Specifically, in this embodiment, in the die closing mechanism tie rod strain prediction model based on the SE attention mechanism and CNN-GRU, the CNN layer includes two one-dimensional convolutional layers, and the number of convolutional kernels of the two layers is 32 and 64 respectively. At the same time, the ReLU activation function is used as the activation function of each layer; the SE attention mechanism layer includes a global average pooling layer and two fully connected layers, and the number of channels of the two fully connected layers is 16 and 64 respectively. The ReLU activation function and the Sigmoid activation function are used as the activation functions of each layer respectively; a single-layer GRU structure is built, and 50 unit numbers are selected for feature learning in the GRU layer; during the training process, the number of iterations is set to 1000 times, the learning rate is 0.001, and the Adam optimizer is used for parameter optimization.
[0116] S4. Use the test set to predict the die closing mechanism assembly process through the trained die closing mechanism tie rod strain prediction model, perform anti-normalization on the prediction result to obtain the adjusted predicted tie rod strain value, and evaluate the final prediction result through evaluation indicators.
[0117] In this embodiment, the evaluation indicators include root mean square error RMSE, mean absolute error MAE, and coefficient of determination ; the calculation formulas of the evaluation indicators RMSE, MAE, are as follows respectively:
[0118] (7)
[0119] (8)
[0120] (9)
[0121] In formulas (7)-(9), n represents the total number of samples, represents the true value of the tie rod strain of the sample, represents the predicted value of the tie rod strain of the sample, represents the average value of the true values of the tie rod strains of the samples.
[0122] It is used to evaluate the interpretability of the prediction model for the tie rod strain of the die - closing mechanism. The closer the value is to 1, the better the fitting effect of the prediction model for the tie rod strain of the die - closing mechanism; and reflects the deviation degree between the predicted value and the true value obtained by the prediction model for the tie rod strain of the die - closing mechanism, and the smaller the value, the higher the prediction accuracy.
[0123] In this embodiment, the obtained data during the assembly and adjustment process of the die - closing mechanism is used for verification. 70% of the 88 - group data, that is, 62 groups of data, are used as the training set to train the prediction model for the tie rod strain of the die - closing mechanism, and 30% of the data, that is, 26 groups of data, are used as the test set and input into the prediction model for the tie rod strain of the die - closing mechanism described in this embodiment. The prediction results are as Figures 5 - 8 shown, where Figure 5 , Figure 6 , Figure 7 , Figure 8 respectively represent the prediction result diagrams of all samples of the first tie rod, the second tie rod, the third tie rod, and the fourth tie rod in the multi - output results of the model. Figures 5 - 8 The abscissa of represents the true value of the tie rod strain, and the ordinate represents the predicted value of the tie rod strain. The sample points trained by the CNN - GRU model based on the SE attention mechanism described in this embodiment almost all fall on the fitting line, indicating that the model has a high prediction accuracy. At the same time, it is compared with the CNN - LSTM model based on the SE attention mechanism to verify that the prediction model for the tie rod strain of the die - closing mechanism based on the CNN - GRU with the SE attention mechanism proposed in this embodiment has a higher prediction accuracy. In order to more intuitively compare the prediction accuracies of each model, the root - mean - square error (RMSE), mean absolute error (MAE), and coefficient of determination (
[0124] Table 1 Comparison of evaluation indexes of different prediction models
[0125]
[0126] From the comparison results of the evaluation indexes in Table 1, it can be seen that compared with the CNN - LSTM model based on the SE attention mechanism, the evaluation index results of the CNN - GRU model based on the SE attention mechanism proposed in this embodiment are better and have higher And lower RMSE and MAE. It can be seen from this that the CNN-GRU model based on the SE attention mechanism has better prediction performance than the CNN-LSTM prediction model based on the SE attention mechanism.
[0127] S5. Deploy the trained die closing mechanism tie rod strain prediction model to the actual production site. During die closing adjustment, input the real-time collected data into the die closing mechanism tie rod strain prediction model, and the die closing mechanism tie rod strain prediction model outputs the predicted value of the tie rod strain after the current adjustment operation.
[0128] In this embodiment, step S5 specifically includes:
[0129] Integrate the trained and optimized die closing mechanism tie rod strain prediction model into the adjustment system of the actual production line;
[0130] During the die closing mechanism adjustment operation, the strain values of the four tie rods during the adjustment process and the corresponding rotation angles of the tie rod nuts during the adjustment process are collected in real time through the sensors configured at the actual production site, and the collected data is used as the input variables of the die closing mechanism tie rod strain prediction model. Calculate according to the parameters of the trained die closing mechanism tie rod strain prediction model and output the predicted value of the tie rod strain under the current adjustment operation.
[0131] The die closing mechanism tie rod strain prediction model calculates and outputs the predicted value of the tie rod strain after the current adjustment operation. The output result is used as an advance estimate of the actual adjustment operation result, provides reference information on the force uniformity of the tie rod in the current adjustment state, provides quick feedback to the operator, and greatly improves the accuracy and efficiency of the die closing mechanism adjustment.
[0132] The above only describes the basic principle and preferred implementation mode of the present invention. Those skilled in the art can make many changes and improvements according to the above description, and these changes and improvements should belong to the protection scope of the present invention.
Claims
1. A method for predicting the strain of a die closing tie bar based on an attention mechanism and CNN-GRU, characterized in that The steps are as follows: S1. Collect the data during the assembly and adjustment process of the injection molding machine's clamping mechanism, and construct a historical database. Among them, the injection molding machine's clamping mechanism at least includes a fixed platen, a moving platen, a rear platen, four tie bars, tie bar nuts respectively arranged on each tie bar, toggle levers and a hydraulic system. Step S1 specifically includes: Determine the data variables to be collected, including the strain values of the tie bars of the clamping mechanism and the corresponding rotation angles of the tie bar nuts; Select a data acquisition device according to the requirements of collecting data during assembly and adjustment and the structural characteristics of the clamping mechanism, and arrange the data acquisition device. Two strain sensors are symmetrically installed at positions close to the fixed platen on each tie bar to collect the strain values of the tie bars during clamping loading, and a magnetic grating encoder is installed on each tie bar nut to collect the rotation angles of the tie bar nuts during the assembly and adjustment process; Before the assembly and adjustment of the clamping mechanism, install and calibrate the strain sensors and magnetic grating encoders. During the assembly and adjustment process of the clamping mechanism, use the data acquisition and processing module to synchronously collect, store and preprocess the data collected by all sensors. Among them, all sensors include all strain sensors and all magnetic grating encoders; Construct a historical database for storing the original data during the assembly and adjustment process of the clamping mechanism and the data during the assembly and adjustment process of the clamping mechanism after preprocessing. The historical database is used to record the detailed data during each assembly and adjustment process of the clamping mechanism, at least including the clamping mechanism model, tie bar strain values, tie bar nut rotation angles and equipment status; S2. Preprocess the data during the assembly and adjustment process of the clamping mechanism obtained in step S1, construct a sample data set with the preprocessed data during the assembly and adjustment process of the clamping mechanism, and divide the sample data set into a training set and a test set; S3. Use a CNN-GRU network structure combined with an SE attention mechanism to construct a multi-input multi-output prediction model for the tie bar strain of the clamping mechanism, determine the input, output and network parameters of the prediction model for the tie bar strain of the clamping mechanism, and use the training set to train the prediction model for the tie bar strain of the clamping mechanism; S4. Use the test set to predict the assembly and adjustment process of the clamping mechanism through the trained prediction model for the tie bar strain of the clamping mechanism, perform anti-normalization on the prediction result to obtain the adjusted tie bar strain prediction value, and evaluate the final prediction result through evaluation indicators; S5. Deploy the trained prediction model for the tie bar strain of the clamping mechanism to the actual production site. During the clamping assembly and adjustment, input the real-time collected data into the prediction model for the tie bar strain of the clamping mechanism, and the prediction model for the tie bar strain of the clamping mechanism outputs the tie bar strain prediction value after the current assembly and adjustment operation.
2. The method for predicting the strain of the mold clamping tie bar based on the CNN-GRU with attention mechanism according to claim 1, characterized in that In step S1, the data during the assembly and adjustment process of the clamping mechanism includes: the current tie bar strain values during the assembly and adjustment process of the four tie bars, the corresponding rotation angles of the tie bar nuts during the assembly and adjustment process, and the tie bar strain values after assembly and adjustment.
3. The method for predicting the strain of the mold clamping tie rod based on the attention mechanism and CNN-GRU according to claim 1, wherein Step S2 specifically includes: Screen the data obtained in the mold clamping mechanism assembly and adjustment process in step S1, and use the Isolation Forest algorithm to identify and delete outliers. Through an unsupervised outlier detection method based on random partitioning, randomly select data features and perform partitioning, gradually separating possible outliers, identifying and isolating data points that do not conform to the normal pattern, and deleting the abnormal data to ensure that the selected data samples are assembly and adjustment data under normal conditions; Normalize the screened normal sample data, and normalize the input data and output data to between 0 and 1; Store the normalized sample data and construct a sample data set; Randomly divide the sample data set in the historical database into a training set and a test set according to a preset ratio, where the number of the training set is greater than the number of the test set.
4. The method for predicting the strain of the mold clamping tie bar based on the attention mechanism CNN-GRU according to claim 3, characterized in that In step S2, normalize the screened normal sample data, specifically including: Use the min-max normalization method to perform a linear transformation on the sample data and calculate the minimum value of the data and the maximum value , and scale the sample data to the target interval [0, 1] according to the normalization formula; the normalization formula is expressed as follows: (1) In formula (1), is the normalized sample data, is the original sample data, is the minimum value of the sample data, is the maximum value of the sample data.
5. The method for predicting the strain of the mold clamping tie rod based on the attention mechanism CNN-GRU according to claim 1, wherein In step S3, construct a multi-input multi-output mold clamping mechanism tie rod strain prediction model by using a CNN-GRU network structure combined with an SE attention mechanism, and determine the input, output and network parameters of the mold clamping mechanism tie rod strain prediction model, specifically including: Determine the input variables and output variables of the mold clamping mechanism tie rod strain prediction model: Use the current moment tie rod strain values during the assembly and adjustment process of the four tie rods and the corresponding tie rod nut rotation angles during the assembly and adjustment process as eight input variables, and use the four variables of the tie rod strain value after assembly and adjustment as output variables; Determine the network structure of the mold clamping mechanism tie rod strain prediction model: Select a two-layer one-dimensional convolutional neural network CNN and a gated recurrent unit network GRU and fuse the SE attention mechanism to construct a mold clamping mechanism tie rod strain prediction model. The network structure of the mold clamping mechanism tie rod strain prediction model sequentially includes an input layer, a CNN layer, an SE attention mechanism layer, a GRU layer and an output layer; Determine the number of network layers, the number of units in each layer, the number of iterations and the learning rate of the mold clamping mechanism tie rod strain prediction model, and use the Adam optimizer to update the network parameters.
6. The method for predicting the strain of the mold clamping tie rod based on the attention mechanism according to claim 5, wherein The input layer is used to input the original mold clamping mechanism assembly and adjustment process data as the input of the mold clamping mechanism tie rod strain prediction model, specifically, the original mold clamping mechanism assembly and adjustment process data is input into the mold clamping mechanism tie rod strain prediction model after preprocessing; The CNN layer includes a convolution operation and an activation function, and is used to perform convolution processing on the input mold clamping mechanism assembly and adjustment process data, extract the local features and spatial features of the input data, and transfer the learned data features to the SE attention mechanism layer; The convolution expression is as follows: (2) In formula (2), C represents the convolution output, X is the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the weight matrix of the j-th convolution kernel, b is the bias term, and * is the convolution operation. The SE attention mechanism layer includes a global average pooling layer and two fully connected layers, and is used to evaluate the weights of the CNN convolution features, adjust the feature channel weights through compression and excitation operations, perform weighted averaging on the features of each channel using the weight coefficients, and selectively enhance the attention to key features and suppress unimportant or irrelevant features; The GRU layer includes an update gate and a reset gate. The GRU layer is used to selectively retain and transmit the information input at the previous moment by using a gating mechanism. Among them, the update gate is used to control how much information is selected from the current input and the historical state to update the current state, and the reset gate is used to control whether the candidate hidden state depends on the previous moment state and store the short-term changes of the data. The output is predicted by establishing a mapping relationship between the input variables and the output prediction target. The mathematical expression of the GRU layer is as follows: (3) (4) (5) (6) In formulas (3)-(6), and represent the update gate and the reset gate respectively, represents the current hidden state, represents the candidate hidden state, and both represent the weight matrix of the update gate, and both represent the weight matrix of the reset gate, and both represent the weight matrix of the hidden state, , , represent the offsets of the update gate, the reset gate and the hidden state respectively, represents the Sigmoid activation function, represents the input value at the current moment, represents the output value at the previous moment, tanh represents the hyperbolic tangent activation function, represents the dot product operation; The output layer includes a fully connected layer, which is used to take the output of the GRU layer as the input and output the prediction result of the tie rod strain of the mold clamping mechanism through the fully connected layer.
7. The CNN-GRU mold clamping tie bar strain prediction method based on the attention mechanism according to claim 1, characterized in that In step S4, the evaluation metrics include the root mean square error RMSE, the mean absolute error MAE, and the coefficient of determination ; Evaluation metrics RMSE, MAE, The calculation formulas are as follows: (7) (8) (9) In Formulas (7)-(9), n represents the total number of samples, represents the true value of the tie rod strain of the sample, represents the predicted value of the tie rod strain of the sample, represents the average value of the true values of the tie rod strains of the samples.
8. The method for predicting the strain of the mold clamping tie rod based on the attention mechanism CNN-GRU according to claim 1, wherein Step S5 specifically includes: Integrate the trained and optimized prediction model of the tie rod strain of the mold clamping mechanism into the installation and adjustment system of the actual production line; During the installation and adjustment operation of the mold clamping mechanism, the tie rod strain values during the installation and adjustment process of the four tie rods and the corresponding rotation angles of the tie rod nuts during the installation and adjustment process are collected in real time through the sensors configured at the actual production site, and the collected data is used as the input variables of the prediction model of the tie rod strain of the mold clamping mechanism. Calculate according to the parameters of the trained prediction model of the tie rod strain of the mold clamping mechanism, and output the predicted value of the tie rod strain under the current installation and adjustment operation.
Citation Information
Patent Citations
Foam concrete mechanical property prediction model optimization method
CN118486408A