MATLAB: Fmincon Current Step Size

fminconoptimizationOptimization Toolbox

I'm pretty much confused with the behavior of fmincon function (interior point algorithm). I want to minimize some custom nonlinear function (.m file), with very simple linear limits – all the variables should be greater than or equal to zero (blo=zeros(…)). The function also provides correct gradients, so the optimization job should be easy.
More details about the system:
  • x is vector of about 400 elements, with initial values of magnitude 1e37
  • function value after the first iteration is about 150
  • partial derivatives returned by the function are pretty small (but correct!). dx(1)=-3e-36, dx(end)=+8e-11, while others are much smaller (negative, in magnitudes 1e-40 to 1e-47).
fmincon does just two iterations (two function executions), and successfully exits with the message:
"fmincon stopped because the size of the current step is less than the default value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance."
Obviously the curvature is not steep enough, so fmincon satisfies its criteria in just two iterations. But instead it should use significantly larger "current step size" to do the job appropriately. I've gave my best to find a way to force fmincon to use greater step, to play around with other parameters, to tweak it by multiplying derivatives with 1e50, but with no luck. It always finishes in few iterations with the function value of 150.
Funny thing is that I was able to write few lines iterative program and do the job "manually", and after about 1,000 iterations I've got function value of 0 (plus 1e-12).
How to make fmincon to actually find the minimum (optimum)?
Any help would be appreciated.
Thanks!

Best Answer

The only solution that worked for me was to provide user-defined Hessian function. Although it took me few weeks to calculate and code second derivatives, since the software will be used many times by many people - it was worthwhile. With correct Hessian function fmincon works like charm.
Btw. I believe that there is a room for improving fmincon algorithm when it comes to "step size". It was obvious in my case when it stalled at certain value. Although with each subsequent iteration the value of the objective function was constantly decreasing (without oscillations), the rate was way too slow. I suggest adding some logic that will increase step size when objective function constantly decreasing without oscillations.
Thanks