Non convex objective funtion

Hi there,
I a have an objective function which in some areas is not convex.
Is there any way to relax it and then use fmin con ?
thanks!!
Here I have writen a piece of code to prove that second derivative for a particular temeprature T_ext is negative:
cell_capacity=45;
T_ext=25;
T=273.15+T_ext;
B2=-0.0067*T+2.35;
%% B1
a=8.89*10^-6;
b=-0.0053;
c=0.7871;
B1=a*T^2+b*T+c;
syms x
f=B1*exp(B2*x/cell_capacity)*(x^2/(2*0.8*cell_capacity));
p=diff(f);
q=diff(p);
ff = matlabFunction(q);
x=(0.1*cell_capacity):1:(0.9*cell_capacity);
figure(1)
title('Second derivative for different temperatures')
xlabel('Current (Ah)')
ylabel('second derivative')
plot(x, ff(x))
hold on
ff_final=ff(x)';

5 Comments

Which function would you "relax" ?
Can you express the restrictions as upper and lower bounds? As linear relationships such as 5*x-7 < 0 ? As linear equalities?
If you can express through bounds or linear inequalities or linear equalities, then MATLAB can avoid going outside the area (except possibly when it estimates the initial gradient.)
If you need nonlinear inequalities or nonlinear equalities, then MATLAB might go into an area and then check later to see whether the area was within bounds.
Thnks for the reply, I think fmincon was used only for convex objective funtions.
I have inewquality constaints for x, which are linear so I think it won't be a problem.
The original probllem is a bit more complex, as it will be a sum of the function presented above, each of them representing a battery discharging behaviour.
I have solved the problem using fmincon, the problem is is the solution the global minima?
I think for the areas that is not convex it migh be a problem, as the solution could be local minima right?
So, is it possible to know if it is a global one instead of local?
sorry for the confusion
You can never be sure of global minimality for non-convex , n-dimensional minimization. However, the Global Optimization Toolbox contains routines that can help reduce the changes of getting stuck at a local min.
You can never be sure of global minimality for non-convex , n-dimensional minimization.
... unless you can use calculus to find the complete set of critical points, and you can find all of the boundary points, and you can evaluate the function at all of the critical points and all of the boundary points and select the minima.
However, you need symbolic processing to find critical points once you get beyond fairly simple functions.
ok thanks,
that's why I was wondering if I could convert it to a convex function.
Anyway, I'll see what I can do thanks

Sign in to comment.

Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!