Nonlinear optimization by using MATLAB built in functions
2 views (last 30 days)
Show older comments
Hello everybody,
I have a question regarding the optimization algorithms. I have used some of them so far, in order to do some system identification. At the moment I am trying to use the optimizer to find the optimal inputs to system that I am simulating. Basically the output of the system responds to N input parameters, I have a target value for the output of my system and I define my error function as the difference between the output value obtained by the current combination of parameters at the current iteration. Basically after every new simulated point, I check the gradient of the new values, and I use those gradients to set the next step, basically a gradient descent optimization. Normally one could do this in MATLAB by using the optimizer built in functions, but they always request the knowledge of the function to optimize and the gradient...is there any way to use those functions without having the whole regression matrixes and vectors in advance? or do I need to develop myself those iterative solutions?
0 Comments
Accepted Answer
John D'Errico
on 1 Oct 2015
Edited: John D'Errico
on 1 Oct 2015
No. The tools in MATLAB absolutely do NOT require knowledge of the gradient!!!!!!
In general, the optimization tools in MATLAB require for the function nothing more sophisticated than a "black box", a function that you can pass parameters into and it returns an objective value.
As it is, you claim that you are computing the gradient anyway. So why would that be a problem? That you are using what is essentially steepest descent suggests that you would be far better off using a more intelligent tool.
Since I do not know what problem you are solving, nor how many parameters are involved in the estimation, I cannot suggest an optimizer. fminsearch is a simple choice, if you have no constraints, and up to roughly 6 or so parameters. Larger problems would normally go to one of the routines in the optimization toolbox. Or you can always look to the file exchange if you lack that toolbox.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!