Optimization of Injection-Molding Process Parameters for Weight Control: Converting Optimization Problem to Classification Problem

1 e State Key Laboratory of Fluid Power and Mechatronic Systems, College of Mechanical Engineering, Zhejiang University, Hangzhou 310027, China Key Laboratory of 3D Printing Process and Equipment of Zhejiang Province, College of Mechanical Engineering, Zhejiang University, Hangzhou 310027, China Jiangsu Jianghuai Magnetic Industry Co., Ltd., Xuyi 211700, China College of Mechanical Engineering, Zhejiang University of Technology, Hangzhou 310014, China Tederic Machinery Co., Ltd., Hangzhou 311224, China


Introduction
Injection molding is regarded as the most important method for mass-producing plastic parts [1][2][3][4], and it is complicated because of steep thermal gradients and complex flow geometries; many studies have been conducted in this field [5][6][7][8][9][10]. e product weight of a plastic part is considered one of the most significant properties, especially for plastic parts with high precision requirements, such as plastic lenses. e product weight can reflect other quality properties such as impact strength. [11]. Weight control is also of great commercial interest for manufacturers, as it reduces the cost of materials in mass production [12]. erefore, the weight control of products is a critical issue in injection molding.
For a specific material and product, process parameters are the most important factors affecting product weight, and many studies have been conducted to explore the relationship between process parameters and product weights. Hassan [13] determined that product weight has a positive correlation with packing pressure. López et al. [14] applied the design of experiments (DOE) method to explore the influence of parameters on products with different geometries. Yang and Gao [11] found that the settings for packing pressure, barrel temperature, and mold temperature have the most significant effects on the product weight. Hence, it is of vital importance to select optimal process parameters before the part is molded. However, the procedure for selecting optimal process parameters remains challenging. Most parameters are coupled with each other, and it is therefore difficult to construct an accurate mathematical model. e traditional parameter optimization method is an inefficient trial-and-error process based on personal experience, and it is not suitable for complex plastic parts [15].
Because of these challenges, researchers have conducted many studies to explore the approaches to take in order to optimize injection-molding parameters. e design of experiments (DOE), such as the Taguchi method, is applied to improve the quality of manufactured goods by analyzing the signal-to-noise (S/N) ratio and the analysis of variance (ANOVA) [16][17][18][19][20][21]. e Taguchi method is unsuitable for the problem in this study because process parameters are continuous. us, the Taguchi method is unable to assist technologists in obtaining optimal process parameters [22]. e DOE approach also requires that technologists understand both statistics and the injection-molding process in experiment planning [23]. Because of the shortcomings of the DOE method, researchers have proposed new optimization methods by applying surrogate models, such as the artificial neural network (ANN) [24], and iterative methods, such as the genetic algorithm (GA) [25,26]. Xu et al. [27] developed a backpropagation neural network model combined with particle swarm optimization (PSO) to map the complex nonlinear relationship between process parameters and the mechanical performance of the product. Chen et al. [28] applied a backpropagation neural network, genetic algorithms, and engineering optimization concepts to achieve competitive advantages in both quality and cost. However, defining the structure of a neural network is a time-consuming procedure due to the lack of uniform structure. Technologists need to determine the number of layers and nodes in the network, as well as the connection relations between nodes. In addition, to guarantee accuracy, ANN usually requires a large number of experiment samples, which is difficult to acquire in practice.
In this study, the optimization objective is to generate process parameters for the molding of optimal products of a standard weight. Because the weight of the molded product has an either positive or negative error, the optimization problem can be converted into a classification problem. e support vector machine (SVM) method is now widely applied in classification problems, such as separating defective and nondefective products. Yu [29] applied the SVM and DOE methods for predicting process windows to ensure robust, high-quality injection moldings. Gao [30] proposed a method using SVM to optimize process parameters that could provide more stable product quality than traditional methods. Shin et al. [31] pointed out that SVM generally has better accuracy than ANN as the data size decreases. Due to the advantages of SVM, this study proposes a classifier model using the support vector machine method, called the support vector classifier (SVC), to construct a hyperplane which separates products that are heavier or lighter than the standard weight. Optimal process parameters are presumed to be located on the hyperplane constructed by the SVC model. Having established an SVC model, a particle swarm optimization (PSO) algorithm is applied to improve the SVC model by tuning hyperparameters in order to minimize the error between the experimental result and the SVC prediction value. e outline of this paper is as follows: Section 2 introduces the implementation procedure of the proposed optimization method and its key algorithms. In Sections 3 and 4, a case of plastic lenses is carried out to verify the presented algorithm. e conclusions are provided in the last section.

