# Intelligent Selection of Machining Parameters in Multipass Turnings Using Firefly Algorithm

Authors: Abderrahim Belloufi; Mekki Assas; Imane Rezgui
Journal: Modelling and Simulation in Engineering
 (2014)

---

## Abstract

Determination of optimal cutting parameters is one of the most important elements in any process planning of metal parts. In this paper, a new optimization technique, firefly algorithm, is used for determining the machining parameters in a multipass turning operation model. The objective considered is minimization of production cost under a set of machining constraints. The optimization is carried out using firefly algorithm. An application example is presented and solved to illustrate the effectiveness of the presented algorithm.


---

## Body

## 1. Introduction

The selection of optimal cutting parameters, like the number of passes, depth of cut for each pass, feed, and speed, is a very important issue for every machining processes [1].Several cutting constraints must be considered in machining operations. In turning operations, a cutting process can possibly be completed with a single pass or by multiple passes. Multipass turning is preferable over single-pass turning in the industry for economic reasons [2].The optimization problem of machining parameters in multipass turnings becomes very complicated when plenty of practical constraints have to be considered [3].Traditionally, mathematical programming techniques like graphical methods [4], linear programming [5], dynamic programming [6, 7], and geometric programming [8, 9] had been used to solve optimization problems of machining parameters in multipass turnings. However, these traditional methods of optimization do not fare well over a broad spectrum of problem domains. Moreover, traditional techniques may not be robust. Numerous constraints and multiple passes make machining optimization problems complicated and hence these techniques are not ideal for solving such problems as they tend to obtain a local optimal solution. Thus, metaheuristic algorithms have been developed to solve machining economics problems because of their power in global searching. There have been some works regarding optimization of cutting parameters [2, 3, 10–14] for different situations; authors have been trying to bring out the utility and advantages of genetic algorithm, evolutionary approach, and simulated annealing. It is proposed to use the new optimization technique, firefly algorithm, for the machining optimization problems.The firefly algorithm (FA) is a metaheuristic, nature-inspired, and optimization algorithm which is based on the social (flashing) behavior of fireflies, or lighting bugs, in the summer sky in the tropical temperature regions [5–18]. It was developed by Dr. Yang at Cambridge University in 2007, and it is based on the swarm behavior such as fish, insects, or bird schooling in nature. In particular, although the firefly algorithm has many similarities with other algorithms which are based on the so-called swarm intelligence, such as the famous Particle Swarm Optimization (PSO), Artificial Bee Colony optimization (ABC), and Bacterial Foraging algorithms (BFA), it is indeed much simpler both in concept and implementation [15, 16, 18, 19]. Furthermore, according to recent bibliography, the algorithm is very efficient and can outperform other conventional algorithms, such as genetic algorithms, for solving many optimization problems, a fact that has been justified in a recent research, where the statistical performance of the firefly algorithm was measured against other well-known optimization algorithms using various standard stochastic test functions [20].The current paper focuses on the application of a new optimization technique, firefly algorithm, to determine the optimal machining parameters that minimize the unit production cost in multipass turnings.


## 2. Cutting Process Model

### 2.1. Decision Variables

In the constructed optimization problem, six decision variables are considered: cutting speeds in rough and finish machining(
V
r
,
V
s
), feed rates in rough and finish machining (
f
r
,
f
s
), and depth of cut for each pass of rough and finish machining (
a
r
,
a
s
).


### 2.2. Objective Function

Based on the minimum unit production cost,UC, criterion, the objective function for a multipass turning operation can be given by the equation [10]:
(1)
UC
=
C
M
+
C
I
+
C
R
+
C
T
,
C
M
=
k
0
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
,
C
I
=
k
0
[
t
c
+
(
h
1
L
+
h
2
)
(
a
t
-
a
s
a
r
+
1
)
]
,
C
R
=
k
0
t
c
T
p
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
,
C
T
=
k
t
T
p
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
.


### 2.3. Constraints

There are some constraints which affect the selection of the optimal cutting conditions and will be taken into account.The constraints in rough and finish machining are as outlined below [10].


#### 2.3.1. Rough Machining

