## 1. INTRODUCTION

Rational and robust production planning and the use of up-to-date machinery can lead to significant cost savings in the production phase of a business. In many of today’s markets where customer liquidity is low and customer orientation is a necessity, companies need to constantly improve the quality and price of their products to compete for market share. The affairs of supply chain and affiliate entities can also play an important role in product development and deeply impact product design and manufacture (Rao, 2019).

Tolerance design is an optimization process in which the designer selects the specifications of a series of components in a system in the pursuit of certain objectives determined by what required from the process, such as reducing production costs or increasing quality. Mathematical modeling of such design problems often involves using complex objective functions with a large number of dependent variables, which can make it difficult to solve the model. Therefore, it is customary to use experimental design methods to simplify this process.

One of the factors that affect the output of tolerance design is the parameter setting, which can be defined as the goal-oriented process of setting limitations for parameters so that the outcome meets the design requirements at the highest possible level. Tolerance design is especially important for controlling the specification limits of assembly parts. There is an inverse relationship between tolerance and cost, because a smaller tolerance increases the number of components that do not fit together, which results in increased production cost.

Another important issue in this discussion is choosing the right setting for the involved machinery and equipment to make them stable and robust. This is because tolerance design goals can only be pursued when machinery and equipment are stable and products with different tolerances can be compared under the same conditions. The mathematical modeling of tolerance design problems in mechanical engineering with the optimization methods and other techniques of industrial engineering can be a very effective approach for reducing production costs and increasing product quality.

## 2. RESEARCH BACKGROUND

One of the important tools for robust design is Taguchi’s approach to parameter design. Taguchi is the founder of robust design techniques, where were introduced in Japan in the 1950s and popularized in the United States in the mid-1980s. Taguchi’s design approach is based on a series of orthogonal arrays, where the inner array represents the controllable variables x and the outer arrays represent the noise variables z. These orthogonal arrays represent factorial or fractional factorial designs. The outer array intersects with each of the inner arrays. The orthogonal array is represented by *Lr*(*mk*) where r is the number of repeats in the array, k is the number of variables, and m is the number of levels considered for each variable (Teimouri *et al*., 2020).

Taguchi has argued that the interactions between control variables can be eliminated through accurate determination of response variables in the design. One of the main drawbacks of the Taguchi method is that it ignores the relationship between controllable factors. Another problem of this method is that the orthogonal array itself can become excessively large as the number of design variables increases. The Taguchi approach is effective when there is no correlation between controllable variables. Taguchi has recommended using a signal-tonoise ratio (SNR) to summarize the result of each response (Hu *et al*., 2021).

Tolerance design consists of three steps: tolerance specification, tolerance allocation, and validation. In the first step, it is necessary to specify the dimensions to which the tolerance should be applied (dimensions in which some deviation is allowed). Then, the values of tolerances should be determined. In the end, the allocated tolerances should be checked and finalized according to the design requirements (Colosimo and Senin, 2010). It is common to consider stricter tolerances for important parameters and looser tolerances for less important parameters (Zang *et al*., 2005). The goal of tolerance design is to control the deviation from product design. Tolerances can have a major impact on production performance and costs (Jeang, 2008). From the designers’ point of view, tolerances are important because they affect the final performance of the product. From the manufacturers’ perspective, tolerances are important because of their effect on the choice of processes, machinery, jigs and fixtures, and especially the production cost. It is customary to use statistical methods and mathematical programming in tolerance design.

In a study by Derakhshan *et al*. (2013) they used a global optimization method based on an artificial neural network and artificial bee colony algorithm to optimize the shape of the impeller of a centrifugal pump for improved pump performance. Karasu *et al*. (2014) used the Taguchi method to determine the optimal parameters of injection molding machines. Bramerdorfer (2019) used optimization methods to conduct a tolerance analysis on the design of electric machines. In this study, a mathematical model based on clustering was presented and a sensitivity analysis was also performed to determine the effect of key parameters on the results. In a study by Hallmann *et al*. (2020) on tolerance-cost optimization, it was stated that the 4th generation industrial revolution can be a change in the tolerance design and related costs in production units. Wiener *et al*. (2021) tried to optimize the mechanical properties of certain composites based on their tolerances. In this study, which was focused on the polymer industry, the damage tolerance of multilayer composites was mathematically formulated and optimized.

