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)?

回答 (1 件)

Alan Weiss
Alan Weiss 2017 年 1 月 30 日

0 投票

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 件のコメント

Daniel Caliari
Daniel Caliari 2017 年 1 月 31 日
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?
Daniel Caliari
Daniel Caliari 2017 年 1 月 31 日
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);

サインインしてコメントする。

カテゴリ

タグ

質問済み:

2017 年 1 月 29 日

コメント済み:

2017 年 1 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by