Parameter Bounds. Due to the limitations on the machine and cutting tool and due to the safety of machining the cutting parameters are limited with the bottom and top permissible limit:
(2)
cutting
speed

:
V
r
L
≤
V
r
≤
V
r
U
,
feed
rate

:
f
r
L
≤
f
r
≤
f
r
U
,
depth
of
cut

:
a
r
L
≤
a
r
≤
a
r
U
.Tool-Life Constraint. The constraint on the tool life is taken as
(3)
T
L
≤
T
r
≤
T
U
.Cutting Force Constraint. The maximum amount of cutting forces Fu should not exceed a certain value as higher forces produce shakes and vibration. This constraint is given below:
(4)
F
r
=
k
1
(
f
r
)
μ
(
a
r
)
υ
≤
F
u
.Power Constraint. The nominal power of the machine P
U limits the cutting process:(5)
P
r
=
F
r
V
r
6120
η
≤
P
U
,
efficiency η
=
0.85.Stable Cutting Region Constraint. This constraint is given as
(6)
(
V
r
)
λ
f
r
(
a
r
)
ν
≥
SC
.Chip-Tool Interface Temperature Constraint. This constraint is given as
(7)
Q
r
=
k
2
(
V
r
)
τ
(
f
r
)
ϕ
(
a
r
)
δ
≤
Q
u
.


#### 2.3.2. Finish Machining

All the constraints other than the surface finish constraint are similar for rough and finish machining [21].Surface Finish Constraint. In the finishing operations, the obtained surface roughness must be smaller than the specified value, S
R
U, given by technological criteria, so that the following equation is satisfied:
(8)
f
s
2
8
R
≤
S
R
U
.Constraints for roughing and finishing parameter relations are(9)
V
s
≥
k
3
V
r
,
f
r
≥
k
4
f
s
,
a
r
≥
k
5
a
s
.The Number of Rough Cuts. The possible number of rough cuts is restricted by
(10)
n
=
a
t
-
a
s
a
r
,
where n
L
≤
n
≤
n
U,
(11)
n
L
=
(
a
t
-
a
s
U
)
a
r
U
,
n
U
=
(
a
t
-
a
s
L
)
a
r
L
.The optimization problem in multipass turnings can be divided intom
=
(
n
U
-
n
L
+
1
) subproblems, in each of which the number of rough cuts n is fixed. So the solution of the whole optimization problem is divided into searching the optimal results of m subproblems and the minimum of them is the objective of whole optimization problem [3].


## 2.1. Decision Variables

In the constructed optimization problem, six decision variables are considered: cutting speeds in rough and finish machining(
V
r
,
V
s
), feed rates in rough and finish machining (
f
r
,
f
s
), and depth of cut for each pass of rough and finish machining (
a
r
,
a
s
).


## 2.2. Objective Function

Based on the minimum unit production cost,UC, criterion, the objective function for a multipass turning operation can be given by the equation [10]:
(1)
UC
=
C
M
+
C
I
+
C
R
+
C
T
,
C
M
=
k
0
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
,
C
I
=
k
0
[
t
c
+
(
h
1
L
+
h
2
)
(
a
t
-
a
s
a
r
+
1
)
]
,
C
R
=
k
0
t
c
T
p
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
,
C
T
=
k
t
T
p
[
π
D
L
1000
V
r
f
r
(
a
t
-
a
s
a
r
)
+
π
D
L
1000
V
s
f
s
]
.


## 2.3. Constraints

There are some constraints which affect the selection of the optimal cutting conditions and will be taken into account.The constraints in rough and finish machining are as outlined below [10].


### 2.3.1. Rough Machining

Parameter Bounds. Due to the limitations on the machine and cutting tool and due to the safety of machining the cutting parameters are limited with the bottom and top permissible limit:
(2)
cutting
speed

:
V
r
L
≤
V
r
≤
V
r
U
,
feed
rate

:
f
r
L
≤
f
r
≤
f
r
U
,
depth
of
cut

