I want to minimize a cost function for a differential-nonlinear system (dynamic). Is it possible to use this software? How can I do it?
Best regards, Haniye
I want to minimize a cost function for a differential-nonlinear system (dynamic). Is it possible to use this software? How can I do it?
Best regards, Haniye
In theory, you could do it in MATLAB. In practice, you probably can't, and shouldn't, because it would probably be prohibitively slow.
The two dominant approaches I'm aware of for dynamic optimization are:
In practice, neither of these approaches is likely to be viable in MATLAB; the former approach is a more realistic possibility than the latter.
The large-scale nonlinear programming solver IPOPT was essentially written to solve nonlinear programs arising from collocation, and a compiled language was used (first Fortran, then C++) because large-scale nonlinear programs are computationally demanding. IPOPT does have a MATLAB interface affiliated with it, so if you were to try this approach in MATLAB, you might be able to use the interface and solve your problem. It's not clear that the interface is maintained; for instance, documentation suggests that it has been tested in MATLAB 7.2 (R2006a) to 7.7 (R2008b), which means it hasn't been tested against a version of MATLAB released in the past 5 years. If this interface works, it is probably your only viable approach for using MATLAB to solve a dynamic optimization problem.
The rigorous approach (interval arithmetic, etc.) is already time-consuming, even if everything is implemented in C++. Problems with 10 or so state variables take an hour or two to complete, and the algorithm scales exponentially with the number of state variables. Although interval arithmetic and automatic differentiation packages exist for MATLAB, you would probably have to write all of the remaining solver infrastructure (I'm not aware of any libraries that implement this approach). The performance of MATLAB is usually one to three orders of magnitude slower, assuming that you're not relying heavily on compiled libraries, so solving your problem would likely take an unacceptably long time (and that's assuming your problem is small enough for this approach).