# Parameters Optimization of Multipass Milling Process by an Effective Modified Particle Swarm Optimization Algorithm

Authors: Cuiyu Wang; Wenwen Wang; Yiping Gao; Xinyu Li
Journal: Discrete Dynamics in Nature and Society
 (2022)

---

## Abstract

The selection of the optimal metal milling parameters greatly impacts final product quality and production efficiency in modern manufacturing systems. The profit rate is also sensitive to the selected parameters. This research focuses on determining the optimal parameters of a multipass milling process using an improved particle swarm optimization (PSO) method. The objective is to minimize the production time. The proper number of passes, the optimal cut speed, and feed rate are considered as the parameters (the decision variables in the model) which are needed to be optimized. Furthermore, the permissive arbor strength, arbor deflection, and motor power are the constraints of the model. The penalty function method is used as the constraints handling technique to address the constraints efficiently in the proposed method. A case is adopted and solved to evaluate the performance of the proposed method. The experimental part is analyzed and compared with advanced methods. Experimental results show that the proposed method is very effective for parameters optimization of a multipass milling process and outperforms other methods.


---

## Body

## 1. Introduction

In recent years, optimal machining parameters for milling process play an important role to ensure the quality of final products, productivity, and the competition of the manufacturers [1]. As a result, determining the optimal milling parameters becomes a very hot research topic. Metal milling is one of the most important and widely used manufacturing processes. But it is difficult to choose the optimal milling parameters which are subject to multiconstraints of motor power, cutting force, and feasible range of machining parameters [2]. The single-pass milling process was originally preferred to find the minimum production time for economic reasons. However, with the development of the economy, the single-pass process cannot meet the needs of product quality [3]. Hence more and more researchers tend to focus on the multipass machining operation. Traditionally, the operators usually depend on the handbooks, and if the machines and processing types do not exist, the operators can only rely on their experiences to choose the parameters. However, handbooks and experiences cannot guarantee the selected parameters are optimal and this may lead to the waste of time and resources [4].Several researchers used mathematical methods to find the authentic optimal machining parameters. The traditional strategies such as dynamic programming and geometric programming (GP) have been applied to the optimization of the single-pass cutting process [5]. Tolouei-Rad and Bidhendi [6] used a feasible direction method to determine the optimal parameters in milling operation. Petropoulos [7] used a GP method for practical optimization problems. Although the application of traditional methods mentioned above obtained better results than those gained by just following the handbooks, the results were far from robust when compared with the results obtained by heuristic approaches.However, these traditional methods cannot be the optimal strategies to determine the optimal machining parameters, especially for the multipass process. This is because milling parameters optimization is a complicated multiconstraints nonlinear programming problem. Traditional methods rely on gradient information and are far from robust. So many researchers begin to apply heuristic methods to this problem. Vijayakumar et al. [8] used ant colony optimization (ACO) to find the satisfactory parameters in multipass turning operation. Palanisamy et al. [9] and Gakhe et al. [10] used a genetic algorithm (GA) to obtain the optimal machining parameters and minimize the total production time. Wang et al. [11] hybridized GA and SA and got the new strategy GSA, to select the optimal parameters in milling operation. The artificial bee colony (ABC) [12] was applied to the milling parameters optimization problem by Rao et al. [5]. Baykasoglu [13] proposed a weighted superposition attraction-repulsion algorithm for cutting conditions.Particle swarm optimization (PSO) is a soft computation technology based on swarm intelligence [14, 15]. It can be used in the area of system design, multiobjective optimization, pattern recognition, signal processing, games, decision making, simulation, and identification [16, 17]. PSO had also been used to identify human tremors by Eberhart et al. [18], and the computational process was fast and the result was accurate. Han et al. [19] introduced PSO into the flexible manufacturing system to find the optimal scheduling and increase the use ratio of machines and productivity. Tang et al. [20] developed a parallel random matrix PSO for scheduling with budget constraints. Yang et al. [21] proposed an improved multiobjective PSO for scheduling with panel block construction. Sun and Ren [22] introduced graph density into PSO. PSO also had been used in the fields of CNC machining [23] and pulsed laser micromachining [24], and both gained good results. Fang et al. [25] proposed an improved adaptive PSO for cutting parameter optimization.PSO is simple in concept, convenient in computation, fast in implementation, and brief in programming [26]. Using PSO to figure out nonlinear programming problems with multiple constraints is efficient. That is why PSO is considered to be one of the most popular methods among nature-inspired methods to solve complex optimization problems. However, the balance of the exploration (diversification) and exploitation (intensification) is one of the limitations, which impedes the application of PSO in the multipass milling process greatly. Hence, an effective modified particle swarm optimization method is proposed for the multipass milling process. The motivation of the proposed method is to balance the exploration (diversification) and exploitation (intensification) of PSO, which aims to improve the optimization results. With this motivation, three aspects of improvement, including the searchability, avoiding the local optima, and restart parameter, have been implemented, and the constraints handling strategy is introduced. Moreover, the penalty function method is combined with PSO to optimize the parameters optimization of the multipass milling process. The main contribution of this paper has several points. Firstly, in order to improve the PSO and avoid the local optima, the proposed method introduces three aspects of modification to balance the diversification and intensification. Secondly, a constraints handling strategy is introduced to construct the penalty function for the feasible particle. Finally, the proposed method is developed into a multipass milling process optimization problem, which has indicated the effectiveness of the proposed method.The rest of this paper is organized as follows: the problem is formulated in Section2. Section 3 introduces the proposed improved PSO. In Section 4, an application example has been selected to testify to the performance of the proposed PSO and the results are compared with the ones gained by other strategies. Some conclusions are given in the last section.