:
a
r
L
≤
a
r
≤
a
r
U
.Tool-Life Constraint. The constraint on the tool life is taken as
(3)
T
L
≤
T
r
≤
T
U
.Cutting Force Constraint. The maximum amount of cutting forces Fu should not exceed a certain value as higher forces produce shakes and vibration. This constraint is given below:
(4)
F
r
=
k
1
(
f
r
)
μ
(
a
r
)
υ
≤
F
u
.Power Constraint. The nominal power of the machine P
U limits the cutting process:(5)
P
r
=
F
r
V
r
6120
η
≤
P
U
,
efficiency η
=
0.85.Stable Cutting Region Constraint. This constraint is given as
(6)
(
V
r
)
λ
f
r
(
a
r
)
ν
≥
SC
.Chip-Tool Interface Temperature Constraint. This constraint is given as
(7)
Q
r
=
k
2
(
V
r
)
τ
(
f
r
)
ϕ
(
a
r
)
δ
≤
Q
u
.


### 2.3.2. Finish Machining

All the constraints other than the surface finish constraint are similar for rough and finish machining [21].Surface Finish Constraint. In the finishing operations, the obtained surface roughness must be smaller than the specified value, S
R
U, given by technological criteria, so that the following equation is satisfied:
(8)
f
s
2
8
R
≤
S
R
U
.Constraints for roughing and finishing parameter relations are(9)
V
s
≥
k
3
V
r
,
f
r
≥
k
4
f
s
,
a
r
≥
k
5
a
s
.The Number of Rough Cuts. The possible number of rough cuts is restricted by
(10)
n
=
a
t
-
a
s
a
r
,
where n
L
≤
n
≤
n
U,
(11)
n
L
=
(
a
t
-
a
s
U
)
a
r
U
,
n
U
=
(
a
t
-
a
s
L
)
a
r
L
.The optimization problem in multipass turnings can be divided intom
=
(
n
U
-
n
L
+
1
) subproblems, in each of which the number of rough cuts n is fixed. So the solution of the whole optimization problem is divided into searching the optimal results of m subproblems and the minimum of them is the objective of whole optimization problem [3].


## 2.3.1. Rough Machining

Parameter Bounds. Due to the limitations on the machine and cutting tool and due to the safety of machining the cutting parameters are limited with the bottom and top permissible limit:
(2)
cutting
speed

:
V
r
L
≤
V
r
≤
V
r
U
,
feed
rate

:
f
r
L
≤
f
r
≤
f
r
U
,
depth
of
cut

:
a
r
L
≤
a
r
≤
a
r
U
.Tool-Life Constraint. The constraint on the tool life is taken as
(3)
T
L
≤
T
r
≤
T
U
.Cutting Force Constraint. The maximum amount of cutting forces Fu should not exceed a certain value as higher forces produce shakes and vibration. This constraint is given below:
(4)
F
r
=
k
1
(
f
r
)
μ
(
a
r
)
υ
≤
F
u
.Power Constraint. The nominal power of the machine P
U limits the cutting process:(5)
P
r
=
F
r
V
r
6120
η
≤
P
U
,
efficiency η
=
0.85.Stable Cutting Region Constraint. This constraint is given as
(6)
(
V
r
)
λ
f
r
(
a
r
)
ν
≥
SC
.Chip-Tool Interface Temperature Constraint. This constraint is given as
(7)
Q
r
=
k
2
(
V
r
)
τ
(
f
r
)
ϕ
(
a
r
)
δ
≤
Q
u
.


## 2.3.2. Finish Machining

All the constraints other than the surface finish constraint are similar for rough and finish machining [21].Surface Finish Constraint. In the finishing operations, the obtained surface roughness must be smaller than the specified value, S
R
U, given by technological criteria, so that the following equation is satisfied:
(8)
f
s
2
8
R
≤
S
R
U
.Constraints for roughing and finishing parameter relations are(9)
V
s
≥
k
3
V
r
,
f
r
≥
k
4
f
s
,
a
r
≥
k
5
a
s
.The Number of Rough Cuts. The possible number of rough cuts is restricted by
(10)
n
=
a
t
-
a
s
a
r
,
where n
L
≤
n
≤
n
U,
(11)
n
L
=
(
a
t
-
a
s
U
)
a
r
U
,
n
U
=
(
a
t
-
a
s
L
)
a
r
L
.The optimization problem in multipass turnings can be divided intom
=
(
n
U
-
n
L
+
1
) subproblems, in each of which the number of rough cuts n is fixed. So the solution of the whole optimization problem is divided into searching the optimal results of m subproblems and the minimum of them is the objective of whole optimization problem [3].


