• Tidak ada hasil yang ditemukan

In some functions, when the derivative information is available, an unconstrained minimum may be more efficiently found by finding the zero of the derivative. Also, a robust method of finding the zero of a function is a necessary tool in constrained nonlinear optimization algorithms discussed later in Chapter 7.

The problem of finding the root or zero of a functionf(x) is same as findingx such that

f(x)=0

The problem of finding g(x) = a can be put in the above form by setting f(x)=g(x) –a. Such problems frequently occur in design and analysis. The problem of finding the minimum of a smooth function of one variable leads to finding the zero of its derivative. The zero finding algorithms may be classified into two basic categories – one where we start from an arbitrary point, and the second where an initial interval of uncertainty has been established. Newton’s method and the secant method fall in the first category. Bisection and other hybrid methods fall in the sec- ond category.

Newton’s Method

In the Newton’s method, we start at a pointxkwherefkandfk are evaluated. The next approximationxk+1 to the zero of the functionf(x), as seen fromFig. 2.19, is given by

xk+1=xkfk

fk (2.31)

2.9 Zero of a Function 79

x linear approximation to f at xk

xk+1 = xk – (f 'k)–1fk fk

xk f 'k f

Figure 2.19. Newton’s method for zero-finding.

Example 2.12

An endless V-belt with a pitch diameter of 500 mm is tightly wrapped around pulleys of pitch radii 60 mm and 40 mm as shown inFig. E2.12. Determine the center distance of the pulleys.

Solution

DesignatingRandras the larger and smaller pitch radii of pulleys respectively, andθas half contact angle on the smaller pulley,Las belt length andCas the center distance, following relationships can be derived easily:

tanθθ= 0.5LπR Rr C= Rr

cosθ

DenotingA= 0.5LRπr R, sinceL=500 mm,R=60 mm, andr=40 mm, we deter- mineA=3.075. Now designatingf=tanθθA, we need to determine θ such that f =0. Noting that f = tan2θ, we apply Eq. (2.31) starting with a value of θ1=0.45πand the correspondingf1=1.825. Newton’s algorithm yields the result θ=1.3485 radians (77.26) in four iterations. The corresponding center distanceC is then calculated as 90.71 mm.

c

(a)

(b) inv θ (= tan θ – θ)

θ π

θc 2 c1

θ θ

L = Length of Belt 50 cm R = 6 cm

R – r r = 4 cm

Figure E2.12. (a) V-belt on pulleys. (b) Plotθversus invθ.

We note here that if we start with a small value ofθ1, then the next estimation θ2may be larger than 0.5π, where the functionfchanges its sign. Some strategy can be introduced to safeguard this.

The term tanθθis special in involute gear geometry. This entity is designated as involute function of θ (invθ =tanθθ) and plays an important role in gear design.

Newton’s method for finding a zero of a function is not guaranteed to work for arbitrary starts. If we start sufficiently close to a zero, the method converges to it at a quadratic rate. Ifxkapproachesx askgoes to infinity, and there exist positive numberspandβsuch that

klim→∞

|xk+1x|

|xkx|p =β (2.32)

we say thatthe rate of convergenceis of orderp. The larger the value ofp, the higher is the order of convergence. For Newton’s method,p=2 (quadratic convergence).

Ifp=1 andβ <1, the convergence is said to belinearwith aconvergence ratioof β. The limiting case whenβ=0 is referred to assuperlinear convergence.

In thesecant method, the derivative fkis approximated using the last two func- tion values. Thus,

xk+1 =xkxkxk1

fkfk1

fk (2.33)

Problems 2.1–2.3 81 Newton’s method can be used for minimization. In this case, we find the zero of the derivative of the function.

Method of Bisection

In this method, we first establish an initial bracket x1, x2 where the function values f1, f2 are opposite in sign. The function value f is then evaluated at the mid point x = 0.5 (x1 + x2). If f and f1 have opposite signs, then x and f are renamed as x2 and f2 respectively, and if f and f1 have same signs, then x and f are renamed as x1 and f1 respectively. This is carried out till f = 0 or abs (x2x1) is smaller than a predetermined value. Solution of Example 2.8 using the bisection approach is left as an exercise. We note thatfhas a negative value atθ= 0 and a positive value atθ=0.5π. Bisection is applied to this interval.

Bisection can be combined with polynomial fit approach. Brent’s algorithm for zero finding uses bisection and quadratic fit ideas. See [Forsythe et al. 1977; Press et al. 1992] for an alternate algorithms and discussions.

COM PUTER PROGRAM S

FIBONACI, GOLDINTV, GOLDLINE, QUADFIT, BRENTGLD, CUBIC2P, SHUBERT

PROBLEM S

P2.1. Prove thatf=x2is a convex function using the following:

(i) The definition in Eq.(2.7)

(ii) Property 1 of a convex function in Eq.(2.8) (iii) Property 2 of a convex function in Eq.(2.9)

P2.2. Write down the necessary and sufficient conditions for a localmaximumtof.

P2.3. A function of one variable is graphed in the following:

(i) Isfconvex?

(ii) Isfunimodal?

x f

Figure P2.3

P2.4. A part is produced on a lathe in a machine shop. The cost of the part includes machining cost, tool related cost, and cost of idle time. The cost for the machining time is inversely proportional to the cutting speedVm/min. The tool related costs are proportional toV1.5. The costcin dollars is given by

c=240

V +104V1.5+0.45

Determine the cutting speed for minimum cost and the associated minimum cost using optimality conditions in both(2.5) and(2.6).

P2.5. In a solution of potassium (K) and chlorine (Cl), the equilibrium distancerin nanometers (10−9m) between the two atoms is obtained as the minimum of the total energyE(sum of the energy of attraction and the energy of repulsion) in electron volts (eV) given by

E= −1.44

r +5.9×106 r9

Determine the equilibrium spacing and the corresponding energy using opti- mality conditions in both(2.5) and(2.6).

P2.6. State whether Fibonacci and Golden Section search methods will work on the following problem: minimizef, where

f =(x−1)2+2 if x≤1

=(x−1)2, if x>1 Justify your answer.

P2.7. Consider f =x14+x24, with x1 and x2 real. To minimize f, I set ∇f = 0 which yields x = (0, 0)T. I claim that this is the global minimum. Explain my reasoning.

P2.8. Givenf(x)=2 – 2x+exon R1, initial interval of uncertainty=[0, 2], deter- mine the following:

(i) The first two points placed within the interval as per the Fibonacci method.

(ii) The first two points placed within the interval as per the Golden Section method.

(iii) The ratio of I1/I10 as per Fibonacci and Golden Section search methods, respectively.

P2.9. A) Consider the functionf= −V, whereV=x(210−2x) (297−2x)=vol- ume of open box. See Example 2.4. Determine whetherxis convex on: (a)R1, and (b) on the subset{0≤x≤105}. Also, provide a plot offvsxover, say, the interval [0, 250] to support your comments.