## 3. METHOD

To conduct parameter design separately from tolerance design, one should first optimize the response values of the controllable variables for constant tolerance limits, and then determine the tolerance limits of the parameters for optimal parameter values. Integrating parameter design and tolerance design together will allow the designer to optimize the response values of controllable variables simultaneously. This approach provides a more accurate solution and takes less energy.

While most studies in the field of robust design focus on only one response variable or qualitative feature to simplify the process, in practice, it is often necessary to optimize multiple response variables simultaneously. For example, there could be 10 variables involved in the production of semiconductor materials, and since a number of response variables could be correlated, parameters should be adjusted so that all response variables are close to their optimal value.

Each product is known by a series of qualitative characteristics, each of which could be a function of other variables. The key qualitative characteristic is the most important qualitative feature of a product. Each qualitative characteristic can be broken down into multiple categories, which themselves can be decomposed into smaller subcategories. In the proposed method, the key qualitative characteristic is repeatedly decomposed into smaller subsets to the extent that each component at the last level is the output of only one process. The relationship between product design and production process can be expressed as $\text{y}=f({x}_{1}.{x}_{2}.{x}_{3}\dots {x}_{n})$, where y is a qualitative characteristic, x is the controllable variable, and f is the conversion function. This equation is for the case where only one stage of decomposition is performed. In (Jeong, 2017), it has been pointed out that in addition to product and process characteristics, there could be other differences between product and process design. In product design, design factors are controllable and variables are known. As a result, random changes are transferred to the response variable through external perturbation factors. Considering the emergence of the effect of tolerance in the production phase and the discussions made in (Romano *et al*., 2004), for parameter and tolerance design, the quality loss can be decomposed into ${\text{L}}_{2}(y)={k}_{2}var(y).{L}_{1}={k}_{1}{(y-T)}^{2}$, where *T* is the target value of the qualitative characteristic and *k*_{1} is the cost of deviation from this target value. It can be stated that the qualitative characteristic is a function of controllable variables, and these variables need to be determined during product design such that the said characteristic has the least deviation from its target value. To design a tolerance, its effect on the production phase must also be considered. Variance can be used to quantify the extent of quality loss due to tolerance.

In this equation, *k*_{2} is the cost of deviation in the qualitative characteristic. The term ${k}_{1}{(y-T)}^{2}$ represents the product design error and the term *k*_{2}*var*(*y*) represents the error caused by the process. Therefore, quality loss can be obtained from the sum of *L*_{1}(*y*) and *L*_{2} (*y*) (Hallmann *et al*., 2020). In the following, the multiple types of cost involved in tolerance design are described.

### 3.1 Total Cost

Using a stricter tolerance increases the production cost by requiring more precise machinery and tools to be used. As a result, there is an inverse relationship between tolerance cost and production. Conversely, using a looser tolerance reduces the production cost, but increases the probability of manufacturing heterogeneous products, which might be of limited or no use to customers. Therefore, the total cost should be formulated in objective function so that tolerances and averages offer acceptable quality levels at minimum cost (Romano *et al*., 2004).

### 3.2 Quality loss function

According to Taguchi (1986), the cost associated with quality loss increases whenever the response values deviate from their nominal (target) values. Thus, he defined the bivariate loss function as follows:

In Equation (1), k is the cost factor, y is the response variable, and T is the nominal value of the response variable. When the response value exactly matches the target value, the loss is zero. In traditional quality control, it is assumed that no additional cost is incurred as long as y is within certain bounds. But according to Taguchi’s loss function, even small deviations from the target value lead to a quality loss. Using the Taguchi function as the basis, the expected loss can be obtained as follows:

In Equation (2), *m _{y}* is the mean and

*d*is the variance of the response variable y. The coefficient k is given by:

_{y}

where A_{0} is the response cost in the critical range, which includes the cost of rework, waste, market loss, and other financial losses, and Δ_{0} is the tolerance of the response variable, which is obtained by the formula $\frac{\text{USL}-\text{LSL}}{2}$

### 3.3 Production Cost