## 2. Problem Formulation

This paper uses the mathematical model proposed by [27]. The milling parameters optimization model is made up of three essential parts, which are objective function, constraints condition, and decision variables. In this model, the total production time is the objective function. The number of passes, the depth of cut for the rough pass and final pass, cutting speed, and feed per teeth are the parameters to be optimized. The constraints of this problem include the arbor strength, arbor deflection, and permissible motor power.


### 2.1. Objective Function

In this multipass milling model, a component’s milling process contains some rough processes and one finishing process. The rough processes fulfil the removal of a large number of materials while the finishing process ensures the permissible surface roughness [5].The total production time for a component isTpr; it is composed of the following items:(1)Tpr=Tp+TL+Tα+Tm+Tc.Tp is the machine set-up time. Tp=Ts/Nb, where Ts is the set-up time for a new batch and Nb means the total number of components in a produced batch.TL is the loading-unloading time for one part.Tα is the process of adjusting and quick return time.Tm is the actual machining time. Tm=L/f, where L (mm) is the cutting length and f (mm/min) means the feed rate. f=fz⋅Z⋅N, where fz stands for the feed per tooth (mm/tooth), Z refers to the total number of teeth on the cutter, N means spindle speed (rpm), and N can be given as N=1000⋅V/πD, where V is cutting speed (m/min) and D means cut diameter (mm).Tc is the time per component to change machining tool. Tc=TdTm/T, where Td means actual time for changing a dull cutting edge, and T=CV1/mDbv/m/V1/mαev/mfzuv/mαwrv/mZnv/mλSqv/mBmBhBpBt1/m represent tool life. For a multipass milling process, the total machining time should take every milling pass into consideration that Tpr becomes(2)Tpr=TSNb+TL+NPTa+∑i=1NPπDL1000fziZVi+TdπLVi1/m−1aiev/mfziuv/m−1awrv/mZnv/m−1λsqv/m1000CV1/mDbv/m−1BmBhBpBt1/m.Np is the number of passes to remove the total depth of cut.i is a subscript that refers to the i-th pass of a process.T1=Ts/Nb+TL and T2=∑Tαi+Tmi+TdTmi/T.


### 2.2. Constraint Conditions

Feasible results are subject to some technological constraints that are related to the machining tools, cutting tools, and materials. Design variables are bounded by the following constraints [27].


#### 2.2.1. Power Constraint

Tool power of machine ought to be less than effective power, which is shown as(3)Pc≤Pmη.And for plain milling case,(4)Czp⋅αw⋅Z⋅DbzαezfzuzV/6120≤Pmη.Pc is the cutting powerPm is the nominal motor powerη is the overall efficiency of the cutting machineFc is the cutting force which can be calculated according to Czp⋅αw⋅Z⋅Dbzαezfzuz


#### 2.2.2. Arbor Strength

Cutting forceFc should not exceed the permissible strength Fs, and all the coefficients are following [27]:(5)Fc−Fs≤0,Fc−0.1kbdα30.08Lα+0.650.25Lα2+0.5Dkb/1.3kt≤0.Fc is the cutting forceFs is the permissible force for the arbor strengthkb is the permissible bending strength of the arbordα is the diameter of the arborLα is the arbor length between supportskt is the permissible torsional stress of the arbor material


#### 2.2.3. Arbor Deflection

Arbor deflection must be checked when choosing the satisfying feed rate:(6)Fc−Fd≤0,Fd=4Eeda4La3.Fd is the permissible strength of the arbor deflectionE is the modulus of elasticity of the arbor materiale is the permissible value of the arbor deflection, and e=0.2 in roughing pass meanwhile e=0.2 in finishing pass


### 2.3. Decision Variables

The number of passes, the cut depth of each pass, the feed rate, and the feed per tooth are design variables. The last two parameters can be gained from the range of spindle speed and spindle feed rate. The first two parameters are determined by the permissible boundary of cutting depth and the total milling depth. The feasible range of depth of cut is specified as [5](7)αmin≤α≤αmax,where αmin and αmax determine the boundary of the choice of the depth of cut in every pass.Yet the maximum spindle speedNmax and the minimum spindle speed Nmin determine the range of milling speed:(8)Vmin≤V≤Vmax,where Vmin=πDNmin/1000 and Vmax=πDNmax/1000.Also, the feasible feed rate must be in the range determined by the maximum and minimum feed rate of the machine.(9)fzmin≤fz≤fzmax,where fzmin=fmin/ZNmax and fzmax=fmax/ZNmin and fmax are the minimum and maximum spindle feed rate. The PSO will be introduced in the following section based on the given multipass milling model.


## 2.1. Objective Function

In this multipass milling model, a component’s milling process contains some rough processes and one finishing process. The rough processes fulfil the removal of a large number of materials while the finishing process ensures the permissible surface roughness [5].The total production time for a component isTpr; it is composed of the following items:(1)Tpr=Tp+TL+Tα+Tm+Tc.Tp is the machine set-up time. Tp=Ts/Nb, where Ts is the set-up time for a new batch and Nb means the total number of components in a produced batch.TL is the loading-unloading time for one part.Tα is the process of adjusting and quick return time.Tm is the actual machining time. Tm=L/f, where L (mm) is the cutting length and f (mm/min) means the feed rate. f=fz⋅Z⋅N, where fz stands for the feed per tooth (mm/tooth), Z refers to the total number of teeth on the cutter, N means spindle speed (rpm), and N can be given as N=1000⋅V/πD, where V is cutting speed (m/min) and D means cut diameter (mm).Tc is the time per component to change machining tool. Tc=TdTm/T, where Td means actual time for changing a dull cutting edge, and T=CV1/mDbv/m/V1/mαev/mfzuv/mαwrv/mZnv/mλSqv/mBmBhBpBt1/m represent tool life. For a multipass milling process, the total machining time should take every milling pass into consideration that Tpr becomes(2)Tpr=TSNb+TL+NPTa+∑i=1NPπDL1000fziZVi+TdπLVi1/m−1aiev/mfziuv/m−1awrv/mZnv/m−1λsqv/m1000CV1/mDbv/m−1BmBhBpBt1/m.Np is the number of passes to remove the total depth of cut.i is a subscript that refers to the i-th pass of a process.T1=Ts/Nb+TL and T2=∑Tαi+Tmi+TdTmi/T.


