On 4/8/2013 7:02 AM, mado wrote: > i want to ask about genetic algorithm , i am using it to tune pid > parameters but it gives different p, i d values in every running and > it?s not satisfying , need your help > i don't know is this problem of ga parameters or it's the objective > function
The genetic algorithm is stochastic, it often gives different results every time.
Allow me to suggest that you use patternsearch instead of ga as your solver. It is usually faster, more robust, and easier to tune. The only down side is you need to supply initial points. If you have finite upper and lower bounds, you can try
x0 = lb + rand(size(lb)).*(ub - lb);
Alan Weiss MATLAB mathematical toolbox documentation