|
Alan Weiss <aweiss@mathworks.com> wrote in message <gi2ltn$4ol$1@fred.mathworks.com>...
> Vincent Morio wrote:
> > Hi,
> >
> > Is it possible to use LUT inside a fmincon objective or nonlinear constraints function ? It seems that the Jacobian matrix can't be evaluated by numerical differentiation. However, my code works if I use approximating analytical functions instead of the LUTs.Thanks.
> >
> fmincon needs to be able to evaluate the objective and constraint
> functions at arbitrary points x. So you have to provide objective and
> nonlinear constraint functions that evaluate at every x. If your
> function is defined only on a grid, such as in a lookup table, then you
> have to provide interpolation functions that give the objective and
> nonlinear constraints at intermediate values.
>
> It is best if the interpolation is not simply linear, since linear
> interpolations have discontinuous derivatives. However, it may be
> difficult to find an appropriate smooth multidimensional nonlinear
> interpolation function.
>
> interpn performs n-dimensional linear interpolation.
>
> You might want to try to interpolate by convolution with an appropriate
> function, such as a multivariate normal density. You should take the
> standard deviation of the density high enough to cover a few mesh
> points, but low enough that the convolution is reasonably close to the
> original function at mesh points.
>
> Sorry I don't have any better ideas right now. Good luck,
>
> Alan Weiss
> MATLAB mathematical toolbox documentation
Alan,
I used a feedforward neural network to approximate the loop-up tables in smooth analytical form instead of a linear interpolation, and it works pretty well. Thank you again for your help,
Vincent Morio
University of Bordeaux
|