## 2.2. Constraint Conditions

Feasible results are subject to some technological constraints that are related to the machining tools, cutting tools, and materials. Design variables are bounded by the following constraints [27].


### 2.2.1. Power Constraint

Tool power of machine ought to be less than effective power, which is shown as(3)Pc≤Pmη.And for plain milling case,(4)Czp⋅αw⋅Z⋅DbzαezfzuzV/6120≤Pmη.Pc is the cutting powerPm is the nominal motor powerη is the overall efficiency of the cutting machineFc is the cutting force which can be calculated according to Czp⋅αw⋅Z⋅Dbzαezfzuz


### 2.2.2. Arbor Strength

Cutting forceFc should not exceed the permissible strength Fs, and all the coefficients are following [27]:(5)Fc−Fs≤0,Fc−0.1kbdα30.08Lα+0.650.25Lα2+0.5Dkb/1.3kt≤0.Fc is the cutting forceFs is the permissible force for the arbor strengthkb is the permissible bending strength of the arbordα is the diameter of the arborLα is the arbor length between supportskt is the permissible torsional stress of the arbor material


### 2.2.3. Arbor Deflection

Arbor deflection must be checked when choosing the satisfying feed rate:(6)Fc−Fd≤0,Fd=4Eeda4La3.Fd is the permissible strength of the arbor deflectionE is the modulus of elasticity of the arbor materiale is the permissible value of the arbor deflection, and e=0.2 in roughing pass meanwhile e=0.2 in finishing pass


## 2.2.1. Power Constraint

Tool power of machine ought to be less than effective power, which is shown as(3)Pc≤Pmη.And for plain milling case,(4)Czp⋅αw⋅Z⋅DbzαezfzuzV/6120≤Pmη.Pc is the cutting powerPm is the nominal motor powerη is the overall efficiency of the cutting machineFc is the cutting force which can be calculated according to Czp⋅αw⋅Z⋅Dbzαezfzuz


## 2.2.2. Arbor Strength

Cutting forceFc should not exceed the permissible strength Fs, and all the coefficients are following [27]:(5)Fc−Fs≤0,Fc−0.1kbdα30.08Lα+0.650.25Lα2+0.5Dkb/1.3kt≤0.Fc is the cutting forceFs is the permissible force for the arbor strengthkb is the permissible bending strength of the arbordα is the diameter of the arborLα is the arbor length between supportskt is the permissible torsional stress of the arbor material


## 2.2.3. Arbor Deflection

Arbor deflection must be checked when choosing the satisfying feed rate:(6)Fc−Fd≤0,Fd=4Eeda4La3.Fd is the permissible strength of the arbor deflectionE is the modulus of elasticity of the arbor materiale is the permissible value of the arbor deflection, and e=0.2 in roughing pass meanwhile e=0.2 in finishing pass


## 2.3. Decision Variables

The number of passes, the cut depth of each pass, the feed rate, and the feed per tooth are design variables. The last two parameters can be gained from the range of spindle speed and spindle feed rate. The first two parameters are determined by the permissible boundary of cutting depth and the total milling depth. The feasible range of depth of cut is specified as [5](7)αmin≤α≤αmax,where αmin and αmax determine the boundary of the choice of the depth of cut in every pass.Yet the maximum spindle speedNmax and the minimum spindle speed Nmin determine the range of milling speed:(8)Vmin≤V≤Vmax,where Vmin=πDNmin/1000 and Vmax=πDNmax/1000.Also, the feasible feed rate must be in the range determined by the maximum and minimum feed rate of the machine.(9)fzmin≤fz≤fzmax,where fzmin=fmin/ZNmax and fzmax=fmax/ZNmin and fmax are the minimum and maximum spindle feed rate. The PSO will be introduced in the following section based on the given multipass milling model.


## 3. Proposed PSO for Parameter Optimization

### 3.1. Conventional PSO for Parameter Optimization

