Skip to content

Finding The Cheapest Cutting Speed With Golden-Section Search

Bracketing versus golden-section search on a Taylor tool-life cost model over 50–600 m/min — and why the golden ratio keeps shrinking the interval so evenly.

Nov 12, 20269 min readTime O(log(1/ε))Space O(1)
50 m/min600 m/min
Iteration 1/15 · interval [50.0, 600.0] · width 550.00 m/min

The engineering problem

A turning operation has two competing costs. Increasing the cutting speed reduces machining time, but shortens tool life: tools wear out faster, need replacing more often, and introduce additional downtime. The optimization variable is the cutting speed VV, bounded by 50≤V≤60050\leq V\leq600 m/min.

This worked example applies directional bracketing with interval refinement and golden-section search to the same production-cost function.

Model and physical parameters

Taylor’s tool-life equation is VTn=CVT^n=C, so tool life and machining time are

T(V)=(CV)1/n,tm(V)=KV,K=πDLf.T(V)=\left(\frac{C}{V}\right)^{1/n},\qquad t_m(V)=\frac{K}{V},\qquad K=\frac{\pi DL}{f}.

The total cost per part is

f(V)=CoKV+KV(VC)1/n(Cotct+Ctool).f(V)=\frac{C_oK}{V}+\frac{K}{V}\left(\frac{V}{C}\right)^{1/n}(C_ot_{ct}+C_{\mathrm{tool}}).

Here ff in the definition of KK denotes feed per revolution; f(V)f(V) denotes the objective function.

SymbolMeaningValueUnits
VVCutting speed50–600m/min
DDWorkpiece diameter0.05m
LLLength of cut0.20m
ffFeed per revolution0.0002m/rev
KKCutting-path constant50π≈157.0850\pi\approx157.08m
CoC_oMachine, labor, and overhead rate1.00dollars/min
tctt_{ct}Tool-change time1.5min
CtoolC_{\mathrm{tool}}Cost per cutting edge3.00dollars
nnTaylor tool-life exponent0.25dimensionless
CCSpeed giving one minute of tool life400m/min

Dimensional check. The operating cost is a rate in dollars/min, not minutes. Multiplying it by machining time yields dollars. The second term multiplies the number of tool lives consumed per part by the cost of a replacement and its downtime, also yielding dollars.

Substitution gives

f(V)=157.0796327V+157.0796327V(V400)4(1.5+3.0).f(V)=\frac{157.0796327}{V}+\frac{157.0796327}{V}\left(\frac{V}{400}\right)^4(1.5+3.0).

Bracketing and interval refinement

A bracket contains a middle point whose cost is no larger than that of its two neighboring probes. Start at the lower bound and expand the step while the cost continues to decrease.

ParameterMeaningValue
Δ\DeltaReference step length4 m/min
λ\lambdaStep scale0.5
s0=λΔs_0=\lambda\DeltaInitial step2 m/min
γ\gammaExpansion factor2
mmGrid divisions per refinement10

Initialization and direction

x0=50,f(x0)≈3.145;x1=x0+s0=52,f(x1)≈3.025.x_0=50,\quad f(x_0)\approx3.145;\qquad x_1=x_0+s_0=52,\quad f(x_1)\approx3.025.

Since f(x1)<f(x0)f(x_1)<f(x_0), the forward direction d=+1d=+1 is descending. If the forward probe does not improve the cost, a reverse probe can determine the other direction, provided it lies within the admissible bounds. At the lower bound, an out-of-range reverse probe must not be used.

Expansion and termination

sk+1=γsk,xk+2=xk+1+d sk+1.s_{k+1}=\gamma s_k,\qquad x_{k+2}=x_{k+1}+d\,s_{k+1}.

Keep probes within [50,600][50,600]. The supplied forward sequence is

50, 52, 56, 64, 80, 112, 176, 304.50,\ 52,\ 56,\ 64,\ 80,\ 112,\ 176,\ 304.

When the next probe increases the cost, the minimum is bracketed:

f(xk−1)≥f(xk)≤f(xk+1)⟹V∗∈[min⁡(xk−1,xk+1),max⁡(xk−1,xk+1)].f(x_{k-1})\geq f(x_k)\leq f(x_{k+1})\quad\Longrightarrow\quad V^*\in[\min(x_{k-1},x_{k+1}),\max(x_{k-1},x_{k+1})].

For this sequence, the bracket is [112,304][112,304] m/min around the best probe at 176176 m/min.

Grid refinement

For a retained bracket [aj,bj][a_j,b_j], divide its width into ten equal parts:

