Problem with using the exp-function in the objective

33 views
Skip to first unread message

EricB

unread,
Dec 16, 2014, 11:09:00 AM12/16/14
to yal...@googlegroups.com

Hello Johan,

first I want to thank you for your great work on YALMIP.

I use YALMIP for my PhD-Thesis to solve following problem:

I implemented an MPC scheme with  a non-convex cost functional to solve a driver assistance system problem. Hence, my dynamic system is a simple vehicle model. Furthermore I have some simple bound constraints.

In my cost functional occurs a simplified Gaussian function (last part of objective)

objective = objective + 1*exp(3*(x{k}(3)-b_road/2)) + 1*exp(3*(-x{k}(3)-  b_road/2))+...

                   (-0.15*exp(-1.0*(0.75*(x{k}(3)-b_road/4))^2))+...

                    0.01*u{k}(1)*u{k}(1) + 0.0001*10*u{k}(2)*u{k}(2)+...

                    2*exp(-0.1*( x{k}(6)-distance)^2)*exp(-0.6*(0.75*(x{k}(3)-1.5))^2); .

 

If the variable “distance” is chosen higher than for example “100” and x(6) varies for example between 0 and 50,  IPOPT will be unstable but normally the influence of this term should be zero because the value of the Gaussian function is approximately zero.

When I delete the Gaussian function IPOPT delivers the expected optimal results. Normally the objective with the Gaussian function and the example values should deliver the same results.

 

Could you help me with this problem?

Eric

Johan Löfberg

unread,
Dec 16, 2014, 4:04:20 PM12/16/14
to yal...@googlegroups.com
Well, it is nonconvex so all bets are off.

You could

1. Solve convex problem, and the solve non-convex using that feasible solution as initial guess

2. Write exp(t) with f(x)<= t instead of exp(f(x)) (YALMIP write exp(f(x)) as exp(t), f(x)=t, when f(x) isn't convex PWA representable,  and that equality might causes issues for some solvers)
Reply all
Reply to author
Forward
0 new messages