Method Implementation
e implementation procedure for the proposed optimization method is described in Section 2.1. Section 2.2 illustrates the SVC algorithm in detail, and the method for tuning the hyperparameters of SVC using PSO is introduced in Section 2.3.

Implementation Procedure.
e standard weight of a plastic product is determined by technologists prior to molding. e product weight can be regarded as a function of the process parameters throughout the injection-molding process. Each experiment sample under different process parameters could be heavier or lighter than the standard weight and can therefore be labeled as a positive sample (heavier) or a negative sample (lighter). e molding parameters for the desired product with a standard weight should be located between the molding parameters for the positive and negative samples. Hence, this study intends to search for the parameter classification boundary between the positive and negative classes, as shown in Figure 1. e larger the weight error of a sample is, the further away the point is from the boundary, and the points on the boundary correspond to a zero-weight error.
In this study, an SVC model is employed to classify products by their weights. Products under different process parameters are injection-molded and weighed. ese products are labeled as either positive or negative samples, and they are employed as training data for the SVC. As illustrated in Figure 1, the SVC constructs a maximummargin hyperplane, which is also known as the classification boundary, to separate the positive and negative samples. e distance between the samples and the hyperplane corresponds to weight errors. Optimal parameters should be located on the hyperplane of the trained SVC model. Because of the linearly nonseparable problem, further modifications of the SVC model are required, including the selection and calculation of the kernel function [32], as well as the determination of the slack variable [33]. Mathematical principles are illustrated in Section 2.2 in detail. e kernel parameter of the kernel function and the penalty parameter of the slack variable have a great influence on the performance of the SVC model. e determination of these hyperparameters for the SVC is therefore significant. In this study, a particle swarm optimization (PSO) method is adopted. e implementation procedure for the proposed method can be summarized as follows: 2 Advances in Polymer Technology Step 1: initialize parameter range. Choose molding parameters, and then set their initial range. e initial parameter range should cover all the feasible parameters.
Step 2: perform experiments. Carry out experiments under each process parameter. en, evaluate experimental results by comparing the product weight with the standard weight.
Step 3: train the SVC model. Label these samples, and prepare the data sets for the SVC. Select proper kernel function, and train the SVC with sample data.
Step 4: tune SVC hyperparameters. Apply PSO to determine hyperparameters. A hyperplane that separates underweight and overweight samples can be obtained. e optimal process parameters are located on that hyperplane.

Support Vector Classifier
Algorithm. e support vector classifier is a machine learning algorithm based on statistical learning theory. It minimizes the structural risk and improves the generalization ability of the learning machine. e target of a classification is to estimate a function f using the training data is the matrix of the process parameters in this study and y ∈ +1, − 1 { } is the label, indicating whether a product is heavier or lighter than the standard weight.
Considering a linear case as shown in Figure 1, the classification function can be written as where w is a normal vector and b is the intercept. When f(x) � 0, x is a point located on the hyperplane. For all points that satisfy f(x) < 0, the corresponding label y i is − 1, and for all points that satisfy f(x) > 0, the corresponding label y i is 1. It can also be written as e margin between two classes is Moreover, the target is to find the hyperplane that makes the margin the largest. For mathematic convenience, maximize 2/‖ w → ‖ is equal to minimize (1/2)‖w‖ 2 . us, the optimization problem becomes Because of the linear inseparability of the data set, a kernel function must be adopted to map the data (input space) to a high-dimensional space (feature space) where a linear separating hyperplane can be constructed. One kernel commonly used in training nonlinear SVCs is the Gaussian kernel which maps data to an infinite-dimensional space.
e Gaussian kernel on two samples x and y is defined as where c � 1/2σ 2 represents the width and height of the Gaussian function.
Although the probability of linear separation is increased by introducing the kernel function, it is still difficult to deal with the noise in a data set. Noisy data, also known as "outliers," have a great influence on the SVC model, especially when outliers become support vectors. e slack variable ξ i is therefore introduced. After considering outliers, the constraint condition in equation (4) is e slack variable means that the accurate classification of the outliers is abandoned, which is an additional loss to the classifier and should be added to the objective function.
us, the optimization problem becomes where C is the penalty parameter, which refers to the sensitivity of the SVC model to outliers. e weight error between each sample and the standard weight can be calculated, which means each sample should have a different penalty parameter. e further away the sample is from the standard, the more emphasis the SVC should put on the sample, which means the penalty parameter C for this sample should be larger. For this reason, we should modify C for each sample according to its own weight error. e Samples heavier than standard: positive class Classification boundary: predicted parameters corresponding to standard weight Samples lighter than standard: negative class determinant of penalty parameter C is as follows: first, expand the value of C to an n × 1 matrix and then calculate the updated penalty parameter matrix C sample as where W e is an n × 1 matrix of the weight error of n samples and "⊙" is the denotation of componentwise multiplication. From equation (7), it can be clearly seen that it is a convex optimization problem with linear constraint. e final optimization goal is where α i is a nonnegative Lagrange multiplier and K(x i , x j ) is the kernel function, as shown in equation (5).
It should be noted that the performance of an SVC model depends largely on the parameters c and C. Parameter c determines the sphere of influence of each support vector. A large value of c is conducive to the situation in which the support vectors affect only the nearby area, which can lead to high variance of the model and overfitting. Parameter C controls the tradeoff between achieving a low training error and the ability to generalize the model to unseen data. Because of the absence of prior knowledge of the choice of parameters, some types of model selection (parametric search) must be conducted. Several approaches have been proposed, such as K-folder cross validation [34] and grid search [35]. K-folder cross validation is often combined with grid search as a method of parameter evaluation. Via this method, hyperparameters can be modified by improving the classification accuracy of the model. However, this criterion only applies to a model with a large number of samples. Because of the small data set in this study, a new criterion to modify SVC model must be proposed.