PSO is a swarm-intelligence-based algorithm and was first proposed as the simulation of a bird flock’s social behavior. PSO randomly generates a set of birds with random velocities and random positions. After that, an initial group of swarms is produced. Individuals in the population are particles. The number of particles in the swarm is the population size. Every particle searches for the best position to get the minimum value of the objective function just like the bird searching for food. The search space of the optimization problem is bounded by the feasible range of each decision variable. The position of each particle represents a potential solution because every dimension of the search space stands for the corresponding design variable. Each particle keeps track of its coordinates in the problem space which is associated with the best solution it has achieved so far [19]; it is pbest. Another important value that is tracked is the overall best value. The overall best location is called gbest. Fitness function is the criterion to judge the positions of particles. And fitness function is composed of the objective function and the constraints. pbest and gbest are continually updated by the better locations and better fitness in the searching process. This searching process is exactly like the self-learning and social-learning behavior of birds. In a word, the PSO concept consists of each time stop. Each particle changing velocity toward Pbest and gbest randomly generates the acceleration for each best position. Every particle modifies its position and velocity after one search time by the equations given as follows:(10)vit+1=ω⋅vit+c1r1Pbest−Pit+c2r2Gbesti−piti=1,…,d,(11)pit+1=pit+vit+1,i=1,…,d.d is the dimension of the optimization problem (the number of design variables)vi=v1,v2,…,vd is the velocity of particles in the d-dimension search spacepi=p1,p2,…,pd is the i-th particle’s d-dimension positionpbesti=pbest1,pbest2,…,pbestd is the personal best positiongbesti=gbest1,gbest2,…,gbestd is the global best positionω means the inertia weight controls the particle’s exploration and exploitation abilityc1, c2 are the acceleration constants that represent the weighting that pulls each particle toward pbest and gbest positionr1, r2 are two uniform random numbers between 0,1The process for implementing PSO is as follows:(i)
Initialize the population of particles with random positions and random velocities within the search ranges(ii)
Evaluate each particle with both the objective function and constraints(iii)
Compare each particle’s objective value with itspbest, take their constraints satisfaction into consideration, and if the current position is better, take the place of the previous fitness value and pbest(iv)
Compare each particle fitness evaluation and constraints satisfaction state with the overall previous bestgbest, updating gbest if it exits better particle and keeping in track of the best fitness value(v)
Change the velocity and position of each particle by (10) and (11)(vi)
Loop to (ii) if the maximum number of iterations is not reached or the given precision is met


### 3.2. Constraints Handling Technique

In PSO, a traditional method to deal with the constraints is usually adopted by Yang et al. [28]. In this method, the more constraints a particle violates, the worse the particle is. The degree of violation of constraints is neglected. So, it is not so easy for this method to judge the particles. The strategy is shown in Table 1.Table 1
The commonly used updating strategy forpbest.
Updating strategy for the personal best position (compare current fitness value andpbest)(i) If these two solutions are both feasible, select the one with better fitness value; if both two fitness values are equal, randomly select one of them.(ii) If one is feasible and the other is infeasible, select the feasible one.(iii) If these two solutions are both infeasible, select the one with the lower number of constraints violations; if they violate the same number of constraints, randomly select one of them.The constraints handling technique is operated in the encoding work rather than be put into the objective function. But it becomes hard to ensure the results are feasible when the number of constraints increases. The final optimal particle may just violate fewer constraints but is still not feasible.Thus, the penalty function method is adopted in this study. The overall constraints are contained in the penalty function. The fitness function is composed of the penalty function and the objective function. The results are usually feasible and subject to all the constraints when setting the punishment factor to a big enough number. The details to build the fitness function with the penalty function are introduced next.For a general optimization problem, the mathematical expressions can be described as follows [29].Assume thatx=x1,x2,…,xn is a point in n-dimension space Rn and fx, hix, and gix are given functions with n variables. Consider the constraints as follows:(12)hixi=1,…,k=0,gixi=1,…,p≤0.The optimization target is to obtain the minimumfx:fx is the objective functionhix is k equality constraintsgix is p inequality constraintsx are the design variablesThe fitness function is given as follows when consideringc:(13)Fx=fx+δPx.δ is the punishment factorPx is the punishment termWithout theε (a positive tolerance value for equality constraints) in [29], the penalty function can be written as(14)Px=m1∑i=1khix2+m2∑i=1pmax0,gix2.m1 is the weight of equality constraintsm2 is the weight of inequality constraintsThe fitness function is built based on (13) and (14) with the constraints and objective function. The process of building this structure is simple, fast, and time-saving. The results are very stable while using this penalty function method.


### 3.3. The Proposed PSO

Based on the standard PSO, a new improved PSO is applied to this study. To obtain better computational results and avoid quick convergence, three improvements are applied to standard PSO. A new fitness function based on the problem is constructed.


#### 3.3.1. Modification of PSO

(1)
Particles no longer learn from one’s ownpbest. Parts of the swarm obtain pbest of other members. The different pbest guide the particle flying in another direction. The searchability of the swarm is enhanced. In this study, ten percent of particles were randomly chosen to implement this modification and change pbest used in (10).(2)
To avoid the particles getting trapped into local optima, after an iteration of the proposed method, the particles do not update their position and velocity by (12) and (13). Instead, ten percent of particles implement their initialization and randomly get their positions and velocities. In this way, that the majority of the experience has been held back and delivered to the next generation. At the same time, the diversity of the swarm is kept.(3)
The last modification of the standard PSO is a restart parameter to stop its quick convergence. When all the particles go to the same direction guided bygbest, the swarm always have a fast convergence rate before finding the optimal point. To get thorough flying in the search space, the particles have some probability to reset and restart the method so the particles can jump out of local optima.Whengbest does not update, a counter-repeat times (RepeatTime) increase by 1. When the repeat times reach the max repeat time (MaxRepeatTime) that means the particles may trap in the local minimum. We set a parameter rs that combines with the present iteration times and the max iteration times (rs is present iteration times/max iteration times). Another parameter rand is a randomly generated number in 0,1. On the condition that the max repeat times are reached, compare rs with rand. If rs is smaller than rand, all particles have an initialized value and all parameters are reset. But in each restart, the best global fitness is saved. It can be seen that the restart probability decreased with the iteration time rising because rs is increased by each iteration.


#### 3.3.2. Fitness Function

