Page 275 - Process Modelling and Simulation With Finite Element Methods
P. 275
262 Process Modelling and Simulation with Finite Element Methods
>> errornm([0.05,0.05,0.051)
** Several warnings print here **
Iter ErrEst Damping Stepsize nfun njac nfac nbsu
1 2e-014 1.0000000 3.1 2 1 1 2
2 1.2e-016 1.0000000 8.7e-015 3 2 2 4
ans = 0.00001699
Finally, we are ready to create a MATLAB script file to call MATLAB’s built-in
optimization routine, fminsearch ( ) for scalar valued functions with vectorial
arguments :
fmin.m contains three simple commands
v= LO. 01,o. 01,o. 011 ;
a=fminsearch(@errornm,v) ;
quit
The @ preceeding the function name treats it as a pure function argument. The
second argument represents the initial condition. fminsearch ( ) provides a
simple algorithm for minimizing a scalar function of several variables. It
implements the Nelder-Mead simplex search algorithm, which modifies the input
arguments “v” to find the minimum of f(v). This is not as efficient on smooth
functions as some other algorithms, especially those that compute the
derivatives, but on the other hand, costly gradient calculations are not made
either. It tends to be robust on functions that are not smooth. If the function to
be minimized is inexpensive to compute, the Nelder-Mead algorithm usually
works very well.
This m-file script is best executed from the UNIX command line to avoid the
GUI overheads. It takes about 10 CPU minutes on a Pentium IV 1.2 GHz
processor:
matlab -nojvm <fmin.m >err 2>err &
Figure 7.5 contains the first 131 iterates. Apparently, the error norm has hit a
plateau at about 0.0006 and is finding it exceedingly difficult move to smaller
error norm. Similarly, the dielectric constants are convergent around the values
v=[ 0.0517, 0.0125, 0.04951.
Given that the “known” solution is
v=[ 0.05 , 0.05, 0.051,
the fact that it is not found must be explained. Clearly, given the small error
norm, the solution found is nearly as satisfactory as the “known” solution. In
fact, there is a wide range of iterates that show nearly identical error norm. This
suggests that there are many choices of the dielectric constants that result in
nearly identical boundary data - the outputs are weakly sensitive to input
variations in this regime. This result is part and parcel of the ill-posedness of the
inverse ECT problem in this case. If many sets of dielectric constants are