TokenMonkey Posted July 18, 2009 Posted July 18, 2009 Hi, all! Google's turned up nothing relevant (except my post of the same thing on another non-SFN forum) to help me with this problem. I'm at a bit of a loss as to how to do the following elegantly—I've had some success with a slow, "nested" optimisation for what I'm trying to do, but I'm not happy with the results. I have a trajectory described by: [math]\frac{{dx}}{{d\tau}} = f(x,y,a,b,c)[/math] [math]\frac{{dy}}{{d\tau}} = g(x,y,a,b,c)[/math] where [math]a[/math], [math]b[/math], and [math]c[/math] are parameters. The functions [math]f[/math] and [math]g[/math] cannot be calculated analytically (iteration is required), but what happens internally is unimportant anyway, I think. If I select values for these parameters, I can plot a trajectory in the [math]x[/math]-[math]y[/math] space. What I'm trying to do is find out which combinations of parameters [math]a[/math], [math]b[/math], and [math]c[/math] will make the trajectory pass through two fixed points, say [math](x_1,y_1)[/math] and [math](x_2,y_2)[/math]. Of course, this will more than likely lead to many solutions to the problem, and I will choose a set of parameters that minimises another function, say [math]h(x_1,y_1,x_2,y_2,a,b,c)[/math]. Does anyone have any idea how I'd go about finding appropriate combinations of parameters? My weapon of choice is MATLAB, in case that happens to have built-in functions for what I need. Any help, or even just a pointer in the right direction, would be greatly appreciated. This must have been done before by someone somewhere; I just have no idea what the principle is called. Thanks! TokenMonkey
D H Posted July 18, 2009 Posted July 18, 2009 Matlab has an optimization toolbox. Some of the capabilities are also implemented in the plain old vanilla version of matlab. fminsearch might do the trick if you don't have the optimization toolbox. Optimization toolbox: http://www.mathworks.com/products/optimization/description6.html fminsearch: http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/fminsearch.html
TokenMonkey Posted July 18, 2009 Author Posted July 18, 2009 Thanks for the reply, D H. I've been using optimisation thus far (both the toolbox (patternsearch, specifically) and fminsearch), and it works OK, except that (a) that approach is slow, because it's a sort of "brute force" method where it calculates a trajectory at every iteration of the optimisation, but more importantly (b) it doesn't seem to find the global minimum, but a local one, so that the solution to which it converges is remarkably sensitive to the initial guess. I don't think I explained that very well, but suffice it to say that it's rather clumsy and I'm hoping for something more elegant than that, which will hopefully either be quicker so that I can try many initial guesses, or that it'll find the global optimum the first time round. I'll keep going with the optimisation route so long and see what I can do with it, but it just strikes me as odd that I can't find much (any!) info on this type of problem.
D H Posted July 18, 2009 Posted July 18, 2009 fminsearch is a local optimization method. Local optimization is a lot easier than global optimization. It remains the subject of a lot of research. There is no silver bullet. Do a google search. Look for optimization techniques.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now