How to implement a pso tunning for a function ?

Hi! I'm starting to study pso and still remained some details I don't get how they work. I know that pso is a stochastic and heuristic AI method and that simuletes a set of particles travelling in a number of dimensions to find the maximums or the minimums of a function. How could I tune a set of constants of a function using pso?
Let's suppose the function is :
V = A + B/x + C*x;
Where A, B and C are constants and x is a variable.
How could I tune A, B and C using pso (conceptually speaking)?

Réponses (1)

Alan Weiss
Alan Weiss le 30 Jan 2017

0 votes

Well, if you have Global Optimization Toolbox release 2014b or later, you can look at the documentation for examples and explanations of how the algorithm works.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

2 commentaires

Hi Alan Weiss! I already saw the documentation, but I believe that my doubt is conceptual. The documentation is pretty clear about the syntax code and how to code, but my problem is how should I interpret the expression to tune it?
I tried to implement using this code. But I clearly need some conceptual help.
g = @(V)-( 6.3223*V(4)^2 + 18*V(4) + 12.812 )/V(4);
PID = @(V)V(1) + V(2)/V(4) + V(3)*V(4);
input = @(V)heaviside(V(4));
H = @(V)PID(V)*g(V);
erro = @(V)input(V)/(H(V) + 1);
ITAE = @(V)integral(abs(erro(V))*V(4),0,inf);
nvar = 4;
rng default
options = optimoptions('particleswarm','SwarmSize',100,'MaxIterations',100);
lb = [0 0 0 -inf];
ub = [100 100 100 inf];
[x,fval] = particleswarm(ITAE, nvar,lb ,ub, options);

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by