MATLAB: Minimise two functions simultaneously

fgoalattainkineticsMATLABmultiple functionsOptimization Toolbox

Hello,
I have an ODE15s function with 4 simultaneous equations, there are a 7 chemical kinetic rate constants (K) to derive the time changes in four parameters. I am using three of these rate constants to minimise two of the equations simultaneously to two sets of data obtained from the same experiment.
I have tried fminsearch but this only allows the minimisation of one of the functions to one of the data sets based on the difference in the sum of squares error.
I am presently trying fgoalattain to try to get two minimum SSE from two functions against the data but I cannot see how to code it, the goals are presently the SSEs but I need it to change the K values so that the SSEs are minimised. I am also looking at gamultiobj but need to work out how fgoalattain works first and if it will do the job. I have the global optimisation toolbox.
Any help or advice.
Thanks, matt

Best Answer

It may be brute force. But, I first would try fmincon. fmincon is usually what I try first! You probably have limits for your constraints (K values, like they can't be less than zero). Your objective function would then be the difference between your calculated values to your experimental values. You can use whatever metric you want - but I would tend to use something like SSE, as well.
The syntax would be the following:
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub)
where x0 is your initial guess for you chemical rate constants. fun would be a function handle to a function that takes these constants and calculates the SSE for both your data sets. If you want any relationship between your constants, you can set those in A and b or Aeq or beq -- if not you can set them to []. lb and ub can be used to set minimum and maximum values for your rate constant parameters.
You can then use the multistart option and/or the globalsearch options in the Global Optimization toolbox to ensure that you did not find a local minimum.