In tolerance design, control variables have definite values and their errors must be determined. This step is necessary for robust design because parameter design only recommends a value for the parameters without specifying how much deviation can be considered acceptable. According to the definition of the loss function, the tolerance limits must be zero to have minimal quality loss. Therefore, to balance the robust design, the tolerance cost must be added to the objective function. It is widely known that strict tolerances are costly because they require investing more energy and labor to reduce production errors.

Researchers have proposed various functions for tolerance cost, which are presented in Table 1. In these functions, a, and b are cost coefficients, which are determined through simulation or regression for standard deviation in the production process.

Following the approach taken in (Bramerdorfer, 2019;Wiener *et al*., 2021), and (Afshar *et al*., 2007) as well as many other studies, the present study uses the exponential function to calculate production cost. In this function, δ is the resultant tolerance of production. Having the tolerance and production costs, parameters a, and b can be determined.

## 4. PROPOSED MODEL

The proposed model has two main objective functions for *Z*_{1} and *Z*_{2}. The first objective function minimizes the quality loss and the second one minimizes the production cost. As mentioned, like most studies in this field, this study uses the exponential cost function.

In the first equation, *T* is the target value of the qualitative characteristic, *k*_{1} is the cost of deviation from the target value, and y is a parameter characterizing the current performance of the production line or the relationship between parameters. The qualitative characteristic is a function of controllable variables, which need to be determined during product design such that the qualitative characteristic has the least amount of deviation from its target value. In tolerance design, the effect of tolerance on the production process must also be considered. Variance can be used to quantify the extent of quality loss due to tolerance.

The parameter *k*_{2} is the cost of deviation in the qualitative characteristic. In the first objective function, ${K}_{1}{({Y}_{1}-T)}^{2}$ is the product design error and ${K}_{2}var(Y)$ is the error due to the process

Equation (4) represents the quality cost. The term at the end of this objective function minimizes the quality loss due to the tolerance difference of two Y’s, which improves the model. Equation (5) represents the production cost, which is considered to be exponential. This model, which intends to control the tolerance of the entire system, shows the association between the tolerance of each parameter and the total tolerance. Equation (6) is used to control the total variances, i.e. to make sure that the total variance is equal to the sum of variances of components. Equation (7) is used to control the production parameters and set their upper and lower bounds based on the history of machinery and products. Equations (8) and (9) control the allowable range of dependent variables based on standard tables available for the product (here pipe datasheets). Equation (10) is a linear regression that models the pipe and connection production line. Finally, Equation (11) seeks to minimize the difference between the outer diameter of the pipe and the inner diameter of the connection.

The first objective function in Equation 4 represents the quality cost of the pipe production process. Here, k_{1} is a coefficient for determining the cost of waste and rework due to deviations of the production process from the standard value T_{1}, and *var*(*Y*_{1}) is the deviation of the production process parameters. The coefficient k_{2} is the cost of milling and reworking the connections because of the deviation of the production line from the standard, and 1 *var*(*Y*_{1}) is the deviation of the parameters of the connection production process. The coefficient k_{3} is used to minimize the difference between the outputs of the two processes (Taguchi, 1986).

## 5. METAHEURISTIC GENETIC ALGORITHM

Genetic Algorithm (GA) was first introduced by John Holland at the University of Michigan in 1962. This algorithm is a search method for finding optimum solutions in a solution space. The genetic algorithm guides the search process toward optimal points by imitating the concept of natural selection. The genetic algorithm can be described as an enumeration method in which the number of tests is reduced through mechanisms inspired by natural processes (Zhang and Xing, 2010).

In the genetic algorithm, the search space is a space comprised of feasible solutions. These solutions are represented by strings of fixed or variable length, called chromosomes, which can contain symbols and are not necessarily binary. Each design variable is represented by several cells, called genes, and the value of each gene is called an allele. Each chromosome has a utility or fitness value, which is calculated by a function called the fitness function. Chromosomes with higher fitness values are more desirable. The fitness value is usually a number between zero and one. The set of multiple chromosomes is called a population. The population of chromosomes at each stage of the algorithm is called a generation. The workflow of the genetic algorithm is shown schematically in Figure 1.

## 6. NUMERICAL RESULTS