In this optimization problem, there are only three inequality constraints. Based on the standard PSO and recommended constraints handling technique, the constraints in (13) and (14) can be substituted with the milling model. The fitness function is shown as follows:(15)Fit=Tpr+m2max0,FcV6120−Pmη2+max0,Fc−Fs2+max0,Fc−Fd2.According to (2), the fitness function above is a quaternion function (about Np, αi, Vi, fzi). So, this is a four-dimension optimization problem. Nevertheless, the optimization results of Np and αi cannot always be implemented in practice, because the removal of each pass αi depends on the machining accuracy of the machine. And the number of passes of the cutting process must be an integer. For the reasons above, the two parameters, Np and αi, are optimized by another strategy.There are some frequently used machining options ofNp and αi. αi is defined in the range of αmin,αmax. Then the Np is fixed by the total cut depth α and αi, Np=α/αi. Usually, four or five strategies are implemented to obtain the final best results. The set of Np and αi that obtain the minimum machining time is considered as the optimal parameters.The representation of this milling problem by particles is shown in Figure1.Figure 1
The representation of a solution to the milling parameters optimization problem.


#### 3.3.3. Computational Process

In this study, the programming language is Microsoft VisualC++ and the flow chart of the proposed PSO is shown in Figure 2.Figure 2
The flowchart of the proposed PSO.


#### 3.3.4. Complexity of the Proposed Method

Assuming the population size isK, the maximum iteration times is L (maximum iteration times), the maximum repetition times is R (maximum repeat times), and the problem size is N (Nparameters need to be optimized), and the computational complexity is analyzed as follows: at each iteration, problem modeling, fitness calculation, optimal state selection of individual and population, speed calculation, and state update are required. Therefore, the time complexity of the proposed method is(16)OL,K,R,N=OK∗KN+R−1∗L−1∗0.1∗N2≈OK2+OKRLN2.When the size of the problem is much larger than the population size, the time complexity of this method can be simplified asK∗R∗L∗ON2; that is, the calculation amount is proportional to the square of the size of the research problem and is proportional to the population size (K), the maximum number of repeats (R), and the maximum number of iterations (L).


## 3.1. Conventional PSO for Parameter Optimization

PSO is a swarm-intelligence-based algorithm and was first proposed as the simulation of a bird flock’s social behavior. PSO randomly generates a set of birds with random velocities and random positions. After that, an initial group of swarms is produced. Individuals in the population are particles. The number of particles in the swarm is the population size. Every particle searches for the best position to get the minimum value of the objective function just like the bird searching for food. The search space of the optimization problem is bounded by the feasible range of each decision variable. The position of each particle represents a potential solution because every dimension of the search space stands for the corresponding design variable. Each particle keeps track of its coordinates in the problem space which is associated with the best solution it has achieved so far [19]; it is pbest. Another important value that is tracked is the overall best value. The overall best location is called gbest. Fitness function is the criterion to judge the positions of particles. And fitness function is composed of the objective function and the constraints. pbest and gbest are continually updated by the better locations and better fitness in the searching process. This searching process is exactly like the self-learning and social-learning behavior of birds. In a word, the PSO concept consists of each time stop. Each particle changing velocity toward Pbest and gbest randomly generates the acceleration for each best position. Every particle modifies its position and velocity after one search time by the equations given as follows:(10)vit+1=ω⋅vit+c1r1Pbest−Pit+c2r2Gbesti−piti=1,…,d,(11)pit+1=pit+vit+1,i=1,…,d.d is the dimension of the optimization problem (the number of design variables)vi=v1,v2,…,vd is the velocity of particles in the d-dimension search spacepi=p1,p2,…,pd is the i-th particle’s d-dimension positionpbesti=pbest1,pbest2,…,pbestd is the personal best positiongbesti=gbest1,gbest2,…,gbestd is the global best positionω means the inertia weight controls the particle’s exploration and exploitation abilityc1, c2 are the acceleration constants that represent the weighting that pulls each particle toward pbest and gbest positionr1, r2 are two uniform random numbers between 0,1The process for implementing PSO is as follows:(i)
Initialize the population of particles with random positions and random velocities within the search ranges(ii)
Evaluate each particle with both the objective function and constraints(iii)
Compare each particle’s objective value with itspbest, take their constraints satisfaction into consideration, and if the current position is better, take the place of the previous fitness value and pbest(iv)
Compare each particle fitness evaluation and constraints satisfaction state with the overall previous bestgbest, updating gbest if it exits better particle and keeping in track of the best fitness value(v)
Change the velocity and position of each particle by (10) and (11)(vi)
Loop to (ii) if the maximum number of iterations is not reached or the given precision is met


## 3.2. Constraints Handling Technique

