A CNC compensation adjustment system for precision injection molds
By identifying nodes with high probability of defects during the injection molding process and using machine learning models to match compensation parameters, the problem of the inability to deal with dynamic changes in the injection molding process in the existing technology is solved, and the quality stability of injection molding products is improved.
Patent Information
- Application Number
- CN202510245301.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-03-04
AI Technical Summary
The existing injection molding process performs compensation adjustment after product molding, and cannot deal with random dynamic changes in the production process in real time, resulting in quality stability problems during complex mold injection molding.
By obtaining a large number of production process data samples of injection molded products, identifying production nodes with high defect probability, and using machine learning models to quantify the relationship between defect information and compensation parameters of production time nodes, to achieve defect compensation adjustment in the entire production process.
Real-time and accurate compensation during the injection molding process is achieved, and it can effectively respond to random dynamic changes in the production process and improve the quality stability of injection molded products.
Smart Images

Figure CN119748797B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of intelligent manufacturing and relates to a numerical control compensation adjustment system for a precision injection mold. Background Art
[0002] As a key equipment in the production of plastic particle building block toys, the injection mold has a slight deviation in its precision, which may cause the building block toys to have problems such as non-compliant dimensions and mismatched splicing structures. For example, if the size error of the connection part of the building block is too large, the building blocks will be too loose or too tight when spliced, which will seriously affect the user experience of the toy; the inaccuracy of the appearance contour will also reduce the aesthetics and overall quality of the product. In order to meet market demand and improve product quality and competitiveness, toy manufacturers urgently need to improve the precision of injection molds.
[0003] At present, the injection molding process will make compensation adjustments when the molded product is completed to achieve a uniform standard. However, for plastic particle building block toy molds with complex shapes or structures, defects may occur at any time during the production process. Compensation after the product is formed often cannot produce the expected effect. It is essentially a lagging feedback control that cannot respond to random dynamic changes in the production process in real time, and it is difficult to fundamentally solve the quality stability problem in the injection molding process of complex molds. Therefore, how to break through the limitations of traditional post-compensation strategies and develop real-time and precise compensation technology suitable for the injection molding process of complex shape molds has become a key issue that needs to be urgently solved in the current injection molding process. Summary of the invention
[0004] In order to solve the above-mentioned problems existing in the prior art, the present invention provides a CNC compensation and adjustment system for precision injection molds, which aims to identify production nodes with higher defect probabilities by acquiring a large number of production process data samples of injection molded products; quantify the relationship between defect information and compensation parameters at production time nodes through a machine learning model, and realize defect compensation and adjustment throughout the production process, thereby solving the problem that the prior art cannot respond to dynamic changes that occur randomly during the production process in real time.
[0005] The purpose of the present invention can be achieved through the following technical solutions:
[0006] The present application provides a numerical control compensation and adjustment system for a precision injection mold, comprising a process monitoring module, a parameter matching module and a compensation and adjustment module, wherein the process monitoring module, the parameter matching module and the compensation and adjustment module are communicatively connected, wherein:
[0007] The process monitoring module is used to monitor defect information at key time nodes in an injection molding cycle; the key time nodes are time nodes at which the probability of defect information appearing during the injection molding process is higher than a preset threshold;
[0008] The parameter matching module is used to match the compensation parameters of the injection mold according to the defect information;
[0009] The compensation adjustment module is used to compensate and adjust the defect information according to the compensation parameters to obtain the target molding die.
[0010] Furthermore, the key time node is determined by the following steps:
[0011] S1, randomly batch-acquire mold injection molding datasets in historical periods;
[0012] S2. Analyze the defect probability distribution of defect information over time during the injection molding cycle;
[0013] S3. Set a defect probability threshold, obtain the time node in the injection molding cycle that is higher than the defect probability threshold, and record it as the key time node.
[0014] Furthermore, the defect probability is calculated as follows:
[0015] ,
[0016] In the formula, P t Indicates the probability of defect information appearing at a certain time point in the data set; T t Indicates the number of times defect information appears at a certain time node in the data set; T sum Represents the total number of samples in the dataset.
[0017] Furthermore, the defect information includes defect location, defect type and defect degree, wherein: the defect location is determined by comparing the real-time image of the mold during the injection molding process with the standard image of the mold; the defect types include warping, bubbles and vacuum holes, weld lines, burns, overflow, short shots, silver streaks, poor surface gloss, delamination, uneven color and black spots; the defect degree is used to indicate the range or size of the defect type in the injection mold.
[0018] Furthermore, the compensation parameters include temperature compensation parameters, pressure compensation parameters, time compensation parameters, speed compensation parameters and position compensation parameters.
[0019] Furthermore, matching the compensation parameters of the injection mold according to the defect information comprises the following steps:
[0020] Batch obtain working data samples including defect information and compensation parameters of key time nodes in the historical period;
[0021] The artificial intelligence model is trained with defect information as input and compensation parameters as target output;
[0022] When defect information appears, the defect information is input into the artificial intelligence model and the corresponding compensation parameters are output.
[0023] Furthermore, the artificial intelligence model includes a random forest model, a BP artificial neural network model and a convolutional neural network model. The random forest model is used to determine the optimal combination of compensation parameters; the BP artificial neural network model is used to quantify the relationship between the optimal combination of compensation parameters and defect parameters; the convolutional neural network model is used to detect the compensation of defect information during the injection molding process frame by frame with reference to the standard image of the mold.
[0024] Furthermore, the random forest model includes the following construction steps:
[0025] Data preprocessing: For the data related to defect information and compensation parameters in the injection molding process, the data must first be cleaned to remove duplicate and erroneous data records. Then the data is standardized or normalized to unify the numerical ranges of different features;
[0026] Feature selection: Through correlation analysis and other means, the key features closely related to the compensation parameters of the injection mold are screened out. Redundant features that have little impact on the compensation parameters or are irrelevant are eliminated to reduce the data dimension;
[0027] Sample division: The preprocessed data is divided into training set and test set according to a certain ratio. The training set is used in the learning process of the model, allowing the model to explore the potential connection between defect information and compensation parameters from these data. The test set is used to evaluate the performance of the model and test the generalization ability of the model on unseen data to ensure the reliability of the model in practical applications.
[0028] Constructing a decision tree: Random sampling with replacement is used for the training set to construct multiple Bootstrap sample subsets. For each subset, the Gini coefficient is used as the evaluation criterion, and the optimal attributes are recursively selected from the root node to divide the samples, and the decision tree is gradually constructed. During the construction process, the complexity of the decision tree is reasonably controlled by setting hyperparameters such as the maximum depth of the tree and the minimum number of sample splits, effectively preventing the occurrence of overfitting.
[0029] Ensemble decision tree: Integrate many decision trees into a random forest. When making predictions, if it is a regression task, the average method is usually used to combine the prediction results of each decision tree for the compensation parameter to obtain the final prediction value; if it is a classification task, the voting method is used to determine the category or range of the compensation parameter based on the voting results of the majority of decision trees, so as to improve the stability and accuracy of the model prediction.
[0030] Model evaluation: Use the test set to conduct a comprehensive evaluation of the random forest model and calculate key indicators such as mean square error and accuracy. These indicators can be used to determine whether the model has overfitting or underfitting problems, and to deeply analyze the specific performance of the model in predicting different defect types and compensation parameter combinations, providing a clear direction for model optimization.
[0031] Optimization and determination of the best combination: Based on the evaluation results, the model's hyperparameters are adjusted and optimized in a targeted manner. The training and evaluation operations are repeated until the model performance reaches the optimal state. At this time, new defect information is input, and the compensation parameter combination output by the model is the best combination for the defect, which can be used to guide the actual adjustment of the injection mold.
[0032] Furthermore, the BP artificial neural network includes the following construction steps:
[0033] Determine the network structure: first determine the number of input layer neurons based on the characteristics of the defect information; the number of hidden layers is obtained through repeated experiments, and the number is between the input and output layers; the number of output layer neurons is the number obtained by the compensation parameter;
[0034] Initialize weights and thresholds: Assign initial values to the connection weights between neurons in the neural network and the threshold of each neuron, and set them randomly within a small numerical range;
[0035] Forward propagation: The defect information data monitored during the injection molding process is input into the input layer. The neurons multiply and accumulate the signal from the previous layer with the corresponding weight. After the sum is obtained, it is subjected to nonlinear changes through the activation function to obtain the output; finally, the predicted compensation parameter value is obtained in the output layer.
[0036] Calculate the error: Compare the compensation parameter value predicted by the output layer with the compensation parameter value actually used to process the defect, and obtain the error between the two;
[0037] Backward propagation: Starting from the output layer, the error is propagated backward layer by layer in the opposite direction of the forward propagation. In this process, the influence of each weight and threshold on the error is calculated, and then the weight and threshold are adjusted in the direction of reducing the error;
[0038] Iterative training: Repeat the process of forward propagation, error calculation and back propagation, and adjust the weights and thresholds according to the newly calculated errors each time, so that the compensation parameter values predicted by the network are closer to the actual required values. Continue training until the preset number of training times is reached, or the error is small enough to be acceptable, or the error does not decrease significantly after multiple trainings, at which point the network training meets the standards;
[0039] Model evaluation: Use data that has not participated in training to test the trained BP neural network, input the defect information in the test data into the network to obtain the predicted compensation parameters, and then compare them with the actual compensation parameters. Use indicators such as accuracy and error size to measure the performance of the model. If the performance is poor, adjust the network structure or training parameters, retrain and evaluate until the model can accurately match the compensation parameters for the new defect information.
[0040] Furthermore, the convolutional neural network includes the following construction steps:
[0041] Data preparation: A large number of mold images are collected from multiple angles at the injection molding site, covering both normal and defective conditions, and standard mold images are obtained for comparison. The specific location and type of defects in each image are carefully marked manually. The images are then preprocessed to unify the resolution, grayscale, and normalize the pixel values, so that the image data meets the model training requirements and provides high-quality data support for subsequent model learning.
[0042] Constructing the network architecture: First, determine the input layer to adapt to the size of the preprocessed image. Then stack multiple convolutional layers, each equipped with convolution kernels of different sizes, numbers, and steps to extract image features. Intersperse pooling layers between convolutional layers to reduce the amount of data by downsampling and retain key features. Then expand the feature map and connect it to the fully connected layer to fully integrate the features. Finally, according to the task requirements of defect detection and compensation effect, design the output layer to output the corresponding information.
[0043] Model training: Choose a loss function based on the task, such as cross entropy for classification and mean square error for regression. Then choose an optimization algorithm (such as Adam) to update the model parameters. Divide the labeled data into training set, validation set and test set. During training, forward propagate the training set data to calculate the prediction results, compare the real labels to calculate the loss value, then back propagate to calculate the gradient, and use the optimization algorithm to update the parameters. Use the validation set to evaluate during training and adjust the hyperparameters based on the results.
[0044] Model evaluation: Use the test set to test the trained convolutional neural network, input the test image to get the model prediction. Evaluate according to indicators such as task selection accuracy, recall rate, mean square error, etc. to determine whether the model can meet the actual use requirements. If not, adjust the model structure and parameters, and retrain and evaluate.
[0045] Beneficial effects of the present invention:
[0046] By monitoring the defect information at key time nodes in an injection molding cycle; the key time nodes are time nodes where the probability of defect information appearing during the injection molding process is higher than a preset threshold; matching the compensation parameters of the injection mold according to the defect information; and compensating and adjusting the defect information according to the compensation parameters to obtain the target molding mold. The present invention solves the problem that the prior art cannot cope with the dynamic changes that randomly occur during the production process in real time by performing compensation after the product is molded. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0048] Figure 1 The figure is a structural diagram of a numerical control compensation and adjustment system for a precision injection mold in the present invention.
[0049] Figure 2 This is a step for determining a key time node in an embodiment of the present invention.
[0050] Figure 3 This is a step of matching compensation parameters of an injection mold according to defect information in one embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation mode, structure, characteristics and effects of the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0052] See also Figure 1-Figure 3 The present application provides a CNC compensation and adjustment system for a precision injection mold, including a process monitoring module, a parameter matching module and a compensation and adjustment module, wherein the process monitoring module, the parameter matching module and the compensation and adjustment module are communicatively connected, wherein:
[0053] The process monitoring module is used to monitor defect information at key time nodes in an injection molding cycle; the key time nodes are time nodes at which the probability of defect information appearing during the injection molding process is higher than a preset threshold;
[0054] Furthermore, the defect information includes defect location, defect type and defect degree, wherein: the defect location is determined by comparing the real-time image of the mold during the injection molding process with the standard image of the mold; the defect types include warping, bubbles and vacuum holes, weld lines, burns, overflow, short shots, silver streaks, poor surface gloss, delamination, uneven color and black spots; the defect degree is used to indicate the range or size of the defect type in the injection mold.
[0055] In this embodiment, the defect location is determined by comparing the real-time image of the mold during the injection molding process with the standard image of the mold. This method utilizes image recognition technology. At the injection molding site, high-speed cameras and other equipment collect image information of the mold in real time. These images cover the overall appearance and key parts of the mold. At the same time, the system pre-stores a standard image of the mold, which represents what the mold should look like under ideal conditions. When the real-time image is compared with the standard image, any area with a difference may indicate the location of the defect. For example, if the real-time image shows that a side wall of the mold has a contour change that is inconsistent with the standard image, it can be preliminarily determined that there is a defect at that location. This positioning method based on image comparison can accurately point out the specific coordinates of the defect on the mold, providing an accurate position basis for subsequent targeted compensation adjustments.
[0056] Defect types include a variety of common injection molding defects, such as warping, which is usually caused by uneven shrinkage of the injection molded parts during the cooling process, which is manifested as a change in the flatness of the product, affecting its appearance and performance; bubbles and vacuum holes are because the gas cannot be effectively discharged during the injection molding process, and remains inside the plastic product, forming bubbles or vacuum holes, which reduce the strength and aesthetics of the product; weld lines are traces left when the plastic melt fails to fully merge when it is reunited after diversion, which may weaken the mechanical properties of the product; burns are caused by excessive local temperature during the injection molding process, causing the plastic to carbonize; flash refers to the plastic melt overflowing the mold cavity, causing excess plastic burrs around the product; short shots indicate that the plastic melt fails to completely fill the mold cavity, resulting in an incomplete product; silver streaks are fine silver streaks on the surface of plastic products, affecting the appearance quality of the product; poor surface gloss causes the product surface to lose its proper gloss; stratification is the layered separation phenomenon inside the plastic product; uneven color is manifested as inconsistent colors in different parts of the product; black spots are small black spots formed on the surface of the product due to plastic raw material contamination or local overheating and carbonization. Accurately identifying these defect types is critical to determining appropriate compensation parameters, as different types of defects often require different solutions.
[0057] The degree of defect is used to quantify the range or size of the defect type in the injection mold. For example, for warpage, the degree of defect can be reflected by measuring the maximum deviation between the deformed part and the ideal plane; for bubbles and vacuum holes, it can be measured by calculating the volume ratio or diameter size inside the product; the degree of defect of the weld line can be evaluated by the length and depth of the weld line and the degree of influence on the strength of the product. Understanding the degree of defect helps to accurately determine the strength and range of compensation adjustment. If the degree of defect is minor, it may only require fine-tuning of the injection molding parameters to solve it; for severe defects, it may be necessary to make larger adjustments to the mold structure or injection molding process.
[0058] Furthermore, the key time node is determined by the following steps:
[0059] S1. Random batch acquisition of mold injection molding data sets in historical periods:
[0060] Comprehensive data collection is the basis for subsequent analysis. In this step, a large number of injection molding data from different batches, different times, and different conditions are selected from past mold injection molding production records by random sampling. Random sampling can avoid data bias caused by specific selection, making the data set more representative and truthfully reflecting the various actual situations of mold injection molding. The collected data covers the changes in injection molding machine operating parameters such as temperature, pressure, injection speed, etc. over time; mold status information, such as mold opening and closing time, mold temperature; and corresponding product defect information, including whether defects occur, defect type, occurrence time, etc., providing rich and comprehensive data support for subsequent analysis.
[0061] S2. Analyze the defect probability distribution of defect information over time during the injection molding cycle:
[0062] After obtaining the data set, use data analysis technology to deeply explore the value of the data. Divide the injection molding cycle into multiple equally spaced time intervals in chronological order, and count the number of times each type of defect occurs in each interval. Then calculate the defect probability of the corresponding interval based on the total production in each time interval. For example, if 100 products are produced in a certain interval and 10 are defective, the defect probability of this interval is 10%. In this way, a chart showing the change of defect probability over time is drawn, which intuitively presents the distribution of defects in each time period of the injection molding cycle, helps to find out which time periods have a significantly higher probability of defects, and provides a basis for determining key time nodes.
[0063] S3. Set the defect probability threshold, obtain the time node in the injection molding cycle that is higher than the defect probability threshold, and record it as the key time node:
[0064] Based on the analysis results of historical data and the quality requirements of actual production, a defect probability threshold is set artificially. The setting of this threshold should comprehensively consider factors such as product quality standards, production efficiency, and cost. If the threshold is set too high, time points that have a low defect probability but affect product quality may be missed; if it is set too low, there will be too many critical time nodes, increasing monitoring costs and complexity. For example, if the threshold is set to 15%, then in the defect probability distribution, time nodes above 15% are identified as critical time nodes. These nodes are the moments that need to be monitored in subsequent production, which helps to achieve accurate monitoring of the injection molding process and defect prevention.
[0065] The parameter matching module is used to match the compensation parameters of the injection mold according to the defect information;
[0066] In the injection molding process, common compensation parameters usually include the following categories:
[0067] Temperature compensation parameters: such as barrel temperature compensation value, mold temperature compensation value, etc., are used to adjust the plasticizing and molding temperature of the plastic according to actual conditions to ensure the fluidity and molding quality of the plastic.
[0068] Pressure compensation parameters: injection pressure compensation value, holding pressure compensation value, back pressure compensation value, etc. These parameters can adjust the filling and compaction degree of plastic in the mold to avoid defects such as short shots and bubbles.
[0069] Time compensation parameters: injection time compensation value, holding time compensation value, cooling time compensation value, etc. Reasonable adjustment of time parameters helps to control the plastic molding process and improve the dimensional accuracy and stability of the product.
[0070] Speed compensation parameters: injection speed compensation value, screw speed compensation value, etc., can change the filling speed and plasticizing efficiency of the plastic, and affect the surface quality and internal structure of the product.
[0071] Position compensation parameters: screw position compensation value, mold opening and closing position compensation value, etc., are used to accurately control the mechanical action of the injection molding machine to ensure the closing accuracy of the mold and the injection volume of the plastic.
[0072] The compensation adjustment module is used to compensate and adjust the defect information according to the compensation parameters to obtain the target molding die.
[0073] Furthermore, the defect probability is calculated as follows:
[0074] ,
[0075] In the formula, P t Indicates the probability of defect information appearing at a certain time point in the data set; T t Indicates the number of times defect information appears at a certain time node in the data set; T sum Represents the total number of samples in the dataset.
[0076] Furthermore, matching the compensation parameters of the injection mold according to the defect information comprises the following steps:
[0077] Batch obtain the working data samples including defect information and compensation parameters of key time nodes in the historical period:
[0078] This step is to build a data foundation to provide materials for subsequent artificial intelligence model training. From historical production records, a large amount of defect information that occurred at key time nodes in injection molding production at different times and batches, as well as the compensation parameters taken at the time, are collected. The key time node is the time point mentioned above when the probability of defect occurrence is higher than the preset threshold. Through comprehensive and large-scale data collection, various possible defect situations and corresponding processing methods are covered as much as possible, so that the data samples are widely representative, laying the foundation for accurate model training.
[0079] With defect information as input and compensation parameters as target output, train the artificial intelligence model:
[0080] The AI model is trained using the collected working data samples. Defect information (such as a certain type and degree of defect at a specific location) is used as the input data of the model, and the corresponding compensation parameters are used as the desired output results. The AI model will learn the intrinsic relationship pattern between the defect information and the compensation parameters in the data sample through algorithms. For example, through multiple iterative calculations, the parameter weights within the model are adjusted so that the model can output results close to the actual effective compensation parameters when faced with similar defect information inputs. As the training progresses, the model's grasp of this relationship becomes more and more accurate, preparing for the subsequent accurate matching of compensation parameters.
[0081] When defect information appears, the defect information is input into the artificial intelligence model and the corresponding compensation parameters are output:
[0082] The trained artificial intelligence model has predictive capabilities. In the actual injection molding production process, once the process monitoring module detects defect information at key time nodes, the defect information is input into the trained artificial intelligence model. Based on the previously learned relationship between defect information and compensation parameters, the model quickly analyzes and outputs compensation parameters suitable for the defect situation. Operators can make corresponding adjustments to the injection mold based on these output compensation parameters, such as changing the injection molding temperature, pressure, etc., so as to achieve effective compensation for defects, improve the quality of injection molded products, and solve problems in actual production.
[0083] Furthermore, the artificial intelligence model includes a random forest model, a BP artificial neural network model and a convolutional neural network model. The random forest model is used to determine the optimal combination of compensation parameters; the BP artificial neural network model is used to quantify the relationship between the optimal combination of compensation parameters and defect parameters; the convolutional neural network model is used to detect the compensation of defect information during the injection molding process frame by frame with reference to the standard image of the mold.
[0084] In this embodiment, the random forest model is an integrated learning algorithm based on a decision tree, which plays a key role in determining the best combination of compensation parameters. It randomly extracts multiple sample subsets from the original data set with replacement, builds a decision tree for each subset, and finally makes predictions based on the results of all decision trees. In the application scenario of injection mold compensation parameters, the model considers various defect information (such as defect location, type, degree, etc.) and many possible compensation parameters. It analyzes a large number of historical data samples to evaluate the effects of different compensation parameter combinations on solving various defects. Through multiple random sampling and decision tree construction, the model can fully explore the compensation parameter space and find the most effective parameter combination for solving specific defects as a whole, that is, the best combination of compensation parameters. This method can effectively avoid the overfitting problem that may occur in a single decision tree and improve the reliability and stability of the results.
[0085] The BP (Back Propagation) artificial neural network model is a multi-layer feedforward neural network trained according to the error back propagation algorithm. In the injection mold compensation parameter adjustment system, it is mainly responsible for quantifying the relationship between the optimal combination of compensation parameters and defect parameters. The model consists of an input layer, a hidden layer, and an output layer. The input layer receives the optimal combination of compensation parameters and the corresponding defect parameters (such as the specific characteristic data of the defect) determined by the random forest model. Through the complex nonlinear transformation of neurons in the hidden layer, the input information is abstracted and feature extracted, and finally the quantitative result of the relationship between the two is output in the output layer. The BP neural network minimizes the error between the predicted output and the actual data by continuously adjusting the connection weights between neurons, thereby accurately depicting the intrinsic relationship between the optimal combination of compensation parameters and defect parameters. This quantitative relationship helps operators to have a deeper understanding of the causal relationship between compensation parameters and defects, and provides theoretical support for further optimization of the injection molding process.
[0086] The convolutional neural network model has a powerful ability in image processing. During the injection molding process, it uses the standard image of the mold as a reference to detect the compensation of defect information during the injection molding process frame by frame. During the injection molding production process, continuous image frames of the injection molding process are obtained through a camera installed in a suitable position. The convolutional neural network model first learns the standard image of the mold and extracts the feature information of the mold in a normal state. Then, when processing the injection molding process image frame by frame, the convolution layer, pooling layer and other operations are used to automatically extract the features in the image and compare them with the standard image features. When a defect occurs, the model can quickly locate the defect position and analyze the improvement of the defect after the compensation parameter adjustment is taken through the subsequent processing layer. For example, observe whether the size of the defect area is reduced and whether the shape returns to normal. This frame-by-frame detection method can monitor the compensation effect in real time, promptly discover possible problems in the compensation process, and provide real-time feedback for further optimization of the compensation strategy.
[0087] Furthermore, the random forest model includes the following construction steps:
[0088] The random forest model obtains the best combination of compensation parameters, which usually includes the following construction steps:
[0089] Data preprocessing: Clean the collected data containing defect information and compensation parameters to remove duplicate and erroneous data. Standardize or normalize the data to scale different features to the same scale to ensure that each feature has a balanced impact on the model and avoid some features dominating the model training due to excessively large or small values.
[0090] Feature selection: Through correlation analysis and other methods, find out the key features that are closely related to the compensation parameters, eliminate irrelevant or redundant features, reduce data dimensions, reduce model calculations, improve model training speed and accuracy, and make the model more focused on factors that have an important impact on the compensation parameters.
[0091] Sample division: The preprocessed data is divided into a training set and a test set in a certain ratio. The training set is used for model training to allow the model to learn the relationship between defect information and compensation parameters. The test set is used to evaluate model performance and test the model's generalization ability on unseen data.
[0092] Constructing a decision tree: For the training set, multiple Bootstrap sample subsets are constructed by random sampling with replacement. For each subset, the Gini coefficient is used as the basis for division, and the optimal attribute is recursively selected from the root node for sample division to construct a decision tree. The complexity of the tree is controlled by setting hyperparameters such as the maximum depth of the tree to prevent overfitting.
[0093] Ensemble decision tree: Multiple decision trees are integrated to form a random forest. When predicting, for regression tasks, the average method is generally used to combine the prediction results of each decision tree to obtain the predicted value of the compensation parameter; for classification tasks, the voting method is used to determine the category or range of the compensation parameter based on the voting results of the majority of decision trees.
[0094] Model evaluation: Use the test set to evaluate the random forest model and calculate indicators such as mean square error and accuracy. Determine whether the model is overfitting or underfitting based on the evaluation results, and analyze the model's prediction performance on different defect types and compensation parameter combinations.
[0095] Optimization and determination of the best combination: According to the evaluation results, hyperparameters such as the number of decision trees are adjusted to optimize the model. Training and evaluation are repeated until the model performance reaches the optimal level. Finally, new defect information is input, and the compensation parameter combination output by the model is the best combination for the defect.
[0096] Furthermore, the construction steps of the BP artificial neural network are as follows:
[0097] Determine the network structure: For the application of precision injection molds, the input data is defect information, which must be converted into digital form as input. The number of neurons in the input layer depends on how many digital features we convert these defect information into. For example, if the defect location is represented by two numbers, the defect type is encoded into 10 different numbers, and the degree of defect is quantified by one number, then the input layer may have 13 neurons.
[0098] The number of hidden layers and the number of neurons in each hidden layer need to be determined through continuous trial and error. Because the injection molding process is relatively complex, 2 to 3 hidden layers are generally set first. The number of neurons in the hidden layer is usually between the number of neurons in the input layer and the output layer. For example, 30 neurons are set in the first hidden layer and 20 neurons are set in the second hidden layer. This can help the network learn the complex relationship between defect information and compensation parameters. The output is the compensation parameters that need to be adjusted for the injection mold.
[0099] Initialize weights and thresholds: Set initial values for the weights of the connections between neurons in the BP neural network and the thresholds of each neuron. Generally, a random setting method is used, such as randomly selecting values within a relatively small range, such as setting the initial value between -0.1 and 0.1. This is done to allow the network to try different parameter combinations when it first starts training, to avoid falling into bad results at the beginning.
[0100] Forward propagation: The defect information data monitored during the injection molding process is input into the input layer. The data is transmitted between neurons, and each neuron multiplies the signal transmitted by the previous layer of neurons by the corresponding weight, and then adds them together to obtain a sum. This sum is then processed by an activation function, which causes the sum to undergo nonlinear changes to obtain the output of this neuron. In this way, the data is transmitted layer by layer, and finally the predicted compensation parameter value is obtained at the output layer.
[0101] Calculate the error: Compare the compensation parameter value predicted by the output layer with the compensation parameter value actually used to handle this defect to see how big the gap is. This gap is the error. By calculating this error, we can know whether the current network prediction is accurate, which provides a basis for adjusting the network in the next step.
[0102] Back propagation: Starting from the output layer, the error is propagated back layer by layer in the opposite direction of the forward propagation. In this process, the influence of each weight and threshold on the error is calculated. Then, based on this influence, the weight and threshold are adjusted in the direction of reducing the error. For example, if it is found that the error will decrease if a certain weight is increased a little, then this weight is slightly increased. In this way, the prediction results of the network are made more and more accurate.
[0103] Iterative training: Repeat the process of forward propagation, error calculation and back propagation. Each time it is repeated, the weights and thresholds are adjusted according to the newly calculated errors, so that the compensation parameter values predicted by the network are closer and closer to the actual required values. Keep training until the preset number of training times is reached, such as 5,000 training times; or the error is small enough to be acceptable to us, such as less than 0.01; or the error has not decreased significantly after several consecutive trainings, then it can be considered that the network is almost trained.
[0104] Model evaluation: Use some data that has not been trained to test the trained BP neural network. Input the defect information in these test data into the network, obtain the compensation parameters predicted by the network, and then compare them with the actual compensation parameters, and use some indicators to measure the performance of the model, such as accuracy, error size, etc. If the model does not perform well on these test data, it means that it is not universal, then it is necessary to adjust the network structure, such as changing the number of hidden layer neurons, or adjusting the training parameters, such as learning speed, and then retrain and evaluate until the model can accurately match the appropriate compensation parameters for the new defect information.
[0105] Furthermore, the convolutional neural network includes the following construction steps:
[0106] In the CNC compensation adjustment system of precision injection molds, the steps for building a convolutional neural network are as follows:
[0107] 1. Data preparation:
[0108] Collect image data: Collect a large number of mold images during the injection molding process, covering normal production and various defective situations. At the same time, obtain standard mold images as a reference for comparison. These images can be obtained by installing an industrial camera on the injection molding equipment at different stages of injection molding and at different angles.
[0109] Image annotation: Detailed annotation of the collected images, marking the location, type and other information of the defects in the image. For example, if there is a warping defect in the image, the deformed area needs to be accurately circled and marked as "warping". The annotation work provides clear guidance information for subsequent model learning.
[0110] Data preprocessing: Preprocess the images to improve image quality and unify specifications. This includes adjusting image resolution to be consistent, grayscale processing to simplify data dimensions, and using normalization methods to map image pixel values to a specific range (such as [0, 1]) to make model training more efficient and stable.
[0111] (II) Building a network architecture:
[0112] Input layer: Make sure that the input layer receives preprocessed image data, and its size matches the size of the preprocessed image. For example, if the image resolution is uniformly 224×224 pixels, the input layer receives image data of the corresponding size.
[0113] Convolutional layer: Multiple convolutional layers are stacked, each of which contains multiple convolutional kernels. The convolutional kernels extract local features in the image by sliding over the image. The size, number, and step size of the convolutional kernels of different convolutional layers can be adjusted as needed. For example, the first convolutional layer can use a 3×3 convolutional kernel with a number of 16 and a step size of 1 to capture the basic edges, textures, and other features of the image. As the network level deepens, the number of convolutional kernels is gradually increased to extract more complex features.
[0114] Pooling layer: A pooling layer is inserted between or after convolutional layers. Common pooling layers include maximum pooling or average pooling. The pooling layer reduces the amount of data and the model's computational burden by downsampling local areas while retaining the main features. For example, a maximum pooling operation with a 2×2 pooling window and a step size of 2 is used to halve the image size and retain the maximum value in each area as the representative feature.
[0115] Fully connected layer: The feature map after multiple convolution and pooling operations is expanded and connected to the fully connected layer. The neurons in the fully connected layer are connected to all neurons in the previous layer and are responsible for synthesizing the extracted features to achieve classification or regression tasks. For example, two fully connected layers are set, the first layer contains 128 neurons, and the second layer determines the number of neurons according to the output task. To predict the defect type, assuming there are 10 defect types, the second fully connected layer has 10 neurons.
[0116] Output layer: The output layer structure is determined according to the specific task. In this case, if it is used to detect the compensation of defect information, the output layer can be designed to output information related to the defect location, type, and compensation effect. For example, a vector containing the defect location coordinates, the probability distribution of the defect type, and the evaluation value of the degree of improvement of the defect after compensation is output.
[0117] 3. Model training:
[0118] Select loss function: Select an appropriate loss function based on the task type. If it is a defect classification task, the cross entropy loss function can be used to measure the difference between the model prediction result and the true label; if it involves a regression task of defect location or compensation effect, the mean square error loss function is selected to calculate the average error between the predicted value and the actual value.
[0119] Optimization algorithm: Use an optimization algorithm to adjust model parameters, such as stochastic gradient descent (SGD) and its variants Adagrad, Adadelta, Adam, etc. Taking the Adam optimization algorithm as an example, it can adaptively adjust the learning rate of each parameter, so that the model converges to the optimal solution faster during training.
[0120] Training process: The labeled image data is divided into training set, validation set and test set. During the training process, the training set image data is input into the convolutional neural network, and the prediction results are calculated through forward propagation, and the loss value is calculated by comparing with the true label. Then the back propagation algorithm is used to calculate the gradient of the loss value to the parameters of each layer, and the model parameters are updated through the optimization algorithm to gradually reduce the loss value. During the training process, the validation set is used regularly to evaluate the model performance to prevent overfitting. According to the performance on the validation set, the model hyperparameters, such as learning rate, number of network layers, etc., are adjusted.
[0121] 4. Model evaluation
[0122] Use the test set: Use the previously divided test set to evaluate the trained convolutional neural network. Input the image data in the test set into the model to obtain the model's prediction results.
[0123] Evaluation indicators: Select the corresponding evaluation indicators according to the task. For defect classification tasks, you can calculate indicators such as accuracy, recall, and F1 value to evaluate the model's ability to classify different defect types; for tasks such as defect location detection or compensation effect evaluation, you can use indicators such as mean square error and mean absolute error to measure the closeness between the model's predicted value and the actual value. Use the evaluation indicators to determine whether the model meets the actual application requirements. If not, you need to further adjust the model structure or training parameters, retrain and evaluate.
[0124] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A CNC compensation adjustment system for precision injection molds, characterized in that: It includes a process monitoring module, a parameter matching module and a compensation adjustment module, which are communicatively connected to each other, wherein: The process monitoring module is used to monitor defect information at key time nodes in an injection molding cycle; the key time nodes are time nodes at which the probability of defect information appearing during the injection molding process is higher than a preset threshold; The parameter matching module is used to match the compensation parameters of the injection mold according to the defect information; The compensation adjustment module is used to compensate and adjust the defect information according to the compensation parameters to obtain the target molding die; The method of matching the compensation parameters of the injection mold according to the defect information comprises the following steps: Batch obtain working data samples including defect information and compensation parameters of key time nodes in the historical period; The artificial intelligence model is trained with defect information as input and compensation parameters as target output; When defect information appears, the defect information is input into the artificial intelligence model and the corresponding compensation parameters are output; The artificial intelligence model includes a random forest model, a BP artificial neural network model and a convolutional neural network model. The random forest model is used to determine the optimal combination of compensation parameters; the BP artificial neural network model is used to quantify the relationship between the optimal combination of compensation parameters and defect parameters; the convolutional neural network model is used to detect the compensation of defect information during the injection molding process frame by frame with reference to the standard image of the mold.
2. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The key time node is determined by the following steps: S1, randomly batch-acquire mold injection molding datasets in historical periods; S2. Analyze the defect probability distribution of defect information over time during the injection molding cycle; S3. Set a defect probability threshold, obtain the time node in the injection molding cycle that is higher than the defect probability threshold, and record it as the key time node.
3. The CNC compensation adjustment system for a precision injection mold according to claim 2, characterized in that: The defect probability is calculated as follows: , In the formula, P t Indicates the probability of defect information appearing at a certain time point in the data set; T t Indicates the number of times defect information appears at a certain time node in the data set; T sum Represents the total number of samples in the dataset.
4. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The defect information includes defect location, defect type and defect degree, wherein: the defect location is determined by comparing the real-time image of the mold during the injection molding process with the standard image of the mold; the defect types include warping, bubbles and vacuum holes, weld lines, burns, overflow, short shots, silver streaks, poor surface gloss, delamination, uneven color and black spots; the defect degree is used to indicate the range or size of the defect type in the injection mold.
5. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The compensation parameters include temperature compensation parameters, pressure compensation parameters, time compensation parameters, speed compensation parameters and position compensation parameters.
6. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The random forest model includes the following construction steps: Data preprocessing: For the data involving defect information and compensation parameters in the injection molding process, first clean the data to remove duplicate and erroneous data records, and then standardize or normalize the data to unify the numerical ranges of different features; Feature selection: Use correlation analysis to screen key features that are significantly correlated with injection mold compensation parameters, eliminate redundant features that have little or no effect on compensation parameters, and reduce data dimensions; Sample division: Divide the preprocessed data into training set and test set according to a certain ratio; Construct a decision tree: Use random sampling with replacement for the training set to construct multiple Bootstrap sample subsets. For each subset, use the Gini coefficient as the criterion, recursively select the optimal attributes from the root node to divide the sample, and gradually construct a decision tree. Ensemble decision tree: Integrate multiple decision trees into a random forest. When making predictions, if it is a regression task, use the average method to combine the prediction results of each decision tree for the compensation parameter to obtain the final prediction value. If it is a classification task, the voting method is used to determine the category or range to which the compensation parameter belongs based on the voting results of the majority of decision trees; Model evaluation: Use the test set and evaluation indicators to evaluate the random forest model; Optimize and determine the best combination: adjust and optimize the model's hyperparameters based on the evaluation results, and repeat training and evaluation operations until the model performance reaches the optimal state; at this time, input new defect information, and the compensation parameter combination output by the model is the best combination for the defect.
7. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The BP artificial neural network includes the following construction steps: Determine the network structure: Determine the number of neurons in the input layer according to the characteristics of the defect information; the number of hidden layers is obtained through repeated experiments, and the number is between the input layer and the output layer; the number of neurons in the output layer is the number obtained by the compensation parameter; Initialize weights and thresholds: assign initial values to the connection weights between neurons in the neural network and the threshold of each neuron; Forward propagation: The defect information data monitored during the injection molding process is input into the input layer. The neuron multiplies and accumulates the signal from the previous layer with the corresponding weight. After the sum is obtained, it undergoes nonlinear changes through the activation function, and finally the predicted compensation parameter value is obtained in the output layer. Calculate the error: Compare the compensation parameter value predicted by the output layer with the compensation parameter value actually used to process the defect, and obtain the error between the two; Back propagation: Starting from the output layer, the error is propagated backward layer by layer in the opposite direction of the forward propagation. In this process, the influence of each weight and threshold on the error is calculated, and then the weight and threshold are adjusted in the direction of reducing the error; Iterative training: Repeat the process of forward propagation, error calculation and back propagation, and adjust the weights and thresholds according to the newly calculated error each time, so that the compensation parameter value predicted by the network is close to the actual required value; until the training reaches the preset number of training times or error range; Model evaluation: Use data that has not participated in training to test the trained BP neural network, input the defect information in the test data into the network to obtain the predicted compensation parameters, and then compare them with the actual compensation parameters until the model can accurately match the compensation parameters for the new defect information.
8. The CNC compensation adjustment system for a precision injection mold according to claim 1, characterized in that: The convolutional neural network includes the following construction steps: Data preparation: Collect a large number of mold images from multiple angles at the injection molding site, including normal and defective images, and obtain standard mold images for comparison; Manually mark the defect information in each image; then pre-process the image, unify the resolution and grayscale, and then normalize the pixel value; Construct the network architecture: first determine the input layer to adapt to the preprocessed image size, then stack multiple convolutional layers, each layer is equipped with convolution kernels of different sizes, numbers and steps to extract image features; insert pooling layers between convolutional layers, reduce the amount of data by downsampling, and retain key features; expand the feature map to connect the fully connected layer to fully integrate the features; according to the task requirements of defect detection and compensation effect, design the output layer to output the corresponding information; Model training: Select the loss function according to the task to update the model parameters, divide the labeled data into training set, validation set and test set, and use the training set data to forward propagate the prediction results, compare the real labels to calculate the loss value, and then back propagate the gradient to update the parameters with the optimization algorithm; Use the validation set to evaluate during training and adjust hyperparameters based on the results; Model evaluation: Use the test set to test the trained convolutional neural network, input the test image to get the model prediction; select the indicators according to the task to evaluate whether the model can meet the actual use requirements. If not, adjust the model structure and parameters, and retrain and evaluate.
Citation Information
Patent Citations
Injection molding system and injection molding method
EP3632650A1
Adjusting manufacturing parameters based on inspection
WO2021221621A1