## 3. Firefly Algorithm (FA)

Firefly algorithm is inspired by biochemical and social aspects of real fireflies. Real fireflies produce a short and rhythmic flash that helps them in attracting (communicating) their mating partners and also serves as protective warning mechanism. FA formulates this flashing behavior with the objective function of the problem to be optimized. The following three rules are idealized for basic formulation of FA.(i)
All fireflies are unisex so that fireflies will attract each other regardless of their sex.
(ii)
Attractiveness is proportional to their brightness, which decreases as distance increases between two flies. Thus the less bright one will move towards the brighter one. In case it is unable to detect brighter one it will move randomly.
(iii)
The brightness of a firefly is determined by the landscape of the objective function.


### 3.1. Firefly Algorithm Concept [17]

The algorithm is considered in the continuous constrained optimization problem setting where the task is to minimize cost functionf
(
x
) for x
∈
S
⊂
ℝ
n; that is, find x
* such that:(12)
f
(
x
*
)
=
min
⁡
x
∈
S
f
(
x
)
.Assume that there exists a swarm ofm agents (fireflies) solving optimization problem iteratively and x
i represents a solution for a firefly i in algorithm’s iteration k, whereas f
(
x
i
) denotes its cost.Each firefly has its distinctive attractivenessβ which implies how strong it attracts other members of the swarm. As a firefly attractiveness one should select any monotonically decreasing function of the distance r
j
=
d
(
x
i
,
x
j
) to the chosen firefly j, for example, as Yang suggests, the exponential function:
(13)
β
=
β
0
e
-
γ
r
j
,
where β
0 and γ are predetermined algorithm parameters: maximum attractiveness value and absorption coefficient, respectively.Every member of the swarm is characterized by its light intensityI
i which can be directly expressed as an inverse of a cost function f
(
x
i
).Initially all fireflies are dislocated inS (randomly or employing some deterministic strategy).To effectively explore considered search spaceS it is assumed that each firefly i is changing its position iteratively taking into account two factors: attractiveness of other swarm members with higher light intensity, that is, I
j
>
I
i, for all j
=
1
,
…
,
m, j
≠
i, which is varying across distance and a fixed random step vector u
i.If no brighter firefly can be found only the randomized step is being used.


### 3.2. Pseudocode of the Firefly Algorithm

See Pseudocode1.Pseudocode 1
Input:
f
(
z
)
,
z
=
[
z
1
,
z
2
,
…
,
z
n
]
T (Cost function)
S
=
[
a
k
,
b
k
]
,
∀
k
=
1
,
…
,
n (Constraints)
m
,
β
0
,
γ
,
min
⁡
u
i
,
max
u
i (Algorithm’s parameters)
Output:
x
i
min
⁡
begin
repeat
i
min
⁡
←
arg
⁡
min
⁡
i
f
(
x
i
)
,
x
i
min
⁡
←
arg
⁡
min
⁡
x
i
f
(
x
i
)
For i
=
1 to m do
For j
=
1 to m do
If f
(
x
j
)
<
f
(
x
i
) then
r
j
← Calculate distance (
x
i
,
x
j
)
β
←
β
0
e
-
γ
r
j
u
i
← Generate Random Vector (
min
u
i
,
max
u
i
)
For k
=
1 to n do x
i
,
k
←
(
1
-
β
)
x
i
,
k
+
β
x
j
,
k
+
u
i
,
k
u
i
min
⁡
← Generate Random Vector (
min
u
i
,
max
⁡
u
i
)
For k
=
1 to n do x
i
min
⁡
,
k
←
x
i
min
⁡
,
k
+
u
i
min
⁡
,
k
until stop condition true
end


## 3.1. Firefly Algorithm Concept [17]

