Download ADAMS/Solver Primer

Transcript
x (1) = x (0) −
f ( x (0) )
f ′( x (0) )
(2)
where f ′() is the derivative of the function with respect to the variables on which it
depends.
This strategy of updating the value of x is obtained by linearizing the function f at the
point x (0) . Thus,
f ( x) ≈ f ( x (0) ) + f ′( x (0) )( x − x (0) )
(3)
Rather than solving f ( x) = 0 , the root of the right hand side expression in Eq.(3) is
sought. This leads to a linear equation, and its root is denoted by x (1) :
f ( x (0) ) + f ′( x (0) )( x (1) − x (0) ) = 0 ⇒ x (1) = x (0) −
f ( x (0) )
f ′( x (0) )
which is the configuration update defined in Eq.(2). The algorithm continues by setting
x (0) ← x (1) and performing another iteration as indicated in Eq.(2), and illustrated in
Figure 1.
The method just described is called Newton-Raphson, or sometimes simply
Newton. In general, this approach leads to a quadratic rate of convergence to the root x∗
provided the iterative process is started close enough to the root. The drawback of the
method is that as indicated in Eq.(2), the new update x (1) requires the computation of the
derivative both the function f ( x (0) ) and the derivative f ′( x (0) ) . At the cost of one
function and one derivative evaluation per iteration, this method is considered to be rather
expensive. An alternative is to only update the derivative once in a while, and to recycle
the derivative computed at an older configuration for several iterations. This method is
called Newton-like, and the convergence rate is linear.
Referring to the ADAMS/Solver documentation, consider the INTEGRATOR
statement. One of its attributes is the PATTERN setting, which enables the user to
dictate how often the derivative is to be updated. Computing the derivative (also called
the Jacobian), is in general an expensive operation and should be done as seldom as
possible. On the other hand, if it’s done too seldom, the speed of convergence will suffer
as there will be degradation from quadratic (for Newton-Raphson), to linear rate of
convergence (for Newton-like methods). Figure 1 shows a geometric interpretation of
the Newton-Raphson method: starting with the configuration x (0) , the nonlinear function
is locally approximated by a straight line. The new configuration x (1) is taken to be the
place where the straight line intersects the x -axis (the solution of the linear equation of
Eq.(3)). Moving on, the new tangent is determined; i.e., a new derivative f ( x (1) ) is
computed, and the new configuration x (2) is obtained. The Newton-Raphson iteration
sequence is thus carried out as:
4