In PSO, a traditional method to deal with the constraints is usually adopted by Yang et al. [28]. In this method, the more constraints a particle violates, the worse the particle is. The degree of violation of constraints is neglected. So, it is not so easy for this method to judge the particles. The strategy is shown in Table 1.Table 1
The commonly used updating strategy forpbest.
Updating strategy for the personal best position (compare current fitness value andpbest)(i) If these two solutions are both feasible, select the one with better fitness value; if both two fitness values are equal, randomly select one of them.(ii) If one is feasible and the other is infeasible, select the feasible one.(iii) If these two solutions are both infeasible, select the one with the lower number of constraints violations; if they violate the same number of constraints, randomly select one of them.The constraints handling technique is operated in the encoding work rather than be put into the objective function. But it becomes hard to ensure the results are feasible when the number of constraints increases. The final optimal particle may just violate fewer constraints but is still not feasible.Thus, the penalty function method is adopted in this study. The overall constraints are contained in the penalty function. The fitness function is composed of the penalty function and the objective function. The results are usually feasible and subject to all the constraints when setting the punishment factor to a big enough number. The details to build the fitness function with the penalty function are introduced next.For a general optimization problem, the mathematical expressions can be described as follows [29].Assume thatx=x1,x2,…,xn is a point in n-dimension space Rn and fx, hix, and gix are given functions with n variables. Consider the constraints as follows:(12)hixi=1,…,k=0,gixi=1,…,p≤0.The optimization target is to obtain the minimumfx:fx is the objective functionhix is k equality constraintsgix is p inequality constraintsx are the design variablesThe fitness function is given as follows when consideringc:(13)Fx=fx+δPx.δ is the punishment factorPx is the punishment termWithout theε (a positive tolerance value for equality constraints) in [29], the penalty function can be written as(14)Px=m1∑i=1khix2+m2∑i=1pmax0,gix2.m1 is the weight of equality constraintsm2 is the weight of inequality constraintsThe fitness function is built based on (13) and (14) with the constraints and objective function. The process of building this structure is simple, fast, and time-saving. The results are very stable while using this penalty function method.


## 3.3. The Proposed PSO

Based on the standard PSO, a new improved PSO is applied to this study. To obtain better computational results and avoid quick convergence, three improvements are applied to standard PSO. A new fitness function based on the problem is constructed.


### 3.3.1. Modification of PSO

(1)
Particles no longer learn from one’s ownpbest. Parts of the swarm obtain pbest of other members. The different pbest guide the particle flying in another direction. The searchability of the swarm is enhanced. In this study, ten percent of particles were randomly chosen to implement this modification and change pbest used in (10).(2)
To avoid the particles getting trapped into local optima, after an iteration of the proposed method, the particles do not update their position and velocity by (12) and (13). Instead, ten percent of particles implement their initialization and randomly get their positions and velocities. In this way, that the majority of the experience has been held back and delivered to the next generation. At the same time, the diversity of the swarm is kept.(3)
The last modification of the standard PSO is a restart parameter to stop its quick convergence. When all the particles go to the same direction guided bygbest, the swarm always have a fast convergence rate before finding the optimal point. To get thorough flying in the search space, the particles have some probability to reset and restart the method so the particles can jump out of local optima.Whengbest does not update, a counter-repeat times (RepeatTime) increase by 1. When the repeat times reach the max repeat time (MaxRepeatTime) that means the particles may trap in the local minimum. We set a parameter rs that combines with the present iteration times and the max iteration times (rs is present iteration times/max iteration times). Another parameter rand is a randomly generated number in 0,1. On the condition that the max repeat times are reached, compare rs with rand. If rs is smaller than rand, all particles have an initialized value and all parameters are reset. But in each restart, the best global fitness is saved. It can be seen that the restart probability decreased with the iteration time rising because rs is increased by each iteration.


### 3.3.2. Fitness Function

In this optimization problem, there are only three inequality constraints. Based on the standard PSO and recommended constraints handling technique, the constraints in (13) and (14) can be substituted with the milling model. The fitness function is shown as follows:(15)Fit=Tpr+m2max0,FcV6120−Pmη2+max0,Fc−Fs2+max0,Fc−Fd2.According to (2), the fitness function above is a quaternion function (about Np, αi, Vi, fzi). So, this is a four-dimension optimization problem. Nevertheless, the optimization results of Np and αi cannot always be implemented in practice, because the removal of each pass αi depends on the machining accuracy of the machine. And the number of passes of the cutting process must be an integer. For the reasons above, the two parameters, Np and αi, are optimized by another strategy.There are some frequently used machining options ofNp and αi. αi is defined in the range of αmin,αmax. Then the Np is fixed by the total cut depth α and αi, Np=α/αi. Usually, four or five strategies are implemented to obtain the final best results. The set of Np and αi that obtain the minimum machining time is considered as the optimal parameters.The representation of this milling problem by particles is shown in Figure1.Figure 1
The representation of a solution to the milling parameters optimization problem.


### 3.3.3. Computational Process

In this study, the programming language is Microsoft VisualC++ and the flow chart of the proposed PSO is shown in Figure 2.Figure 2
The flowchart of the proposed PSO.


### 3.3.4. Complexity of the Proposed Method

Assuming the population size isK, the maximum iteration times is L (maximum iteration times), the maximum repetition times is R (maximum repeat times), and the problem size is N (Nparameters need to be optimized), and the computational complexity is analyzed as follows: at each iteration, problem modeling, fitness calculation, optimal state selection of individual and population, speed calculation, and state update are required. Therefore, the time complexity of the proposed method is(16)OL,K,R,N=OK∗KN+R−1∗L−1∗0.1∗N2≈OK2+OKRLN2.When the size of the problem is much larger than the population size, the time complexity of this method can be simplified asK∗R∗L∗ON2; that is, the calculation amount is proportional to the square of the size of the research problem and is proportional to the population size (K), the maximum number of repeats (R), and the maximum number of iterations (L).


## 3.3.1. Modification of PSO