Determination of SVC Hyperparameters Using Particle
Swarm Optimization. Particle swarm optimization is an algorithm that simulates the foraging behavior of a flock of birds. e basic idea is to find the optimal solution via collaboration and information sharing among individuals in the group. A group of particles (candidate solutions) is randomly initialized in the solution space. Each particle is evaluated by calculating its fitness value. e optimal solution is then found by iteration. In each iteration, the particle updates its own velocity and position by tracking "Pbest" (the best known position of the current individual) and "Gbest" (the best known position of the current group). e updated formula for particle i(i � 1, 2, . . . , n) can be written as where v i and x i are the velocity and position of the particle, respectively, rand is a random value between (− 1, 1), c 1 and c 2 are learning factors, and under normal conditions, c 1 � c 2 � 2, and ω is known as the inertia weight factor. In order to achieve better convergence, ω is set to linearly decrease with the iteration: where ω is the inertia weight for each iteration, ω min and ω max are the minimum and maximum inertia weights, respectively, which are set to 0.2 and 0.6 in this study, and i refers to the current iteration step. By applying a linear decrease, particles can quickly converge to the approximate optimal solution with a large step size at the beginning and then converge to the exact solution with a small step size. In this study, PSO is applied to improve the accuracy of the SVC model by determining its hyperparameters. e key to applying PSO in this optimization problem is to construct a proper fitness function. In order to acquire the most precise result, the prediction value of the SVC should be the same as the actual value from experiments. By tuning the hyperparameters of the SVC model, the position of the hyperplane can be modified. us, the distance between the hyperplane and the samples is as close as possible to the actual weight error. e calculation of fitness of particles is where p is the normalized vector of the distance between the sample and the hyperplane and e is the normalized vector of the product weight error. p and e are calculated by e � e − min(e) max(e) − min(e) .
rough PSO, all particles converge to the position where the fitness value is reduced to the minimum. e optimal position corresponds to the modified combination of hyperparameters of the SVC. With this method, the parameters c and C can be calculated.

Experimental Design
To demonstrate the accuracy of the proposed method, an experiment using a plastic lenses is presented in this section. A high-precision electrical injection-molding machine, Zhafir VE400 (Zhafir Plastics Machinery GmbH, China), is employed in this study and is depicted in Figure 2(a). e injection mold and molded plastic lenses are shown in Figure 2(b) and Figure 2(c), respectively. A single lens has a diameter of 30 mm and a maximum thickness of 2 mm. e resin used in this study is poly(methyl methacrylate) (PMMA, HT55X produced by Sumipex, Japan [36]). To weigh the product, an electronic balance FA2004 (Shanghai Sunny Hengping Scientific Instrument Co., Ltd, China) is employed, the measurement accuracy of which is 0.0001 g (see Figure 2). Many process parameters have large effect on product weight, including packing pressure, packing time, injection pressure, injection time, and injection temperature. e effect of these parameters depends on the type of the resin [13] and the structure of the product [14]. According to Yang, Hassan and López [11][12][13][14], the injection temperature and packing pressure are the two parameters which have the most significant influence on product weight. On purpose of demonstrating the optimization results more clearly, this study selects only these two parameters as optimization variables. e initial range of injection temperature is divided into 4 levels, namely, 235°C, 245°C, 255°C, and 265°C, according to the recommended temperatures provided by the material supplier. A relatively wide range of packing pressure, from 70 MPa to 120 MPa in increments of 10 MPa, is set as the initial range. Subsequently, a total number of 24 injection-molding analyses with different process parameters are carried out. After obtaining the experiment samples, all runners are removed, because the weight of the additional plastic in runners is not concerned in this study. Only the four lenses of one sample are weighted. e total standard weight of four lenses is 8.16 g. e experiment results are shown in the following section.