The algorithm is considered in the continuous constrained optimization problem setting where the task is to minimize cost functionf
(
x
) for x
∈
S
⊂
ℝ
n; that is, find x
* such that:(12)
f
(
x
*
)
=
min
⁡
x
∈
S
f
(
x
)
.Assume that there exists a swarm ofm agents (fireflies) solving optimization problem iteratively and x
i represents a solution for a firefly i in algorithm’s iteration k, whereas f
(
x
i
) denotes its cost.Each firefly has its distinctive attractivenessβ which implies how strong it attracts other members of the swarm. As a firefly attractiveness one should select any monotonically decreasing function of the distance r
j
=
d
(
x
i
,
x
j
) to the chosen firefly j, for example, as Yang suggests, the exponential function:
(13)
β
=
β
0
e
-
γ
r
j
,
where β
0 and γ are predetermined algorithm parameters: maximum attractiveness value and absorption coefficient, respectively.Every member of the swarm is characterized by its light intensityI
i which can be directly expressed as an inverse of a cost function f
(
x
i
).Initially all fireflies are dislocated inS (randomly or employing some deterministic strategy).To effectively explore considered search spaceS it is assumed that each firefly i is changing its position iteratively taking into account two factors: attractiveness of other swarm members with higher light intensity, that is, I
j
>
I
i, for all j
=
1
,
…
,
m, j
≠
i, which is varying across distance and a fixed random step vector u
i.If no brighter firefly can be found only the randomized step is being used.


## 3.2. Pseudocode of the Firefly Algorithm

See Pseudocode1.Pseudocode 1
Input:
f
(
z
)
,
z
=
[
z
1
,
z
2
,
…
,
z
n
]
T (Cost function)
S
=
[
a
k
,
b
k
]
,
∀
k
=
1
,
…
,
n (Constraints)
m
,
β
0
,
γ
,
min
⁡
u
i
,
max
u
i (Algorithm’s parameters)
Output:
x
i
min
⁡
begin
repeat
i
min
⁡
←
arg
⁡
min
⁡
i
f
(
x
i
)
,
x
i
min
⁡
←
arg
⁡
min
⁡
x
i
f
(
x
i
)
For i
=
1 to m do
For j
=
1 to m do
If f
(
x
j
)
<
f
(
x
i
) then
r
j
← Calculate distance (
x
i
,
x
j
)
β
←
β
0
e
-
γ
r
j
u
i
← Generate Random Vector (
min
u
i
,
max
u
i
)
For k
=
1 to n do x
i
,
k
←
(
1
-
β
)
x
i
,
k
+
β
x
j
,
k
+
u
i
,
k
u
i
min
⁡
← Generate Random Vector (
min
u
i
,
max
⁡
u
i
)
For k
=
1 to n do x
i
min
⁡
,
k
←
x
i
min
⁡
,
k
+
u
i
min
⁡
,
k
until stop condition true
end


## 4. Application Example

Now an application example is considered to demonstrate and validate the firefly algorithm (FA) for the optimization of process parameters of the multipass turning operation. The parameters used for the numerical application are mentioned in Table1.Table 1
Machining data [10].
Parameter
Values
Parameter
Values
Parameter
Values
D (mm)
50
L (mm)
300
a
t (mm)
6
V
r
U (m/min)
500
V
r
L (m/min)
50
f
r
U (mm/rev)
0.9
f
r
L (mm/rev)
0.1
a
r
U (mm)
3.0
a
r
L (mm)
1.0
V
s
U (m/min)
500
V
s
L (m/min)
50
f
s
U (mm/rev)
0.9
f
s
L (mm/rev)
0.1
a
s
U (mm)
3.0
a
s
L (mm)
1.0
P
5
q
1.75
r
0.75
k
1
108
μ
0.75
υ
0.95
η
0.85
λ
2
ν
−1
k
2
132
τ
0.4
ϕ
0.2
δ
0.105
R (mm)
1.2
k
0 ($/min)
0.5
C
0
6
×
10
11
h
1
7
×
1
0
-
4
h
2
0.3
T
L (min)
25
t
c (min/piece)
0.75
t
e (min/edge)
1.5
P
U (kW)
5
T
U (min)
45
F
u (N)
1961.3
SC
140
SR
U (μm)
10
Q
u (°C)
1000
k
3
1.0
k
4
2.5
k
5
1.0
k
t ($/edge)
2.5