Wj=bj−aj,Δj=Wjm,gi=aj+iΔj,i=0,…,m.W_j=b_j-a_j,\qquad\Delta_j=\frac{W_j}{m},\qquad g_i=a_j+i\Delta_j,\quad i=0,\ldots,m.

Evaluate the grid points, retain the neighbors of the lowest-cost point, and repeat until the bracket meets the desired tolerance. Bracketing first discovers a useful region; refinement then spends evaluations reducing that region.

Golden-section search starts with the full interval and systematically discards a portion that cannot contain the minimum of a unimodal objective.

ρ=5−12≈0.618033989,Vl=50,Vu=600,ϵ=0.5 m/min.\rho=\frac{\sqrt5-1}{2}\approx0.618033989,\qquad V_l=50,\quad V_u=600,\quad\epsilon=0.5\ \mathrm{m/min}.

The two interior points are

V1=Vu−ρ(Vu−Vl)≈260.0813,V2=Vl+ρ(Vu−Vl)≈389.9187.V_1=V_u-\rho(V_u-V_l)\approx260.0813,\qquad V_2=V_l+\rho(V_u-V_l)\approx389.9187.

The original notes repeat the first point’s label and mix function values with interval bounds. The interval updates below correct that notation without changing the method:

{f(V1)<f(V2)⟹[Vl,Vu]←[Vl,V2],f(V1)≥f(V2)⟹[Vl,Vu]←[V1,Vu].\begin{cases} f(V_1)<f(V_2)&\Longrightarrow [V_l,V_u]\gets[V_l,V_2],\\ f(V_1)\geq f(V_2)&\Longrightarrow [V_l,V_u]\gets[V_1,V_u]. \end{cases}

One interior point survives each update, together with its cached objective value. Only one new evaluation is needed per reduction.

Ik=Vu−Vl,Ik+1=ρIk,Ik≤ϵ⟹V∗≈Vl+Vu2.I_k=V_u-V_l,\qquad I_{k+1}=\rho I_k,\qquad I_k\leq\epsilon\Longrightarrow V^*\approx\frac{V_l+V_u}{2}.

Reference implementation

const rho = (Math.sqrt(5) - 1) / 2;
let xl = 50, xu = 600;
const eps = 0.5;
let x1 = xu - rho * (xu - xl);
let x2 = xl + rho * (xu - xl);
let f1 = cost(x1), f2 = cost(x2);

while (xu - xl > eps) {
  if (f1 < f2) {
    xu = x2; x2 = x1; f2 = f1;
    x1 = xu - rho * (xu - xl);
    f1 = cost(x1);
  } else {
    xl = x1; x1 = x2; f1 = f2;
    x2 = xl + rho * (xu - xl);
    f2 = cost(x2);
  }
}
const xstar = (xl + xu) / 2;
const minimumCost = cost(xstar);

Numerical check and stopping accuracy

Writing the cost as A/V+BV1/n−1A/V+B V^{1/n-1} gives a closed-form stationary point for verification:

Vcheck=C[n1−nCoCotct+Ctool]n≈208.67794 m/min.V_{\mathrm{check}}=C\left[\frac{n}{1-n}\frac{C_o}{C_ot_{ct}+C_{\mathrm{tool}}}\right]^n\approx208.67794\ \mathrm{m/min}.

At this speed, the minimum cost is approximately 1.00365 dollars per part. Golden-section search with a 0.5 m/min interval tolerance returns a midpoint near 208.7 m/min; the midpoint’s distance from a bracketed minimizer is at most half the final interval width.

N≥⌈log⁡(ϵ/(600−50))log⁡ρ⌉=15.N\geq\left\lceil\frac{\log(\epsilon/(600-50))}{\log\rho}\right\rceil=15.

Thus the interval needs 15 reductions. The iteration count grows logarithmically with the initial width divided by the tolerance; the algorithm retains only a constant-sized working state.

Comparison analysis

The supplied notes leave the final comparison analysis to the author. It is not fabricated here. The worked methods, objective, stopping criterion, and numerical check are presented above; a measured comparison of function evaluations and refinement accuracy remains to be written.

Series · Numerical Optimization

  1. Part 1

    Finding The Cheapest Cutting Speed With Golden-Section Search

  2. Part 2

    Having Fun With Conjugate Gradient Descent On A Spring–Mass System

All algorithms

Comments (2)

Demo discussion
  • Nevaeh Hall

    Nevaeh@crazywolf266

    Golden-section search seems well suited to narrowing a cutting-speed interval while reusing cost evaluations.

    • Darlene Diaz

      Darlene@angrypanda812

      Would that advantage hold if the Taylor tool-life model produced more than one local cost minimum?