Experimental Results.
e product weight under the condition of each process parameter is presented in Table 1 and Figure 3. A positive weight error value indicates that the product weight is larger than the standard value, and vice versa.
From the experimental results, we can observe that the product weight has a positive correlation with both the packing pressure and injection temperature.
is phenomenon agrees well with the research of Hamdy [13] and Yang and Gao [11]. Due to the high viscosity, PMMA has a poor fluidity and the melt viscosity is sensitive to injection temperature. e fluidity of the PMMA melt improves with an increase in the injection temperature, which leads to more plastic melt flowing into the mold. In addition, the melt solidifies quickly due to the small thickness of the product. When the injection temperature is higher, the time to reach solidification increases. erefore, more melt can pass through the gate during a longer time. With an increase in the packing pressure, more materials can be packed into the cavity in the packing phase.
As the SVC is a supervised machine learning model, the data set must be labeled. In this study, we regard all the negative values with a -1 label and the positive values with a +1 label. e two key parameters (C and c) of the SVC are optimized through PSO, and the convergence procedure is shown in Figure 4. From the result of PSO, the performance of the SVC model is determined to be the best with C � 2451.3 and c � 5.74. e hyperplane that separates the overweight and underweight samples is exhibited in Figure 5; each dot indicates an experimental sample, and the size of the dot corresponds to the magnitude of the weight error. e product weight under process parameters that are located on the hyperplane should be equal to the standard weight of 8.16 g.

Verification.
In order to evaluate the hyperplane obtained from the proposed method, a set of verification experiments are carried out. e verification experiment scheme is illustrated in Figure 6. e points a0, a1, a2, . . ., a8, and b1 and b2 represent different injection-molding process parameters.
To verify that a single point located on the hyperplane is the best parameter combination among the other points around it, the center point (a0) with a packing pressure of 95 MPa and an injection temperature of 248°C is selected as the verification point. A series of experiments (a1, a2, a3, and a4) is first conducted with a fixed packing pressure of 95 MPa and varying injection temperatures from 242°C to 254°C in increments of 3°C. en, several experiments (a5, a6, a7, and a8) were conducted with a fixed injection temperature of 248°C and varying packing pressures from 89 MPa to 101 MPa in increments of 3 MPa. In total, 9 sets of experiments are conducted. For each parameter combination, 30 products are molded and weighed. e results are provided in Figure 7, and the statistics are listed in Table 2 and 3. Although there are fluctuations during the injectionmolding process, the product weight under the optimized parameters is the closest to the standard weight. e average weight error can reach 0.0212%, which is smaller than any other parameter combinations around it.
In the case in which a single point on the hyperplane is known as an optimal parameter set, the second step is to verify that other points on the hyperplane are also feasible. Experiments under two other parameter combinations on the hyperplane (b1: 85 MPa/252.5°C and b2: 105 MPa/ 244.8°C) are carried out. eir weights are 8.1645 g and 8.1634 g, respectively, and the results are presented in Figure 8. We can presume that the product weight under other parameters on the hyperplane is also close to the standard weight. Other feasible process parameters offer more choices, so the technologists can pick up the parameter that fits the current product the best according to the product structure and the type of the resin.

Conclusions
is study proposed a new method for optimizing process parameters to mold products with a standard weight. e parameter optimization problem is converted into a weight classification problem according to whether the sample is heavier or lighter than the standard weight. e support vector classifier and particle swarm optimization algorithm are adopted to construct the classification hyperplane, which separates samples. A new criterion for the classification model is introduced in order to improve accuracy. e product weight under parameter sets located on the classification hyperplane should be the same as the standard weight. Based on the results obtained in this study, the following conclusions can be drawn: (1) e product weight under optimized parameters is rather close to the standard weight. Experimental results indicate that the weight error can reach 0.0212%. e hyperplane obtained from the SVC has a high level of correspondence with the verification result. (2) e idea of converting an optimization problem to a classification problem is proven useful for process parameter optimization. (3) e accuracy of the classification model can be improved by applying the PSO method and the criterion proposed in this study. (4) In contrast to the shortcomings in the traditional Taguchi method, this approach for the optimization of process parameters can deal with the situation in which the process parameters are continuous and nonlinear. In general, the proposed method has the advantages of a small data set requirement, high accuracy, and the ability to deal with nonlinear problems.
e ongoing studies will serve to solve the following problems: (1) apply this method to multiple parameters optimization problems; (2) drive the mathematical model to a tool for design algorithms to determine the process window; (3) promote the proposed method to other parameter optimization problems for other polymer processing techniques, such as extrusion molding and blow molding.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.