### 4.1. Results and Discussion

The Firefly algorithm was run with these parameters:nf
=
40 (number of fireflies),
α
=
0.25 (randomness),
β
0
=
0.20 (minimum value of beta),
γ
=
1 (Absorption coefficient).The results found by the Firefly algorithm are mentioned on Table2.Table 2
The optimized turning parameters.
n
Cutting parameters (rough machining)
Cutting parameters (finish machining)
UC ($)
V
r  (m/min)
f
r (mm/rev)
a
r (mm)
V
s  (m/min)
f
s (mm/rev)
a
s (mm)
1
98.4102
0.8200
3.0000
162.2882
0.2582
3.0000
1.9358
2
145.7281
0.6067
2.3964
207.0844
0.1519
1.2072
2.7213
3
144.1821
0.7907
1.5958
191.9014
0.1590
1.2125
3.1075
4
145.8086
0.7886
1.2429
180.1447
0.1821
1.0285
3.5428
5
166.5327
0.8998
1.0000
191.3605
0.2582
1.0000
3.4586We find that the lowest value is 1.9358$ under which the minimum number of rough cutsn
=
1 is taken.The performance of the Firefly algorithm and others can be seen in Table3.Table 3
Results of optimization using different algorithms.
Algorithms
Unit cost ($)
FEGA
[2]
2.3084
SA/SP
[3]
2.2795
PSO
[10]
2.2721
GA
[11]
2.2538
SS
[12]
2.0754
GA-based approach
[13]
2.0298
ACO
[14]
1.9680
Firefly
1.9358According to Table3 one notices that the firefly algorithm yields much better results than the other algorithms. Thus the firefly algorithm can tackle the optimization of multipass turning operations problem efficiently to achieve better results in reducing the unit production cost.


## 4.1. Results and Discussion

The Firefly algorithm was run with these parameters:nf
=
40 (number of fireflies),
α
=
0.25 (randomness),
β
0
=
0.20 (minimum value of beta),
γ
=
1 (Absorption coefficient).The results found by the Firefly algorithm are mentioned on Table2.Table 2
The optimized turning parameters.
n
Cutting parameters (rough machining)
Cutting parameters (finish machining)
UC ($)
V
r  (m/min)
f
r (mm/rev)
a
r (mm)
V
s  (m/min)
f
s (mm/rev)
a
s (mm)
1
98.4102
0.8200
3.0000
162.2882
0.2582
3.0000
1.9358
2
145.7281
0.6067
2.3964
207.0844
0.1519
1.2072
2.7213
3
144.1821
0.7907
1.5958
191.9014
0.1590
1.2125
3.1075
4
145.8086
0.7886
1.2429
180.1447
0.1821
1.0285
3.5428
5
166.5327
0.8998
1.0000
191.3605
0.2582
1.0000
3.4586We find that the lowest value is 1.9358$ under which the minimum number of rough cutsn
=
1 is taken.The performance of the Firefly algorithm and others can be seen in Table3.Table 3
Results of optimization using different algorithms.
Algorithms
Unit cost ($)
FEGA
[2]
2.3084
SA/SP
[3]
2.2795
PSO
[10]
2.2721
GA
[11]
2.2538
SS
[12]
2.0754
GA-based approach
[13]
2.0298
ACO
[14]
1.9680
Firefly
1.9358According to Table3 one notices that the firefly algorithm yields much better results than the other algorithms. Thus the firefly algorithm can tackle the optimization of multipass turning operations problem efficiently to achieve better results in reducing the unit production cost.


## 5. Conclusion

This paper presents a firefly algorithm optimization for solving the multipass turning operations problem. The results obtained from comparing the Firefly algorithm with those taken from recent literature prove its effectiveness.The results of the Firefly algorithm are compared with results of genetic algorithms, simulated annealing, particle swarm intelligence, scatter search, and ant colony approaches.The firefly algorithm obtains near optimal solution; it can be used for machining parameter selection of complex machined parts that require many machining constraints. Also, it can be extended to solve the other metal cutting optimization problems such as milling and drilling.



---

*Source: 592627-2014-02-09.xml*