(1)
Particles no longer learn from one’s ownpbest. Parts of the swarm obtain pbest of other members. The different pbest guide the particle flying in another direction. The searchability of the swarm is enhanced. In this study, ten percent of particles were randomly chosen to implement this modification and change pbest used in (10).(2)
To avoid the particles getting trapped into local optima, after an iteration of the proposed method, the particles do not update their position and velocity by (12) and (13). Instead, ten percent of particles implement their initialization and randomly get their positions and velocities. In this way, that the majority of the experience has been held back and delivered to the next generation. At the same time, the diversity of the swarm is kept.(3)
The last modification of the standard PSO is a restart parameter to stop its quick convergence. When all the particles go to the same direction guided bygbest, the swarm always have a fast convergence rate before finding the optimal point. To get thorough flying in the search space, the particles have some probability to reset and restart the method so the particles can jump out of local optima.Whengbest does not update, a counter-repeat times (RepeatTime) increase by 1. When the repeat times reach the max repeat time (MaxRepeatTime) that means the particles may trap in the local minimum. We set a parameter rs that combines with the present iteration times and the max iteration times (rs is present iteration times/max iteration times). Another parameter rand is a randomly generated number in 0,1. On the condition that the max repeat times are reached, compare rs with rand. If rs is smaller than rand, all particles have an initialized value and all parameters are reset. But in each restart, the best global fitness is saved. It can be seen that the restart probability decreased with the iteration time rising because rs is increased by each iteration.


## 3.3.2. Fitness Function

In this optimization problem, there are only three inequality constraints. Based on the standard PSO and recommended constraints handling technique, the constraints in (13) and (14) can be substituted with the milling model. The fitness function is shown as follows:(15)Fit=Tpr+m2max0,FcV6120−Pmη2+max0,Fc−Fs2+max0,Fc−Fd2.According to (2), the fitness function above is a quaternion function (about Np, αi, Vi, fzi). So, this is a four-dimension optimization problem. Nevertheless, the optimization results of Np and αi cannot always be implemented in practice, because the removal of each pass αi depends on the machining accuracy of the machine. And the number of passes of the cutting process must be an integer. For the reasons above, the two parameters, Np and αi, are optimized by another strategy.There are some frequently used machining options ofNp and αi. αi is defined in the range of αmin,αmax. Then the Np is fixed by the total cut depth α and αi, Np=α/αi. Usually, four or five strategies are implemented to obtain the final best results. The set of Np and αi that obtain the minimum machining time is considered as the optimal parameters.The representation of this milling problem by particles is shown in Figure1.Figure 1
The representation of a solution to the milling parameters optimization problem.


## 3.3.3. Computational Process

In this study, the programming language is Microsoft VisualC++ and the flow chart of the proposed PSO is shown in Figure 2.Figure 2
The flowchart of the proposed PSO.


## 3.3.4. Complexity of the Proposed Method

Assuming the population size isK, the maximum iteration times is L (maximum iteration times), the maximum repetition times is R (maximum repeat times), and the problem size is N (Nparameters need to be optimized), and the computational complexity is analyzed as follows: at each iteration, problem modeling, fitness calculation, optimal state selection of individual and population, speed calculation, and state update are required. Therefore, the time complexity of the proposed method is(16)OL,K,R,N=OK∗KN+R−1∗L−1∗0.1∗N2≈OK2+OKRLN2.When the size of the problem is much larger than the population size, the time complexity of this method can be simplified asK∗R∗L∗ON2; that is, the calculation amount is proportional to the square of the size of the research problem and is proportional to the population size (K), the maximum number of repeats (R), and the maximum number of iterations (L).


## 4. Experiment Study