In the numerical example, the parameters of extrusion and injection processes are differentiated by using the notation *x _{ij}* , where i is either 1 for the extrusion process and the pipe production line or 2 for the injection process and the connection production line, and j represents the parameter of the process.

The model parameters can be defined as: y_{1}: Regression equation for pipes; x_{13}: Water temperature; *x*_{23} : Cooling time; *y*_{2} : Regression equation for connections; *x*_{11} : Ram speed; *x*_{14} : Main engine speed; *x*_{24} : Injection pressure; *x*_{21} : Sensor position; *x*_{12} : Screw speed; *x*_{15} : Feed rate; *x*_{22} : Load rate According to the sales documents of companies 1 and 2, among the pipes and connections produced by these companies, those of size 110 are sold more than others. Therefore, size 110 pipes and connections were chosen for the case study. Considering the large production and sales figures of size 110 products of both companies, it was decided to use the 110×3.2 pipe and the 110×45 knee connection as examples. Given the less frequent use of connections in the piping process compared to the direct attachment of pipes, the relationship between the male end and the bell end was also investigated.

### 6.1 Pipe Tolerance Prediction

After entering the data of the extruder machine in SPSS software and executing the multiple regression tool of this software, the model of the pipe production line was obtained as shown in Equation 12 (results are presented in Table 1). This model can be used in the optimization of the pipe production line (parameters of the extruder machine) to reduce production costs and increase product quality.

### 6.2 Connection Tolerance Prediction

The case studied company in the machinery field, the parameters of which had to be modeled as was done for extruders (see Table 2). This was necessary to reach a model capable of reflecting the connection production line of this company, which was necessary for connection tolerance optimization. Therefore, the regression process performed for the extruder was repeated for the injection machines. The output of this regression process is given in Table 3 and the resulting relationship is shown in Equation 13.

The Institute of Standards and Industrial Research (Wise, 2020) is the only official authority for setting, compiling, and publishing national standards. This institute has specified the upper and lower dimension limits of PVC pipes and connections of different sizes. Some of these limits for pipes and connections are given in Tables 4 and 4 and 5 respectively.

Finally, having the regression equations, the mathematical model of the research was rewritten as follows.

### 6.3 Implementation of Genetic Algorithm

In the genetic algorithm coded in MATLAB, the initial population size was set to 200 chromosomes, the crossover rate was set to 0.7 (from the formula nCrossover = 2*round(pCrossover*nPop/2), and the mutation rate was set to 0.1. The evaluation function is the objective function of the model. The objective function of the model, which is of minimization type, was used as the fitness function. The penalty terms were used as the coefficients of the objective function. The maximum number of iterations was set to 500. The model output obtained from MATLAB is shown in Figure 2.

As can be seen, the genetic algorithm managed to obtain a large set of Pareto solutions for this problem. These solutions were diverse and had different values for objective functions 1 to 3. This feature of genetic algorithms helps managers and decision-makers to choose and implement the best option among the range of solutions available for a problem.

## 7. CONCLUSION

After executing the algorithm in three-dimensional space, the values 110.10 and 107.08 were obtained for the outer diameter of the male end of the connection and for the inner diameter of the pipe respectively. To achieve the optimal tolerance, the parameters of the extruder machine must be set as follows: ram speed to 124.46, water temperature to 18, main engine speed to 78.05, and feed rate to 77.86, and the parameters of the injection machine must be set as follows: sensor position to 138.86 and cooling time to 25. It should be noted that the 3.02 difference between the male end of the connection and the pipe is due to the belling of the pipe.

After executing the model and obtaining the optimal parameters for pipe and connection products, the pipe and connection production machines were tuned accordingly and the deviation of products from the center of the standard range was calculated. For a deviation of 0.07, the total cost of 1kg of pipe was changed from 5.616 before optimization to 5.608, which given the production output of the first company (20 tons per day) is equivalent to 160,000 monetary units or 0.14% cost saving. The average cost saving in the pipe production company for different levels of deviation from standards was calculated to 5.8%.

For a deviation of 0.06, the total cost of 1kg of connection was reduced from 6.656 to 6.494, which given the production output of the company (10 tons per day) is equivalent to 1,620,000 monetary units or 2.4% cost saving. The average cost saving in the connection production company for different levels of deviation from standards was estimated to 13.06%.