Changing stepsize of fmincon algorithm applied to an undefined function

1 view (last 30 days)
Hi,
I need your help using the fmincon function at a specific application. I don't want to apply the fmincon algorithm to a defined function of the type f(x,y)=... but commit a special function that reads the output of a scope. Depending on the measured value of the scope, I then want to move a x-y-table to another position (x_new | y_new). At the end I want to find the position at which the highest value is measured. At the moment i am calling the fmincon function like this:
[x,fval,exitflag,output] = fmincon(@(position)myScopeFunction(position,handles,wait_time),[0,0],[],[],[],[],[-2,-2],[2,2]);
position is a vector that defines the x and y coordinate of the xy-table. The start position is 0|0 and I want to find the optimal position in an area that is bounded by
x = [-2,2] and y = [-2,2]
The "myScopeFunction" returns the measured value of the scope and configures the position of the xy-table depending on the input "position" that is defined by the fmincon algorithm.
The problem is, that i don't find any way to define the minimum stepsize that fmincon uses to change the xy position. I want the position to change in a range of 0.1-0.5 but fmincon causes position changes of something like 1e-6 and below.
Do you have any idea how i could solve this problem?
Thanks!

Answers (2)

Torsten
Torsten on 2 May 2017
If you use a position change of 0.1, e.g., and you use a double for-loop, you will need appr. 1700 calls to "myScopeFunction" to scan the complete area of interest. So no need to use "fmincon" for this task.
Best wishes
Torsten.
  1 Comment
Alan Weiss
Alan Weiss on 2 May 2017
I think that Torsten has an excellent idea. But, if you want to try to save some time, you could try patternsearch instead of fmincon, and set the MeshTolerance option to 0.05 or so. Requires a Global Optimization Toolbox license.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.


Walter Roberson
Walter Roberson on 2 May 2017
You want discrete optimization, but fmincon is for continuous optimization.

Community Treasure Hunt

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

Start Hunting!