Thread Subject: Look-up table under fmincon

Subject: Look-up table under fmincon

From: Vincent Morio

Date: 14 Dec, 2008 00:30:05

Message: 1 of 3

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.

Subject: Look-up table under fmincon

From: Alan Weiss

Date: 14 Dec, 2008 10:07:51

Message: 2 of 3

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

Subject: Look-up table under fmincon

From: Vincent Morio

Date: 14 Dec, 2008 12:44:02

Message: 3 of 3

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

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
nonlinear optim... Vincent MORIO 13 Dec, 2008 19:35:04
lookup tables Vincent MORIO 13 Dec, 2008 19:35:04
rssFeed for this Thread

Contact us at files@mathworks.com