CNN-GRU mold closing pull rod strain prediction method based on attention mechanism
Through the CNN-GRU network based on attention mechanism, the tension prediction model of the tie rod with a clamping mechanism is solved, and the problem of low assembly and adjustment efficiency and consistency in the existing technology is difficult to ensure, and accurate prediction and real-time adjustment of the strain of the tie rod are achieved, improving the improvement of the strain of the tie rod. The assembly efficiency and quality of the injection molding machine.
Patent Information
- Application Number
- CN202411796934.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing mold clamping and assembly methods rely heavily on the experience of technical workers, are inefficient and are susceptible to human factors, are difficult to ensure assembly consistency, and are unable to accurately predict tension rod strain, resulting in the impact of injection molding product accuracy and machine stability.
A multi-input and multi-output tension prediction model of the clamping mechanism is constructed using the CNN-GRU network structure based on the attention mechanism. By collecting and pre-processing the assembly and adjustment process data, the model is trained to predict the tension strut, real-time prediction and adjustment are achieved.
It effectively avoids uncertainty in manual operation, significantly improves assembly efficiency and quality, and provides reliable assembly and commissioning guarantees.
Smart Images

Figure CN119272806A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of assembly and debugging of injection molding machines, and in particular to a CNN-GRU mold tie rod strain prediction method based on an attention mechanism. Background Art
[0002] The clamping mechanism is the core component and main function realization carrier of the injection molding machine. It is mainly composed of a fixed platen, a movable platen, a rear platen, four tie rods, tie rod nuts corresponding to each tie rod, a toggle rod and a hydraulic system. As the main actuator in the injection molding process, the clamping mechanism is responsible for 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 the injection molded product and the service life of the machine. Mold clamping and adjustment is a crucial step in the assembly process of the clamping mechanism of the injection molding machine, which has a huge impact on the assembly efficiency, quality and assembly consistency of the injection molding machine. The specific steps of mold clamping and adjustment are to adjust the relative position of the tie rod nut on the tie rod according to the degree of tie rod strain deviation and then adjust the parallelism between the fixed platen and the movable platen to ensure that the strain of the four tie rods due to the force stretching is uniform during the clamping loading and reduce the eccentric load rate. During the assembly and debugging process, the degree of tie rod strain deviation and the eccentric load rate are key indicators for measuring the assembly quality of the clamping mechanism. Uneven force on the tie rod may cause tie rod deformation and unstable mold closure, which in turn affects the precision of the injection molded product and the long-term stability of the machine.
[0003] At present, the existing mold assembly and adjustment methods still have some limitations. First, the mold assembly and adjustment process relies heavily on the experience of skilled workers, and the skills and experience of personnel are difficult to quantify. Especially in mass production, manual debugging is inefficient and easily affected by human factors, making it difficult to ensure assembly consistency. In addition, manual assembly cannot be accurately predicted. In order to ensure that the product meets the assembly requirements, assembly technicians need to spend a lot of time on tedious adjustment processes, constantly repeating the process of "assembly-test-disassembly-adjustment-test", and the operation steps are cumbersome and time-consuming. This assembly and debugging 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 shortcomings of the above technologies, the present invention provides a CNN-GRU clamping rod strain prediction method based on the attention mechanism. Based on the assembly requirements and characteristics of the clamping mechanism, the present invention constructs a multi-input and multi-output clamping mechanism rod strain prediction model that integrates a convolutional neural network with an attention mechanism and a gated recurrent unit, so as to achieve accurate prediction of the rod strain during the assembly and adjustment process.
[0005] Terminology explanation:
[0006] 1. CNN: Convolutional Neural Network.
[0007] 2. GRU: Gated Recurrent Unit, gated recurrent unit.
[0008] 3. LSTM: Long Short-Term Memory, long short-term memory network.
[0009] 4. SE: Squeeze-and-Excitation, compression and excitation.
[0010] 5. Adam: Adaptive Moment Estimation, adaptive moment estimation.
[0011] 6. RMSE: 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 the technical problems is:
[0015] A CNN-GRU mold tie rod strain prediction method based on attention mechanism includes the following steps:
[0016] S1. Collect the installation and adjustment process data of the mold clamping mechanism of the injection molding machine and build a historical database;
[0017] S2, preprocessing the clamping mechanism installation and adjustment process data obtained in step S1, constructing a sample data set using the preprocessed clamping mechanism installation and adjustment process data, and dividing the sample data set into a training set and a test set;
[0018] S3. Use the CNN-GRU network structure combined with the SE attention mechanism to build a multi-input and multi-output clamping mechanism tie rod strain prediction model, determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, and use the training set to train the clamping mechanism tie rod strain prediction model;
[0019] S4, using the test set to predict the clamping mechanism assembly process through the trained clamping mechanism tie rod strain prediction model, denormalizing the prediction results to obtain the adjusted tie rod strain prediction value, and evaluating the final prediction results through evaluation indicators;
[0020] S5. Deploy the trained clamping mechanism tie rod strain prediction model to the actual production site. When performing mold clamping adjustment, input the real-time collected data into the clamping mechanism tie rod strain prediction model. The clamping mechanism tie rod strain prediction model outputs the predicted value of the tie rod strain after the current adjustment operation.
[0021] Furthermore, in step S1, the clamping mechanism adjustment process data includes: the strain values of the four tie rods at the current moment during the adjustment process, the corresponding tie rod nut rotation angles during the adjustment process, and the tie rod strain values after the adjustment.
[0022] Further, in step S1, the mold clamping mechanism of the injection molding machine includes at least a fixed mold plate, a movable mold plate, a rear mold plate, four tie rods, a tie rod nut correspondingly arranged on each tie rod, a toggle lever and a hydraulic system, and the installation and adjustment process data of the mold clamping mechanism of the injection molding machine is collected, specifically including:
[0023] Determine the data variables that need to be collected, including the strain value of the tie rod of the clamping mechanism and the corresponding rotation angle of the tie rod nut;
[0024] According to the data collection requirements for installation and adjustment and the structural characteristics of the mold clamping mechanism, the data acquisition device is selected and arranged. Two strain sensors are symmetrically installed on each tie rod near the fixed platen to collect the strain value of the tie rod during mold clamping loading. A magnetic encoder is installed on each tie rod nut to collect the rotation angle of the tie rod nut during installation and adjustment.
[0025] Before the clamping mechanism is installed and adjusted, the strain sensors and magnetic encoders are installed and calibrated. During the clamping mechanism installation and adjustment, the data collected by all sensors are synchronously collected, stored and preprocessed through the data acquisition and processing module, where all sensors include all strain sensors and all magnetic encoders;
[0026] A historical database is constructed to store the original data of the mold clamping mechanism installation process and the pre-processed mold clamping mechanism installation process data. The historical database is used to record detailed data in each mold clamping mechanism installation process, including at least the mold clamping mechanism model, tie rod strain value, tie rod nut rotation angle and equipment status.
[0027] Furthermore, step S2 specifically includes:
[0028] The clamping mechanism assembly process data obtained in step S1 is screened, and the isolation forest algorithm is used to identify and delete outliers. Through an unsupervised anomaly detection method based on random segmentation, data features are randomly selected and segmented, and possible outliers are gradually separated. Data points that do not conform to the normal pattern are identified and isolated, and the abnormal data are deleted to ensure that the selected data samples are assembly data under normal conditions;
[0029] Normalize the screened normal sample data and normalize the input data and output data to between 0 and 1;
[0030] Store the normalized sample data and construct a sample data set;
[0031] The sample data set of the historical database is randomly divided into a training set and a test set according to a preset ratio, wherein the number of training sets is greater than the number of test sets.
[0032] Furthermore, in step S2, the normal sample data after screening is normalized, specifically including:
[0033] The min-max normalization method is used to perform linear transformation on the sample data and calculate the minimum value of the data. and maximum value , according to the normalization formula, the sample data is scaled to the target interval [0, 1]; the normalization formula is 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] Furthermore, in step S3, a multi-input and multi-output clamping mechanism tie rod strain prediction model is constructed by using a CNN-GRU network structure combined with an SE attention mechanism to determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, specifically including:
[0037] Determine the input variables and output variables of the clamping mechanism tie rod strain prediction model: take the current tie rod strain values of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angles during the adjustment process as eight variables as input variables, and take the four tie rod strain values after 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 integrate the SE attention mechanism to construct a clamping mechanism tie rod strain prediction model, wherein the network structure of the clamping mechanism tie rod strain prediction model sequentially includes an input layer, a CNN layer, a SE attention mechanism layer, a GRU layer and an output layer;
[0039] The number of network layers, the number of units per layer, the number of iterations and the learning rate of the clamping mechanism tie rod strain prediction model were determined, and the Adam optimizer was used to update the network parameters.
[0040] Furthermore, the input layer is used to use the original clamping mechanism installation and adjustment process data as the input of the clamping mechanism tie rod strain prediction model, specifically, the original clamping mechanism installation and adjustment process data is input into the clamping mechanism tie rod strain prediction model after preprocessing;
[0041] The CNN layer includes convolution operations and activation functions, which are used to perform convolution processing on the input clamping mechanism adjustment process data, extract the local features and spatial features of the input data, and pass 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 represents the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the j-th convolution kernel weight matrix, 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, which are used to evaluate the weights of CNN convolutional features, adjust the feature channel weights through compression and excitation operations, and use the weight coefficients to perform weighted averaging on the features of each channel, selectively enhancing the focus on key features and suppressing 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 transmit the information input at the previous moment using a gating mechanism. 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. The reset gate is used to control whether the candidate hidden state depends on the state at the previous moment and store short-term changes in the data. The output is predicted by establishing a mapping relationship between the input variable 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 represent the update gate and reset gate respectively, Indicates 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, Indicates the current input value. represents the output value of the previous moment, 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 input and output the prediction result of the clamping mechanism tie rod strain through the fully connected layer.
[0052] Furthermore, in step S4, the evaluation indicators include root mean square error RMSE, mean absolute error MAE and determination coefficient ;Evaluation indicators RMSE, MAE, The calculation formulas are as follows:
[0053] (7)
[0054] (8)
[0055] (9)
[0056] In formulas (7)-(9), n represents the total number of samples. represents the true value of the sample's rod strain, represents the predicted value of the sample's rod strain, It represents the average value of the true value of the sample rod strain.
[0057] Furthermore, step S5 specifically includes:
[0058] Integrate the trained and optimized clamping mechanism tie rod strain prediction model into the actual production line assembly and adjustment system;
[0059] During the mold clamping mechanism adjustment operation, the sensors configured at the actual production site are used to collect the tie rod strain values of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angles during the adjustment process in real time. The collected data are used as the input variables of the mold clamping mechanism tie rod strain prediction model. The calculation is performed according to the parameters of the trained mold clamping mechanism tie rod strain prediction model to output the tie rod strain prediction value under the current adjustment operation.
[0060] The beneficial effects of the present invention are:
[0061] The present invention designs a data collection scheme according to the data collection requirements for assembly and adjustment and the structural characteristics of the clamping mechanism. During the assembly and adjustment of the clamping mechanism, two sensors, strain sensors and magnetic grating encoders, are used to collect the assembly and adjustment process data of the clamping mechanism. After preprocessing the data, a sample data set is obtained, and a multi-input and multi-output clamping mechanism tie rod strain prediction model integrating convolutional neural network CNN, gated recurrent unit GRU and SE attention mechanism is constructed, so as to realize the accurate prediction of tie rod strain during the assembly and adjustment of the clamping mechanism. This method effectively avoids the uncertainty caused by the difference in workers' experience in manual operation, and realizes the early prediction of the assembly and adjustment results, significantly improves the assembly efficiency and assembly quality, and provides a reliable technical guarantee for the assembly and debugging of the clamping mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of the CNN-GRU mold tie rod strain prediction method based on the attention mechanism described in an embodiment of the present invention.
[0063] Figure 2 The present invention is a schematic diagram of the installation of a strain sensor used for data collection during the assembly and adjustment process of a mold clamping mechanism of an injection molding machine according to an embodiment of the present invention.
[0064] Figure 3 The present invention is a schematic diagram of the installation of a magnetic grating encoder used for data collection during the assembly and adjustment process of a mold clamping mechanism of an injection molding machine according to an embodiment of the present invention.
[0065] Figure 4 Schematic diagram of the network structure of the clamping mechanism tie rod strain prediction model of CNN-GRU based on the attention mechanism described in an embodiment of the present invention.
[0066] Figure 5 This is a graph of strain prediction results of the first tie rod of the clamping mechanism obtained by the clamping mechanism tie rod strain prediction model of CNN-GRU based on the attention mechanism described in an embodiment of the present invention.
[0067] Figure 6 This is a graph of strain prediction results of the second tie rod of the clamping mechanism obtained by the clamping mechanism tie rod strain prediction model of CNN-GRU based on the attention mechanism described in an embodiment of the present invention.
[0068] Figure 7 This is a graph of strain prediction results of the third tie rod of the clamping mechanism obtained by the clamping mechanism tie rod strain prediction model of CNN-GRU based on the attention mechanism described in an embodiment of the present invention.
[0069] Figure 8 This is a graph of strain prediction results of the fourth tie rod of the clamping mechanism obtained by the clamping mechanism tie rod strain prediction model of CNN-GRU based on the attention mechanism described in an embodiment of the present invention.
[0070] Figure 2 and Figure 3 Among them, 1. fixed template, 2. movable template, 3. rear template, 4. tie rod, 5. tie rod nut, 6. elbow, 7. hydraulic cylinder, 8. strain sensor, 9. magnetic encoder. DETAILED DESCRIPTION
[0071] In order to facilitate those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with 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 CNN-GRU mold tie rod strain prediction method based on an attention mechanism, comprising the following steps:
[0073] S1. Collect the installation and adjustment process data of the mold clamping mechanism of the injection molding machine and build a historical database;
[0074] S2, preprocessing the clamping mechanism installation and adjustment process data obtained in step S1, constructing a sample data set using the preprocessed clamping mechanism installation and adjustment process data, and dividing the sample data set into a training set and a test set;
[0075] S3. Use the CNN-GRU network structure combined with the SE attention mechanism to build a multi-input and multi-output clamping mechanism tie rod strain prediction model, determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, and use the training set to train the clamping mechanism tie rod strain prediction model;
[0076] S4, using the test set to predict the clamping mechanism assembly process through the trained clamping mechanism tie rod strain prediction model, denormalizing the prediction results to obtain the adjusted tie rod strain prediction value, and evaluating the final prediction results through evaluation indicators;
[0077] S5. Deploy the trained clamping mechanism tie rod strain prediction model to the actual production site. When performing mold clamping adjustment, input the real-time collected data into the clamping mechanism tie rod strain prediction model. The clamping mechanism tie rod strain prediction model outputs the predicted value of the tie rod strain after the current adjustment operation.
[0078] In order to better understand the above technical solution, the exemplary embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. These are only exemplary embodiments of the present invention. However, it should be understood that the present invention can also be implemented in various forms and is not limited to the embodiments described herein. These embodiments are intended to enable those skilled in the art to understand the present invention more clearly and thoroughly.
[0079] The present embodiment describes a CNN-GRU mold tie rod strain prediction method based on the attention mechanism, such as Figure 1 As shown, the steps include:
[0080] S1. Collect the injection molding machine clamping mechanism installation and adjustment process data and build a historical database.
[0081] Specifically, Figure 2 As shown, the mold clamping mechanism of the injection molding machine includes at least a fixed mold plate 1, a movable mold plate 2, a rear mold plate 3, four tie rods 4, a tie rod nut 5 correspondingly arranged on each tie rod, a toggle rod 6 and a hydraulic system, wherein the hydraulic system includes at least a hydraulic cylinder 7.
[0082] In this embodiment, the clamping mechanism adjustment process data includes: the current moment strain values of the four tie rods during the adjustment process, the corresponding tie rod nut rotation angles during the adjustment process, and the tie rod strain values after the adjustment.
[0083] The data collected in this embodiment comes from the assembly workshop production line of a certain injection molding machine manufacturing company, and a total of 92 sets of original adjustment data are obtained. Specifically, the adjustment process data of the injection molding machine clamping mechanism are collected, such as Figure 2 and Figure 3 As shown, specifically including:
[0084] 1) Determine the data variables that need to be collected, including the strain value of the tie rod of the clamping mechanism and the corresponding rotation angle of the tie rod nut. These variables directly affect the stress state and strain distribution of the clamping mechanism and are the basic data for subsequent prediction of the tie rod strain value.
[0085] 2) According to the data collection requirements for installation and adjustment and the structural characteristics of the mold clamping mechanism, a data collection device is selected and arranged. Two strain sensors 8 are symmetrically installed on each tie rod 4 near the fixed mold plate 1 to collect the strain value of the tie rod during mold clamping loading, and 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 installation and adjustment process. Preferably, the two strain sensors 8 are symmetrically installed on the tie rod 4 at a distance of 1.5 times the tie rod diameter on one side of the fixed mold plate 1. This position is a uniform strain area of the tie rod, which can more accurately reflect the strain of the tie rod during mold clamping loading, so the measurement result at this position is more accurate; the magnetic grating encoder 9 is selected according to the outer diameter of the tie rod nut 5. In this embodiment, a circular magnetic grating encoder is selected.
[0086] 3) Before the clamping mechanism is installed and adjusted, the strain sensor 8 and the magnetic grating encoder 9 are installed and calibrated to ensure the accuracy of the collected data. During the clamping mechanism installation and adjustment, the data collected by all sensors are synchronously collected, stored and preprocessed by the data acquisition and processing module 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) Constructing a historical database for storing the original data of the clamping mechanism installation and adjustment process and the preprocessed clamping mechanism installation and adjustment process data. The historical database is used to record the detailed data of each clamping mechanism installation and adjustment process to facilitate subsequent data query, analysis and clamping mechanism tie rod strain prediction model training. The detailed data of each clamping mechanism installation and adjustment process at least includes the clamping mechanism model, tie rod strain value, tie rod nut rotation angle and equipment status, wherein the equipment includes all sensors for collecting data and other auxiliary tools and test benches used in the installation and adjustment process.
[0088] S2. Preprocess the mold clamping mechanism installation and adjustment process data obtained in step S1, construct a sample data set using the preprocessed mold clamping mechanism installation 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) The clamping mechanism adjustment process data obtained in step S1 is screened, and the isolation forest algorithm is used to identify and delete outliers. The data features are randomly selected and segmented through an unsupervised anomaly detection method based on random segmentation, and possible anomalies are gradually separated. Identify and isolate data points that do not conform to the normal pattern, delete the abnormal data to ensure that the selected data samples are adjustment data under normal conditions. Specifically, after the abnormal data is automatically screened out using the isolation forest algorithm, the data marked as abnormal is further reviewed to ensure that the eliminated data does not conform to the regular debugging mode, and the existing abnormal data is deleted to ensure that the selected data samples are clamping debugging data under normal conditions to the greatest extent possible, and to ensure the accuracy and representativeness of the data.
[0091] 2) Normalize the filtered normal sample data and normalize the input data and output data to between 0 and 1. Normalize the filtered normal sample data, including:
[0092] The min-max normalization method is used to perform linear transformation on the sample data and calculate the minimum value of the data. and maximum value , according to the normalization formula, the sample data is scaled to the target interval [0, 1] to facilitate 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 to facilitate the subsequent updating, verification and optimization of the clamping mechanism tie rod strain prediction model.
[0096] 4) The sample data set of the historical database is randomly divided into a training set and a test set according to a preset ratio of 7:3. 70% of the data is used as the training set for parameter learning and model training of the clamping mechanism tie rod strain prediction model, and 30% of the data is used as the test set to evaluate the prediction performance of the clamping mechanism tie rod strain prediction model.
[0097] Specifically, in this embodiment, after the 92 sets of original clamping mechanism adjustment data are obtained and the identified outliers are deleted through the above-mentioned preprocessing process, the remaining 88 sets of sample data construct a sample data set, and 62 sets of data are used as training sets for the training of the clamping mechanism tie rod strain prediction model, and 26 sets of data are used as verification sets for the verification of the clamping mechanism tie rod strain prediction model.
[0098] S3. Use the CNN-GRU network structure combined with the SE attention mechanism to construct a multi-input and multi-output clamping mechanism tie rod strain prediction model, determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, and use the training set to train the clamping mechanism tie rod strain prediction model.
[0099] In this embodiment, a multi-input and multi-output clamping mechanism tie rod strain prediction model is constructed by using a CNN-GRU network structure combined with an SE attention mechanism to determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, specifically including:
[0100] 1) Determine the input variables and output variables of the clamping mechanism tie rod strain prediction model: take the current tie rod strain value of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angle during the adjustment process as eight variables as input variables, and take the four tie rod strain values after adjustment as output variables.
[0101] 2) 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 integrate the SE attention mechanism to construct a clamping mechanism tie rod strain prediction model, such as Figure 4 As shown, the network structure of the clamping mechanism tie rod strain prediction model includes an input layer, a CNN layer, a SE attention mechanism layer, a GRU layer and an output layer in sequence.
[0102] 3) Determine the number of network layers, the number of units per 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.
[0103] Furthermore, the input layer is used to use the original mold clamping mechanism installation process data as the input of the mold clamping mechanism tie rod strain prediction model. Specifically, the original mold clamping mechanism installation process data is input into the mold clamping mechanism tie rod strain prediction model after preprocessing, which helps to improve the training effect and prediction accuracy of the model.
[0104] The CNN layer includes convolution operations and activation functions, which are used to perform convolution processing on the input clamping mechanism adjustment process data, extract the local features and spatial features of the input data, and pass 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 represents the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the j-th convolution kernel weight matrix, 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, which are used to evaluate the weights of CNN convolutional features, adjust the feature channel weights through compression and excitation operations, and use the weight coefficients to perform weighted averaging on the features of each channel, selectively enhancing the focus on key features and suppressing 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 transmit the information input at the previous moment using a gating mechanism. 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. The reset gate is used to control whether the candidate hidden state depends on the state at the previous moment and store short-term changes in the data. The output is predicted by establishing a mapping relationship between the input variable 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 represent the update gate and reset gate respectively, Indicates 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, Indicates the current input value. represents the output value of the previous moment, 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 prediction result of the clamping mechanism tie rod strain through the fully connected layer.
[0115] Specifically, in the present embodiment, in the clamping mechanism tie rod strain prediction model based on SE attention mechanism and CNN-GRU, the CNN layer includes two one-dimensional convolution layers, and the number of convolution kernels of the two layers are 32 and 64 respectively, and 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, and the ReLU activation function and the Sigmoid activation function are used as the activation function of each layer respectively; a single-layer GRU structure is built, and the GRU layer selects 50 units for feature learning; 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 clamping mechanism assembly process through the trained clamping mechanism tie rod strain prediction model, denormalize the prediction results to obtain the adjusted tie rod strain prediction value, and evaluate the final prediction results through evaluation indicators.
[0117] In this embodiment, the evaluation indicators include root mean square error RMSE, mean absolute error MAE and determination coefficient ;Evaluation indicators RMSE, MAE, The calculation formulas are as follows:
[0118] (7)
[0119] (8)
[0120] (9)
[0121] In formulas (7)-(9), n represents the total number of samples. represents the true value of the sample's rod strain, represents the predicted value of the sample's rod strain, It represents the average value of the true value of the sample rod strain.
[0122] It is used to evaluate the explanatory power of the clamping mechanism tie rod strain prediction model. The closer the value is to 1, the better the fitting effect of the clamping mechanism tie rod strain prediction model is. and It reflects the deviation between the predicted value and the true value obtained by the clamping mechanism tie rod strain prediction model. and The smaller the value, the higher the prediction accuracy.
[0123] In this embodiment, the obtained clamping mechanism assembly process data is used for verification, 70% of the 88 data sets, i.e. 62 data sets, are used as training sets to train the clamping mechanism tie rod strain prediction model, and 30% of the data sets, i.e. 26 data sets, are used as test sets and input into the clamping mechanism tie rod strain prediction model described in this embodiment. The prediction results are shown in Figure 2. Figure 5-Figure 8 As shown, Figure 5 , Figure 6 , Figure 7 , Figure 8 They represent the prediction result graphs of all samples of the first pull rod, the second pull rod, the third pull rod, and the fourth pull rod in the multi-output results of the model, respectively. Figure 5-Figure 8 The horizontal axis represents the true value of the tie rod strain, and the vertical axis 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 clamping mechanism tie rod strain prediction model based on the CNN-GRU SE attention mechanism proposed in this embodiment has a higher prediction accuracy. In order to more intuitively compare the prediction accuracy of each model, the root mean square error (RMSE), mean absolute error (MAE) and determination coefficient ( ) evaluation indicators are used to quantitatively analyze the prediction results, and the results are shown in Table 1.
[0124] Table 1 Comparison of evaluation indicators of different prediction models
[0125]
[0126] From the comparison results of the evaluation indicators in Table 1, it can be seen that compared with the CNN-LSTM model based on the SE attention mechanism, the CNN-GRU model based on the SE attention mechanism proposed in this embodiment has better evaluation indicator results and has higher As well as lower RMSE and MAE. It can be seen that the CNN-GRU model based on SE attention mechanism has better prediction performance than the CNN-LSTM prediction model based on SE attention mechanism.
[0127] S5. Deploy the trained clamping mechanism tie rod strain prediction model to the actual production site. When performing mold clamping adjustment, input the real-time collected data into the clamping mechanism tie rod strain prediction model. The clamping 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 clamping mechanism tie rod strain prediction model into the actual production line assembly and adjustment system;
[0130] During the mold clamping mechanism adjustment operation, the sensors configured at the actual production site are used to collect the tie rod strain values of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angles during the adjustment process in real time. The collected data are used as the input variables of the mold clamping mechanism tie rod strain prediction model. The calculation is performed according to the parameters of the trained mold clamping mechanism tie rod strain prediction model to output the tie rod strain prediction value under the current adjustment operation.
[0131] The clamping mechanism tie rod strain prediction model calculates and outputs the predicted strain value of the tie rod after the current adjustment operation. The output result is used as an advance estimate of the actual operation result of the adjustment, providing reference information on the force uniformity of the tie rod under the current adjustment state, providing quick feedback to the operator, and greatly improving the accuracy and efficiency of the clamping mechanism adjustment.
[0132] The above only describes the basic principles and preferred embodiments of the present invention. Those skilled in the art may make many changes and improvements based on the above description, and these changes and improvements should fall within the protection scope of the present invention.
Claims
1. A CNN-GRU mold tie rod strain prediction method based on attention mechanism, characterized in that: The steps include: S1. Collect the installation and adjustment process data of the mold clamping mechanism of the injection molding machine and build a historical database; S2, preprocessing the clamping mechanism installation and adjustment process data obtained in step S1, constructing a sample data set using the preprocessed clamping mechanism installation and adjustment process data, and dividing the sample data set into a training set and a test set; S3. Use the CNN-GRU network structure combined with the SE attention mechanism to build a multi-input and multi-output clamping mechanism tie rod strain prediction model, determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, and use the training set to train the clamping mechanism tie rod strain prediction model; S4, using the test set to predict the clamping mechanism assembly process through the trained clamping mechanism tie rod strain prediction model, denormalizing the prediction results to obtain the adjusted tie rod strain prediction value, and evaluating the final prediction results through evaluation indicators; S5. Deploy the trained clamping mechanism tie rod strain prediction model to the actual production site. When performing mold clamping adjustment, input the real-time collected data into the clamping mechanism tie rod strain prediction model. The clamping mechanism tie rod strain prediction model outputs the predicted value of the tie rod strain after the current adjustment operation.
2. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1 is characterized in that: In step S1, the clamping mechanism adjustment process data includes: the current moment strain values of the four tie rods during the adjustment process, the corresponding tie rod nut rotation angles during the adjustment process, and the tie rod strain values after the adjustment.
3. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1 is characterized in that: In step S1, the mold clamping mechanism of the injection molding machine includes at least a fixed mold plate, a movable mold plate, a rear mold plate, four tie rods, a tie rod nut corresponding to each tie rod, a toggle lever and a hydraulic system, and the installation and adjustment process data of the mold clamping mechanism of the injection molding machine are collected, specifically including: Determine the data variables that need to be collected, including the strain value of the tie rod of the clamping mechanism and the corresponding rotation angle of the tie rod nut; According to the data collection requirements for installation and adjustment and the structural characteristics of the mold clamping mechanism, the data acquisition device is selected and arranged. Two strain sensors are symmetrically installed on each tie rod near the fixed platen to collect the strain value of the tie rod during mold clamping loading. A magnetic encoder is installed on each tie rod nut to collect the rotation angle of the tie rod nut during installation and adjustment. Before the clamping mechanism is installed and adjusted, the strain sensors and magnetic encoders are installed and calibrated. During the clamping mechanism installation and adjustment, the data collected by all sensors are synchronously collected, stored and preprocessed through the data acquisition and processing module, where all sensors include all strain sensors and all magnetic encoders; A historical database is constructed to store the original data of the mold clamping mechanism installation process and the pre-processed mold clamping mechanism installation process data. The historical database is used to record detailed data in each mold clamping mechanism installation process, including at least the mold clamping mechanism model, tie rod strain value, tie rod nut rotation angle and equipment status.
4. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1 is characterized in that: Step S2 specifically includes: The clamping mechanism assembly process data obtained in step S1 is screened, and the isolation forest algorithm is used to identify and delete outliers. The data features are randomly selected and segmented through an unsupervised anomaly detection method based on random segmentation, and outliers are gradually separated. The data points that do not conform to the normal pattern are identified and isolated, and the abnormal data are deleted to ensure that the selected data samples are assembly 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; The sample data set of the historical database is randomly divided into a training set and a test set according to a preset ratio, wherein the number of training sets is greater than the number of test sets.
5. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 4 is characterized in that: In step S2, the normal sample data after screening is normalized, which specifically includes: The min-max normalization method is used to perform linear transformation on the sample data and calculate the minimum value of the data. and maximum value , according to the normalization formula, the sample data is scaled to the target interval [0, 1]; the normalization formula is 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.
6. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1 is characterized in that: In step S3, a multi-input and multi-output clamping mechanism tie rod strain prediction model is constructed by using a CNN-GRU network structure combined with a SE attention mechanism to determine the input, output and network parameters of the clamping mechanism tie rod strain prediction model, specifically including: Determine the input variables and output variables of the clamping mechanism tie rod strain prediction model: take the current tie rod strain values of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angles during the adjustment process as eight variables as input variables, and take the four tie rod strain values after adjustment as output variables; 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 integrate the SE attention mechanism to construct a clamping mechanism tie rod strain prediction model, wherein the network structure of the clamping mechanism tie rod strain prediction model sequentially includes an input layer, a CNN layer, a SE attention mechanism layer, a GRU layer and an output layer; The number of network layers, the number of units per layer, the number of iterations and the learning rate of the clamping mechanism tie rod strain prediction model were determined, and the Adam optimizer was used to update the network parameters.
7. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 6 is characterized in that: The input layer is used to use the original clamping mechanism installation and adjustment process data as the input of the clamping mechanism tie rod strain prediction model, specifically, the original clamping mechanism installation and adjustment process data is input into the clamping mechanism tie rod strain prediction model after preprocessing; The CNN layer includes convolution operations and activation functions, which are used to perform convolution processing on the input clamping mechanism adjustment process data, extract the local features and spatial features of the input data, and pass 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 represents the input data, f represents the activation function, and the activation function is the ReLU activation function. represents the j-th convolution kernel weight matrix, 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, which are used to evaluate the weights of CNN convolutional features, adjust the feature channel weights through compression and excitation operations, and use the weight coefficients to perform weighted averaging on the features of each channel, selectively enhancing the focus on key features and suppressing 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 using a gating mechanism. 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. The reset gate is used to control whether the candidate hidden state depends on the state at the previous moment and store short-term changes in the data. The output is predicted by establishing a mapping relationship between the input variable 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 reset gate respectively, Indicates 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, Indicates the current input value. represents the output value of 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 input and output the prediction result of the clamping mechanism tie rod strain through the fully connected layer.
8. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1 is characterized in that: In step S4, the evaluation indicators include root mean square error RMSE, mean absolute error MAE and determination coefficient ; Evaluation indicators 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 sample's rod strain, represents the predicted value of the sample's rod strain, It represents the average value of the true value of the sample rod strain.
9. The CNN-GRU mold tie rod strain prediction method based on the attention mechanism according to claim 1, characterized in that: Step S5 specifically includes: Integrate the trained and optimized clamping mechanism tie rod strain prediction model into the actual production line assembly and adjustment system; During the mold clamping mechanism adjustment operation, the sensors configured at the actual production site are used to collect the tie rod strain values of the four tie rods during the adjustment process and the corresponding tie rod nut rotation angles during the adjustment process in real time. The collected data are used as the input variables of the mold clamping mechanism tie rod strain prediction model. The calculation is performed according to the parameters of the trained mold clamping mechanism tie rod strain prediction model to output the tie rod strain prediction value under the current adjustment operation.
Citation Information
Patent Citations
Mould-assembling mechanism for injection molding machine and balancing and adjusting method for mould-assembling force thereof
CN102837404A
Telegraph pole production process
CN105965686A
Motor quality control method based on structural equation model and LSTM
CN116383977A
Photovoltaic output prediction method combined with channel attention mechanism and terminal
CN117039983A
Method for generating roundness prediction model for steel pipe, method for predicting roundness of steel pipe, method for controlling roundness of steel pipe, method for manufacturing steel pipe, and device for predicting roundness of steel pipe
CN117580655A