Nonlinear least square problem

Uwe Kotyczka uwe.kotyczka at web.de
Thu Apr 3 16:31:46 EDT 2008


Hallo, sorry for multiposting, but I am really looking
for some hint to solve my problem. And no, I don't
use Matlab, but maybe the matlab people have an idea
nevertheless.

I have to solve a nonlinear least square problem.
Let me tell you some background first. Imagine
you have a tool to process some work piece, say
polishing some piece of glas. The tool behaves
different on different locations of the piece,
and I can describe that behaviour. Now the tool
shall smooth the surface of the workpiece.
Next I have information about the piece before
handling it. What I have to find is optimal
time curve for the tool to obtain a perfectly
smooth surface.

How to formulate the problem?
Given a time vector (t_j) I have a function
g which calculates the remaining error (e_i)
(e_i) = g(t_j)
The rest error is given at, say, 100 points,
(t_j) is searched at 200 points.
My idea was to make the (t_j) a function of
some few parameters (t_j) = h(p_k), say 15
parameters. So the concatenated function
(e_i) = g(t_j) = g(h(p_k)) =: f(p_k) is to be minimized.
in the sense (e_i)-c -> Min, where c is a constant,
the end level of the surface.

To solve this problem I use a "C" implementation
of the Levenberg-Marquardt algorithm as you can find
it in the LevMar Package (www.ics.forth.gr/~lourakis/levmar/).

The function g contains the information about the
tool and about the initial surface. For the function
h I tried several approaches, making the time a
cubic spline of a selected times, or making it some
polynmial or...

Now what is my problem? With the above I do find
solutions, however a lot of solutions seem to
give very similar remaining errors. The only problem
is that the corresponding time vectors, which are
(t_j_optimal) = h(p_k_optimal) look very different
from optimal solution to optimal solution.
In particular the optimization algorithm often prefers
solutions where the time vector is heavily oscillating.

Now this is something I _must_ suppress, but I have no
idea how. The oscillation of the (t_j) depend of
the ansatz of h, of the number of parameters (p_k).
If f would be a linear function, then the matrix
representing it would be a band matrix with a lot
of diagonals nonzero. How many depends on the
ratio tool diameter to piece diameter.

Now what are my question: Is the problem properly
formulated? Can I expect to find non-oscillating
solutions? Is it normal that taking more parameters
(p_k) makes the thing worse? What else should I
consider? Is this more verbal description sufficient?

Thank you very much in advance.







More information about the Python-list mailing list