Problems 2.9–2.17 83 B) With exactly four (4) function evaluations, determine the smallest interval of uncertainty on the problem byhand calculations: minimizef=e3x+5e−2x, on the initial interval [0, 1] as per:

(i) Fibonacci search (ii) Golden Section search

P2.10. Solve the unconstrained problem: minimizef=e3x+5e2x, using MATLAB fminbnd. Check the optimality conditions at the optimum obtained from the pro- gram. Is the solution a local minimum or a global minimum?

P2.11. Solve P2.4 using Program FIBONACI.

P2.12. Solve P2.5 using Program GOLDLINE and GOLDINTV.

P2.13. Solve P2.4 using Matlab “fminbnd” routine.

P2.14. Two disks of diameters 10 cm and 20 cm are to be placed inside a rectangular region. Determine the region (a) of least perimeter, (b) of least area.

P2.15. Three disks each of diameter 10 cm are to be placed inside a rectangular region. Determine the region (a) of least perimeter, (b) of least area.

P2.16. A trapezoidal regionABCDis to be built inside a semicircle of radius 10m with pointsAandBdiametrically opposite and pointsCandD on the semicircle withCDparallel toABas shown inFig. P2.16. Determine the heighthwhich maxi- mizes the area ofABCD, and evaluate the area.

10 m

h

B D C

A Figure P2.16

P2.17. A frustum of a pyramid is to be inscribed in a hemisphere of radius 10 m. The base of the pyramid is a square with its corners touching the base of the hemisphere.

The top surface is a square parallel to the base as shown inFig. P2.17. Determine the dimensions that maximize the volume. What is the volume in m3?

h 10 m

10 m

Figure P2.17

P2.18. A water canal is built by digging dirt from the ground and spreading it on the banks as shown inFig. P2.18. If 50 m2of earth is the cross sectional area dug, deter- mine the dimensions of the canal which minimize the wetted perimeter. Assume that the canal will flow full. (Hint: The wetted perimeter is the length of the bottom side and the sum of the lengths of the two slant sides.)

3 m 3 m

A = 50 m2

h

d

x

25º

25º 25º

25º

Figure P2.18

P2.19. An open box is made by cutting out equal squares from the corners, bending the flaps, and welding the edges (Fig. P2.19). Every cubic inch of the volume of the open box brings in a profit of $0.10, every square inch of corner waste results in a cost

Problems 2.19–2.20 85 of $0.04, every inch of welding length costs $0.02. Determine the box dimensions for maximum profit.

h b

h h

h h h

h

h 17''

22'' h

b

welding