An application example is adopted to evaluate the performance of the proposed PSO. The parameters, the constants, and exponents’ values are specified asType of milling: plain milling.Motor power:Pw=5.5KW, efficiency η=0.7.Arbor diameterda=27mm, arbor length between supports Lα=210mm.Permissible bending and torsional stress of arbor:kb=140MPa=14.27kg/mm2, kt=120MPa=12.23kg/mm2.Modulus of elasticity of arbor materialE=200GPa=20387kg/mm2.Spindle speed range:31.5∼2000 rpm, feed rate range: 14∼900 mm/min.Tool material: HSS; tool diameter:D=63mm; number of teeth Z=8.Workpiece material: structural carbon steelC≤0.6%.Tensile strength: 750 MPa; Brinell hardness number: 150.Length, width, depth of cut:L=160mm, αw=50mm, α=5mm.Loading and unloading time of one work pieceTL=1.5min.Set up time of fixtures and machine toolTs=10min; tool change time Tc=5min.Process adjusting and quick return timeTα=0.1min/part.Lot sizeNb=100; cutting inclination: 30°.The constants and exponents used in the example are listed as follows:Cv=35.4, m=0.33, bv=0.45, ev=0.3, Bm=1.0, Bh=1, Bp=0.8, Bt=0.8, uv=0.4, rv=0.1, nv=0.1, qv=0, Czp=68.2, bz=−0.86, ez=0.86 and uz=0.72αmin and αmax are 0.5 mm, 4 mm for the milling operation, so 0.5≤αi≤4Calculate the boundary offz (feed per teeth) and V (feed speed) based on (13) and (14). The following equations are obtained:(17)0.00875mmtooth≤fz≤3.571mmtooth,6.234mmin≤V≤395.84mmin.The maximum iteration number is set as 40, the population of particles is 20, inertia weight (ω) factor is 0.9, acceleration coefficients c1, c2 are 1.05, and the punishment factor δ is 50. All the hyperparameters, such as the c1 and c2, are selected based on preliminary experiments, and the experiment results are not sensitive with a feasible selection range. Moreover, the preliminary experiment also suggests that the hyperparameter in this experiment will provide an acceptable result as well. But if it wants to exploit the best performance of the proposed method, a fined search for the hyperparameter is more feasible.For this simplified two-dimension problem, the width of each dimension is (3.571–0.000875) and (395.84–6.234). It can be seen that the two ranges differ so much. So, the initial speeds are assigned with the initial position coordinates of particles rather than be set at the 10∼20% of the dynamic range traditionally. The searchability of particles is balanced in two dissimilar dimensions by the recommended assignment.Four typical machining strategies with differentNp and αi are chosen. And the different strategies to accomplish the total 5 mm removal are tabulated in Table 2.Table 2
Four machining strategy options.
Machining strategy1234Roughing operationαrough=2αrough=1.5αrough=2αrough=1αrough=2αrough=1.5αrough=1αrough=1αrough=1.5αrough=1αrough=1αrough=1Finishing operationαfinish=1αfinish=0.5αfinish=1αfinish=1Some other methods are implemented to have a comparison with the proposed PSO. Geometric programming (GP) is one of the typical traditional dynamic programming methods. Artificial bee colony (ABC) and simulated annealing (SA) are kinds of soft computing methods that are researched mostly in recent years. All the comparison methods are the advanced methods of multipass milling process, and for a fair comparison, the proposed improved PSO (IPSO) is compared with these methods directly without any extra design or strategies. The purpose of the comparison is to evaluate if the proposed method is effective for multipass milling process.Table3 shows the four groups of computational results of IPSO and ABC. IPSO is superior to ABC in all four strategies. The production time of one part is shorted by 0.038 minutes, especially in machining strategy 1. The total machining time of a batch is shortened by 0.038 × 100 = 38 minutes.Table 3
Computational results of PSO and ABC.
MethodResults of IPSOResults of ABCT1(min)S. no.Machining strategyfz (mm/tooth)V (m/min)T2 (min)Production timeT1+T2fz (mm/tooth)V (m/min)T2 (min)Production timeT1+T21αrough=20.24253.530.4563.240.23148.1170.4753.2781.9αrough=20.24253.530.4560.23148.1170.475αfinish=10.19072.610.4280.18974.0900.4282αrough=1.50.34150.860.3403.2320.33746.9820.3433.2402.0αrough=1.50.34150.860.3400.33746.9820.343αrough=1.50.34150.860.3400.33746.9820.343αfinish=0.50.43564.190.2120.43264.410.2113αrough=20.24253.530.4563.3340.23148.1170.4753.3552.0αrough=10.55447.330.2250.55247.5190.226αrough=10.55447.330.2250.55247.5190.226αfinish=10.19072.610.4280.18974.0900.4284αrough=10.55447.330.2253.4280.55247.5190.2263.4322.1αrough=10.55447.330.2250.55247.5190.226αrough=10.55447.330.2250.55247.5190.226αrough=10.55447.330.2250.55247.5190.226αfinish=10.19072.610.4280.18974.0900.428The computational results obtained by GP are tabulated in Table4. Also, Table 4 gives the results of SA in the commonly used strategy 2. The final production time demonstrates the superiority of IPSO to GP and SA. IPSO cut the production time of one part by 0.031 minutes contrasted to SA. And for GP, production time decreases by almost one minute.Table 4
Computational results of IPSO, SA, and GP.
Machining strategyfz (mm/tooth)V (m/min)Tpr=T1+T2 (min)PSOαrough=1.50.34150.863.232αrough=1.50.34150.86αrough=1.50.34150.86αfinish=0.50.43564.19SAαrough=1.50.33644.6333.263αrough=1.50.33644.633αrough=1.50.33644.633αfinish=0.50.42957.23GPαrough=30.33826.44.205αfinish=20.5725.16IPSO has a self-adapting feature that the particles follow the local best and global best position by adjusting their velocities. The two best positions are updated by fitness estimation and affect the direction of swarms in the next iteration. Particles continually gather to the near-optimal area by conducting two ongoing comparisons. IPSO has efficient search ability due to its active inner learning structure.ABC gains results approximate to IPSO in Table3 but ABC algorithm is so complicated in the concept of foragers, and unemployed foragers consist of scout bee and recruit, employed foragers, and experienced foragers [12, 30]. SA is a kind of probabilistic hill-climbing computing algorithm and is suitable for combinatorial optimization problems or nonlinear response functions. According to Table 4, the results obtained by SA are inferior to the results gained by IPSO. Moreover, SA is time-consuming. With about 100 iterations, SA can obtain the final best results [5]. Unlike IPSO, SA uses Metropolis strategy to update the current best solution and only when the annealing time is long enough, SA can provide good results. When compared to GP which is one type of traditional optimization strategy, IPSO is better than the results of GP. Traditional methods alone cannot give a robust result of the multiconstraints nonlinear programming optimization problem.


## 5. Conclusion and Future Work

Process planning of the multipass milling process is crucial for the determination of the cutting parameters. The selection of the passes, depth of cut, cut speed, and feed per teeth have a great impact on the production time greatly. The cost and final quality of products are also affected by the recommended parameters. In this study, the multipass machining process is modeled on basis of the proposed PSO which is one kind of swarm intelligence algorithm. Its search mechanism of going after the local best and global best positions ensures the convergence of particles.The penalty function method is used as the constraints handling technique. The constraints of the arbor strength, the arbor deflection, and the cutting power are satisfied by the punishment function method. An experimental example is presented to test the proposed IPSO. The computational results of IPSO are superior to the results gained by ABC, SA, and GP. Meanwhile, IPSO has a relatively high convergence rate.In this study, IPSO is successfully used in milling parameters optimization problems, but it has not been frequently tested in other metal machining parameters optimization problems such as drilling, grinding, and turning. In future work, the searching ability and convergence rate of IPSO will be tested by increasing the dimensions of the optimization problem. Furthermore, for a complicated machining process with different machining operations, this will largely decrease the total process time and increase production. Besides, hybridizing IPSO with other optimization algorithms to enhance its performance is another research direction.



---

*Source: 8545739-2022-09-19.xml*