Figure P2.19

P2.20. In the toggle type mechanism shown inFig. P2.20, the spring is at its free length. The potential energyπis given by

π= 12kx2Py

H = 50 mm

k = 100 N/mm L = 300 mm A

P y

x Figure P2.20

If the equilibrium configuration is the one corresponding to minimum potential energy, determinex(andy). Solve for loadPranging from [100 N to 500 N] in steps of 100 N. That is,P(1)=100,P(2)=200, . . . ,P(5)=500.

(I) PlotPversusxandPvsy, withPthe ordinate.

(II) Until what value ofPis the response linear?

Hints:

i. First compute the constantAfromA=L

2

2

+H2.

ii. Within the loopi=1:5, callfminbndor other code to minimizeπusing the relation A2=L+x

2

2

+(Hy)2 to expressyin terms ofx. Thus,xis the independent variable. Importantly, the initial interval of uncertainty forx that must be supplied to the code must be 0≤ x≤ (2AL). The latter

comes from the fact thatAis the hypotenuse and, hence, the longest side of the triangle. Obtain and storex(i) and correspondingy(i).

iii. Outside the loop, plotPversusx,Pversusy.

P2.21. A machine tool spindle is supported by two rolling contact bearings as shown inFig. P2.21. The front bearing has a stiffnessS1of 1000 N/μm, and the rear bearing has a stiffnessS2 of 600 N/μm, the overhang a is 100 mm and the spindle diame- terdis 75 mm. The modulus of elasticityEof the spindle material (steel) is 210× 103 N/mm2. The distance between the bearings isband we denoteα=a/b. The deflection per unit loadfis given by

f = a3 3EI

1+ 1

α

+ 1 S1

(1+α)2+ 1 S2α2 Deflected Center Line

S2 S1 P

a

y y f =P

b

Figure P2.21

whereI=π64d4is the moment of inertia of the spindle section. Determine the spindle spacingbfor minimum deflection per unit load (i.e., maximum stiffness).

P2.22. A beam of length 2Lis to be supported by two symmetrically placed point supports. Determine the spacing for minimizing the maximum deflection of the beam. SeeFig. P2.22.

W = 1

+ c1x + c2 La

y = x4 24

y = (x – 1 + a)3

+ c1x + c2

)

6 x4 24 La

2L

(

Hint:

2a

EI = 1

a

y' = 0 1

Figure P2.22

Problems 2.23–2.26 87 P2.23. Repeat P2.22, but with the objective tominimize the maximum bending stress in the beam. (AssumeL=1). Use MATLAB fminbnd or a code provided on the CD-ROM. Hint: bending stress is proportional to bending moment. Considering

1/2-symmetry, with originξ =0 at the left end, 0≤ξ ≤1, expression for moment is M(ξ)= −0.5ξ 2+max(0,ξ −1+a). Thus, determine optimum spacingato mini- mize the maximum moment abs(M) in the beam.

P2.24. Use Program SHUBERT to find the global maximum off=(−3x+1.4) sin (18x),x∈[0, 1.2] Also, determine all the local maxima and intervals of uncertainty.

Validate your solution by plotting the function.

P2.25. Conduct a study on the functions in Example 2.10 comparing quadfit, cubic fit, and Matlab fminbnd programs.

P2.26. In a four bar linkage arrangement shown in Fig. P2.26, anglesθ and φare related by Freudenstein’s equation given by

R1cosφR2cosθ+R3−cos (φθ)=0 whereR1= d

a, R2= d

b, R3= d2+a2+b2c2 2ab

c

b

d a

θ φ

Figure P2.26

Ifd=16 cm,a =8 cm,b=12 cm, andc=12 cm, use a zero-finding algorithm to findφforθ=10, 20, 30, . . . , 90.

REFERENCES

Brent, R.P., Algorithms of Minimization without Derivatives, Prentice-Hall, Englewood Cliffs, NJ, 1973, pp. 47–60.

Chandrupatla, T.R., An efficient quadratic fit-Sectioning algorithm for minimization without derivatives,Computer Methods in Applied Mechanics and Engineering,152, 211–217, 1988.

Forsythe, G.E., Malcolm, M.A., and Moler, C.B.,Computer Methods for Mathematical Com- putations, Prentice-Hall, Englewood Cliffs, NJ, 1977.

Gill, P.E., Murray, W., and Wright, M.H.,Practical Optimization, Academic Press, New York, 1981.

Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P., Numerical Recipes, Cambridge University Press, New York, 1992.

Robinson, S.M., Quadratic interpolation is risky,SIAM Journal on Numerical Analysis,16, 377–379, 1979.

Shubert, B.O., A sequential method seeking the global maximum of a function,SIAM Journal Numerical on Analysis,9(3), 1972.

3

Unconstrained Optimization